@osdk/client 0.9.0 → 0.11.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.
Files changed (91) hide show
  1. package/build/js/chunk-GOBQUVQZ.mjs +1138 -0
  2. package/build/js/chunk-GOBQUVQZ.mjs.map +1 -0
  3. package/build/js/chunk-LK4VDWCG.cjs +1151 -0
  4. package/build/js/chunk-LK4VDWCG.cjs.map +1 -0
  5. package/build/js/index.cjs +101 -636
  6. package/build/js/index.cjs.map +1 -1
  7. package/build/js/index.mjs +99 -634
  8. package/build/js/index.mjs.map +1 -1
  9. package/build/js/public/objects.cjs +5 -5
  10. package/build/js/public/objects.mjs +1 -1
  11. package/build/types/Client.d.ts +11 -5
  12. package/build/types/MinimalClientContext.d.ts +13 -0
  13. package/build/types/ObjectSetCreator.d.ts +6 -4
  14. package/build/types/OsdkObject.d.ts +1 -1
  15. package/build/types/OsdkObjectFrom.d.ts +17 -16
  16. package/build/types/actions/Actions.d.ts +5 -4
  17. package/build/types/actions/applyAction.d.ts +2 -2
  18. package/build/types/actions/createActionInvoker.d.ts +5 -4
  19. package/build/types/createClient.d.ts +5 -2
  20. package/build/types/createMinimalClient.d.ts +3 -0
  21. package/build/types/definitions/LinkDefinitions.d.ts +8 -12
  22. package/build/types/generatedNoCheck/Ontology.d.ts +5 -5
  23. package/build/types/generatedNoCheck/index.d.ts +3 -0
  24. package/build/types/generatedNoCheck/ontology/actions/actionTakesAttachment.d.ts +1 -1
  25. package/build/types/generatedNoCheck/ontology/actions/actionTakesObjectSet.d.ts +2 -2
  26. package/build/types/generatedNoCheck/ontology/actions/createOffice.d.ts +4 -4
  27. package/build/types/generatedNoCheck/ontology/actions/createOfficeAndEmployee.d.ts +5 -5
  28. package/build/types/generatedNoCheck/ontology/actions/moveOffice.d.ts +4 -4
  29. package/build/types/generatedNoCheck/ontology/actions/promoteEmployee.d.ts +3 -3
  30. package/build/types/generatedNoCheck/ontology/actions/promoteEmployeeObject.d.ts +4 -4
  31. package/build/types/generatedNoCheck/ontology/objects/Employee.d.ts +13 -37
  32. package/build/types/generatedNoCheck/ontology/objects/ObjectWithTimestampPrimaryKey.d.ts +6 -15
  33. package/build/types/generatedNoCheck/ontology/objects/Office.d.ts +10 -29
  34. package/build/types/generatedNoCheck/ontology/objects/equipment.d.ts +6 -16
  35. package/build/types/generatedNoCheck/ontology/objects/objectTypeWithAllPropertyTypes.d.ts +34 -155
  36. package/build/types/index.d.ts +3 -1
  37. package/build/types/object/Cache.d.ts +33 -0
  38. package/build/types/object/aggregate.d.ts +11 -0
  39. package/build/types/object/convertWireToOsdkObjects.d.ts +2 -3
  40. package/build/types/object/fetchPage.d.ts +22 -0
  41. package/build/types/object/fetchPage.test.d.ts +1 -0
  42. package/build/types/object/fetchSingle.d.ts +6 -0
  43. package/build/types/object/index.d.ts +2 -2
  44. package/build/types/objectSet/LinkUtils.d.ts +3 -0
  45. package/build/types/objectSet/ObjectSet.d.ts +18 -10
  46. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +4 -4
  47. package/build/types/objectSet/createObjectSet.d.ts +4 -3
  48. package/build/types/ontology/OntologyProvider.d.ts +20 -0
  49. package/build/types/ontology/loadFullObjectMetadata.d.ts +3 -0
  50. package/build/types/ontology/providers/StandardOntologyProvider.d.ts +5 -0
  51. package/build/types/ontology/providers/StandardOntologyProvider.test.d.ts +1 -0
  52. package/build/types/query/WhereClause.d.ts +2 -1
  53. package/build/types/query/aggregations/AggregatableKeys.d.ts +1 -1
  54. package/build/types/query/aggregations/AggregateOpts.d.ts +3 -3
  55. package/build/types/query/aggregations/AggregationResultsWithGroups.d.ts +11 -7
  56. package/build/types/query/aggregations/AggregationResultsWithoutGroups.d.ts +4 -1
  57. package/build/types/query/aggregations/AggregationsClause.d.ts +5 -2
  58. package/build/types/query/aggregations/AggregationsClause.test.d.ts +2 -0
  59. package/build/types/query/aggregations/AggregationsResults.d.ts +3 -2
  60. package/build/types/query/aggregations/GroupByClause.d.ts +8 -0
  61. package/build/types/query/aggregations/GroupByClause.test.d.ts +1 -0
  62. package/build/types/query/aggregations/GroupByMapper.d.ts +7 -1
  63. package/build/types/util/test/mockOntology.d.ts +3 -0
  64. package/changelog/0.10.0/pr-74.v2.yml +5 -0
  65. package/changelog/0.10.0/pr-78.v2.yml +5 -0
  66. package/changelog/0.10.0/pr-79.v2.yml +5 -0
  67. package/changelog/0.11.0/pr-100.v2.yml +5 -0
  68. package/changelog/0.11.0/pr-67.v2.yml +5 -0
  69. package/changelog/0.11.0/pr-83.v2.yml +5 -0
  70. package/changelog/0.11.0/pr-84.v2.yml +5 -0
  71. package/changelog/0.11.0/pr-86.v2.yml +5 -0
  72. package/changelog/0.11.0/pr-88.v2.yml +5 -0
  73. package/changelog/0.11.0/pr-89.v2.yml +5 -0
  74. package/changelog/0.11.0/pr-91.v2.yml +5 -0
  75. package/changelog/0.11.0/pr-95.v2.yml +5 -0
  76. package/changelog/0.11.0/pr-96.v2.yml +5 -0
  77. package/changelog/0.11.0/pr-99.v2.yml +5 -0
  78. package/package.json +7 -5
  79. package/build/js/chunk-BQNFWSLL.mjs +0 -419
  80. package/build/js/chunk-BQNFWSLL.mjs.map +0 -1
  81. package/build/js/chunk-KAL57TC5.cjs +0 -430
  82. package/build/js/chunk-KAL57TC5.cjs.map +0 -1
  83. package/build/types/createCachedOntologyTransform.d.ts +0 -7
  84. package/build/types/object/aggregateOrThrow.d.ts +0 -6
  85. package/build/types/object/fetchPageOrThrow.d.ts +0 -13
  86. package/build/types/object/followLinkOrThrow.d.ts +0 -5
  87. package/build/types/object/getLinkedObjectByPkOrThrow.d.ts +0 -4
  88. package/build/types/object/getLinkedObjectOrThrow.d.ts +0 -7
  89. package/build/types/object/pageLinkedObjectsOrThrow.d.ts +0 -7
  90. package/build/types/objectSet/LinkTypesFrom.d.ts +0 -2
  91. /package/build/types/object/{aggregateOrThrow.test.d.ts → aggregate.test.d.ts} +0 -0
