Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial tests cleanup and consolidation #887

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
308 changes: 200 additions & 108 deletions packages/e2e.generated.catchall/ontology.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions packages/e2e.generated.catchall/src/generatedNoCheck/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
export {
actionTakesAllParameterTypes,
assignEmployee1,
createObjectToContainerLink,
createOsdkTestContainer,
createOsdkTestObject,
createTodo,
deleteOsdkTestContainer,
deleteOsdkTestObject,
editOsdkTestContainer,
editOsdkTestObject,
} from './ontology/actions.js';
export * as $Actions from './ontology/actions.js';
Expand All @@ -18,14 +20,14 @@ export {
GtfsTripTrackObject,
MtaBus,
ObjectTypeWithAllPropertyTypes,
OsdkTestContainer,
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';
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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';
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -32,7 +32,7 @@ export namespace actionTakesAllParameterTypes {
objectSet: {
multiplicity: false;
nullable: false;
type: ActionMetadata.DataType.ObjectSet<Todo>;
type: ActionMetadata.DataType.ObjectSet<OsdkTestObject>;
};
string: {
multiplicity: false;
Expand All @@ -58,7 +58,7 @@ export namespace actionTakesAllParameterTypes {
*/
readonly object?: ActionParam.ObjectType<Person>;

readonly objectSet: ActionParam.ObjectSetType<Todo>;
readonly objectSet: ActionParam.ObjectSetType<OsdkTestObject>;

readonly string: ActionParam.PrimitiveType<'string'>;

Expand Down Expand Up @@ -87,7 +87,7 @@ export namespace actionTakesAllParameterTypes {
* @param {ActionParam.PrimitiveType<"attachment">} attachmentArray
* @param {ActionParam.PrimitiveType<"datetime">} [dateArray]
* @param {ActionParam.ObjectType<Person>} [object] A person Object
* @param {ActionParam.ObjectSetType<Todo>} objectSet
* @param {ActionParam.ObjectSetType<OsdkTestObject>} objectSet
* @param {ActionParam.PrimitiveType<"string">} string
* @param {ActionParam.PrimitiveType<"timestamp">} time-stamp
*/
Expand All @@ -96,7 +96,7 @@ export interface actionTakesAllParameterTypes extends ActionDefinition<actionTak
apiName: 'actionTakesAllParameterTypes';
description: 'An action which takes different types of parameters';
modifiedEntities: {
Todo: {
OsdkTestObject: {
created: true;
modified: true;
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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<OsdkTestContainer>;
};
osdkTestObjectLink: {
multiplicity: false;
nullable: false;
type: ActionMetadata.DataType.Object<OsdkTestObject>;
};
};

export interface Params {
readonly osdkTestContainerLink: ActionParam.ObjectType<OsdkTestContainer>;

readonly osdkTestObjectLink: ActionParam.ObjectType<OsdkTestObject>;
}

// Represents a fqn of the action
export interface Signatures {
applyAction<P extends createObjectToContainerLink.Params, OP extends ApplyActionOptions>(
args: P,
options?: OP,
): Promise<ActionReturnTypeForOptions<OP>>;

batchApplyAction<P extends ReadonlyArray<createObjectToContainerLink.Params>, OP extends ApplyBatchActionOptions>(
args: P,
options?: OP,
): Promise<ActionReturnTypeForOptions<OP>>;
}
}

/**
* @param {ActionParam.ObjectType<OsdkTestContainer>} osdkTestContainerLink
* @param {ActionParam.ObjectType<OsdkTestObject>} osdkTestObjectLink
*/
export interface createObjectToContainerLink extends ActionDefinition<createObjectToContainerLink.Signatures> {
__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,
};
Original file line number Diff line number Diff line change
@@ -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<P extends createOsdkTestContainer.Params, OP extends ApplyActionOptions>(
args: P,
options?: OP,
): Promise<ActionReturnTypeForOptions<OP>>;

batchApplyAction<P extends ReadonlyArray<createOsdkTestContainer.Params>, OP extends ApplyBatchActionOptions>(
args: P,
options?: OP,
): Promise<ActionReturnTypeForOptions<OP>>;
}
}

/**
* @param {ActionParam.PrimitiveType<"string">} name
* @param {ActionParam.PrimitiveType<"timestamp">} time
*/
export interface createOsdkTestContainer extends ActionDefinition<createOsdkTestContainer.Signatures> {
__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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'>;
}

Expand All @@ -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<createOsdkTestObject.Signatures> {
Expand Down
Loading