@osdk/generator 2.5.0-beta.1 → 2.5.0-beta.10
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 +105 -0
- package/build/browser/shared/sanitizeMetadata.test.js +2 -1
- package/build/browser/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/browser/util/test/TodoWireOntology.js +53 -3
- package/build/browser/util/test/TodoWireOntology.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -2
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +2 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +47 -13
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/browser/v2.0/generateMetadata.js +4 -1
- package/build/browser/v2.0/generateMetadata.js.map +1 -1
- package/build/browser/v2.0/generatePerActionDataFiles.js +1 -1
- package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.js +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js +2 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +51 -9
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/cjs/index.cjs +57 -13
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/shared/sanitizeMetadata.test.js +2 -1
- package/build/esm/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/esm/util/test/TodoWireOntology.js +53 -3
- package/build/esm/util/test/TodoWireOntology.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -2
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +2 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +47 -13
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/esm/v2.0/generateMetadata.js +4 -1
- package/build/esm/v2.0/generateMetadata.js.map +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.js +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.js +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js +2 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +51 -9
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/types/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +3 -2
- package/build/types/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -234,7 +234,11 @@ const referencedOntology = {
|
|
|
234
234
|
displayName: "Some Property",
|
|
235
235
|
rid: "idk"
|
|
236
236
|
}
|
|
237
|
-
}
|
|
237
|
+
},
|
|
238
|
+
"branch": {
|
|
239
|
+
rid: "someRidHere"
|
|
240
|
+
},
|
|
241
|
+
valueTypes: {}
|
|
238
242
|
};
|
|
239
243
|
const referencingOntology = {
|
|
240
244
|
ontology: TodoWireOntology.ontology,
|
|
@@ -276,6 +280,7 @@ const referencingOntology = {
|
|
|
276
280
|
implementsInterfaces: ["com.example.dep.SomeInterface"],
|
|
277
281
|
implementsInterfaces2: {
|
|
278
282
|
"com.example.dep.SomeInterface": {
|
|
283
|
+
links: {},
|
|
279
284
|
properties: {
|
|
280
285
|
"com.example.dep.spt": "body"
|
|
281
286
|
}
|
|
@@ -370,7 +375,8 @@ const referencingOntology = {
|
|
|
370
375
|
version: "0"
|
|
371
376
|
}
|
|
372
377
|
},
|
|
373
|
-
sharedPropertyTypes: {}
|
|
378
|
+
sharedPropertyTypes: {},
|
|
379
|
+
valueTypes: {}
|
|
374
380
|
};
|
|
375
381
|
const fooBarTodoWireOntology = changeNames(TodoWireOntology, {
|
|
376
382
|
objects: {
|
|
@@ -466,7 +472,7 @@ describe("generator", () => {
|
|
|
466
472
|
/**
|
|
467
473
|
* Todo(s) to be deleted
|
|
468
474
|
*/
|
|
469
|
-
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo
|
|
475
|
+
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;
|
|
470
476
|
}
|
|
471
477
|
|
|
472
478
|
// Represents a fqn of the action
|
|
@@ -542,7 +548,7 @@ describe("generator", () => {
|
|
|
542
548
|
/**
|
|
543
549
|
* A Todo to mark completed
|
|
544
550
|
*/
|
|
545
|
-
readonly object?: ActionParam.ObjectType<Todo
|
|
551
|
+
readonly object?: ActionParam.ObjectType<Todo>;
|
|
546
552
|
}
|
|
547
553
|
|
|
548
554
|
// Represents a fqn of the action
|
|
@@ -701,7 +707,7 @@ describe("generator", () => {
|
|
|
701
707
|
/**
|
|
702
708
|
* (no ontology metadata)
|
|
703
709
|
*/
|
|
704
|
-
readonly email:
|
|
710
|
+
readonly email: 'osdk@palantir.com' | 'foundry@palantir.com';
|
|
705
711
|
}
|
|
706
712
|
export type StrictProps = Props;
|
|
707
713
|
|
|
@@ -783,13 +789,17 @@ describe("generator", () => {
|
|
|
783
789
|
} from '@osdk/client';
|
|
784
790
|
|
|
785
791
|
export namespace Todo {
|
|
786
|
-
export type PropertyKeys = 'id' | 'body' | 'complete';
|
|
792
|
+
export type PropertyKeys = 'id' | 'body' | 'complete' | 'array';
|
|
787
793
|
|
|
788
794
|
export interface Links {
|
|
789
795
|
readonly Assignee: $SingleLinkAccessor<Person>;
|
|
790
796
|
}
|
|
791
797
|
|
|
792
798
|
export interface Props {
|
|
799
|
+
/**
|
|
800
|
+
* (no ontology metadata)
|
|
801
|
+
*/
|
|
802
|
+
readonly array: ('a' | 'b' | 'c')[] | undefined;
|
|
793
803
|
/**
|
|
794
804
|
* display name: 'Body',
|
|
795
805
|
*
|
|
@@ -856,6 +866,10 @@ describe("generator", () => {
|
|
|
856
866
|
primaryKeyApiName: 'id';
|
|
857
867
|
primaryKeyType: 'integer';
|
|
858
868
|
properties: {
|
|
869
|
+
/**
|
|
870
|
+
* (no ontology metadata)
|
|
871
|
+
*/
|
|
872
|
+
array: $PropertyDef<'string', 'nullable', 'array'>;
|
|
859
873
|
/**
|
|
860
874
|
* display name: 'Body',
|
|
861
875
|
*
|
|
@@ -1077,7 +1091,7 @@ describe("generator", () => {
|
|
|
1077
1091
|
/**
|
|
1078
1092
|
* Todo(s) to be deleted
|
|
1079
1093
|
*/
|
|
1080
|
-
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo
|
|
1094
|
+
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;
|
|
1081
1095
|
}
|
|
1082
1096
|
|
|
1083
1097
|
// Represents a fqn of the action
|
|
@@ -1153,7 +1167,7 @@ describe("generator", () => {
|
|
|
1153
1167
|
/**
|
|
1154
1168
|
* A Todo to mark completed
|
|
1155
1169
|
*/
|
|
1156
|
-
readonly object?: ActionParam.ObjectType<Todo
|
|
1170
|
+
readonly object?: ActionParam.ObjectType<Todo>;
|
|
1157
1171
|
}
|
|
1158
1172
|
|
|
1159
1173
|
// Represents a fqn of the action
|
|
@@ -1312,7 +1326,7 @@ describe("generator", () => {
|
|
|
1312
1326
|
/**
|
|
1313
1327
|
* (no ontology metadata)
|
|
1314
1328
|
*/
|
|
1315
|
-
readonly email:
|
|
1329
|
+
readonly email: 'osdk@palantir.com' | 'foundry@palantir.com';
|
|
1316
1330
|
}
|
|
1317
1331
|
export type StrictProps = Props;
|
|
1318
1332
|
|
|
@@ -1394,13 +1408,17 @@ describe("generator", () => {
|
|
|
1394
1408
|
} from '@osdk/api';
|
|
1395
1409
|
|
|
1396
1410
|
export namespace Todo {
|
|
1397
|
-
export type PropertyKeys = 'id' | 'body' | 'complete';
|
|
1411
|
+
export type PropertyKeys = 'id' | 'body' | 'complete' | 'array';
|
|
1398
1412
|
|
|
1399
1413
|
export interface Links {
|
|
1400
1414
|
readonly Assignee: $SingleLinkAccessor<Person>;
|
|
1401
1415
|
}
|
|
1402
1416
|
|
|
1403
1417
|
export interface Props {
|
|
1418
|
+
/**
|
|
1419
|
+
* (no ontology metadata)
|
|
1420
|
+
*/
|
|
1421
|
+
readonly array: ('a' | 'b' | 'c')[] | undefined;
|
|
1404
1422
|
/**
|
|
1405
1423
|
* display name: 'Body',
|
|
1406
1424
|
*
|
|
@@ -1467,6 +1485,10 @@ describe("generator", () => {
|
|
|
1467
1485
|
primaryKeyApiName: 'id';
|
|
1468
1486
|
primaryKeyType: 'integer';
|
|
1469
1487
|
properties: {
|
|
1488
|
+
/**
|
|
1489
|
+
* (no ontology metadata)
|
|
1490
|
+
*/
|
|
1491
|
+
array: $PropertyDef<'string', 'nullable', 'array'>;
|
|
1470
1492
|
/**
|
|
1471
1493
|
* display name: 'Body',
|
|
1472
1494
|
*
|
|
@@ -1625,7 +1647,8 @@ describe("generator", () => {
|
|
|
1625
1647
|
interfaceTypes: {},
|
|
1626
1648
|
objectTypes: {},
|
|
1627
1649
|
queryTypes: {},
|
|
1628
|
-
sharedPropertyTypes: {}
|
|
1650
|
+
sharedPropertyTypes: {},
|
|
1651
|
+
valueTypes: {}
|
|
1629
1652
|
}, "", helper.minimalFiles, BASE_PATH);
|
|
1630
1653
|
expect(helper.getFiles()[`${BASE_PATH}/ontology/objects.ts`]).toEqual("export {};\n");
|
|
1631
1654
|
});
|
|
@@ -1934,7 +1957,8 @@ describe("generator", () => {
|
|
|
1934
1957
|
version: "0"
|
|
1935
1958
|
}
|
|
1936
1959
|
},
|
|
1937
|
-
sharedPropertyTypes: {}
|
|
1960
|
+
sharedPropertyTypes: {},
|
|
1961
|
+
valueTypes: {}
|
|
1938
1962
|
}, "typescript-sdk/0.0.0 osdk-cli/0.0.0", helper.minimalFiles, BASE_PATH, "module", new Map(), new Map(), new Map(), false, ["getCount"]);
|
|
1939
1963
|
expect(tweakedFilesForSnapshotConsistency(helper.getFiles())).toMatchInlineSnapshot(`
|
|
1940
1964
|
{
|
|
@@ -2071,13 +2095,17 @@ describe("generator", () => {
|
|
|
2071
2095
|
} from '@osdk/client';
|
|
2072
2096
|
|
|
2073
2097
|
export namespace Todo {
|
|
2074
|
-
export type PropertyKeys = 'id' | 'body' | 'complete';
|
|
2098
|
+
export type PropertyKeys = 'id' | 'body' | 'complete' | 'array';
|
|
2075
2099
|
|
|
2076
2100
|
export interface Links {
|
|
2077
2101
|
readonly Assignee: $SingleLinkAccessor<Person>;
|
|
2078
2102
|
}
|
|
2079
2103
|
|
|
2080
2104
|
export interface Props {
|
|
2105
|
+
/**
|
|
2106
|
+
* (no ontology metadata)
|
|
2107
|
+
*/
|
|
2108
|
+
readonly array: $PropType['string'][] | undefined;
|
|
2081
2109
|
/**
|
|
2082
2110
|
* display name: 'Body',
|
|
2083
2111
|
*
|
|
@@ -2144,6 +2172,10 @@ describe("generator", () => {
|
|
|
2144
2172
|
primaryKeyApiName: 'id';
|
|
2145
2173
|
primaryKeyType: 'integer';
|
|
2146
2174
|
properties: {
|
|
2175
|
+
/**
|
|
2176
|
+
* (no ontology metadata)
|
|
2177
|
+
*/
|
|
2178
|
+
array: $PropertyDef<'string', 'nullable', 'array'>;
|
|
2147
2179
|
/**
|
|
2148
2180
|
* display name: 'Body',
|
|
2149
2181
|
*
|
|
@@ -2306,6 +2338,8 @@ describe("generator", () => {
|
|
|
2306
2338
|
export const $osdkMetadata = { extraUserAgent: '' };
|
|
2307
2339
|
|
|
2308
2340
|
export const $ontologyRid = 'ri.ontology.main.ontology.dep';
|
|
2341
|
+
|
|
2342
|
+
export const $branch = 'someRidHere';
|
|
2309
2343
|
",
|
|
2310
2344
|
"/foo/index.ts": "export {} from './ontology/actions.js';
|
|
2311
2345
|
export * as $Actions from './ontology/actions.js';
|