@@ -2,8 +2,8 @@ import type { ActionDefinition } from '@osdk/api';
2
2
  import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
3
3
  export type ActionDef$actionTakesAttachment$Params = {
4
4
  attachment: {
5
- type: 'attachment';
6
5
  multiplicity: false;
6
+ type: 'attachment';
7
7
  nullable: false;
8
8
  };
9
9
  };
@@ -1,10 +1,10 @@
1
1
  import type { ActionDefinition, ObjectSetActionDataType } from '@osdk/api';
2
2
  import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
3
- import type { EmployeeDef } from '../objects.js';
3
+ import type { Employee } from '../objects.js';
4
4
  export type ActionDef$actionTakesObjectSet$Params = {
5
5
  employees: {
6
- type: ObjectSetActionDataType<'Employee', EmployeeDef>;
7
6
  multiplicity: false;
7
+ type: ObjectSetActionDataType<'Employee', Employee>;
8
8
  nullable: false;
9
9
  };
10
10
  };
@@ -2,25 +2,25 @@ 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
4
  officeId: {
5
- type: 'string';
6
5
  multiplicity: false;
6
+ type: 'string';
7
7
  nullable: false;
8
8
  };
9
9
  address: {
10
- type: 'string';
11
10
  multiplicity: false;
11
+ type: 'string';
12
12
  nullable: true;
13
13
  description: "The office's physical address (not necessarily shipping address)";
14
14
  };
