@osdk/generator 2.7.0-beta.9 → 2.7.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/CHANGELOG.md +136 -0
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +24 -7
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +38 -9
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +39 -15
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/browser/v2.0/generateMetadata.js +0 -3
- package/build/browser/v2.0/generateMetadata.js.map +1 -1
- package/build/browser/v2.0/generatePerActionDataFiles.js +12 -2
- package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/build/cjs/index.cjs +30 -12
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +24 -7
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +38 -9
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +39 -15
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/esm/v2.0/generateMetadata.js +0 -3
- package/build/esm/v2.0/generateMetadata.js.map +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.js +12 -2
- package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/package.json +5 -5
|
@@ -237,9 +237,6 @@ const referencedOntology = {
|
|
|
237
237
|
rid: "idk"
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
|
-
"branch": {
|
|
241
|
-
rid: "someRidHere"
|
|
242
|
-
},
|
|
243
240
|
valueTypes: {}
|
|
244
241
|
};
|
|
245
242
|
const referencingOntology = {
|
|
@@ -475,7 +472,7 @@ describe("generator", () => {
|
|
|
475
472
|
/**
|
|
476
473
|
* Todo(s) to be deleted
|
|
477
474
|
*/
|
|
478
|
-
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo
|
|
475
|
+
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>> | null;
|
|
479
476
|
}
|
|
480
477
|
|
|
481
478
|
// Represents a fqn of the action
|
|
@@ -497,6 +494,11 @@ describe("generator", () => {
|
|
|
497
494
|
|
|
498
495
|
/**
|
|
499
496
|
* An action which takes in an array of objects
|
|
497
|
+
*
|
|
498
|
+
* **Note on null values:** _For optional parameters, explicitly providing a null value instead of undefined
|
|
499
|
+
* can change the behavior of the applied action. If prefills are configured, null prevents them
|
|
500
|
+
* from being applied. If a parameter modifies an object's property, null will clear the data from
|
|
501
|
+
* the object, whereas undefined would not modify that property._
|
|
500
502
|
* @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted
|
|
501
503
|
*/
|
|
502
504
|
export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {
|
|
@@ -551,7 +553,7 @@ describe("generator", () => {
|
|
|
551
553
|
/**
|
|
552
554
|
* A Todo to mark completed
|
|
553
555
|
*/
|
|
554
|
-
readonly object?: ActionParam.ObjectType<Todo
|
|
556
|
+
readonly object?: ActionParam.ObjectType<Todo> | null;
|
|
555
557
|
}
|
|
556
558
|
|
|
557
559
|
// Represents a fqn of the action
|
|
@@ -573,6 +575,11 @@ describe("generator", () => {
|
|
|
573
575
|
|
|
574
576
|
/**
|
|
575
577
|
* An action which takes different types of parameters
|
|
578
|
+
*
|
|
579
|
+
* **Note on null values:** _For optional parameters, explicitly providing a null value instead of undefined
|
|
580
|
+
* can change the behavior of the applied action. If prefills are configured, null prevents them
|
|
581
|
+
* from being applied. If a parameter modifies an object's property, null will clear the data from
|
|
582
|
+
* the object, whereas undefined would not modify that property._
|
|
576
583
|
* @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed
|
|
577
584
|
*/
|
|
578
585
|
export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {
|
|
@@ -673,11 +680,14 @@ describe("generator", () => {
|
|
|
673
680
|
};
|
|
674
681
|
}
|
|
675
682
|
|
|
676
|
-
export const SomeInterface
|
|
683
|
+
export const SomeInterface = {
|
|
677
684
|
type: 'interface',
|
|
678
685
|
apiName: 'SomeInterface',
|
|
679
686
|
osdkMetadata: $osdkMetadata,
|
|
680
|
-
|
|
687
|
+
internalDoNotUseMetadata: {
|
|
688
|
+
rid: 'idk',
|
|
689
|
+
},
|
|
690
|
+
} satisfies SomeInterface & { internalDoNotUseMetadata: { rid: string } } as SomeInterface;
|
|
681
691
|
",
|
|
682
692
|
"/foo/ontology/objects.ts": "export { Person } from './objects/Person.js';
|
|
683
693
|
export { Todo } from './objects/Todo.js';
|
|
@@ -1100,7 +1110,7 @@ describe("generator", () => {
|
|
|
1100
1110
|
/**
|
|
1101
1111
|
* Todo(s) to be deleted
|
|
1102
1112
|
*/
|
|
1103
|
-
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo
|
|
1113
|
+
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>> | null;
|
|
1104
1114
|
}
|
|
1105
1115
|
|
|
1106
1116
|
// Represents a fqn of the action
|
|
@@ -1122,6 +1132,11 @@ describe("generator", () => {
|
|
|
1122
1132
|
|
|
1123
1133
|
/**
|
|
1124
1134
|
* An action which takes in an array of objects
|
|
1135
|
+
*
|
|
1136
|
+
* **Note on null values:** _For optional parameters, explicitly providing a null value instead of undefined
|
|
1137
|
+
* can change the behavior of the applied action. If prefills are configured, null prevents them
|
|
1138
|
+
* from being applied. If a parameter modifies an object's property, null will clear the data from
|
|
1139
|
+
* the object, whereas undefined would not modify that property._
|
|
1125
1140
|
* @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted
|
|
1126
1141
|
*/
|
|
1127
1142
|
export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {
|
|
@@ -1176,7 +1191,7 @@ describe("generator", () => {
|
|
|
1176
1191
|
/**
|
|
1177
1192
|
* A Todo to mark completed
|
|
1178
1193
|
*/
|
|
1179
|
-
readonly object?: ActionParam.ObjectType<Todo
|
|
1194
|
+
readonly object?: ActionParam.ObjectType<Todo> | null;
|
|
1180
1195
|
}
|
|
1181
1196
|
|
|
1182
1197
|
// Represents a fqn of the action
|
|
@@ -1198,6 +1213,11 @@ describe("generator", () => {
|
|
|
1198
1213
|
|
|
1199
1214
|
/**
|
|
1200
1215
|
* An action which takes different types of parameters
|
|
1216
|
+
*
|
|
1217
|
+
* **Note on null values:** _For optional parameters, explicitly providing a null value instead of undefined
|
|
1218
|
+
* can change the behavior of the applied action. If prefills are configured, null prevents them
|
|
1219
|
+
* from being applied. If a parameter modifies an object's property, null will clear the data from
|
|
1220
|
+
* the object, whereas undefined would not modify that property._
|
|
1201
1221
|
* @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed
|
|
1202
1222
|
*/
|
|
1203
1223
|
export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {
|
|
@@ -1298,11 +1318,14 @@ describe("generator", () => {
|
|
|
1298
1318
|
};
|
|
1299
1319
|
}
|
|
1300
1320
|
|
|
1301
|
-
export const SomeInterface
|
|
1321
|
+
export const SomeInterface = {
|
|
1302
1322
|
type: 'interface',
|
|
1303
1323
|
apiName: 'foo.bar.SomeInterface',
|
|
1304
1324
|
osdkMetadata: $osdkMetadata,
|
|
1305
|
-
|
|
1325
|
+
internalDoNotUseMetadata: {
|
|
1326
|
+
rid: 'idk',
|
|
1327
|
+
},
|
|
1328
|
+
} satisfies SomeInterface & { internalDoNotUseMetadata: { rid: string } } as SomeInterface;
|
|
1306
1329
|
",
|
|
1307
1330
|
"/foo/ontology/objects.ts": "export { Person } from './objects/Person.js';
|
|
1308
1331
|
export { Todo } from './objects/Todo.js';
|
|
@@ -2362,8 +2385,6 @@ describe("generator", () => {
|
|
|
2362
2385
|
export const $osdkMetadata = { extraUserAgent: '' };
|
|
2363
2386
|
|
|
2364
2387
|
export const $ontologyRid = 'ri.ontology.main.ontology.dep';
|
|
2365
|
-
|
|
2366
|
-
export const $branch = 'someRidHere';
|
|
2367
2388
|
",
|
|
2368
2389
|
"/foo/index.ts": "export {} from './ontology/actions.js';
|
|
2369
2390
|
export * as $Actions from './ontology/actions.js';
|
|
@@ -2452,11 +2473,14 @@ describe("generator", () => {
|
|
|
2452
2473
|
};
|
|
2453
2474
|
}
|
|
2454
2475
|
|
|
2455
|
-
export const SomeInterface
|
|
2476
|
+
export const SomeInterface = {
|
|
2456
2477
|
type: 'interface',
|
|
2457
2478
|
apiName: 'com.example.dep.SomeInterface',
|
|
2458
2479
|
osdkMetadata: $osdkMetadata,
|
|
2459
|
-
|
|
2480
|
+
internalDoNotUseMetadata: {
|
|
2481
|
+
rid: 'idk2',
|
|
2482
|
+
},
|
|
2483
|
+
} satisfies SomeInterface & { internalDoNotUseMetadata: { rid: string } } as SomeInterface;
|
|
2460
2484
|
",
|
|
2461
2485
|
"/foo/ontology/objects.ts": "export { Task } from './objects/Task.js';
|
|
2462
2486
|
",
|