From cc63153e5159c3937c25312ea05dba4c697dc3a3 Mon Sep 17 00:00:00 2001 From: Nihal Bhatnagar Date: Fri, 18 Oct 2024 15:29:30 -0500 Subject: [PATCH 1/4] Initial tests cleanup and consolidation --- packages/e2e.generated.catchall/ontology.json | 210 ++++++++++++++++-- .../src/generatedNoCheck/index.ts | 6 +- .../src/generatedNoCheck/ontology/actions.ts | 5 +- .../ontology/actions/assignEmployee1.ts | 85 ------- .../actions/createObjectToContainerLink.ts | 73 ++++++ .../actions/createOsdkTestContainer.ts | 76 +++++++ .../ontology/actions/createOsdkTestObject.ts | 16 ++ .../actions/deleteOsdkTestContainer.ts | 64 ++++++ .../ontology/actions/editOsdkTestContainer.ts | 85 +++++++ .../src/generatedNoCheck/ontology/objects.ts | 1 + .../ontology/objects/OsdkTestContainer.ts | 102 +++++++++ .../ontology/objects/OsdkTestObject.ts | 41 +++- packages/e2e.sandbox.catchall/src/index.ts | 17 +- .../src/public/checkUnstableBulkLinks.ts | 13 +- .../src/runInterfacesTest.ts | 58 +++-- ...Test.ts => runLinkAssignmentActionTest.ts} | 56 +++-- .../src/runSubscriptionsTest.ts | 5 +- .../e2e.sandbox.catchall/src/typeChecks.ts | 10 +- 18 files changed, 747 insertions(+), 176 deletions(-) delete mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/assignEmployee1.ts create mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createObjectToContainerLink.ts create mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestContainer.ts create mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/deleteOsdkTestContainer.ts create mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/editOsdkTestContainer.ts create mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts rename packages/e2e.sandbox.catchall/src/{runAssignEmployeeToVentureTest.ts => runLinkAssignmentActionTest.ts} (51%) diff --git a/packages/e2e.generated.catchall/ontology.json b/packages/e2e.generated.catchall/ontology.json index cebab60ae..841944c15 100644 --- a/packages/e2e.generated.catchall/ontology.json +++ b/packages/e2e.generated.catchall/ontology.json @@ -6,11 +6,49 @@ "description": "" }, "actionTypes": { + "create-osdk-test-container": { + "apiName": "create-osdk-test-container", + "displayName": "Create Osdk Test Container", + "status": "EXPERIMENTAL", + "parameters": { + "name": { + "dataType": { + "type": "string" + }, + "required": true + }, + "time": { + "dataType": { + "type": "timestamp" + }, + "required": true + } + }, + "rid": "ri.actions.main.action-type.6d75b952-dd78-4560-b97f-8e344b9b04a7", + "operations": [ + { + "type": "createObject", + "objectTypeApiName": "OsdkTestContainer" + } + ] + }, "create-osdk-test-object": { "apiName": "create-osdk-test-object", "displayName": "Create Osdk Test Object", "status": "EXPERIMENTAL", "parameters": { + "description": { + "dataType": { + "type": "string" + }, + "required": true + }, + "osdk_object_name": { + "dataType": { + "type": "string" + }, + "required": true + }, "string_property": { "dataType": { "type": "string" @@ -26,6 +64,28 @@ } ] }, + "delete-osdk-test-container": { + "apiName": "delete-osdk-test-container", + "displayName": "Delete Osdk Test Container", + "status": "EXPERIMENTAL", + "parameters": { + "OsdkTestContainer": { + "dataType": { + "type": "object", + "objectApiName": "OsdkTestContainer", + "objectTypeApiName": "OsdkTestContainer" + }, + "required": true + } + }, + "rid": "ri.actions.main.action-type.ad5240f6-89d3-45b9-bff6-053c4267d387", + "operations": [ + { + "type": "deleteObject", + "objectTypeApiName": "OsdkTestContainer" + } + ] + }, "delete-osdk-test-object": { "apiName": "delete-osdk-test-object", "displayName": "Delete Osdk Test Object", @@ -48,6 +108,40 @@ } ] }, + "edit-osdk-test-container": { + "apiName": "edit-osdk-test-container", + "displayName": "Edit Osdk Test Container", + "status": "EXPERIMENTAL", + "parameters": { + "name": { + "dataType": { + "type": "string" + }, + "required": true + }, + "OsdkTestContainer": { + "dataType": { + "type": "object", + "objectApiName": "OsdkTestContainer", + "objectTypeApiName": "OsdkTestContainer" + }, + "required": true + }, + "time": { + "dataType": { + "type": "timestamp" + }, + "required": true + } + }, + "rid": "ri.actions.main.action-type.0e75ace8-fd61-4c64-b903-18ee19a878ed", + "operations": [ + { + "type": "modifyObject", + "objectTypeApiName": "OsdkTestContainer" + } + ] + }, "edit-osdk-test-object": { "apiName": "edit-osdk-test-object", "displayName": "Edit Osdk Test Object", @@ -157,43 +251,97 @@ } ] }, - "assign-employee-1": { - "apiName": "assign-employee-1", - "description": "Assigns an employee to a venture", + "create-object-to-container-link": { + "apiName": "create-object-to-container-link", + "displayName": "createObjectToContainerLink", + "status": "EXPERIMENTAL", "parameters": { - "employee-1": { + "osdkTestContainerLink": { "dataType": { "type": "object", - "objectApiName": "Employee", - "objectTypeApiName": "Employee" + "objectApiName": "OsdkTestContainer", + "objectTypeApiName": "OsdkTestContainer" }, "required": true }, - "venture-1": { + "osdkTestObjectLink": { "dataType": { "type": "object", - "objectApiName": "Venture", - "objectTypeApiName": "Venture" + "objectApiName": "OsdkTestObject", + "objectTypeApiName": "OsdkTestObject" }, "required": true } }, - "status": "ACTIVE", - "rid": "ri.a.b.c.d", + "rid": "ri.actions.main.action-type.aa92fca8-4ab5-4153-8e75-f4ec8fd9b733", "operations": [ { - "type": "modifyObject", - "objectTypeApiName": "Employee" + "type": "createLink", + "linkTypeApiNameAtoB": "osdkTestObjectLink", + "linkTypeApiNameBtoA": "osdkTestContainerLink", + "aSideObjectTypeApiName": "OsdkTestContainer", + "bSideObjectTypeApiName": "OsdkTestObject" } ] } }, "objectTypes": { + "OsdkTestContainer": { + "objectType": { + "apiName": "OsdkTestContainer", + "displayName": "Osdk Test Container", + "status": "ACTIVE", + "description": "", + "pluralDisplayName": "Osdk Test Containers", + "icon": { + "type": "blueprint", + "color": "#4C90F0", + "name": "cube" + }, + "primaryKey": "id", + "properties": { + "id": { + "displayName": "id", + "dataType": { + "type": "string" + } + }, + "name": { + "displayName": "name", + "dataType": { + "type": "string" + } + }, + "time": { + "displayName": "time", + "dataType": { + "type": "timestamp" + } + } + }, + "rid": "ri.ontology.main.object-type.f755237b-d1da-4c42-933f-23641662d818", + "titleProperty": "id", + "visibility": "NORMAL" + }, + "linkTypes": [ + { + "apiName": "osdkTestObjectLink", + "displayName": "Osdk Test Object", + "status": "EXPERIMENTAL", + "objectTypeApiName": "OsdkTestObject", + "cardinality": "MANY", + "linkTypeRid": "ri.ontology.main.relation.10740f03-3e22-4f19-9712-a6269b53a930" + } + ], + "implementsInterfaces": [], + "implementsInterfaces2": {}, + "sharedPropertyTypeMapping": {} + }, "OsdkTestObject": { "objectType": { "apiName": "OsdkTestObject", "displayName": "Osdk Test Object", - "status": "EXPERIMENTAL", + "status": "ACTIVE", "description": "", "pluralDisplayName": "Osdk Test Objects", "icon": { @@ -203,6 +351,18 @@ }, "primaryKey": "primaryKey_", "properties": { + "description": { + "displayName": "Description", + "dataType": { + "type": "string" + } + }, + "osdkObjectName": { + "displayName": "osdkObjectName", + "dataType": { + "type": "string" + } + }, "primaryKey_": { "displayName": "Primary Key", "dataType": { @@ -220,9 +380,25 @@ "titleProperty": "primaryKey_", "visibility": "NORMAL" }, - "linkTypes": [], - "implementsInterfaces": [], - "implementsInterfaces2": {}, + "linkTypes": [ + { + "apiName": "osdkTestContainerLink", + "displayName": "Osdk Test Container", + "status": "EXPERIMENTAL", + "objectTypeApiName": "OsdkTestContainer", + "cardinality": "MANY", + "linkTypeRid": "ri.ontology.main.relation.10740f03-3e22-4f19-9712-a6269b53a930" + } + ], + "implementsInterfaces": ["FooInterface"], + "implementsInterfaces2": { + "FooInterface": { + "properties": { + "name": "osdkObjectName", + "description": "description" + } + } + }, "sharedPropertyTypeMapping": {} }, "WeatherStation": { diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts index eefd003b7..bf66cf34c 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts @@ -1,9 +1,12 @@ export { actionTakesAllParameterTypes, - assignEmployee1, + createObjectToContainerLink, + createOsdkTestContainer, createOsdkTestObject, createTodo, + deleteOsdkTestContainer, deleteOsdkTestObject, + editOsdkTestContainer, editOsdkTestObject, } from './ontology/actions.js'; export * as $Actions from './ontology/actions.js'; @@ -18,6 +21,7 @@ export { GtfsTripTrackObject, MtaBus, ObjectTypeWithAllPropertyTypes, + OsdkTestContainer, OsdkTestObject, Person, RhemmingsObjectWithGtsrProperty2, diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts index 9d99db75b..d99091ae0 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts @@ -1,6 +1,9 @@ export { actionTakesAllParameterTypes } from './actions/actionTakesAllParameterTypes.js'; -export { assignEmployee1 } from './actions/assignEmployee1.js'; +export { createObjectToContainerLink } from './actions/createObjectToContainerLink.js'; +export { createOsdkTestContainer } from './actions/createOsdkTestContainer.js'; export { createOsdkTestObject } from './actions/createOsdkTestObject.js'; export { createTodo } from './actions/createTodo.js'; +export { deleteOsdkTestContainer } from './actions/deleteOsdkTestContainer.js'; export { deleteOsdkTestObject } from './actions/deleteOsdkTestObject.js'; +export { editOsdkTestContainer } from './actions/editOsdkTestContainer.js'; export { editOsdkTestObject } from './actions/editOsdkTestObject.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/assignEmployee1.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/assignEmployee1.ts deleted file mode 100644 index e67c6b511..000000000 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/assignEmployee1.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { - ActionDefinition, - ActionMetadata, - ActionParam, - ActionReturnTypeForOptions, - ApplyActionOptions, - ApplyBatchActionOptions, -} from '@osdk/api'; -import { $osdkMetadata } from '../../OntologyMetadata.js'; -import type { Employee } from '../objects/Employee.js'; -import type { Venture } from '../objects/Venture.js'; - -export namespace assignEmployee1 { - // Represents the definition of the parameters for the action - export type ParamsDefinition = { - 'employee-1': { - multiplicity: false; - nullable: false; - type: ActionMetadata.DataType.Object; - }; - 'venture-1': { - multiplicity: false; - nullable: false; - type: ActionMetadata.DataType.Object; - }; - }; - - /** - * Assigns an employee to a venture - */ - export interface Params { - readonly 'employee-1': ActionParam.ObjectType; - - readonly 'venture-1': ActionParam.ObjectType; - } - - // Represents a fqn of the action - export interface Signatures { - /** - * Assigns an employee to a venture - */ - applyAction

( - args: P, - options?: OP, - ): Promise>; - - batchApplyAction

, OP extends ApplyBatchActionOptions>( - args: P, - options?: OP, - ): Promise>; - } -} - -/** - * Assigns an employee to a venture - * @param {ActionParam.ObjectType} employee-1 - * @param {ActionParam.ObjectType} venture-1 - */ -export interface assignEmployee1 extends ActionDefinition { - __DefinitionMetadata?: { - apiName: 'assignEmployee1'; - description: 'Assigns an employee to a venture'; - modifiedEntities: { - Employee: { - created: false; - modified: true; - }; - }; - parameters: assignEmployee1.ParamsDefinition; - rid: 'ri.a.b.c.d'; - status: 'ACTIVE'; - type: 'action'; - - signatures: assignEmployee1.Signatures; - }; - apiName: 'assignEmployee1'; - type: 'action'; - osdkMetadata: typeof $osdkMetadata; -} - -export const assignEmployee1: assignEmployee1 = { - apiName: 'assignEmployee1', - type: 'action', - osdkMetadata: $osdkMetadata, -}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createObjectToContainerLink.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createObjectToContainerLink.ts new file mode 100644 index 000000000..2f5f3d106 --- /dev/null +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createObjectToContainerLink.ts @@ -0,0 +1,73 @@ +import type { + ActionDefinition, + ActionMetadata, + ActionParam, + ActionReturnTypeForOptions, + ApplyActionOptions, + ApplyBatchActionOptions, +} from '@osdk/api'; +import { $osdkMetadata } from '../../OntologyMetadata.js'; +import type { OsdkTestContainer } from '../objects/OsdkTestContainer.js'; +import type { OsdkTestObject } from '../objects/OsdkTestObject.js'; + +export namespace createObjectToContainerLink { + // Represents the definition of the parameters for the action + export type ParamsDefinition = { + osdkTestContainerLink: { + multiplicity: false; + nullable: false; + type: ActionMetadata.DataType.Object; + }; + osdkTestObjectLink: { + multiplicity: false; + nullable: false; + type: ActionMetadata.DataType.Object; + }; + }; + + export interface Params { + readonly osdkTestContainerLink: ActionParam.ObjectType; + + readonly osdkTestObjectLink: ActionParam.ObjectType; + } + + // Represents a fqn of the action + export interface Signatures { + applyAction

( + args: P, + options?: OP, + ): Promise>; + + batchApplyAction

, OP extends ApplyBatchActionOptions>( + args: P, + options?: OP, + ): Promise>; + } +} + +/** + * @param {ActionParam.ObjectType} osdkTestContainerLink + * @param {ActionParam.ObjectType} osdkTestObjectLink + */ +export interface createObjectToContainerLink extends ActionDefinition { + __DefinitionMetadata?: { + apiName: 'createObjectToContainerLink'; + displayName: 'createObjectToContainerLink'; + modifiedEntities: {}; + parameters: createObjectToContainerLink.ParamsDefinition; + rid: 'ri.actions.main.action-type.aa92fca8-4ab5-4153-8e75-f4ec8fd9b733'; + status: 'EXPERIMENTAL'; + type: 'action'; + + signatures: createObjectToContainerLink.Signatures; + }; + apiName: 'createObjectToContainerLink'; + type: 'action'; + osdkMetadata: typeof $osdkMetadata; +} + +export const createObjectToContainerLink: createObjectToContainerLink = { + apiName: 'createObjectToContainerLink', + type: 'action', + osdkMetadata: $osdkMetadata, +}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestContainer.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestContainer.ts new file mode 100644 index 000000000..5f6c170fe --- /dev/null +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestContainer.ts @@ -0,0 +1,76 @@ +import type { + ActionDefinition, + ActionMetadata, + ActionParam, + ActionReturnTypeForOptions, + ApplyActionOptions, + ApplyBatchActionOptions, +} from '@osdk/api'; +import { $osdkMetadata } from '../../OntologyMetadata.js'; + +export namespace createOsdkTestContainer { + // Represents the definition of the parameters for the action + export type ParamsDefinition = { + name: { + multiplicity: false; + nullable: false; + type: 'string'; + }; + time: { + multiplicity: false; + nullable: false; + type: 'timestamp'; + }; + }; + + export interface Params { + readonly name: ActionParam.PrimitiveType<'string'>; + + readonly time: ActionParam.PrimitiveType<'timestamp'>; + } + + // Represents a fqn of the action + export interface Signatures { + applyAction

( + args: P, + options?: OP, + ): Promise>; + + batchApplyAction

, OP extends ApplyBatchActionOptions>( + args: P, + options?: OP, + ): Promise>; + } +} + +/** + * @param {ActionParam.PrimitiveType<"string">} name + * @param {ActionParam.PrimitiveType<"timestamp">} time + */ +export interface createOsdkTestContainer extends ActionDefinition { + __DefinitionMetadata?: { + apiName: 'createOsdkTestContainer'; + displayName: 'Create Osdk Test Container'; + modifiedEntities: { + OsdkTestContainer: { + created: true; + modified: false; + }; + }; + parameters: createOsdkTestContainer.ParamsDefinition; + rid: 'ri.actions.main.action-type.6d75b952-dd78-4560-b97f-8e344b9b04a7'; + status: 'EXPERIMENTAL'; + type: 'action'; + + signatures: createOsdkTestContainer.Signatures; + }; + apiName: 'createOsdkTestContainer'; + type: 'action'; + osdkMetadata: typeof $osdkMetadata; +} + +export const createOsdkTestContainer: createOsdkTestContainer = { + apiName: 'createOsdkTestContainer', + type: 'action', + osdkMetadata: $osdkMetadata, +}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestObject.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestObject.ts index 6226b6eb3..69995ed52 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestObject.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createOsdkTestObject.ts @@ -11,6 +11,16 @@ import { $osdkMetadata } from '../../OntologyMetadata.js'; export namespace createOsdkTestObject { // Represents the definition of the parameters for the action export type ParamsDefinition = { + description: { + multiplicity: false; + nullable: false; + type: 'string'; + }; + osdk_object_name: { + multiplicity: false; + nullable: false; + type: 'string'; + }; string_property: { multiplicity: false; nullable: false; @@ -19,6 +29,10 @@ export namespace createOsdkTestObject { }; export interface Params { + readonly description: ActionParam.PrimitiveType<'string'>; + + readonly osdk_object_name: ActionParam.PrimitiveType<'string'>; + readonly string_property: ActionParam.PrimitiveType<'string'>; } @@ -37,6 +51,8 @@ export namespace createOsdkTestObject { } /** + * @param {ActionParam.PrimitiveType<"string">} description + * @param {ActionParam.PrimitiveType<"string">} osdk_object_name * @param {ActionParam.PrimitiveType<"string">} string_property */ export interface createOsdkTestObject extends ActionDefinition { diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/deleteOsdkTestContainer.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/deleteOsdkTestContainer.ts new file mode 100644 index 000000000..9f2342cd1 --- /dev/null +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/deleteOsdkTestContainer.ts @@ -0,0 +1,64 @@ +import type { + ActionDefinition, + ActionMetadata, + ActionParam, + ActionReturnTypeForOptions, + ApplyActionOptions, + ApplyBatchActionOptions, +} from '@osdk/api'; +import { $osdkMetadata } from '../../OntologyMetadata.js'; +import type { OsdkTestContainer } from '../objects/OsdkTestContainer.js'; + +export namespace deleteOsdkTestContainer { + // Represents the definition of the parameters for the action + export type ParamsDefinition = { + OsdkTestContainer: { + multiplicity: false; + nullable: false; + type: ActionMetadata.DataType.Object; + }; + }; + + export interface Params { + readonly OsdkTestContainer: ActionParam.ObjectType; + } + + // Represents a fqn of the action + export interface Signatures { + applyAction

( + args: P, + options?: OP, + ): Promise>; + + batchApplyAction

, OP extends ApplyBatchActionOptions>( + args: P, + options?: OP, + ): Promise>; + } +} + +/** + * @param {ActionParam.ObjectType} OsdkTestContainer + */ +export interface deleteOsdkTestContainer extends ActionDefinition { + __DefinitionMetadata?: { + apiName: 'deleteOsdkTestContainer'; + displayName: 'Delete Osdk Test Container'; + modifiedEntities: {}; + parameters: deleteOsdkTestContainer.ParamsDefinition; + rid: 'ri.actions.main.action-type.ad5240f6-89d3-45b9-bff6-053c4267d387'; + status: 'EXPERIMENTAL'; + type: 'action'; + + signatures: deleteOsdkTestContainer.Signatures; + }; + apiName: 'deleteOsdkTestContainer'; + type: 'action'; + osdkMetadata: typeof $osdkMetadata; +} + +export const deleteOsdkTestContainer: deleteOsdkTestContainer = { + apiName: 'deleteOsdkTestContainer', + type: 'action', + osdkMetadata: $osdkMetadata, +}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/editOsdkTestContainer.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/editOsdkTestContainer.ts new file mode 100644 index 000000000..4282e5671 --- /dev/null +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/editOsdkTestContainer.ts @@ -0,0 +1,85 @@ +import type { + ActionDefinition, + ActionMetadata, + ActionParam, + ActionReturnTypeForOptions, + ApplyActionOptions, + ApplyBatchActionOptions, +} from '@osdk/api'; +import { $osdkMetadata } from '../../OntologyMetadata.js'; +import type { OsdkTestContainer } from '../objects/OsdkTestContainer.js'; + +export namespace editOsdkTestContainer { + // Represents the definition of the parameters for the action + export type ParamsDefinition = { + name: { + multiplicity: false; + nullable: false; + type: 'string'; + }; + OsdkTestContainer: { + multiplicity: false; + nullable: false; + type: ActionMetadata.DataType.Object; + }; + time: { + multiplicity: false; + nullable: false; + type: 'timestamp'; + }; + }; + + export interface Params { + readonly name: ActionParam.PrimitiveType<'string'>; + + readonly OsdkTestContainer: ActionParam.ObjectType; + + readonly time: ActionParam.PrimitiveType<'timestamp'>; + } + + // Represents a fqn of the action + export interface Signatures { + applyAction

( + args: P, + options?: OP, + ): Promise>; + + batchApplyAction

, OP extends ApplyBatchActionOptions>( + args: P, + options?: OP, + ): Promise>; + } +} + +/** + * @param {ActionParam.PrimitiveType<"string">} name + * @param {ActionParam.ObjectType} OsdkTestContainer + * @param {ActionParam.PrimitiveType<"timestamp">} time + */ +export interface editOsdkTestContainer extends ActionDefinition { + __DefinitionMetadata?: { + apiName: 'editOsdkTestContainer'; + displayName: 'Edit Osdk Test Container'; + modifiedEntities: { + OsdkTestContainer: { + created: false; + modified: true; + }; + }; + parameters: editOsdkTestContainer.ParamsDefinition; + rid: 'ri.actions.main.action-type.0e75ace8-fd61-4c64-b903-18ee19a878ed'; + status: 'EXPERIMENTAL'; + type: 'action'; + + signatures: editOsdkTestContainer.Signatures; + }; + apiName: 'editOsdkTestContainer'; + type: 'action'; + osdkMetadata: typeof $osdkMetadata; +} + +export const editOsdkTestContainer: editOsdkTestContainer = { + apiName: 'editOsdkTestContainer', + type: 'action', + osdkMetadata: $osdkMetadata, +}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts index f286c1b92..5df2004f6 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts @@ -6,6 +6,7 @@ export { FintrafficAis } from './objects/FintrafficAis.js'; export { GtfsTripTrackObject } from './objects/GtfsTripTrackObject.js'; export { MtaBus } from './objects/MtaBus.js'; export { ObjectTypeWithAllPropertyTypes } from './objects/ObjectTypeWithAllPropertyTypes.js'; +export { OsdkTestContainer } from './objects/OsdkTestContainer.js'; export { OsdkTestObject } from './objects/OsdkTestObject.js'; export { Person } from './objects/Person.js'; export { RhemmingsObjectWithGtsrProperty2 } from './objects/RhemmingsObjectWithGtsrProperty2.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts new file mode 100644 index 000000000..992f6371c --- /dev/null +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts @@ -0,0 +1,102 @@ +import type { PropertyDef as $PropertyDef } from '@osdk/api'; +import { $osdkMetadata } from '../../OntologyMetadata.js'; +import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; +import type { OsdkTestObject } from './OsdkTestObject.js'; +import type { + PropertyKeys as $PropertyKeys, + ObjectTypeDefinition as $ObjectTypeDefinition, + ObjectMetadata as $ObjectMetadata, +} from '@osdk/api'; +import type { + ObjectSet as $ObjectSet, + Osdk as $Osdk, + OsdkObject as $OsdkObject, + PropertyValueWireToClient as $PropType, + SingleLinkAccessor as $SingleLinkAccessor, +} from '@osdk/api'; + +export namespace OsdkTestContainer { + export type PropertyKeys = 'id' | 'name' | 'time'; + + export interface Links { + readonly osdkTestObjectLink: OsdkTestObject.ObjectSet; + } + + export interface Props { + readonly id: $PropType['string'] | undefined; + readonly name: $PropType['string'] | undefined; + readonly time: $PropType['timestamp'] | undefined; + } + export interface StrictProps { + readonly id: $PropType['string']; + readonly name: $PropType['string'] | undefined; + readonly time: $PropType['timestamp'] | undefined; + } + + export interface ObjectSet extends $ObjectSet {} + + export type OsdkInstance< + OPTIONS extends never | '$notStrict' | '$rid' = never, + K extends keyof OsdkTestContainer.Props = keyof OsdkTestContainer.Props, + > = $Osdk.Instance; + + /** @deprecated use OsdkInstance */ + export type OsdkObject< + OPTIONS extends never | '$notStrict' | '$rid' = never, + K extends keyof OsdkTestContainer.Props = keyof OsdkTestContainer.Props, + > = OsdkInstance; +} + +export interface OsdkTestContainer extends $ObjectTypeDefinition { + osdkMetadata: typeof $osdkMetadata; + type: 'object'; + apiName: 'OsdkTestContainer'; + __DefinitionMetadata?: { + objectSet: OsdkTestContainer.ObjectSet; + props: OsdkTestContainer.Props; + linksType: OsdkTestContainer.Links; + strictProps: OsdkTestContainer.StrictProps; + apiName: 'OsdkTestContainer'; + description: ''; + displayName: 'Osdk Test Container'; + icon: { + type: 'blueprint'; + color: '#4C90F0'; + name: 'cube'; + }; + implements: []; + interfaceMap: {}; + inverseInterfaceMap: {}; + links: { + osdkTestObjectLink: $ObjectMetadata.Link; + }; + pluralDisplayName: 'Osdk Test Containers'; + primaryKeyApiName: 'id'; + primaryKeyType: 'string'; + properties: { + /** + * (no ontology metadata) + */ + id: $PropertyDef<'string', 'non-nullable', 'single'>; + /** + * (no ontology metadata) + */ + name: $PropertyDef<'string', 'nullable', 'single'>; + /** + * (no ontology metadata) + */ + time: $PropertyDef<'timestamp', 'nullable', 'single'>; + }; + rid: 'ri.ontology.main.object-type.f755237b-d1da-4c42-933f-23641662d818'; + status: 'ACTIVE'; + titleProperty: 'id'; + type: 'object'; + visibility: 'NORMAL'; + }; +} + +export const OsdkTestContainer: OsdkTestContainer = { + type: 'object', + apiName: 'OsdkTestContainer', + osdkMetadata: $osdkMetadata, +}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts index 52124774d..62d477ca3 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts @@ -1,6 +1,7 @@ import type { PropertyDef as $PropertyDef } from '@osdk/api'; import { $osdkMetadata } from '../../OntologyMetadata.js'; import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; +import type { OsdkTestContainer } from './OsdkTestContainer.js'; import type { PropertyKeys as $PropertyKeys, ObjectTypeDefinition as $ObjectTypeDefinition, @@ -15,15 +16,21 @@ import type { } from '@osdk/api'; export namespace OsdkTestObject { - export type PropertyKeys = 'primaryKey_' | 'stringProperty'; + export type PropertyKeys = 'description' | 'osdkObjectName' | 'primaryKey_' | 'stringProperty'; - export type Links = {}; + export interface Links { + readonly osdkTestContainerLink: OsdkTestContainer.ObjectSet; + } export interface Props { + readonly description: $PropType['string'] | undefined; + readonly osdkObjectName: $PropType['string'] | undefined; readonly primaryKey_: $PropType['string'] | undefined; readonly stringProperty: $PropType['string'] | undefined; } export interface StrictProps { + readonly description: $PropType['string'] | undefined; + readonly osdkObjectName: $PropType['string'] | undefined; readonly primaryKey_: $PropType['string']; readonly stringProperty: $PropType['string'] | undefined; } @@ -59,14 +66,34 @@ export interface OsdkTestObject extends $ObjectTypeDefinition { color: '#4C90F0'; name: 'cube'; }; - implements: []; - interfaceMap: {}; - inverseInterfaceMap: {}; - links: {}; + implements: ['FooInterface']; + interfaceMap: { + FooInterface: { + name: 'osdkObjectName'; + description: 'description'; + }; + }; + inverseInterfaceMap: { + FooInterface: { + osdkObjectName: 'name'; + description: 'description'; + }; + }; + links: { + osdkTestContainerLink: $ObjectMetadata.Link; + }; pluralDisplayName: 'Osdk Test Objects'; primaryKeyApiName: 'primaryKey_'; primaryKeyType: 'string'; properties: { + /** + * display name: 'Description' + */ + description: $PropertyDef<'string', 'nullable', 'single'>; + /** + * (no ontology metadata) + */ + osdkObjectName: $PropertyDef<'string', 'nullable', 'single'>; /** * display name: 'Primary Key' */ @@ -77,7 +104,7 @@ export interface OsdkTestObject extends $ObjectTypeDefinition { stringProperty: $PropertyDef<'string', 'nullable', 'single'>; }; rid: 'ri.ontology.main.object-type.ba4a949c-547a-45de-9c78-b772bb55acfb'; - status: 'EXPERIMENTAL'; + status: 'ACTIVE'; titleProperty: 'primaryKey_'; type: 'object'; visibility: 'NORMAL'; diff --git a/packages/e2e.sandbox.catchall/src/index.ts b/packages/e2e.sandbox.catchall/src/index.ts index 447b1f278..b2ffb05a0 100644 --- a/packages/e2e.sandbox.catchall/src/index.ts +++ b/packages/e2e.sandbox.catchall/src/index.ts @@ -18,17 +18,18 @@ import { client } from "./client.js"; import { checkUnstableBulkLinks } from "./public/checkUnstableBulkLinks.js"; import { runAggregationGroupByDatesTest } from "./runAggregationGroupByDatesTest.js"; import { runAggregationsTest } from "./runAggregationsTest.js"; -import { runAssignEmployeeToVentureTest } from "./runAssignEmployeeToVentureTest.js"; import { runFoundrySdkClientVerificationTest } from "./runFoundrySdkClientVerificationTest.js"; import { runGeoQueriesTest } from "./runGeoQueriesTest.js"; import { runGeotimeSeriesReferenceTests } from "./runGeotimeSeriesTest.js"; import { runInterfacesTest } from "./runInterfacesTest.js"; import { runLegacyExamples } from "./runLegacyExamples.js"; +import { runLinkAssignmentActionTest } from "./runLinkAssignmentActionTest.js"; import { runQueriesTest } from "./runQueriesTest.js"; import { runSubscriptionsTest } from "./runSubscriptionsTest.js"; import { runTimeseriesTest } from "./runTimeseriesTest.js"; import { typeChecks } from "./typeChecks.js"; +// Legacy tests currently fail due to missing backend types const runOld = false; const testSubscriptions = false; @@ -46,20 +47,22 @@ async function runTests() { return; } - const datasetRid = - "ri.foundry.main.dataset.58070dbb-dd3b-4c82-b012-9c2f8a13dd83"; - await runFoundrySdkClientVerificationTest(datasetRid); + // Test is currently failing - await runInterfacesTest(); + // const datasetRid = + // "ri.foundry.main.dataset.58070dbb-dd3b-4c82-b012-9c2f8a13dd83"; + // await runFoundrySdkClientVerificationTest(datasetRid); + await runInterfacesTest(); // only works in default ontology await runGeoQueriesTest(); - await runAssignEmployeeToVentureTest(); + await runLinkAssignmentActionTest(); await runAggregationsTest(); - await runAggregationGroupByDatesTest(); + // Test is currently failing + // await runAggregationGroupByDatesTest(); await runQueriesTest(); diff --git a/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts b/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts index c901332fd..9a9c786b0 100644 --- a/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts +++ b/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts @@ -15,7 +15,11 @@ */ import { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "@osdk/api/unstable"; -import { Employee, WeatherStation } from "@osdk/e2e.generated.catchall"; +import { + Employee, + OsdkTestObject, + WeatherStation, +} from "@osdk/e2e.generated.catchall"; import { client } from "../client.js"; import { logger } from "../logger.js"; @@ -40,7 +44,7 @@ export async function checkUnstableBulkLinks() { ); } - const { data: employees } = await client(Employee).fetchPage({ + const { data: objects } = await client(OsdkTestObject).fetchPage({ $pageSize: 100, }); @@ -53,9 +57,8 @@ export async function checkUnstableBulkLinks() { linkApiName, otherObjectApiName, otherObjectPk, - } of client[__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks](employees, [ - "ventures", - "amishsSyncGroup", + } of client[__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks](objects, [ + "osdkTestContainerLink", ]) ) { logger.info( diff --git a/packages/e2e.sandbox.catchall/src/runInterfacesTest.ts b/packages/e2e.sandbox.catchall/src/runInterfacesTest.ts index 29205a177..feec3f9bf 100644 --- a/packages/e2e.sandbox.catchall/src/runInterfacesTest.ts +++ b/packages/e2e.sandbox.catchall/src/runInterfacesTest.ts @@ -15,7 +15,11 @@ */ import type { Osdk } from "@osdk/api"; -import { Employee, FooInterface } from "@osdk/e2e.generated.catchall"; +import { + createOsdkTestObject, + FooInterface, + OsdkTestObject, +} from "@osdk/e2e.generated.catchall"; import invariant from "tiny-invariant"; import type { TypeOf } from "ts-expect"; import { expectType } from "ts-expect"; @@ -26,43 +30,53 @@ export async function runInterfacesTest() { (async () => { const { data } = await client(FooInterface).fetchPage(); const first = data[0]; - const e = first.$as(Employee); + const e = first.$as(OsdkTestObject); })(); - const qqq = await client(FooInterface).where({ name: { $ne: "Patti" } }); - - const fooLimitedToEmployees = await client(FooInterface).fetchPage({ - $__EXPERIMENTAL_selectedObjectTypes: ["Employee"], + const fooLimitedToSpecificObject = await client(FooInterface).fetchPage({ + $__EXPERIMENTAL_selectedObjectTypes: ["OsdkTestObject"], }); - invariant(fooLimitedToEmployees.data.length > 0); + invariant(fooLimitedToSpecificObject.data.length > 0); const fooLimitedToOther = await client(FooInterface).fetchPage({ $__EXPERIMENTAL_selectedObjectTypes: ["Other"], }); invariant(fooLimitedToOther.data.length === 0); + await client(createOsdkTestObject).applyAction({ + "string_property": "InterfaceTest", + "osdk_object_name": "InterfaceTest", + "description": "InterfaceTest", + }); + const r = await client(FooInterface) - .where({ name: { $ne: "Patti" } }) - .where({ name: { $ne: "Roth" } }) .fetchPage({ $pageSize: 1, $select: ["name"] }); // const q = client(FooInterface) // .where({ name: { $ne: "Patti" } }); // expectType>>(true); for (const int of r.data) { - console.log("int:", int.name, int); + console.log("int:", int.name, JSON.stringify(int)); invariant(int.name); invariant(!(int as any).firstName); - const employee = int.$as(Employee); - expectType, typeof employee>>(false); - expectType, typeof employee>>(true); + const object1 = int.$as(OsdkTestObject); + expectType, typeof object1>>( + false, + ); + expectType< + TypeOf, typeof object1> + >(true); - console.log("employee:", employee.firstName, employee); - invariant(employee.firstName); - invariant(!(employee as any).name); + console.log( + "osdkObject:", + object1.osdkObjectName, + JSON.stringify(object1), + ); + invariant(object1.osdkObjectName); + invariant(!(object1 as any).name); - const int2 = employee.$as(FooInterface); + const int2 = object1.$as(FooInterface); expectType, typeof int2>>(false); expectType, typeof int2>>(true); @@ -70,12 +84,12 @@ export async function runInterfacesTest() { invariant(int2.name); invariant(!(int as any).firstName); - const employee2 = int2.$as(Employee); - console.log("employee2:", employee2.firstName, employee2); - invariant(employee2.firstName); - invariant(!(employee2 as any).name); + const object2 = int2.$as(OsdkTestObject); + console.log("osdkObject2:", object2.osdkObjectName, object2); + invariant(object2.osdkObjectName); + invariant(!(object2 as any).name); // underlyings are ref equal! - console.log("employee === employee2", employee === employee2); + console.log("osdkObject1 === osdkObject2", object1 === object2); } } diff --git a/packages/e2e.sandbox.catchall/src/runAssignEmployeeToVentureTest.ts b/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts similarity index 51% rename from packages/e2e.sandbox.catchall/src/runAssignEmployeeToVentureTest.ts rename to packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts index 4d6d61f40..6cda0d61f 100644 --- a/packages/e2e.sandbox.catchall/src/runAssignEmployeeToVentureTest.ts +++ b/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts @@ -16,54 +16,62 @@ import type { Client } from "@osdk/client"; import { - assignEmployee1, - Employee, + createObjectToContainerLink, + createOsdkTestContainer, + OsdkTestContainer, + OsdkTestObject, Person, - Venture, } from "@osdk/e2e.generated.catchall"; +import { time } from "console"; import { client as unstableClient } from "./client.js"; const client: Client = unstableClient; -export async function runAssignEmployeeToVentureTest() { +export async function runLinkAssignmentActionTest() { let didValidateOnce = false; - const e = await client(Employee).fetchOneWithErrors("hi", { + const e = await client(OsdkTestObject).fetchOneWithErrors("hi", { // $select: ["adUsername"], - $select: ["adUsername"], + $select: ["osdkObjectName"], }); - for await (const emp of client(Employee).asyncIter()) { - emp.id; - console.log(`Employee: ${emp.id}`); + for await (const obj of client(OsdkTestObject).asyncIter()) { + console.log(`Name: ${obj.osdkObjectName}`); - let foundVentures = false; - for await (const venture of emp.$link.ventures.asyncIter()) { - foundVentures = true; - console.log(` - Venture: ${venture.ventureId} ${venture.ventureName}`); + let foundContainer = false; + for await (const container of obj.$link.osdkTestContainerLink.asyncIter()) { + foundContainer = true; + console.log(` - Venture: ${container.id} ${container.name}`); } - if (!foundVentures) { - console.log(" - No ventures. "); + if (!foundContainer) { + console.log(" - No container for object. "); if (!didValidateOnce) { console.log(" - Validating assignEmployee1"); didValidateOnce = true; - const { data: [venture] } = await client(Venture).fetchPage(); - - const r = await client(assignEmployee1).applyAction({ - "employee-1": emp.id, - "venture-1": venture.ventureId, + const time = new Date().toISOString(); + client(createOsdkTestContainer).applyAction({ + "name": "assignEmployee1", + time, + }); + const { data: [container] } = await client(OsdkTestContainer) + .fetchPage(); + const r = await client(createObjectToContainerLink).applyAction({ + "osdkTestObjectLink": obj.primaryKey_, + "osdkTestContainerLink": container.id, }, { $validateOnly: true, }); if (false) { - const r = await client(assignEmployee1).batchApplyAction([{ - "employee-1": emp.id, - "venture-1": venture.ventureId, - }], { + const r = await client(createObjectToContainerLink).batchApplyAction([ + { + "osdkTestObjectLink": obj.primaryKey_, + "osdkTestContainerLink": container.id, + }, + ], { $returnEdits: true, }); } diff --git a/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts b/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts index 440712da5..2e1502bcf 100644 --- a/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts +++ b/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import type { ObjectOrInterfaceDefinition } from "@osdk/api"; -import type { EXPERIMENTAL_ObjectSetListener } from "@osdk/api/unstable"; import { __EXPERIMENTAL__NOT_SUPPORTED_YET_subscribe } from "@osdk/api/unstable"; import { $Actions, MtaBus, OsdkTestObject } from "@osdk/e2e.generated.catchall"; import { client, dsClient } from "./client.js"; @@ -46,6 +43,8 @@ export async function runSubscriptionsTest() { await client($Actions.createOsdkTestObject).applyAction({ string_property: "test", + osdk_object_name: "test", + description: "test", }); const objectArray = await client(OsdkTestObject).fetchPage(); diff --git a/packages/e2e.sandbox.catchall/src/typeChecks.ts b/packages/e2e.sandbox.catchall/src/typeChecks.ts index 212ebc292..dae859c39 100644 --- a/packages/e2e.sandbox.catchall/src/typeChecks.ts +++ b/packages/e2e.sandbox.catchall/src/typeChecks.ts @@ -17,9 +17,11 @@ import type { ObjectSet, Osdk, PageResult } from "@osdk/api"; import type { Client } from "@osdk/client"; // import type { ObjectSet$Employee } from "@osdk/e2e.generated.catchall"; +import type { OsdkTestContainer } from "@osdk/e2e.generated.catchall"; import { Employee, ObjectTypeWithAllPropertyTypes, + OsdkTestObject, } from "@osdk/e2e.generated.catchall"; import type { TypeOf } from "ts-expect"; import { expectType } from "ts-expect"; @@ -33,16 +35,16 @@ import { expectType } from "ts-expect"; export async function typeChecks(client: Client) { // single link pivot types are correct { - const objectSet = client(Employee).pivotTo("lead"); - expectType>( + const objectSet = client(OsdkTestObject).pivotTo("osdkTestContainerLink"); + expectType>( true, ); } // multi link pivot types are correct { - const objectSet = client(Employee).pivotTo("peeps"); - expectType>( + const objectSet = client(OsdkTestObject).pivotTo("osdkTestContainerLink"); + expectType>( true, ); } From 61c98ba322e20ba876a93b91e3777711cea07eac Mon Sep 17 00:00:00 2001 From: Nihal Bhatnagar Date: Fri, 18 Oct 2024 15:44:08 -0500 Subject: [PATCH 2/4] Remove Todo's --- packages/e2e.generated.catchall/ontology.json | 98 ++------------- .../src/generatedNoCheck/index.ts | 4 +- .../src/generatedNoCheck/ontology/actions.ts | 1 - .../actions/actionTakesAllParameterTypes.ts | 10 +- .../ontology/actions/createTodo.ts | 66 ---------- .../src/generatedNoCheck/ontology/objects.ts | 1 - .../ontology/objects/Person.ts | 3 - .../generatedNoCheck/ontology/objects/Todo.ts | 113 ------------------ .../src/generatedNoCheck/ontology/queries.ts | 1 - .../ontology/queries/getTodoCount.ts | 38 ------ .../queries/queryTakesAllParameterTypes.ts | 14 +-- 11 files changed, 20 insertions(+), 329 deletions(-) delete mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/createTodo.ts delete mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Todo.ts delete mode 100644 packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/getTodoCount.ts diff --git a/packages/e2e.generated.catchall/ontology.json b/packages/e2e.generated.catchall/ontology.json index 841944c15..10250957d 100644 --- a/packages/e2e.generated.catchall/ontology.json +++ b/packages/e2e.generated.catchall/ontology.json @@ -177,7 +177,7 @@ "objectSet": { "dataType": { "type": "objectSet", - "objectTypeApiName": "Todo" + "objectTypeApiName": "OsdkTestObject" }, "required": true }, @@ -225,11 +225,11 @@ "operations": [ { "type": "createObject", - "objectTypeApiName": "Todo" + "objectTypeApiName": "OsdkTestObject" }, { "type": "modifyObject", - "objectTypeApiName": "Todo" + "objectTypeApiName": "OsdkTestObject" }, { "type": "modifyObject", @@ -238,19 +238,6 @@ ], "status": "ACTIVE" }, - "create-todo": { - "apiName": "create-todo", - "description": "Creates a new Todo", - "parameters": {}, - "status": "ACTIVE", - "rid": "ri.a.b.c.d", - "operations": [ - { - "type": "createObject", - "objectTypeApiName": "Todo" - } - ] - }, "create-object-to-container-link": { "apiName": "create-object-to-container-link", "displayName": "createObjectToContainerLink", @@ -723,61 +710,6 @@ }, "linkTypes": [] }, - "Todo": { - "objectType": { - "apiName": "Todo", - "primaryKey": "id", - "displayName": "AwesomeTodoDisplayname", - "description": "Its a todo item.", - "properties": { - "id": { - "dataType": { - "type": "integer" - } - }, - "body": { - "dataType": { - "type": "string" - }, - "description": "The text of the todo", - "displayName": "Body" - }, - "text": { - "dataType": { - "type": "string" - }, - "displayName": "Text" - }, - "priority": { - "dataType": { - "type": "integer" - } - }, - "complete": { - "dataType": { - "type": "boolean" - } - } - }, - "status": "ACTIVE", - "rid": "rid.a.b.c.d", - "icon": { - "type": "blueprint", - "name": "todo", - "color": "color" - }, - "titleProperty": "body", - "pluralDisplayName": "AwesomeTodoDisplayname" - }, - "linkTypes": [{ - "apiName": "Assignee", - "cardinality": "ONE", - "displayName": "Assignee", - "objectTypeApiName": "Person", - "status": "ACTIVE", - "foreignKeyPropertyApiName": "email" - }] - }, "Person": { "objectType": { "apiName": "Person", @@ -803,13 +735,6 @@ "pluralDisplayName": "People" }, "linkTypes": [{ - "apiName": "Todos", - "cardinality": "MANY", - "displayName": "Todos", - "objectTypeApiName": "Todo", - "status": "ACTIVE", - "foreignKeyPropertyApiName": "id" - }, { "apiName": "Friends", "cardinality": "MANY", "displayName": "Friends", @@ -1242,15 +1167,15 @@ "object": { "dataType": { "type": "object", - "objectApiName": "Todo", - "objectTypeApiName": "Todo" + "objectApiName": "OsdkTestObject", + "objectTypeApiName": "OsdkTestObject" } }, "objectSet": { "dataType": { "type": "objectSet", - "objectApiName": "Todo", - "objectTypeApiName": "Todo" + "objectApiName": "OsdkTestObject", + "objectTypeApiName": "OsdkTestObject" } }, "array": { @@ -1329,15 +1254,6 @@ } } }, - "getTodoCount": { - "apiName": "getTodoCount", - "output": { - "type": "integer" - }, - "parameters": {}, - "rid": "query.rid2", - "version": "0.1.2" - }, "getNamesOfCustomersFromCountry": { "apiName": "getNamesOfCustomersFromCountry", "output": { diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts index bf66cf34c..05354701f 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/index.ts @@ -3,7 +3,6 @@ export { createObjectToContainerLink, createOsdkTestContainer, createOsdkTestObject, - createTodo, deleteOsdkTestContainer, deleteOsdkTestObject, editOsdkTestContainer, @@ -25,11 +24,10 @@ export { OsdkTestObject, Person, RhemmingsObjectWithGtsrProperty2, - Todo, Venture, WeatherStation, } from './ontology/objects.js'; export * as $Objects from './ontology/objects.js'; -export { getNamesOfCustomersFromCountry, getTodoCount, queryTakesAllParameterTypes } from './ontology/queries.js'; +export { getNamesOfCustomersFromCountry, queryTakesAllParameterTypes } from './ontology/queries.js'; export * as $Queries from './ontology/queries.js'; export { $ontologyRid } from './OntologyMetadata.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts index d99091ae0..c8a7c349a 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions.ts @@ -2,7 +2,6 @@ export { actionTakesAllParameterTypes } from './actions/actionTakesAllParameterT export { createObjectToContainerLink } from './actions/createObjectToContainerLink.js'; export { createOsdkTestContainer } from './actions/createOsdkTestContainer.js'; export { createOsdkTestObject } from './actions/createOsdkTestObject.js'; -export { createTodo } from './actions/createTodo.js'; export { deleteOsdkTestContainer } from './actions/deleteOsdkTestContainer.js'; export { deleteOsdkTestObject } from './actions/deleteOsdkTestObject.js'; export { editOsdkTestContainer } from './actions/editOsdkTestContainer.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/actionTakesAllParameterTypes.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/actionTakesAllParameterTypes.ts index 3189dce72..0163c5097 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/actionTakesAllParameterTypes.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/actions/actionTakesAllParameterTypes.ts @@ -7,7 +7,7 @@ import type { ApplyBatchActionOptions, } from '@osdk/api'; import { $osdkMetadata } from '../../OntologyMetadata.js'; -import type { Todo } from '../objects/Todo.js'; +import type { OsdkTestObject } from '../objects/OsdkTestObject.js'; import type { Person } from '../objects/Person.js'; export namespace actionTakesAllParameterTypes { @@ -32,7 +32,7 @@ export namespace actionTakesAllParameterTypes { objectSet: { multiplicity: false; nullable: false; - type: ActionMetadata.DataType.ObjectSet; + type: ActionMetadata.DataType.ObjectSet; }; string: { multiplicity: false; @@ -58,7 +58,7 @@ export namespace actionTakesAllParameterTypes { */ readonly object?: ActionParam.ObjectType; - readonly objectSet: ActionParam.ObjectSetType; + readonly objectSet: ActionParam.ObjectSetType; readonly string: ActionParam.PrimitiveType<'string'>; @@ -87,7 +87,7 @@ export namespace actionTakesAllParameterTypes { * @param {ActionParam.PrimitiveType<"attachment">} attachmentArray * @param {ActionParam.PrimitiveType<"datetime">} [dateArray] * @param {ActionParam.ObjectType} [object] A person Object - * @param {ActionParam.ObjectSetType} objectSet + * @param {ActionParam.ObjectSetType} objectSet * @param {ActionParam.PrimitiveType<"string">} string * @param {ActionParam.PrimitiveType<"timestamp">} time-stamp */ @@ -96,7 +96,7 @@ export interface actionTakesAllParameterTypes extends ActionDefinition; - - /** - * Creates a new Todo - */ - export interface Params {} - - // Represents a fqn of the action - export interface Signatures { - /** - * Creates a new Todo - */ - applyAction

( - args: P, - options?: OP, - ): Promise>; - - batchApplyAction

, OP extends ApplyBatchActionOptions>( - args: P, - options?: OP, - ): Promise>; - } -} - -/** - * Creates a new Todo - */ -export interface createTodo extends ActionDefinition { - __DefinitionMetadata?: { - apiName: 'createTodo'; - description: 'Creates a new Todo'; - modifiedEntities: { - Todo: { - created: true; - modified: false; - }; - }; - parameters: createTodo.ParamsDefinition; - rid: 'ri.a.b.c.d'; - status: 'ACTIVE'; - type: 'action'; - - signatures: createTodo.Signatures; - }; - apiName: 'createTodo'; - type: 'action'; - osdkMetadata: typeof $osdkMetadata; -} - -export const createTodo: createTodo = { - apiName: 'createTodo', - type: 'action', - osdkMetadata: $osdkMetadata, -}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts index 5df2004f6..4fdbdff08 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects.ts @@ -10,6 +10,5 @@ export { OsdkTestContainer } from './objects/OsdkTestContainer.js'; export { OsdkTestObject } from './objects/OsdkTestObject.js'; export { Person } from './objects/Person.js'; export { RhemmingsObjectWithGtsrProperty2 } from './objects/RhemmingsObjectWithGtsrProperty2.js'; -export { Todo } from './objects/Todo.js'; export { Venture } from './objects/Venture.js'; export { WeatherStation } from './objects/WeatherStation.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Person.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Person.ts index 50a8d0941..213ba3a76 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Person.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Person.ts @@ -1,7 +1,6 @@ import type { PropertyDef as $PropertyDef } from '@osdk/api'; import { $osdkMetadata } from '../../OntologyMetadata.js'; import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; -import type { Todo } from './Todo.js'; import type { PropertyKeys as $PropertyKeys, ObjectTypeDefinition as $ObjectTypeDefinition, @@ -20,7 +19,6 @@ export namespace Person { export interface Links { readonly Friends: Person.ObjectSet; - readonly Todos: Todo.ObjectSet; } export interface Props { @@ -65,7 +63,6 @@ export interface Person extends $ObjectTypeDefinition { inverseInterfaceMap: {}; links: { Friends: $ObjectMetadata.Link; - Todos: $ObjectMetadata.Link; }; pluralDisplayName: 'People'; primaryKeyApiName: 'email'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Todo.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Todo.ts deleted file mode 100644 index 7b36483e2..000000000 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/Todo.ts +++ /dev/null @@ -1,113 +0,0 @@ -import type { PropertyDef as $PropertyDef } from '@osdk/api'; -import { $osdkMetadata } from '../../OntologyMetadata.js'; -import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; -import type { Person } from './Person.js'; -import type { - PropertyKeys as $PropertyKeys, - ObjectTypeDefinition as $ObjectTypeDefinition, - ObjectMetadata as $ObjectMetadata, -} from '@osdk/api'; -import type { - ObjectSet as $ObjectSet, - Osdk as $Osdk, - OsdkObject as $OsdkObject, - PropertyValueWireToClient as $PropType, - SingleLinkAccessor as $SingleLinkAccessor, -} from '@osdk/api'; - -export namespace Todo { - export type PropertyKeys = 'id' | 'body' | 'text' | 'priority' | 'complete'; - - export interface Links { - readonly Assignee: $SingleLinkAccessor; - } - - export interface Props { - readonly body: $PropType['string'] | undefined; - readonly complete: $PropType['boolean'] | undefined; - readonly id: $PropType['integer'] | undefined; - readonly priority: $PropType['integer'] | undefined; - readonly text: $PropType['string'] | undefined; - } - export interface StrictProps { - readonly body: $PropType['string'] | undefined; - readonly complete: $PropType['boolean'] | undefined; - readonly id: $PropType['integer']; - readonly priority: $PropType['integer'] | undefined; - readonly text: $PropType['string'] | undefined; - } - - export interface ObjectSet extends $ObjectSet {} - - export type OsdkInstance< - OPTIONS extends never | '$notStrict' | '$rid' = never, - K extends keyof Todo.Props = keyof Todo.Props, - > = $Osdk.Instance; - - /** @deprecated use OsdkInstance */ - export type OsdkObject< - OPTIONS extends never | '$notStrict' | '$rid' = never, - K extends keyof Todo.Props = keyof Todo.Props, - > = OsdkInstance; -} - -export interface Todo extends $ObjectTypeDefinition { - osdkMetadata: typeof $osdkMetadata; - type: 'object'; - apiName: 'Todo'; - __DefinitionMetadata?: { - objectSet: Todo.ObjectSet; - props: Todo.Props; - linksType: Todo.Links; - strictProps: Todo.StrictProps; - apiName: 'Todo'; - description: 'Its a todo item.'; - displayName: 'AwesomeTodoDisplayname'; - icon: { - type: 'blueprint'; - name: 'todo'; - color: 'color'; - }; - interfaceMap: {}; - inverseInterfaceMap: {}; - links: { - Assignee: $ObjectMetadata.Link; - }; - pluralDisplayName: 'AwesomeTodoDisplayname'; - primaryKeyApiName: 'id'; - primaryKeyType: 'integer'; - properties: { - /** - * display name: 'Body', - * description: The text of the todo - */ - body: $PropertyDef<'string', 'nullable', 'single'>; - /** - * (no ontology metadata) - */ - complete: $PropertyDef<'boolean', 'nullable', 'single'>; - /** - * (no ontology metadata) - */ - id: $PropertyDef<'integer', 'non-nullable', 'single'>; - /** - * (no ontology metadata) - */ - priority: $PropertyDef<'integer', 'nullable', 'single'>; - /** - * display name: 'Text' - */ - text: $PropertyDef<'string', 'nullable', 'single'>; - }; - rid: 'rid.a.b.c.d'; - status: 'ACTIVE'; - titleProperty: 'body'; - type: 'object'; - }; -} - -export const Todo: Todo = { - type: 'object', - apiName: 'Todo', - osdkMetadata: $osdkMetadata, -}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries.ts index 52e6f0d62..53893f064 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries.ts @@ -1,3 +1,2 @@ export { getNamesOfCustomersFromCountry } from './queries/getNamesOfCustomersFromCountry.js'; -export { getTodoCount } from './queries/getTodoCount.js'; export { queryTakesAllParameterTypes } from './queries/queryTakesAllParameterTypes.js'; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/getTodoCount.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/getTodoCount.ts deleted file mode 100644 index 1b6619169..000000000 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/getTodoCount.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { QueryDefinition, VersionBound } from '@osdk/api'; -import type { QueryParam, QueryResult } from '@osdk/api'; -import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; -import { $osdkMetadata } from '../../OntologyMetadata.js'; - -export namespace getTodoCount { - export interface Signature { - (): Promise; - } - - export type ReturnType = QueryResult.PrimitiveType<'integer'>; -} - -export interface getTodoCount extends QueryDefinition, VersionBound<$ExpectedClientVersion> { - __DefinitionMetadata?: { - apiName: 'getTodoCount'; - rid: 'query.rid2'; - type: 'query'; - version: '0.1.2'; - parameters: {}; - output: { - nullable: false; - type: 'integer'; - }; - signature: getTodoCount.Signature; - }; - apiName: 'getTodoCount'; - type: 'query'; - version: '0.1.2'; - osdkMetadata: typeof $osdkMetadata; -} - -export const getTodoCount: getTodoCount = { - apiName: 'getTodoCount', - type: 'query', - version: '0.1.2', - osdkMetadata: $osdkMetadata, -}; diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/queryTakesAllParameterTypes.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/queryTakesAllParameterTypes.ts index 22df8882a..200d39571 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/queryTakesAllParameterTypes.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/queries/queryTakesAllParameterTypes.ts @@ -2,7 +2,7 @@ import type { QueryDefinition, VersionBound } from '@osdk/api'; import type { QueryParam, QueryResult } from '@osdk/api'; import type { $ExpectedClientVersion } from '../../OntologyMetadata.js'; import { $osdkMetadata } from '../../OntologyMetadata.js'; -import type { Todo } from '../objects/Todo.js'; +import type { OsdkTestObject } from '../objects/OsdkTestObject.js'; export namespace queryTakesAllParameterTypes { export interface Signature { @@ -56,12 +56,12 @@ export namespace queryTakesAllParameterTypes { /** * (no ontology metadata) */ - readonly object: QueryParam.ObjectType; + readonly object: QueryParam.ObjectType; /** * (no ontology metadata) */ - readonly objectSet: QueryParam.ObjectSetType; + readonly objectSet: QueryParam.ObjectSetType; /** * description: a set of strings @@ -186,18 +186,18 @@ export interface queryTakesAllParameterTypes */ object: { nullable: false; - object: 'Todo'; + object: 'OsdkTestObject'; type: 'object'; - __OsdkTargetType?: Todo; + __OsdkTargetType?: OsdkTestObject; }; /** * (no ontology metadata) */ objectSet: { nullable: false; - objectSet: 'Todo'; + objectSet: 'OsdkTestObject'; type: 'objectSet'; - __OsdkTargetType?: Todo; + __OsdkTargetType?: OsdkTestObject; }; /** * description: a set of strings From 605cb2fdf54ffb7b3c44076158c0488cff11f2f5 Mon Sep 17 00:00:00 2001 From: Nihal Bhatnagar Date: Fri, 18 Oct 2024 15:58:45 -0500 Subject: [PATCH 3/4] Fixes --- .../src/runLinkAssignmentActionTest.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts b/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts index 6cda0d61f..ecfb6a5e9 100644 --- a/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts +++ b/packages/e2e.sandbox.catchall/src/runLinkAssignmentActionTest.ts @@ -18,6 +18,7 @@ import type { Client } from "@osdk/client"; import { createObjectToContainerLink, createOsdkTestContainer, + deleteOsdkTestContainer, OsdkTestContainer, OsdkTestObject, Person, @@ -48,12 +49,12 @@ export async function runLinkAssignmentActionTest() { console.log(" - No container for object. "); if (!didValidateOnce) { - console.log(" - Validating assignEmployee1"); + console.log(" - Validating createObjectToContainerLink"); didValidateOnce = true; const time = new Date().toISOString(); client(createOsdkTestContainer).applyAction({ - "name": "assignEmployee1", + name: "linkAssignmentActionTest", time, }); const { data: [container] } = await client(OsdkTestContainer) @@ -64,6 +65,9 @@ export async function runLinkAssignmentActionTest() { }, { $validateOnly: true, }); + client(deleteOsdkTestContainer).applyAction({ + "OsdkTestContainer": container.id, + }); if (false) { const r = await client(createObjectToContainerLink).batchApplyAction([ From 3a30516b3219aeb7b310a4bea6ed92c1ec6dc6dd Mon Sep 17 00:00:00 2001 From: Nihal Bhatnagar Date: Tue, 22 Oct 2024 17:44:20 -0400 Subject: [PATCH 4/4] Fix errors --- .../ontology/objects/OsdkTestContainer.ts | 10 +++------- .../ontology/objects/OsdkTestObject.ts | 3 +-- .../src/public/checkUnstableBulkLinks.ts | 9 ++++++--- .../e2e.sandbox.catchall/src/runSubscriptionsTest.ts | 4 +++- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts index 992f6371c..834988c3d 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestContainer.ts @@ -23,26 +23,22 @@ export namespace OsdkTestContainer { } export interface Props { - readonly id: $PropType['string'] | undefined; - readonly name: $PropType['string'] | undefined; - readonly time: $PropType['timestamp'] | undefined; - } - export interface StrictProps { readonly id: $PropType['string']; readonly name: $PropType['string'] | undefined; readonly time: $PropType['timestamp'] | undefined; } + export type StrictProps = Props; export interface ObjectSet extends $ObjectSet {} export type OsdkInstance< - OPTIONS extends never | '$notStrict' | '$rid' = never, + OPTIONS extends never | '$rid' = never, K extends keyof OsdkTestContainer.Props = keyof OsdkTestContainer.Props, > = $Osdk.Instance; /** @deprecated use OsdkInstance */ export type OsdkObject< - OPTIONS extends never | '$notStrict' | '$rid' = never, + OPTIONS extends never | '$rid' = never, K extends keyof OsdkTestContainer.Props = keyof OsdkTestContainer.Props, > = OsdkInstance; } diff --git a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts index 3d5f23014..d7e9bce6c 100644 --- a/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts +++ b/packages/e2e.generated.catchall/src/generatedNoCheck/ontology/objects/OsdkTestObject.ts @@ -25,10 +25,9 @@ export namespace OsdkTestObject { export interface Props { readonly description: $PropType['string'] | undefined; readonly osdkObjectName: $PropType['string'] | undefined; - readonly primaryKey_: $PropType['string'] | undefined; + readonly primaryKey_: $PropType['string']; readonly stringProperty: $PropType['string'] | undefined; } - export type StrictProps = Props; export interface ObjectSet extends $ObjectSet {} diff --git a/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts b/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts index ca912de9f..9bf402ea1 100644 --- a/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts +++ b/packages/e2e.sandbox.catchall/src/public/checkUnstableBulkLinks.ts @@ -57,9 +57,12 @@ export async function checkUnstableBulkLinks() { linkApiName, otherObjectApiName, otherObjectPk, - } of client[__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks](objects, [ - "osdkTestContainerLink", - ]) + } of client(__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks).getBulkLinks( + objects, + [ + "osdkTestContainerLink", + ], + ) ) { logger.info( `Found link ${object.$objectType}:${object.$primaryKey} <- (${linkApiName}) -> ${otherObjectApiName}:${otherObjectPk}`, diff --git a/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts b/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts index 01b2b7e73..086f35f75 100644 --- a/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts +++ b/packages/e2e.sandbox.catchall/src/runSubscriptionsTest.ts @@ -42,7 +42,9 @@ export async function runSubscriptionsTest() { }, async onSuccessfulSubscription() { await client($Actions.createOsdkTestObject).applyAction({ - string_property: "test", + "description": "This is a test object.", + "osdk_object_name": "testObject", + "string_property": "test", }); const objectArray = await client(OsdkTestObject).fetchPage();