15
15
  capacity: {
16
- type: 'integer';
17
16
  multiplicity: false;
17
+ type: 'integer';
18
18
  nullable: true;
19
19
  description: 'The maximum seated-at-desk capacity of the office (maximum fire-safe capacity may be higher)';
20
20
  };
21
21
  officeNames: {
22
- type: 'string';
23
22
  multiplicity: true;
23
+ type: 'string';
24
24
  nullable: true;
25
25
  description: 'A list of all office names';
26
26
  };
@@ -2,31 +2,31 @@ 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
4
  officeId: {
5
- type: 'string';
6
5
  multiplicity: false;
6
+ type: 'string';
7
7
  nullable: false;
8
8
  };
9
9
  address: {
10
- type: 'string';
11
10
  multiplicity: false;
11
+ type: 'string';
12
12
  nullable: true;
13
13
  description: "The office's physical address (not necessarily shipping address)";
14
14
  };
15
15
  capacity: {
16
- type: 'integer';
17
16
  multiplicity: false;
17
+ type: 'integer';
18
18
  nullable: true;
19
19
  description: 'The maximum seated-at-desk capacity of the office (maximum fire-safe capacity may be higher)';
20
20
  };
21
21
  officeNames: {
22
- type: 'string';
23
22
  multiplicity: true;
23
+ type: 'string';
24
24
  nullable: true;
25
25
  description: 'A list of all office names';
26
26
  };
27
27
  employeeId: {
28
- type: 'integer';
29
28
  multiplicity: false;
29
+ type: 'integer';
30
30
  nullable: false;
31
31
  description: 'New employee Id';
32
32
  };
@@ -2,25 +2,25 @@ 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
4
  officeId: {
5
- type: 'string';
6
5
  multiplicity: false;
6
+ type: 'string';
7
7
  nullable: false;
8
8
  };
9
9
  newAddress: {
10
- type: 'string';
11
10
  multiplicity: false;
11
+ type: 'string';
12
12
  nullable: true;
13
13
  description: "The office's new physical address (not necessarily shipping address)";
14
14
  };
15
15
  newCapacity: {
16
- type: 'integer';
17
16
  multiplicity: false;
17
+ type: 'integer';
18
18
  nullable: true;
19
19
  description: 'The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)';
20
20
  };
21
21
  officeNames: {
22
- type: 'integer';
23
22
  multiplicity: true;
23
+ type: 'integer';
24
24
  nullable: true;
25
25
  description: 'A list of all office names';
26
26
  };
@@ -2,18 +2,18 @@ import type { ActionDefinition } from '@osdk/api';
2
2
  import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
3
3
  export type ActionDef$promoteEmployee$Params = {
4
4
  employeeId: {
5
- type: 'integer';
6
5
  multiplicity: false;
6
+ type: 'integer';
7
7
  nullable: false;
8
8
  };
9
9
  newTitle: {
10
- type: 'string';
11
10
  multiplicity: false;
11
+ type: 'string';
12
12
  nullable: false;
13
13
  };
14
14
  newCompensation: {
15
- type: 'double';
16
15
  multiplicity: false;
16
+ type: 'double';
17
17
  nullable: false;
18
18
  };
19
19
  };
@@ -1,20 +1,20 @@
1
1
  import type { ActionDefinition, ObjectActionDataType } from '@osdk/api';
2
2
  import type { ActionReturnTypeForOptions, ApplyActionOptions, NOOP, OsdkActionParameters } from '@osdk/client';
3
- import type { EmployeeDef } from '../objects.js';
3
+ import type { Employee } from '../objects.js';
4
4
  export type ActionDef$promoteEmployeeObject$Params = {
5
5
  employee: {
6
- type: ObjectActionDataType<'Employee', EmployeeDef>;
7
6
  multiplicity: false;
7
+ type: ObjectActionDataType<'Employee', Employee>;
8
8
  nullable: false;
9
9
  };
10
10
  newTitle: {
11
- type: 'string';
12
11
  multiplicity: false;
12
+ type: 'string';
13
13
  nullable: false;
14
14
  };
15
15
  newCompensation: {
16
- type: 'double';
17
16
  multiplicity: false;
17
+ type: 'double';
18
18
  nullable: false;
19
19
  };
20
20
  };
