@osdk/client 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/{chunk-LK4VDWCG.cjs → chunk-CKYBATFN.cjs} +253 -108
- package/build/js/chunk-CKYBATFN.cjs.map +1 -0
- package/build/js/{chunk-GOBQUVQZ.mjs → chunk-SNGUDELK.mjs} +250 -109
- package/build/js/chunk-SNGUDELK.mjs.map +1 -0
- package/build/js/index.cjs +82 -33
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +78 -30
- package/build/js/index.mjs.map +1 -1
- package/build/js/public/objects.cjs +3 -3
- package/build/js/public/objects.mjs +1 -1
- package/build/types/Client.d.ts +4 -4
- package/build/types/Definitions.d.ts +4 -5
- package/build/types/ObjectSetCreator.d.ts +2 -2
- package/build/types/OsdkObjectFrom.d.ts +17 -4
- package/build/types/actions/Actions.d.ts +5 -8
- package/build/types/createClient.d.ts +1 -1
- package/build/types/createMinimalClient.d.ts +1 -1
- package/build/types/definitions/LinkDefinitions.d.ts +2 -2
- package/build/types/generatedNoCheck/Ontology.d.ts +10 -7
- package/build/types/generatedNoCheck/ontology/actions/actionTakesAttachment.d.ts +2 -2
- package/build/types/generatedNoCheck/ontology/actions/actionTakesObjectSet.d.ts +2 -2
- package/build/types/generatedNoCheck/ontology/actions/createOffice.d.ts +12 -12
- package/build/types/generatedNoCheck/ontology/actions/createOfficeAndEmployee.d.ts +17 -17
- package/build/types/generatedNoCheck/ontology/actions/moveOffice.d.ts +12 -12
- package/build/types/generatedNoCheck/ontology/actions/promoteEmployee.d.ts +6 -6
- package/build/types/generatedNoCheck/ontology/actions/promoteEmployeeObject.d.ts +6 -6
- package/build/types/generatedNoCheck/ontology/interfaces/FooInterface.d.ts +8 -0
- package/build/types/generatedNoCheck/ontology/interfaces.d.ts +1 -1
- package/build/types/generatedNoCheck/ontology/objects/Employee.d.ts +11 -4
- package/build/types/generatedNoCheck/ontology/objects/ObjectWithTimestampPrimaryKey.d.ts +4 -1
- package/build/types/generatedNoCheck/ontology/objects/Office.d.ts +7 -4
- package/build/types/generatedNoCheck/ontology/objects/equipment.d.ts +4 -1
- package/build/types/generatedNoCheck/ontology/objects/objectTypeWithAllPropertyTypes.d.ts +24 -21
- package/build/types/index.d.ts +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +39 -0
- package/build/types/mapping/PropertyValueMapping.d.ts +47 -0
- package/build/types/object/Cache.d.ts +9 -2
- package/build/types/object/Cache.test.d.ts +10 -0
- package/build/types/object/aggregate.d.ts +4 -2
- package/build/types/object/convertWireToOsdkObjects.d.ts +17 -2
- package/build/types/object/fetchPage.d.ts +12 -3
- package/build/types/objectSet/ObjectSet.d.ts +13 -11
- package/build/types/objectSet/createObjectSet.d.ts +4 -2
- package/build/types/ontology/OntologyProvider.d.ts +12 -4
- package/build/types/ontology/{providers/StandardOntologyProvider.d.ts → StandardOntologyProvider.d.ts} +2 -1
- package/build/types/ontology/StandardOntologyProvider.test.d.ts +1 -0
- package/build/types/ontology/loadInterfaceDefinition.d.ts +3 -0
- package/build/types/query/WhereClause.d.ts +4 -3
- package/build/types/query/aggregations/AggregationsClause.d.ts +2 -2
- package/build/types/query/aggregations/AggregationsResults.d.ts +1 -1
- package/changelog/0.13.0/pr-101.v2.yml +5 -0
- package/changelog/0.13.0/pr-102.v2.yml +5 -0
- package/changelog/0.13.0/pr-104.v2.yml +5 -0
- package/changelog/0.13.0/pr-106.v2.yml +5 -0
- package/changelog/0.13.0/pr-107.v2.yml +5 -0
- package/changelog/0.13.0/pr-110.v2.yml +5 -0
- package/changelog/0.13.0/pr-111.v2.yml +5 -0
- package/changelog/0.13.0/pr-112.v2.yml +5 -0
- package/changelog/0.13.0/pr-116.v2.yml +5 -0
- package/changelog/0.13.0/pr-117.v2.yml +5 -0
- package/changelog/0.13.0/pr-120.v2.yml +5 -0
- package/changelog/0.13.0/pr-125.v2.yml +5 -0
- package/package.json +10 -7
- package/build/js/chunk-GOBQUVQZ.mjs.map +0 -1
- package/build/js/chunk-LK4VDWCG.cjs.map +0 -1
- /package/build/types/{ontology/providers/StandardOntologyProvider.test.d.ts → OsdkObjectFrom.test.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ActionDefinition, ActionParameterDefinition, ObjectActionDataType, ObjectSetActionDataType, OntologyDefinition
|
|
1
|
+
import type { ActionDefinition, ActionParameterDefinition, ObjectActionDataType, ObjectSetActionDataType, OntologyDefinition } from "@osdk/api";
|
|
2
2
|
import type { ActionResults, ValidateActionResponseV2 } from "@osdk/gateway/types";
|
|
3
3
|
import type { ObjectSet } from "../index.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { DataValueClientToWire } from "../mapping/DataValueMapping.js";
|
|
5
5
|
import type { Osdk, OsdkObjectPrimaryKeyType } from "../OsdkObjectFrom.js";
|
|
6
6
|
import type { NOOP } from "../util/NOOP.js";
|
|
7
7
|
import type { NullableProps } from "../util/NullableProps.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { PartialBy } from "../util/PartialBy.js";
|
|
9
9
|
import type { ActionReturnTypeForOptions } from "./applyAction.js";
|
|
10
10
|
export type ApplyActionOptions = {
|
|
11
11
|
returnEdits?: true;
|
|
@@ -14,15 +14,12 @@ export type ApplyActionOptions = {
|
|
|
14
14
|
validateOnly?: true;
|
|
15
15
|
returnEdits?: false;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
attachment: Attachment;
|
|
19
|
-
}
|
|
20
|
-
type BaseType<APD extends ActionParameterDefinition<any, any>> = APD["type"] extends ObjectActionDataType<any, infer TTargetType> ? Osdk<TTargetType> | OsdkObjectPrimaryKeyType<TTargetType> : APD["type"] extends ObjectSetActionDataType<any, infer TTargetType> ? ObjectSet<TTargetType> : APD["type"] extends keyof OverrideWirePropertyTypes ? OverrideWirePropertyTypes[APD["type"]] : never;
|
|
17
|
+
type BaseType<APD extends ActionParameterDefinition<any, any>> = APD["type"] extends ObjectActionDataType<any, infer TTargetType> ? Osdk<TTargetType> | OsdkObjectPrimaryKeyType<TTargetType> : APD["type"] extends ObjectSetActionDataType<any, infer TTargetType> ? ObjectSet<TTargetType> : APD["type"] extends keyof DataValueClientToWire ? DataValueClientToWire[APD["type"]] : never;
|
|
21
18
|
type MaybeArrayType<APD extends ActionParameterDefinition<any, any>> = APD["multiplicity"] extends true ? Array<BaseType<APD>> : BaseType<APD>;
|
|
22
19
|
type NotOptionalParams<X extends ActionParametersDefinition> = {
|
|
23
20
|
[P in keyof X]: MaybeArrayType<X[P]>;
|
|
24
21
|
};
|
|
25
|
-
export type OsdkActionParameters<X extends ActionParametersDefinition> = NullableProps<X> extends never ? NotOptionalParams<X> :
|
|
22
|
+
export type OsdkActionParameters<X extends ActionParametersDefinition> = NullableProps<X> extends never ? NotOptionalParams<X> : PartialBy<NotOptionalParams<X>, NullableProps<X>>;
|
|
26
23
|
export type ActionSignatureFromDef<T extends ActionDefinition<any, any, any>> = NonNullable<T["__OsdkActionType"]> extends never ? ActionSignature<T["parameters"]> : NonNullable<T["__OsdkActionType"]>;
|
|
27
24
|
export type Actions<O extends OntologyDefinition<any>> = {
|
|
28
25
|
[K in keyof O["actions"]]: ActionSignatureFromDef<O["actions"][K]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OntologyDefinition } from "@osdk/api";
|
|
2
2
|
import type { Client, FutureClient } from "./Client.js";
|
|
3
3
|
import type { MinimalClientParams } from "./MinimalClientContext.js";
|
|
4
|
-
import type { OntologyCachingOptions } from "./ontology/
|
|
4
|
+
import type { OntologyCachingOptions } from "./ontology/StandardOntologyProvider.js";
|
|
5
5
|
export declare function createFutureClient(metadata: MinimalClientParams["metadata"], stack: string, tokenProvider: () => Promise<string> | string, ontologyCachingOptions?: OntologyCachingOptions, fetchFn?: typeof globalThis.fetch): FutureClient;
|
|
6
6
|
export declare function createClient<O extends OntologyDefinition<any>>(ontology: O, stack: string, tokenProvider: () => Promise<string> | string, ontologyCachingOptions?: OntologyCachingOptions, fetchFn?: typeof globalThis.fetch): Client<O>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MinimalClient, MinimalClientParams } from "./MinimalClientContext.js";
|
|
2
|
-
import { type OntologyCachingOptions } from "./ontology/
|
|
2
|
+
import { type OntologyCachingOptions } from "./ontology/StandardOntologyProvider.js";
|
|
3
3
|
export declare function createMinimalClient(metadata: MinimalClientParams["metadata"], stack: string, tokenProvider: () => Promise<string> | string, ontologyCachingOptions?: OntologyCachingOptions, fetchFn?: (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>): MinimalClient;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ObjectOrInterfacePropertyKeysFrom2, ObjectTypeDefinition, ObjectTypeLinkDefinition, ObjectTypeLinkKeysFrom2 } from "@osdk/api";
|
|
2
2
|
import type { SelectArg, SelectArgToKeys } from "../object/fetchPage.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ObjectSet } from "../objectSet/ObjectSet.js";
|
|
4
4
|
import type { Osdk } from "../OsdkObjectFrom.js";
|
|
5
5
|
/** The $link container to get from one object type to its linked objects */
|
|
6
6
|
export type OsdkObjectLinksObject<O extends ObjectTypeDefinition<any>> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {
|
|
7
7
|
[L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;
|
|
8
8
|
};
|
|
9
|
-
export type OsdkObjectLinksEntry<O extends ObjectTypeDefinition<any>, L extends ObjectTypeLinkKeysFrom2<O>> = O["links"][L] extends ObjectTypeLinkDefinition<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> :
|
|
9
|
+
export type OsdkObjectLinksEntry<O extends ObjectTypeDefinition<any>, L extends ObjectTypeLinkKeysFrom2<O>> = O["links"][L] extends ObjectTypeLinkDefinition<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : never;
|
|
10
10
|
export type DefaultToFalse<B extends boolean | undefined> = false extends B ? false : undefined extends B ? false : true;
|
|
11
11
|
export interface SingleLinkAccessor<T extends ObjectTypeDefinition<any>> {
|
|
12
12
|
/** Load the linked object */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Interfaces from './ontology/interfaces.js';
|
|
1
2
|
import * as Objects from './ontology/objects.js';
|
|
2
3
|
declare const _Ontology: {
|
|
3
4
|
metadata: {
|
|
@@ -7,22 +8,24 @@ declare const _Ontology: {
|
|
|
7
8
|
};
|
|
8
9
|
objects: {
|
|
9
10
|
Employee: Objects.Employee;
|
|
10
|
-
|
|
11
|
+
equipment: Objects.equipment;
|
|
11
12
|
objectTypeWithAllPropertyTypes: Objects.objectTypeWithAllPropertyTypes;
|
|
12
13
|
ObjectWithTimestampPrimaryKey: Objects.ObjectWithTimestampPrimaryKey;
|
|
13
|
-
|
|
14
|
+
Office: Objects.Office;
|
|
14
15
|
};
|
|
15
16
|
actions: {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
actionTakesAttachment: import("./ontology/actions/actionTakesAttachment.js").ActionDef$actionTakesAttachment;
|
|
18
|
+
actionTakesObjectSet: import("./ontology/actions/actionTakesObjectSet.js").ActionDef$actionTakesObjectSet;
|
|
18
19
|
createOffice: import("./ontology/actions/createOffice.js").ActionDef$createOffice;
|
|
19
20
|
createOfficeAndEmployee: import("./ontology/actions/createOfficeAndEmployee.js").ActionDef$createOfficeAndEmployee;
|
|
20
21
|
moveOffice: import("./ontology/actions/moveOffice.js").ActionDef$moveOffice;
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
promoteEmployee: import("./ontology/actions/promoteEmployee.js").ActionDef$promoteEmployee;
|
|
23
|
+
promoteEmployeeObject: import("./ontology/actions/promoteEmployeeObject.js").ActionDef$promoteEmployeeObject;
|
|
23
24
|
};
|
|
24
25
|
queries: {};
|
|
25
|
-
interfaces: {
|
|
26
|
+
interfaces: {
|
|
27
|
+
FooInterface: Interfaces.FooInterface;
|
|
28
|
+
};
|
|
26
29
|
};
|
|
27
30
|
type _Ontology = typeof _Ontology;
|
|
28
31
|
export interface Ontology extends _Ontology {
|
|
@@ -3,8 +3,8 @@ import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionPa
|
|
|
3
3
|
export type ActionDef$actionTakesAttachment$Params = {
|
|
4
4
|
attachment: {
|
|
5
5
|
multiplicity: false;
|
|
6
|
-
type: 'attachment';
|
|
7
6
|
nullable: false;
|
|
7
|
+
type: 'attachment';
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
export type actionTakesAttachment$Params = NOOP<OsdkActionParameters<ActionDef$actionTakesAttachment$Params>>;
|
|
@@ -15,10 +15,10 @@ export interface actionTakesAttachment {
|
|
|
15
15
|
<OP extends ApplyActionOptions>(args: actionTakesAttachment$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
16
16
|
}
|
|
17
17
|
export interface ActionDef$actionTakesAttachment extends ActionDefinition<'actionTakesAttachment', never, actionTakesAttachment> {
|
|
18
|
-
type: 'action';
|
|
19
18
|
apiName: 'actionTakesAttachment';
|
|
20
19
|
description: 'An action which takes an attachmen t';
|
|
21
20
|
modifiedEntities: {};
|
|
21
|
+
type: 'action';
|
|
22
22
|
parameters: ActionDef$actionTakesAttachment$Params;
|
|
23
23
|
}
|
|
24
24
|
export declare const actionTakesAttachment: ActionDef$actionTakesAttachment;
|
|
@@ -4,8 +4,8 @@ import type { Employee } from '../objects.js';
|
|
|
4
4
|
export type ActionDef$actionTakesObjectSet$Params = {
|
|
5
5
|
employees: {
|
|
6
6
|
multiplicity: false;
|
|
7
|
-
type: ObjectSetActionDataType<'Employee', Employee>;
|
|
8
7
|
nullable: false;
|
|
8
|
+
type: ObjectSetActionDataType<'Employee', Employee>;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export type actionTakesObjectSet$Params = NOOP<OsdkActionParameters<ActionDef$actionTakesObjectSet$Params>>;
|
|
@@ -16,10 +16,10 @@ export interface actionTakesObjectSet {
|
|
|
16
16
|
<OP extends ApplyActionOptions>(args: actionTakesObjectSet$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
17
17
|
}
|
|
18
18
|
export interface ActionDef$actionTakesObjectSet extends ActionDefinition<'actionTakesObjectSet', 'Employee', actionTakesObjectSet> {
|
|
19
|
-
type: 'action';
|
|
20
19
|
apiName: 'actionTakesObjectSet';
|
|
21
20
|
description: 'An action which takes an Object Set';
|
|
22
21
|
modifiedEntities: {};
|
|
22
|
+
type: 'action';
|
|
23
23
|
parameters: ActionDef$actionTakesObjectSet$Params;
|
|
24
24
|
}
|
|
25
25
|
export declare const actionTakesObjectSet: ActionDef$actionTakesObjectSet;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import type { ActionDefinition } from '@osdk/api';
|
|
2
2
|
import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
|
|
3
3
|
export type ActionDef$createOffice$Params = {
|
|
4
|
-
officeId: {
|
|
5
|
-
multiplicity: false;
|
|
6
|
-
type: 'string';
|
|
7
|
-
nullable: false;
|
|
8
|
-
};
|
|
9
4
|
address: {
|
|
5
|
+
description: "The office's physical address (not necessarily shipping address)";
|
|
10
6
|
multiplicity: false;
|
|
11
|
-
type: 'string';
|
|
12
7
|
nullable: true;
|
|
13
|
-
|
|
8
|
+
type: 'string';
|
|
14
9
|
};
|
|
15
10
|
capacity: {
|
|
11
|
+
description: 'The maximum seated-at-desk capacity of the office (maximum fire-safe capacity may be higher)';
|
|
16
12
|
multiplicity: false;
|
|
17
|
-
type: 'integer';
|
|
18
13
|
nullable: true;
|
|
19
|
-
|
|
14
|
+
type: 'integer';
|
|
15
|
+
};
|
|
16
|
+
officeId: {
|
|
17
|
+
multiplicity: false;
|
|
18
|
+
nullable: false;
|
|
19
|
+
type: 'string';
|
|
20
20
|
};
|
|
21
21
|
officeNames: {
|
|
22
|
+
description: 'A list of all office names';
|
|
22
23
|
multiplicity: true;
|
|
23
|
-
type: 'string';
|
|
24
24
|
nullable: true;
|
|
25
|
-
|
|
25
|
+
type: 'string';
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export type createOffice$Params = NOOP<OsdkActionParameters<ActionDef$createOffice$Params>>;
|
|
@@ -33,7 +33,6 @@ export interface createOffice {
|
|
|
33
33
|
<OP extends ApplyActionOptions>(args: createOffice$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
34
34
|
}
|
|
35
35
|
export interface ActionDef$createOffice extends ActionDefinition<'createOffice', 'Office', createOffice> {
|
|
36
|
-
type: 'action';
|
|
37
36
|
apiName: 'createOffice';
|
|
38
37
|
description: "Create an office's";
|
|
39
38
|
modifiedEntities: {
|
|
@@ -42,6 +41,7 @@ export interface ActionDef$createOffice extends ActionDefinition<'createOffice',
|
|
|
42
41
|
modified: false;
|
|
43
42
|
};
|
|
44
43
|
};
|
|
44
|
+
type: 'action';
|
|
45
45
|
parameters: ActionDef$createOffice$Params;
|
|
46
46
|
}
|
|
47
47
|
export declare const createOffice: ActionDef$createOffice;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import type { ActionDefinition } from '@osdk/api';
|
|
2
2
|
import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
|
|
3
3
|
export type ActionDef$createOfficeAndEmployee$Params = {
|
|
4
|
-
officeId: {
|
|
5
|
-
multiplicity: false;
|
|
6
|
-
type: 'string';
|
|
7
|
-
nullable: false;
|
|
8
|
-
};
|
|
9
4
|
address: {
|
|
5
|
+
description: "The office's physical address (not necessarily shipping address)";
|
|
10
6
|
multiplicity: false;
|
|
11
|
-
type: 'string';
|
|
12
7
|
nullable: true;
|
|
13
|
-
|
|
8
|
+
type: 'string';
|
|
14
9
|
};
|
|
15
10
|
capacity: {
|
|
16
|
-
multiplicity: false;
|
|
17
|
-
type: 'integer';
|
|
18
|
-
nullable: true;
|
|
19
11
|
description: 'The maximum seated-at-desk capacity of the office (maximum fire-safe capacity may be higher)';
|
|
20
|
-
|
|
21
|
-
officeNames: {
|
|
22
|
-
multiplicity: true;
|
|
23
|
-
type: 'string';
|
|
12
|
+
multiplicity: false;
|
|
24
13
|
nullable: true;
|
|
25
|
-
|
|
14
|
+
type: 'integer';
|
|
26
15
|
};
|
|
27
16
|
employeeId: {
|
|
17
|
+
description: 'New employee Id';
|
|
28
18
|
multiplicity: false;
|
|
19
|
+
nullable: false;
|
|
29
20
|
type: 'integer';
|
|
21
|
+
};
|
|
22
|
+
officeId: {
|
|
23
|
+
multiplicity: false;
|
|
30
24
|
nullable: false;
|
|
31
|
-
|
|
25
|
+
type: 'string';
|
|
26
|
+
};
|
|
27
|
+
officeNames: {
|
|
28
|
+
description: 'A list of all office names';
|
|
29
|
+
multiplicity: true;
|
|
30
|
+
nullable: true;
|
|
31
|
+
type: 'string';
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
export type createOfficeAndEmployee$Params = NOOP<OsdkActionParameters<ActionDef$createOfficeAndEmployee$Params>>;
|
|
@@ -39,7 +39,6 @@ export interface createOfficeAndEmployee {
|
|
|
39
39
|
<OP extends ApplyActionOptions>(args: createOfficeAndEmployee$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
40
40
|
}
|
|
41
41
|
export interface ActionDef$createOfficeAndEmployee extends ActionDefinition<'createOfficeAndEmployee', 'Office' | 'Employee', createOfficeAndEmployee> {
|
|
42
|
-
type: 'action';
|
|
43
42
|
apiName: 'createOfficeAndEmployee';
|
|
44
43
|
description: 'Create an office and employee';
|
|
45
44
|
modifiedEntities: {
|
|
@@ -52,6 +51,7 @@ export interface ActionDef$createOfficeAndEmployee extends ActionDefinition<'cre
|
|
|
52
51
|
modified: false;
|
|
53
52
|
};
|
|
54
53
|
};
|
|
54
|
+
type: 'action';
|
|
55
55
|
parameters: ActionDef$createOfficeAndEmployee$Params;
|
|
56
56
|
}
|
|
57
57
|
export declare const createOfficeAndEmployee: ActionDef$createOfficeAndEmployee;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import type { ActionDefinition } from '@osdk/api';
|
|
2
2
|
import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
|
|
3
3
|
export type ActionDef$moveOffice$Params = {
|
|
4
|
-
officeId: {
|
|
5
|
-
multiplicity: false;
|
|
6
|
-
type: 'string';
|
|
7
|
-
nullable: false;
|
|
8
|
-
};
|
|
9
4
|
newAddress: {
|
|
5
|
+
description: "The office's new physical address (not necessarily shipping address)";
|
|
10
6
|
multiplicity: false;
|
|
11
|
-
type: 'string';
|
|
12
7
|
nullable: true;
|
|
13
|
-
|
|
8
|
+
type: 'string';
|
|
14
9
|
};
|
|
15
10
|
newCapacity: {
|
|
11
|
+
description: 'The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)';
|
|
16
12
|
multiplicity: false;
|
|
17
|
-
type: 'integer';
|
|
18
13
|
nullable: true;
|
|
19
|
-
|
|
14
|
+
type: 'integer';
|
|
15
|
+
};
|
|
16
|
+
officeId: {
|
|
17
|
+
multiplicity: false;
|
|
18
|
+
nullable: false;
|
|
19
|
+
type: 'string';
|
|
20
20
|
};
|
|
21
21
|
officeNames: {
|
|
22
|
+
description: 'A list of all office names';
|
|
22
23
|
multiplicity: true;
|
|
23
|
-
type: 'integer';
|
|
24
24
|
nullable: true;
|
|
25
|
-
|
|
25
|
+
type: 'integer';
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export type moveOffice$Params = NOOP<OsdkActionParameters<ActionDef$moveOffice$Params>>;
|
|
@@ -33,7 +33,6 @@ export interface moveOffice {
|
|
|
33
33
|
<OP extends ApplyActionOptions>(args: moveOffice$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
34
34
|
}
|
|
35
35
|
export interface ActionDef$moveOffice extends ActionDefinition<'moveOffice', 'Office', moveOffice> {
|
|
36
|
-
type: 'action';
|
|
37
36
|
apiName: 'moveOffice';
|
|
38
37
|
description: "Update an office's physical location";
|
|
39
38
|
modifiedEntities: {
|
|
@@ -42,6 +41,7 @@ export interface ActionDef$moveOffice extends ActionDefinition<'moveOffice', 'Of
|
|
|
42
41
|
modified: true;
|
|
43
42
|
};
|
|
44
43
|
};
|
|
44
|
+
type: 'action';
|
|
45
45
|
parameters: ActionDef$moveOffice$Params;
|
|
46
46
|
}
|
|
47
47
|
export declare const moveOffice: ActionDef$moveOffice;
|
|
@@ -3,18 +3,18 @@ import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionPa
|
|
|
3
3
|
export type ActionDef$promoteEmployee$Params = {
|
|
4
4
|
employeeId: {
|
|
5
5
|
multiplicity: false;
|
|
6
|
-
type: 'integer';
|
|
7
6
|
nullable: false;
|
|
7
|
+
type: 'integer';
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
newCompensation: {
|
|
10
10
|
multiplicity: false;
|
|
11
|
-
type: 'string';
|
|
12
11
|
nullable: false;
|
|
12
|
+
type: 'double';
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
newTitle: {
|
|
15
15
|
multiplicity: false;
|
|
16
|
-
type: 'double';
|
|
17
16
|
nullable: false;
|
|
17
|
+
type: 'string';
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
export type promoteEmployee$Params = NOOP<OsdkActionParameters<ActionDef$promoteEmployee$Params>>;
|
|
@@ -25,7 +25,6 @@ export interface promoteEmployee {
|
|
|
25
25
|
<OP extends ApplyActionOptions>(args: promoteEmployee$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
26
26
|
}
|
|
27
27
|
export interface ActionDef$promoteEmployee extends ActionDefinition<'promoteEmployee', 'Employee', promoteEmployee> {
|
|
28
|
-
type: 'action';
|
|
29
28
|
apiName: 'promoteEmployee';
|
|
30
29
|
description: "Update an employee's title and compensation";
|
|
31
30
|
modifiedEntities: {
|
|
@@ -34,6 +33,7 @@ export interface ActionDef$promoteEmployee extends ActionDefinition<'promoteEmpl
|
|
|
34
33
|
modified: true;
|
|
35
34
|
};
|
|
36
35
|
};
|
|
36
|
+
type: 'action';
|
|
37
37
|
parameters: ActionDef$promoteEmployee$Params;
|
|
38
38
|
}
|
|
39
39
|
export declare const promoteEmployee: ActionDef$promoteEmployee;
|
|
@@ -4,18 +4,18 @@ import type { Employee } from '../objects.js';
|
|
|
4
4
|
export type ActionDef$promoteEmployeeObject$Params = {
|
|
5
5
|
employee: {
|
|
6
6
|
multiplicity: false;
|
|
7
|
-
type: ObjectActionDataType<'Employee', Employee>;
|
|
8
7
|
nullable: false;
|
|
8
|
+
type: ObjectActionDataType<'Employee', Employee>;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
newCompensation: {
|
|
11
11
|
multiplicity: false;
|
|
12
|
-
type: 'string';
|
|
13
12
|
nullable: false;
|
|
13
|
+
type: 'double';
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
newTitle: {
|
|
16
16
|
multiplicity: false;
|
|
17
|
-
type: 'double';
|
|
18
17
|
nullable: false;
|
|
18
|
+
type: 'string';
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export type promoteEmployeeObject$Params = NOOP<OsdkActionParameters<ActionDef$promoteEmployeeObject$Params>>;
|
|
@@ -26,7 +26,6 @@ export interface promoteEmployeeObject {
|
|
|
26
26
|
<OP extends ApplyActionOptions>(args: promoteEmployeeObject$Params, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
27
27
|
}
|
|
28
28
|
export interface ActionDef$promoteEmployeeObject extends ActionDefinition<'promoteEmployeeObject', 'Employee', promoteEmployeeObject> {
|
|
29
|
-
type: 'action';
|
|
30
29
|
apiName: 'promoteEmployeeObject';
|
|
31
30
|
description: "Update an employee's title and compensation";
|
|
32
31
|
modifiedEntities: {
|
|
@@ -35,6 +34,7 @@ export interface ActionDef$promoteEmployeeObject extends ActionDefinition<'promo
|
|
|
35
34
|
modified: true;
|
|
36
35
|
};
|
|
37
36
|
};
|
|
37
|
+
type: 'action';
|
|
38
38
|
parameters: ActionDef$promoteEmployeeObject$Params;
|
|
39
39
|
}
|
|
40
40
|
export declare const promoteEmployeeObject: ActionDef$promoteEmployeeObject;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InterfaceDefinition, PropertyDef } from '@osdk/api';
|
|
2
|
+
export interface FooInterface extends InterfaceDefinition<'FooInterface', FooInterface> {
|
|
3
|
+
links: {};
|
|
4
|
+
properties: {
|
|
5
|
+
fooSpt: PropertyDef<'string', 'nullable', 'single'>;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const FooInterface: FooInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './interfaces/FooInterface.js';
|
|
@@ -2,19 +2,26 @@ import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from
|
|
|
2
2
|
import type { Office } from './Office.js';
|
|
3
3
|
export interface Employee extends ObjectTypeDefinition<'Employee', Employee> {
|
|
4
4
|
description: 'A full-time or part-time \n\n employee of our firm';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
implements: ['FooInterface'];
|
|
6
|
+
inverseSpts: {
|
|
7
|
+
fooSpt: 'fullName';
|
|
8
|
+
};
|
|
7
9
|
links: {
|
|
8
|
-
peeps: ObjectTypeLinkDefinition<Employee, true>;
|
|
9
10
|
lead: ObjectTypeLinkDefinition<Employee, false>;
|
|
10
11
|
officeLink: ObjectTypeLinkDefinition<Office, false>;
|
|
12
|
+
peeps: ObjectTypeLinkDefinition<Employee, true>;
|
|
11
13
|
};
|
|
14
|
+
primaryKeyApiName: 'employeeId';
|
|
15
|
+
primaryKeyType: 'integer';
|
|
12
16
|
properties: {
|
|
13
17
|
employeeId: PropertyDef<'integer', 'non-nullable', 'single'>;
|
|
18
|
+
employeeStatus: PropertyDef<'stringTimeseries', 'nullable', 'single'>;
|
|
14
19
|
fullName: PropertyDef<'string', 'nullable', 'single'>;
|
|
15
20
|
office: PropertyDef<'string', 'nullable', 'single'>;
|
|
16
21
|
startDate: PropertyDef<'datetime', 'nullable', 'single'>;
|
|
17
|
-
|
|
22
|
+
};
|
|
23
|
+
spts: {
|
|
24
|
+
fullName: 'fooSpt';
|
|
18
25
|
};
|
|
19
26
|
}
|
|
20
27
|
export declare const Employee: Employee;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
|
|
2
2
|
export interface ObjectWithTimestampPrimaryKey extends ObjectTypeDefinition<'ObjectWithTimestampPrimaryKey', ObjectWithTimestampPrimaryKey> {
|
|
3
3
|
description: 'Object Type With Timestamp Primary Key';
|
|
4
|
+
implements: [];
|
|
5
|
+
inverseSpts: {};
|
|
6
|
+
links: {};
|
|
4
7
|
primaryKeyApiName: 'timestamp';
|
|
5
8
|
primaryKeyType: 'timestamp';
|
|
6
|
-
links: {};
|
|
7
9
|
properties: {
|
|
8
10
|
timestamp: PropertyDef<'timestamp', 'non-nullable', 'single'>;
|
|
9
11
|
value: PropertyDef<'string', 'nullable', 'single'>;
|
|
10
12
|
};
|
|
13
|
+
spts: {};
|
|
11
14
|
}
|
|
12
15
|
export declare const ObjectWithTimestampPrimaryKey: ObjectWithTimestampPrimaryKey;
|
|
@@ -2,16 +2,19 @@ import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from
|
|
|
2
2
|
import type { Employee } from './Employee.js';
|
|
3
3
|
export interface Office extends ObjectTypeDefinition<'Office', Office> {
|
|
4
4
|
description: 'A office in our Company';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
implements: [];
|
|
6
|
+
inverseSpts: {};
|
|
7
7
|
links: {
|
|
8
8
|
occupants: ObjectTypeLinkDefinition<Employee, true>;
|
|
9
9
|
};
|
|
10
|
+
primaryKeyApiName: 'officeId';
|
|
11
|
+
primaryKeyType: 'string';
|
|
10
12
|
properties: {
|
|
11
|
-
officeId: PropertyDef<'string', 'non-nullable', 'single'>;
|
|
12
13
|
entrance: PropertyDef<'geopoint', 'nullable', 'single'>;
|
|
13
|
-
occupiedArea: PropertyDef<'geoshape', 'nullable', 'single'>;
|
|
14
14
|
name: PropertyDef<'string', 'nullable', 'single'>;
|
|
15
|
+
occupiedArea: PropertyDef<'geoshape', 'nullable', 'single'>;
|
|
16
|
+
officeId: PropertyDef<'string', 'non-nullable', 'single'>;
|
|
15
17
|
};
|
|
18
|
+
spts: {};
|
|
16
19
|
}
|
|
17
20
|
export declare const Office: Office;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
|
|
2
2
|
export interface equipment extends ObjectTypeDefinition<'equipment', equipment> {
|
|
3
|
+
implements: [];
|
|
4
|
+
inverseSpts: {};
|
|
5
|
+
links: {};
|
|
3
6
|
primaryKeyApiName: 'equipmentId';
|
|
4
7
|
primaryKeyType: 'string';
|
|
5
|
-
links: {};
|
|
6
8
|
properties: {
|
|
7
9
|
equipmentId: PropertyDef<'string', 'non-nullable', 'single'>;
|
|
8
10
|
type: PropertyDef<'string', 'nullable', 'single'>;
|
|
9
11
|
};
|
|
12
|
+
spts: {};
|
|
10
13
|
}
|
|
11
14
|
export declare const equipment: equipment;
|
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
|
|
2
2
|
export interface objectTypeWithAllPropertyTypes extends ObjectTypeDefinition<'objectTypeWithAllPropertyTypes', objectTypeWithAllPropertyTypes> {
|
|
3
3
|
description: 'An object type with all property types';
|
|
4
|
+
implements: [];
|
|
5
|
+
inverseSpts: {};
|
|
6
|
+
links: {};
|
|
4
7
|
primaryKeyApiName: 'id';
|
|
5
8
|
primaryKeyType: 'integer';
|
|
6
|
-
links: {};
|
|
7
9
|
properties: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
attachment: PropertyDef<'attachment', 'nullable', 'single'>;
|
|
11
|
+
attachment2: PropertyDef<'attachment', 'nullable', 'single'>;
|
|
12
|
+
attachmentArray: PropertyDef<'attachment', 'nullable', 'array'>;
|
|
10
13
|
boolean: PropertyDef<'boolean', 'nullable', 'single'>;
|
|
14
|
+
booleanArray: PropertyDef<'boolean', 'nullable', 'array'>;
|
|
15
|
+
byte: PropertyDef<'byte', 'nullable', 'single'>;
|
|
16
|
+
byteArray: PropertyDef<'byte', 'nullable', 'array'>;
|
|
11
17
|
date: PropertyDef<'datetime', 'nullable', 'single'>;
|
|
18
|
+
dateArray: PropertyDef<'datetime', 'nullable', 'array'>;
|
|
12
19
|
dateTime: PropertyDef<'timestamp', 'nullable', 'single'>;
|
|
20
|
+
dateTimeArray: PropertyDef<'timestamp', 'nullable', 'array'>;
|
|
13
21
|
decimal: PropertyDef<'decimal', 'nullable', 'single'>;
|
|
14
|
-
|
|
15
|
-
long: PropertyDef<'long', 'nullable', 'single'>;
|
|
16
|
-
short: PropertyDef<'short', 'nullable', 'single'>;
|
|
17
|
-
float: PropertyDef<'float', 'nullable', 'single'>;
|
|
22
|
+
decimalArray: PropertyDef<'decimal', 'nullable', 'array'>;
|
|
18
23
|
double: PropertyDef<'double', 'nullable', 'single'>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
doubleArray: PropertyDef<'double', 'nullable', 'array'>;
|
|
25
|
+
float: PropertyDef<'float', 'nullable', 'single'>;
|
|
26
|
+
floatArray: PropertyDef<'float', 'nullable', 'array'>;
|
|
22
27
|
geoPoint: PropertyDef<'geopoint', 'nullable', 'single'>;
|
|
28
|
+
geoPointArray: PropertyDef<'geopoint', 'nullable', 'array'>;
|
|
23
29
|
geoShape: PropertyDef<'geoshape', 'nullable', 'single'>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
dateTimeArray: PropertyDef<'timestamp', 'nullable', 'array'>;
|
|
28
|
-
decimalArray: PropertyDef<'decimal', 'nullable', 'array'>;
|
|
30
|
+
geoShapeArray: PropertyDef<'geoshape', 'nullable', 'array'>;
|
|
31
|
+
id: PropertyDef<'integer', 'non-nullable', 'single'>;
|
|
32
|
+
integer: PropertyDef<'integer', 'nullable', 'single'>;
|
|
29
33
|
integerArray: PropertyDef<'integer', 'nullable', 'array'>;
|
|
34
|
+
long: PropertyDef<'long', 'nullable', 'single'>;
|
|
30
35
|
longArray: PropertyDef<'long', 'nullable', 'array'>;
|
|
36
|
+
short: PropertyDef<'short', 'nullable', 'single'>;
|
|
31
37
|
shortArray: PropertyDef<'short', 'nullable', 'array'>;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
byteArray: PropertyDef<'byte', 'nullable', 'array'>;
|
|
35
|
-
attachmentArray: PropertyDef<'attachment', 'nullable', 'array'>;
|
|
36
|
-
geoPointArray: PropertyDef<'geopoint', 'nullable', 'array'>;
|
|
37
|
-
geoShapeArray: PropertyDef<'geoshape', 'nullable', 'array'>;
|
|
38
|
+
string: PropertyDef<'string', 'nullable', 'single'>;
|
|
39
|
+
stringArray: PropertyDef<'string', 'nullable', 'array'>;
|
|
38
40
|
};
|
|
41
|
+
spts: {};
|
|
39
42
|
}
|
|
40
43
|
export declare const objectTypeWithAllPropertyTypes: objectTypeWithAllPropertyTypes;
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { Client } from "./Client.js";
|
|
2
2
|
export { createClient } from "./createClient.js";
|
|
3
|
-
export type { ObjectSet } from "./objectSet/ObjectSet.js";
|
|
3
|
+
export type { InterfaceObjectSet, ObjectSet } from "./objectSet/ObjectSet.js";
|
|
4
4
|
export type { ObjectSetListener } from "./objectSet/ObjectSetListener.js";
|
|
5
5
|
export type { PageResult } from "./PageResult.js";
|
|
6
6
|
export * as Objects from "./object/index.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Attachment } from "../object/Attachment.js";
|
|
2
|
+
/**
|
|
3
|
+
* Map from the DataValue type to the typescript type that we return
|
|
4
|
+
*/
|
|
5
|
+
export interface DataValueWireToClient {
|
|
6
|
+
attachment: Attachment;
|
|
7
|
+
boolean: boolean;
|
|
8
|
+
byte: number;
|
|
9
|
+
datetime: string;
|
|
10
|
+
decimal: string;
|
|
11
|
+
float: number;
|
|
12
|
+
double: number;
|
|
13
|
+
integer: number;
|
|
14
|
+
long: string;
|
|
15
|
+
marking: string;
|
|
16
|
+
null: null;
|
|
17
|
+
short: number;
|
|
18
|
+
string: string;
|
|
19
|
+
timestamp: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Map from the DataValue type to the typescript type that we accept
|
|
23
|
+
*/
|
|
24
|
+
export interface DataValueClientToWire {
|
|
25
|
+
attachment: Attachment;
|
|
26
|
+
boolean: boolean;
|
|
27
|
+
byte: number;
|
|
28
|
+
datetime: string;
|
|
29
|
+
decimal: string | number;
|
|
30
|
+
float: number;
|
|
31
|
+
double: number;
|
|
32
|
+
integer: number;
|
|
33
|
+
long: string | number;
|
|
34
|
+
marking: string;
|
|
35
|
+
null: null;
|
|
36
|
+
short: number;
|
|
37
|
+
string: string;
|
|
38
|
+
timestamp: string;
|
|
39
|
+
}
|