@@ -1,44 +1,20 @@
1
- import type { ObjectTypeDefinition, ObjectTypeLinkDefinition } from '@osdk/api';
2
- import type { OfficeDef } from './Office.js';
3
- export interface EmployeeDef extends ObjectTypeDefinition<'Employee'> {
4
- type: 'object';
5
- apiName: 'Employee';
1
+ import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from '@osdk/api';
2
+ import type { Office } from './Office.js';
3
+ export interface Employee extends ObjectTypeDefinition<'Employee', Employee> {
6
4
  description: 'A full-time or part-time \n\n employee of our firm';
5
+ primaryKeyApiName: 'employeeId';
7
6
  primaryKeyType: 'integer';
8
7
  links: {
9
- peeps: ObjectTypeLinkDefinition<EmployeeDef, true>;
10
- lead: ObjectTypeLinkDefinition<EmployeeDef, false>;
11
- officeLink: ObjectTypeLinkDefinition<OfficeDef, false>;
8
+ peeps: ObjectTypeLinkDefinition<Employee, true>;
9
+ lead: ObjectTypeLinkDefinition<Employee, false>;
10
+ officeLink: ObjectTypeLinkDefinition<Office, false>;
12
11
  };
13
12
  properties: {
14
- employeeId: {
15
- multiplicity: false;
16
- type: 'integer';
17
- nullable: false;
18
- };
19
- fullName: {
20
- multiplicity: false;
21
- type: 'string';
22
- nullable: true;
23
- };
24
- office: {
25
- multiplicity: false;
26
- description: 'The unique "ID" of the employee\'s \\"primary\\" assigned office.\n This is some more text.';
27
- type: 'string';
28
- nullable: true;
29
- };
30
- startDate: {
31
- multiplicity: false;
32
- description: 'The date the employee was hired (most recently, if they were re-hired)';
33
- type: 'datetime';
34
- nullable: true;
35
- };
36
- employeeStatus: {
37
- multiplicity: false;
38
- description: 'TimeSeries of the status of the employee';
39
- type: 'stringTimeseries';
40
- nullable: true;
41
- };
13
+ employeeId: PropertyDef<'integer', 'non-nullable', 'single'>;
14
+ fullName: PropertyDef<'string', 'nullable', 'single'>;
15
+ office: PropertyDef<'string', 'nullable', 'single'>;
16
+ startDate: PropertyDef<'datetime', 'nullable', 'single'>;
17
+ employeeStatus: PropertyDef<'stringTimeseries', 'nullable', 'single'>;
42
18
  };
43
19
  }
44
- export declare const Employee: EmployeeDef;
20
+ export declare const Employee: Employee;
@@ -1,21 +1,12 @@
1
- import type { ObjectTypeDefinition } from '@osdk/api';
2
- export interface ObjectWithTimestampPrimaryKeyDef extends ObjectTypeDefinition<'ObjectWithTimestampPrimaryKey'> {
3
- type: 'object';
4
- apiName: 'ObjectWithTimestampPrimaryKey';
1
+ import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
2
+ export interface ObjectWithTimestampPrimaryKey extends ObjectTypeDefinition<'ObjectWithTimestampPrimaryKey', ObjectWithTimestampPrimaryKey> {
5
3
  description: 'Object Type With Timestamp Primary Key';
4
+ primaryKeyApiName: 'timestamp';
6
5
  primaryKeyType: 'timestamp';
7
6
  links: {};
8
7
  properties: {
9
- timestamp: {
10
- multiplicity: false;
11
- type: 'timestamp';
12
- nullable: false;
13
- };
14
- value: {
15
- multiplicity: false;
16
- type: 'string';
17
- nullable: true;
18
- };
8
+ timestamp: PropertyDef<'timestamp', 'non-nullable', 'single'>;
9
+ value: PropertyDef<'string', 'nullable', 'single'>;
19
10
  };
20
11
  }
21
- export declare const ObjectWithTimestampPrimaryKey: ObjectWithTimestampPrimaryKeyDef;
12
+ export declare const ObjectWithTimestampPrimaryKey: ObjectWithTimestampPrimaryKey;
@@ -1,36 +1,17 @@
1
- import type { ObjectTypeDefinition, ObjectTypeLinkDefinition } from '@osdk/api';
2
- import type { EmployeeDef } from './Employee.js';
3
- export interface OfficeDef extends ObjectTypeDefinition<'Office'> {
4
- type: 'object';
5
- apiName: 'Office';
1
+ import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from '@osdk/api';
2
+ import type { Employee } from './Employee.js';
3
+ export interface Office extends ObjectTypeDefinition<'Office', Office> {
6
4
  description: 'A office in our Company';
5
+ primaryKeyApiName: 'officeId';
7
6
  primaryKeyType: 'string';
8
7
  links: {
9
- occupants: ObjectTypeLinkDefinition<EmployeeDef, true>;
8
+ occupants: ObjectTypeLinkDefinition<Employee, true>;
10
9
  };
11
10
  properties: {
12
- officeId: {
13
- multiplicity: false;
14
- type: 'string';
15
- nullable: false;
16
- };
17
- entrance: {
18
- multiplicity: false;
19
- type: 'geopoint';
20
- nullable: true;
21
- };
22
- occupiedArea: {
23
- multiplicity: false;
24
- description: 'The occupied area of the Office';
25
- type: 'geoshape';
26
- nullable: true;
27
- };
28
- name: {
29
- multiplicity: false;
30
- description: 'The Name of the Office';
31
- type: 'string';
32
- nullable: true;
33
- };
11
+ officeId: PropertyDef<'string', 'non-nullable', 'single'>;
12
+ entrance: PropertyDef<'geopoint', 'nullable', 'single'>;
13
+ occupiedArea: PropertyDef<'geoshape', 'nullable', 'single'>;
14
+ name: PropertyDef<'string', 'nullable', 'single'>;
34
15
  };
35
16
  }
36
- export declare const Office: OfficeDef;
17
+ export declare const Office: Office;
@@ -1,21 +1,11 @@
1
- import type { ObjectTypeDefinition } from '@osdk/api';
2
- export interface equipmentDef extends ObjectTypeDefinition<'equipment'> {
3
- type: 'object';
4
- apiName: 'equipment';
1
+ import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
2
+ export interface equipment extends ObjectTypeDefinition<'equipment', equipment> {
3
+ primaryKeyApiName: 'equipmentId';
5
4
  primaryKeyType: 'string';
6
5
  links: {};
7
6
  properties: {
8
- equipmentId: {
9
- multiplicity: false;
10
- description: 'The id of an equipment';
11
- type: 'string';
12
- nullable: false;
13
- };
14
- type: {
15
- multiplicity: false;
16
- type: 'string';
17
- nullable: true;
18
- };
7
+ equipmentId: PropertyDef<'string', 'non-nullable', 'single'>;
8
+ type: PropertyDef<'string', 'nullable', 'single'>;
19
9
  };
20
10
  }
21
- export declare const equipment: equipmentDef;
11
+ export declare const equipment: equipment;
@@ -1,161 +1,40 @@
1
- import type { ObjectTypeDefinition } from '@osdk/api';
2
- export interface objectTypeWithAllPropertyTypesDef extends ObjectTypeDefinition<'objectTypeWithAllPropertyTypes'> {
3
- type: 'object';
4
- apiName: 'objectTypeWithAllPropertyTypes';
1
+ import type { ObjectTypeDefinition, PropertyDef } from '@osdk/api';
2
+ export interface objectTypeWithAllPropertyTypes extends ObjectTypeDefinition<'objectTypeWithAllPropertyTypes', objectTypeWithAllPropertyTypes> {
5
3
  description: 'An object type with all property types';
4
+ primaryKeyApiName: 'id';
6
5
  primaryKeyType: 'integer';
7
6
  links: {};
8
7
  properties: {
9
- id: {
10
- multiplicity: false;
11
- type: 'integer';
12
- nullable: false;
13
- };
14
- string: {
15
- multiplicity: false;
16
- type: 'string';
17
- nullable: true;
18
- };
19
- boolean: {
20
- multiplicity: false;
21
- type: 'boolean';
22
- nullable: true;
23
- };
24
- date: {
25
- multiplicity: false;
26
- type: 'datetime';
27
- nullable: true;
28
- };
29
- dateTime: {
30
- multiplicity: false;
31
- type: 'timestamp';
32
- nullable: true;
33
- };
34
- decimal: {
35
- multiplicity: false;
36
- type: 'decimal';
37
- nullable: true;
38
- };
39
- integer: {
40
- multiplicity: false;
41
- type: 'integer';
42
- nullable: true;
43
- };
44
- long: {
45
- multiplicity: false;
46
- type: 'long';
47
- nullable: true;
48
- };
49
- short: {
50
- multiplicity: false;
51
- type: 'short';
52
- nullable: true;
53
- };
54
- float: {
55
- multiplicity: false;
56
- type: 'float';
57
- nullable: true;
58
- };
59
- double: {
60
- multiplicity: false;
61
- type: 'double';
62
- nullable: true;
63
- };
64
- byte: {
65
- multiplicity: false;
66
- type: 'byte';
67
- nullable: true;
68
- };
69
- attachment: {
70
- multiplicity: false;
71
- type: 'attachment';
72
- nullable: true;
73
- };
74
- attachment2: {
75
- multiplicity: false;
76
- type: 'attachment';
77
- nullable: true;
78
- };
79
- geoPoint: {
80
- multiplicity: false;
81
- type: 'geopoint';
82
- nullable: true;
83
- };
84
- geoShape: {
85
- multiplicity: false;
86
- type: 'geoshape';
87
- nullable: true;
88
- };
89
- stringArray: {
90
- multiplicity: true;
91
- type: 'string';
92
- nullable: true;
93
- };
94
- booleanArray: {
95
- multiplicity: true;
96
- type: 'boolean';
97
- nullable: true;
98
- };
99
- dateArray: {
100
- multiplicity: true;
101
- type: 'datetime';
102
- nullable: true;
103
- };
104
- dateTimeArray: {
105
- multiplicity: true;
106
- type: 'timestamp';
107
- nullable: true;
108
- };
109
- decimalArray: {
110
- multiplicity: true;
111
- type: 'decimal';
112
- nullable: true;
113
- };
114
- integerArray: {
115
- multiplicity: true;
116
- type: 'integer';
117
- nullable: true;
118
- };
119
- longArray: {
120
- multiplicity: true;
121
- type: 'long';
122
- nullable: true;
123
- };
124
- shortArray: {
125
- multiplicity: true;
126
- type: 'short';
127
- nullable: true;
128
- };
129
- floatArray: {
130
- multiplicity: true;
131
- type: 'float';
132
- nullable: true;
133
- };
134
- doubleArray: {
135
- multiplicity: true;
136
- type: 'double';
137
- nullable: true;
138
- };
139
- byteArray: {
140
- multiplicity: true;
141
- type: 'byte';
142
- nullable: true;
143
- };
144
- attachmentArray: {
145
- multiplicity: true;
146
- type: 'attachment';
147
- nullable: true;
148
- };
149
- geoPointArray: {
150
- multiplicity: true;
151
- type: 'geopoint';
152
- nullable: true;
153
- };
154
- geoShapeArray: {
155
- multiplicity: true;
156
- type: 'geoshape';
157
- nullable: true;
158
- };
8
+ id: PropertyDef<'integer', 'non-nullable', 'single'>;
9
+ string: PropertyDef<'string', 'nullable', 'single'>;
10
+ boolean: PropertyDef<'boolean', 'nullable', 'single'>;
11
+ date: PropertyDef<'datetime', 'nullable', 'single'>;
12
+ dateTime: PropertyDef<'timestamp', 'nullable', 'single'>;
13
+ decimal: PropertyDef<'decimal', 'nullable', 'single'>;
14
+ integer: PropertyDef<'integer', 'nullable', 'single'>;
15
+ long: PropertyDef<'long', 'nullable', 'single'>;
16
+ short: PropertyDef<'short', 'nullable', 'single'>;
17
+ float: PropertyDef<'float', 'nullable', 'single'>;
18
+ double: PropertyDef<'double', 'nullable', 'single'>;
19
+ byte: PropertyDef<'byte', 'nullable', 'single'>;
20
+ attachment: PropertyDef<'attachment', 'nullable', 'single'>;
21
+ attachment2: PropertyDef<'attachment', 'nullable', 'single'>;
22
+ geoPoint: PropertyDef<'geopoint', 'nullable', 'single'>;
23
+ geoShape: PropertyDef<'geoshape', 'nullable', 'single'>;
24
+ stringArray: PropertyDef<'string', 'nullable', 'array'>;
25
+ booleanArray: PropertyDef<'boolean', 'nullable', 'array'>;
26
+ dateArray: PropertyDef<'datetime', 'nullable', 'array'>;
27
+ dateTimeArray: PropertyDef<'timestamp', 'nullable', 'array'>;
28
+ decimalArray: PropertyDef<'decimal', 'nullable', 'array'>;
29
+ integerArray: PropertyDef<'integer', 'nullable', 'array'>;
30
+ longArray: PropertyDef<'long', 'nullable', 'array'>;
31
+ shortArray: PropertyDef<'short', 'nullable', 'array'>;
32
+ floatArray: PropertyDef<'float', 'nullable', 'array'>;
33
+ doubleArray: PropertyDef<'double', 'nullable', 'array'>;
34
+ byteArray: PropertyDef<'byte', 'nullable', 'array'>;
35
+ attachmentArray: PropertyDef<'attachment', 'nullable', 'array'>;
36
+ geoPointArray: PropertyDef<'geopoint', 'nullable', 'array'>;
37
+ geoShapeArray: PropertyDef<'geoshape', 'nullable', 'array'>;
159
38
  };
160
39
  }
161
- export declare const objectTypeWithAllPropertyTypes: objectTypeWithAllPropertyTypesDef;
40
+ export declare const objectTypeWithAllPropertyTypes: objectTypeWithAllPropertyTypes;
@@ -5,7 +5,7 @@ export type { ObjectSetListener } from "./objectSet/ObjectSetListener.js";
5
5
  export type { PageResult } from "./PageResult.js";
6
6
  export * as Objects from "./object/index.js";
7
7
  export type { OsdkObject } from "./OsdkObject.js";
8
- export type { OsdkInterfaceFrom, OsdkObjectFrom } from "./OsdkObjectFrom.js";
8
+ export type { Osdk } from "./OsdkObjectFrom.js";
9
9
  export { createClientContext } from "@osdk/shared.net";
10
10
  export { isOk } from "@osdk/shared.net";
11
11
  export type { ResultOrError } from "@osdk/shared.net";
@@ -14,3 +14,5 @@ export type { ActionEditResponse, ActionValidationResponse, ApplyActionOptions,
14
14
  export { ActionValidationError } from "./actions/ActionValidationError.js";
15
15
  export type { ActionReturnTypeForOptions } from "./actions/applyAction.js";
16
16
  export type { NOOP } from "./util/NOOP.js";
17
+ export { createMinimalClient } from "./createMinimalClient.js";
18
+ export type { MinimalClient } from "./MinimalClientContext.js";
@@ -0,0 +1,33 @@
1
+ import type { MinimalClient } from "../MinimalClientContext.js";
2
+ /**
3
+ * A simple cache that can be used to store values for a given client.
4
+ */
5
+ interface Cache<K, V> {
6
+ get: (client: MinimalClient, key: K) => V;
7
+ set: <X extends V>(client: MinimalClient, key: K, value: X) => X;
8
+ }
9
+ /**
10
+ * A simple async cache that can be used to store values for a given client.
11
+ */
12
+ interface AsyncCache<K, V> {
13
+ getOrUndefined: (client: MinimalClient, key: K) => V | undefined;
14
+ get: (client: MinimalClient, key: K) => Promise<V>;
15
+ set: (client: MinimalClient, key: K, value: V | Promise<V>) => Promise<V>;
16
+ }
17
+ type Factory<K, V> = (client: MinimalClient, key: K) => V;
18
+ /**
19
+ * Create a new cache without a factory function.
20
+ */
21
+ export declare function createCache<K, V extends {}>(): Cache<K, V | undefined>;
22
+ /**
23
+ * Create a new cache with a factory function.
24
+ * @param fn A factory function that will be used to create the value if it does not exist in the cache.
25
+ */
26
+ export declare function createCache<K, V extends {}>(fn: Factory<K, V>): Cache<K, V>;
27
+ /**
28
+ * Create a new cache with an async factory function.
29
+ * @param fn A factory function that will be used to create the value if it does not exist in the cache.
30
+ * @returns
31
+ */
32
+ export declare function createAsyncCache<K, V extends {}>(fn: (client: MinimalClient, key: K) => Promise<V>): AsyncCache<K, V>;
33
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ObjectOrInterfaceDefinition } from "@osdk/api";
2
+ import type { ObjectSet } from "@osdk/gateway/types";
3
+ import type { MinimalClient } from "../MinimalClientContext.js";
4
+ import type { AggregateOpts } from "../query/aggregations/AggregateOpts.js";
5
+ import type { AggregationsResults } from "../query/index.js";
6
+ export type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = AO & {
7
+ select: Pick<AO["select"], keyof AggregateOpts<Q>["select"] & keyof AO["select"]> & Record<Exclude<keyof AO["select"], keyof AggregateOpts<Q>["select"]>, never>;
8
+ };
9
+ /** @deprecated use `aggregate` */
10
+ export declare function aggregateOrThrow<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>>(clientCtx: MinimalClient, objectType: Q, objectSet: ObjectSet | undefined, req: AggregateOptsThatErrors<Q, AO>): Promise<AggregationsResults<Q, AO>>;
11
+ export declare function aggregate<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>>(clientCtx: MinimalClient, objectType: Q, objectSet: ObjectSet | undefined, req: AggregateOptsThatErrors<Q, AO>): Promise<AggregationsResults<Q, AO>>;
@@ -1,7 +1,6 @@
1
- import type { OntologyDefinition } from "@osdk/api";
2
1
  import type { OntologyObjectV2 } from "@osdk/gateway/types";
3
- import type { ClientContext } from "@osdk/shared.net";
2
+ import type { MinimalClient } from "../MinimalClientContext.js";
4
3
  /**
5
4
  * @param objs the objects to be converted, the contents of this array will be mutated
6
5
  */
7
- export declare function convertWireToOsdkObjects<T_OntologyDefinition extends OntologyDefinition<any>>(client: ClientContext<T_OntologyDefinition>, objs: OntologyObjectV2[]): void;
6
+ export declare function convertWireToOsdkObjectsInPlace(client: MinimalClient, objs: OntologyObjectV2[]): Promise<void>;
@@ -0,0 +1,22 @@
1
+ import type { ObjectOrInterfaceDefinition, ObjectOrInterfacePropertyKeysFrom2 } from "@osdk/api";
2
+ import type { ObjectSet } from "@osdk/gateway/types";
3
+ import type { DefaultToFalse } from "../definitions/LinkDefinitions.js";
4
+ import type { MinimalClient } from "../MinimalClientContext.js";
5
+ import type { Osdk } from "../OsdkObjectFrom.js";
6
+ import type { PageResult } from "../PageResult.js";
7
+ export interface SelectArg<Q extends ObjectOrInterfaceDefinition<any, any>, L extends ObjectOrInterfacePropertyKeysFrom2<Q> = ObjectOrInterfacePropertyKeysFrom2<Q>, R extends boolean = false> {
8
+ select?: readonly L[];
9
+ includeRid?: R;
10
+ }
11
+ export interface OrderByArg<Q extends ObjectOrInterfaceDefinition<any, any>, L extends ObjectOrInterfacePropertyKeysFrom2<Q> = ObjectOrInterfacePropertyKeysFrom2<Q>> {
12
+ orderBy?: {
13
+ [K in L]?: "asc" | "desc";
14
+ };
15
+ }
16
+ export type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? "$all" : A["select"] extends readonly string[] ? A["select"][number] : "$all";
17
+ export interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends ObjectOrInterfacePropertyKeysFrom2<Q> = ObjectOrInterfacePropertyKeysFrom2<Q>, R extends boolean = false> extends SelectArg<Q, K, R>, OrderByArg<Q, ObjectOrInterfacePropertyKeysFrom2<Q>> {
18
+ nextPageToken?: string;
19
+ pageSize?: number;
20
+ }
21
+ export type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends ObjectOrInterfacePropertyKeysFrom2<Q>, R extends boolean> = Promise<PageResult<ObjectOrInterfacePropertyKeysFrom2<Q> extends L ? (DefaultToFalse<R> extends false ? Osdk<Q, "$all"> : Osdk<Q, "$all", true>) : (DefaultToFalse<R> extends false ? Osdk<Q, L> : Osdk<Q, L, true>)>>;
22
+ export declare function fetchPage<Q extends ObjectOrInterfaceDefinition, L extends ObjectOrInterfacePropertyKeysFrom2<Q>, R extends boolean>(client: MinimalClient, objectType: Q, args: FetchPageArgs<Q, L, R>, objectSet?: ObjectSet): FetchPageResult<Q, L, R>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ObjectOrInterfaceDefinition } from "@osdk/api";
2
+ import type { ObjectSet } from "@osdk/gateway/types";
3
+ import { type ClientContext } from "@osdk/shared.net";
4
+ import type { Osdk } from "../index.js";
5
+ import { type FetchPageArgs, type SelectArgToKeys } from "./fetchPage.js";
6
+ export declare function fetchSingle<Q extends ObjectOrInterfaceDefinition, const A extends FetchPageArgs<Q, any, any>>(client: ClientContext<any>, objectType: Q, args: A, objectSet: ObjectSet): Promise<Osdk<Q, SelectArgToKeys<Q, A>, A["includeRid"] extends true ? true : false>>;
@@ -1,2 +1,2 @@
1
- export { aggregateOrThrow } from "./aggregateOrThrow.js";
2
- export { fetchPageOrThrow } from "./fetchPageOrThrow.js";
1
+ export { aggregate } from "./aggregate.js";
2
+ export { fetchPage } from "./fetchPage.js";