@osdk/maker 0.14.0-beta.8 → 0.14.0-rc.16

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 (76) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +0 -1
  3. package/build/browser/api/code-snippets/createCodeSnippets.js +94 -0
  4. package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -0
  5. package/build/browser/api/code-snippets/snippetTypes.js +61 -0
  6. package/build/browser/api/code-snippets/snippetTypes.js.map +1 -0
  7. package/build/browser/api/defineAction.js +6 -0
  8. package/build/browser/api/defineAction.js.map +1 -1
  9. package/build/browser/api/defineCreateInterfaceObjectAction.js +8 -7
  10. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
  11. package/build/browser/api/defineDeleteInterfaceObjectAction.js +2 -2
  12. package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -1
  13. package/build/browser/api/defineModifyInterfaceObjectAction.js +8 -7
  14. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
  15. package/build/browser/api/defineObject.js +1 -2
  16. package/build/browser/api/defineObject.js.map +1 -1
  17. package/build/browser/api/defineOntology.js +5 -1
  18. package/build/browser/api/defineOntology.js.map +1 -1
  19. package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -1
  20. package/build/browser/api/properties/PropertyTypeType.js.map +1 -1
  21. package/build/browser/api/test/actions.test.js +1252 -10
  22. package/build/browser/api/test/actions.test.js.map +1 -1
  23. package/build/browser/api/test/misc.test.js +2 -2
  24. package/build/browser/api/test/misc.test.js.map +1 -1
  25. package/build/browser/api/test/spt.test.js +204 -105
  26. package/build/browser/api/test/spt.test.js.map +1 -1
  27. package/build/browser/cli/main.js +23 -4
  28. package/build/browser/cli/main.js.map +1 -1
  29. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +19 -7
  30. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  31. package/build/cjs/index.cjs +206 -61
  32. package/build/cjs/index.cjs.map +1 -1
  33. package/build/cjs/index.d.cts +15 -6
  34. package/build/esm/api/code-snippets/createCodeSnippets.js +94 -0
  35. package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -0
  36. package/build/esm/api/code-snippets/snippetTypes.js +61 -0
  37. package/build/esm/api/code-snippets/snippetTypes.js.map +1 -0
  38. package/build/esm/api/defineAction.js +6 -0
  39. package/build/esm/api/defineAction.js.map +1 -1
  40. package/build/esm/api/defineCreateInterfaceObjectAction.js +8 -7
  41. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
  42. package/build/esm/api/defineDeleteInterfaceObjectAction.js +2 -2
  43. package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -1
  44. package/build/esm/api/defineModifyInterfaceObjectAction.js +8 -7
  45. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
  46. package/build/esm/api/defineObject.js +1 -2
  47. package/build/esm/api/defineObject.js.map +1 -1
  48. package/build/esm/api/defineOntology.js +5 -1
  49. package/build/esm/api/defineOntology.js.map +1 -1
  50. package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -1
  51. package/build/esm/api/properties/PropertyTypeType.js.map +1 -1
  52. package/build/esm/api/test/actions.test.js +1252 -10
  53. package/build/esm/api/test/actions.test.js.map +1 -1
  54. package/build/esm/api/test/misc.test.js +2 -2
  55. package/build/esm/api/test/misc.test.js.map +1 -1
  56. package/build/esm/api/test/spt.test.js +204 -105
  57. package/build/esm/api/test/spt.test.js.map +1 -1
  58. package/build/esm/cli/main.js +23 -4
  59. package/build/esm/cli/main.js.map +1 -1
  60. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +19 -7
  61. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  62. package/build/types/api/code-snippets/createCodeSnippets.d.ts +2 -0
  63. package/build/types/api/code-snippets/createCodeSnippets.d.ts.map +1 -0
  64. package/build/types/api/code-snippets/snippetTypes.d.ts +24 -0
  65. package/build/types/api/code-snippets/snippetTypes.d.ts.map +1 -0
  66. package/build/types/api/defineAction.d.ts +3 -0
  67. package/build/types/api/defineAction.d.ts.map +1 -1
  68. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
  69. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
  70. package/build/types/api/defineOntology.d.ts +1 -1
  71. package/build/types/api/defineOntology.d.ts.map +1 -1
  72. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts +1 -1
  73. package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts.map +1 -1
  74. package/build/types/api/properties/PropertyTypeType.d.ts +11 -4
  75. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -1
  76. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,93 @@
1
1
  # @osdk/maker
2
2
 
3
+ ## 0.14.0-rc.16
4
+
5
+ ### Patch Changes
6
+
7
+ - af4f3bf: Remove the following features for RC:
8
+ - Property formatting
9
+ - Branching
10
+ - Constant RDPs
11
+
12
+ - Updated dependencies [af4f3bf]
13
+ - @osdk/typescript-sdk-docs@0.5.0-rc.6
14
+ - @osdk/api@2.6.0-rc.14
15
+
16
+ ## 0.14.0-beta.15
17
+
18
+ ### Minor Changes
19
+
20
+ - a26bfab: Remove import section from readme
21
+ - 88ac696: Remove apiName field from user object property definitions
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [823c756]
26
+ - Updated dependencies [0e863aa]
27
+ - @osdk/typescript-sdk-docs@0.5.0-beta.5
28
+ - @osdk/api@2.6.0-beta.11
29
+
30
+ ## 0.14.0-beta.14
31
+
32
+ ### Minor Changes
33
+
34
+ - 9e2d70a: Interface actions have the option to not include namespaces on parameters for Java OSDK generation
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [a035fdc]
39
+ - @osdk/typescript-sdk-docs@0.5.0-beta.3
40
+
41
+ ## 0.14.0-beta.13
42
+
43
+ ### Minor Changes
44
+
45
+ - 9ddb3b4: Update snippet names and get latest template
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [b307201]
50
+ - @osdk/api@2.6.0-beta.9
51
+
52
+ ## 0.14.0-beta.12
53
+
54
+ ### Minor Changes
55
+
56
+ - 5e4aabd: Add decimal property type customizations
57
+
58
+ ### Patch Changes
59
+
60
+ - @osdk/api@2.6.0-beta.7
61
+
62
+ ## 0.14.0-beta.11
63
+
64
+ ### Minor Changes
65
+
66
+ - 09242c5: Move mustache dependency
67
+
68
+ ## 0.14.0-beta.10
69
+
70
+ ### Minor Changes
71
+
72
+ - 6532b54: Move osdk/typescript-sdk-docs from dev dependencies to normal dep
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [b959085]
77
+ - @osdk/api@2.6.0-beta.6
78
+
79
+ ## 0.14.0-beta.9
80
+
81
+ ### Minor Changes
82
+
83
+ - 55e104e: Add code snippet generation into osdk/maker
84
+ - 949646b: Fix delete interface bug
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [2556c64]
89
+ - @osdk/api@2.6.0-beta.5
90
+
3
91
  ## 0.14.0-beta.8
4
92
 
5
93
  ### Minor Changes
@@ -83,6 +171,46 @@
83
171
 
84
172
  - @osdk/api@2.5.0-beta.15
85
173
 
174
+ ## 0.13.0
175
+
176
+ ### Patch Changes
177
+
178
+ - 322c5bc: Simulated release
179
+ - 6da8fd2: Write value type IR correctly
180
+ - 37eb75b: readme update and missing changeset for wiring up randomness key
181
+ - a6f49e9: Intermediary links in oac
182
+ - a6f49e9: Fix Maker Rid Generation
183
+ - f025f30: Fix semantic merge conflict
184
+ - 1b60527: Remove foundry.ontologies dependency
185
+ - 7cdab1d: Update platform sdk dependencies
186
+ - a00d2ed: Update Platform SDK dependencies
187
+ - 40d43c2: Make codegen TS compiler friendly
188
+ - d815339: Allow interface props to be excluded from actions
189
+ - f9b6dc4: Write value types to ontology IR file
190
+ - 07083e1: Action submission conditions can have custom metadata
191
+ - b1c99bf: Revert .js -> .ts extension for codegen
192
+ - 11fd3fb: Add api name validation for object types
193
+ - 5f72188: Fix object action param optionality for non-array props
194
+ - 5fd12eb: Fix interface display metadata to include icon
195
+ - 7bdac45: Update Platform SDK dependency
196
+ - a96d89e: Update Platform SDK dependencies
197
+ - f2dbc3d: Fix test from semantic merge conflict
198
+ - cbcf2ad: Add branching support
199
+ - 04fe946: Use block data type for imports
200
+ - 7f0ad5c: Check extended interfaces when verifying interface actions
201
+ - 712dfbe: Improve interface action validation
202
+ - Updated dependencies [322c5bc]
203
+ - Updated dependencies [7160276]
204
+ - Updated dependencies [7bdac45]
205
+ - Updated dependencies [37eb75b]
206
+ - Updated dependencies [7b97128]
207
+ - Updated dependencies [76905f5]
208
+ - Updated dependencies [20962bc]
209
+ - Updated dependencies [052a96b]
210
+ - Updated dependencies [ca1fabe]
211
+ - Updated dependencies [e48be06]
212
+ - @osdk/api@2.5.0
213
+
86
214
  ## 0.13.0-beta.15
87
215
 
88
216
  ### Minor Changes
package/README.md CHANGED
@@ -14,7 +14,6 @@ The Maker package provides a type-safe, programmatic way to define ontologies, w
14
14
  - [Defining Links](#defining-links)
15
15
  - [Interface Link Constraints](#interface-link-constraints)
16
16
  - [Defining Actions](#defining-actions)
17
- - [Importing Ontology Entities](#importing-ontology-entities)
18
17
  - [Advanced](#advanced)
19
18
 
20
19
  ## Getting Started
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { TYPESCRIPT_OSDK_SNIPPETS } from "@osdk/typescript-sdk-docs";
18
+ import { consola } from "consola";
19
+ import * as fs from "fs";
20
+ import Mustache from "mustache";
21
+ import * as path from "path";
22
+ import { OntologyEntityTypeEnum } from "../common/OntologyEntityTypeEnum.js";
23
+ import { actionSnippets, interfaceSnippets, objectSnippets, snippetNameMapping } from "./snippetTypes.js";
24
+ export function createCodeSnippets(ontology, packageName, outputDir) {
25
+ if (outputDir === undefined) {
26
+ outputDir = "./code-snippets";
27
+ }
28
+ if (!fs.existsSync(outputDir)) {
29
+ fs.mkdirSync(outputDir, {
30
+ recursive: true
31
+ });
32
+ }
33
+ if (packageName === undefined) {
34
+ packageName = "";
35
+ }
36
+ consola.info("Generating code snippets to ", outputDir);
37
+ for (const type of Object.values(OntologyEntityTypeEnum)) {
38
+ for (const object of Object.values(ontology[type])) {
39
+ let snippet = {};
40
+ switch (type) {
41
+ case OntologyEntityTypeEnum.OBJECT_TYPE:
42
+ snippet = generateObjectSnippet(object, packageName);
43
+ break;
44
+ case OntologyEntityTypeEnum.ACTION_TYPE:
45
+ snippet = generateActionSnippet(object, packageName);
46
+ break;
47
+ case OntologyEntityTypeEnum.INTERFACE_TYPE:
48
+ snippet = generateInterfaceSnippet(object, packageName);
49
+ break;
50
+ default:
51
+ continue;
52
+ }
53
+ fs.writeFileSync(path.join(outputDir, object.apiName), JSON.stringify(snippet));
54
+ }
55
+ }
56
+ consola.info("Finished Code Snippet Generation");
57
+ }
58
+ function generateInterfaceSnippet(interfaceType, packageName) {
59
+ const interfaceContext = {
60
+ "interfaceApiName": interfaceType.apiName,
61
+ "packageName": packageName,
62
+ "objectOrInterfaceApiName": interfaceType.apiName,
63
+ "propertyNames": Object.keys(interfaceType.propertiesV2),
64
+ "interfaceName": interfaceType.displayMetadata.displayName
65
+ };
66
+ return getSnippets(interfaceSnippets, interfaceContext);
67
+ }
68
+ function generateObjectSnippet(objectType, packageName) {
69
+ const objectContext = {
70
+ "objectType": objectType.apiName,
71
+ "packageName": packageName,
72
+ "objectOrInterfaceApiName": objectType.apiName
73
+ };
74
+ return getSnippets(objectSnippets, objectContext);
75
+ }
76
+ function generateActionSnippet(actionType, packageName) {
77
+ const actionContext = {
78
+ "actionApiName": actionType.apiName,
79
+ "packageName": packageName
80
+ };
81
+ return getSnippets(actionSnippets, actionContext);
82
+ }
83
+ function getSnippets(snippetType, context) {
84
+ const allSnippets = {};
85
+ for (const templateName of Object.keys(snippetType).filter(key => isNaN(Number(key)))) {
86
+ const versions = Object.values(TYPESCRIPT_OSDK_SNIPPETS.versions);
87
+ const latestTemplate = versions.slice().reverse().find(v => v.snippets[templateName])?.snippets[templateName].at(-1)?.template ?? "";
88
+ const renderedTemplate = Mustache.render(latestTemplate, context);
89
+ const snippetName = snippetNameMapping.get(templateName);
90
+ allSnippets[snippetName !== undefined ? Mustache.render(snippetName, context) : templateName] = renderedTemplate;
91
+ }
92
+ return allSnippets;
93
+ }
94
+ //# sourceMappingURL=createCodeSnippets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCodeSnippets.js","names":["TYPESCRIPT_OSDK_SNIPPETS","consola","fs","Mustache","path","OntologyEntityTypeEnum","actionSnippets","interfaceSnippets","objectSnippets","snippetNameMapping","createCodeSnippets","ontology","packageName","outputDir","undefined","existsSync","mkdirSync","recursive","info","type","Object","values","object","snippet","OBJECT_TYPE","generateObjectSnippet","ACTION_TYPE","generateActionSnippet","INTERFACE_TYPE","generateInterfaceSnippet","writeFileSync","join","apiName","JSON","stringify","interfaceType","interfaceContext","keys","propertiesV2","displayMetadata","displayName","getSnippets","objectType","objectContext","actionType","actionContext","snippetType","context","allSnippets","templateName","filter","key","isNaN","Number","versions","latestTemplate","slice","reverse","find","v","snippets","at","template","renderedTemplate","render","snippetName","get"],"sources":["createCodeSnippets.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TYPESCRIPT_OSDK_SNIPPETS } from \"@osdk/typescript-sdk-docs\";\nimport { consola } from \"consola\";\nimport * as fs from \"fs\";\nimport Mustache from \"mustache\";\nimport * as path from \"path\";\nimport type { ActionType } from \"../action/ActionType.js\";\nimport type { OntologyDefinition } from \"../common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { InterfaceType } from \"../interface/InterfaceType.js\";\nimport type { ObjectType } from \"../object/ObjectType.js\";\nimport {\n actionSnippets,\n interfaceSnippets,\n objectSnippets,\n snippetNameMapping,\n} from \"./snippetTypes.js\";\n\nexport function createCodeSnippets(\n ontology: OntologyDefinition,\n packageName: string | undefined,\n outputDir: string | undefined,\n): void {\n if (outputDir === undefined) {\n outputDir = \"./code-snippets\";\n }\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n if (packageName === undefined) {\n packageName = \"\";\n }\n consola.info(\"Generating code snippets to \", outputDir);\n for (const type of Object.values(OntologyEntityTypeEnum)) {\n for (const object of Object.values(ontology[type])) {\n let snippet = {};\n switch (type) {\n case OntologyEntityTypeEnum.OBJECT_TYPE:\n snippet = generateObjectSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.ACTION_TYPE:\n snippet = generateActionSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.INTERFACE_TYPE:\n snippet = generateInterfaceSnippet(object, packageName);\n break;\n default:\n continue;\n }\n fs.writeFileSync(\n path.join(outputDir, object.apiName),\n JSON.stringify(snippet),\n );\n }\n }\n consola.info(\"Finished Code Snippet Generation\");\n}\n\nfunction generateInterfaceSnippet(\n interfaceType: InterfaceType,\n packageName: string,\n) {\n const interfaceContext = {\n \"interfaceApiName\": interfaceType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": interfaceType.apiName,\n \"propertyNames\": Object.keys(interfaceType.propertiesV2),\n \"interfaceName\": interfaceType.displayMetadata.displayName,\n };\n\n return getSnippets(interfaceSnippets, interfaceContext);\n}\n\nfunction generateObjectSnippet(objectType: ObjectType, packageName: string) {\n const objectContext = {\n \"objectType\": objectType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": objectType.apiName,\n };\n return getSnippets(objectSnippets, objectContext);\n}\n\nfunction generateActionSnippet(actionType: ActionType, packageName: string) {\n const actionContext = {\n \"actionApiName\": actionType.apiName,\n \"packageName\": packageName,\n };\n return getSnippets(actionSnippets, actionContext);\n}\n\nfunction getSnippets(\n snippetType:\n | typeof interfaceSnippets\n | typeof actionSnippets\n | typeof objectSnippets,\n context: {},\n) {\n const allSnippets = {};\n for (\n const templateName of Object.keys(snippetType).filter(key =>\n isNaN(Number(key))\n )\n ) {\n const versions = Object.values(TYPESCRIPT_OSDK_SNIPPETS.versions);\n const latestTemplate = versions\n .slice()\n .reverse()\n .find(v => v.snippets[templateName])\n ?.snippets[templateName]\n .at(-1)?.template ?? \"\";\n const renderedTemplate = Mustache.render(latestTemplate, context);\n const snippetName = snippetNameMapping.get(templateName);\n\n (allSnippets as any)[\n snippetName !== undefined\n ? Mustache.render(snippetName, context)\n : templateName\n ] = renderedTemplate;\n }\n return allSnippets;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,wBAAwB,QAAQ,2BAA2B;AACpE,SAASC,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,IAAI;AACxB,OAAOC,QAAQ,MAAM,UAAU;AAC/B,OAAO,KAAKC,IAAI,MAA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AACsD,QAAQ,CAAC;IACjE,MAAMC,cAAc,GAAGD,QAAQ,CAC5BE,KAAK,CAAC,CAAC,CACPC,OAAO,CAAC,CAAC,CACTC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAACX,YAAY,CAAC,CAAC,EAClCW,QAAQ,CAACX,YAAY,CAAC,CACvBY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEC,QAAQ,IAAI,EAAE;IACzB,MAAMC,gBAAgB,GAAG5D,QAAQ,CAAC6D,MAAM,CAACT,cAAc,EAAER,OAAO,CAAC;IACjE,MAAMkB,WAAW,GAAGxD,kBAAkB,CAACyD,GAAG,CAACjB,YAAY,CAAC;IAEvDD,WAAW,CACViB,WAAW,KAAKnD,SAAS,GACrBX,QAAQ,CAAC6D,MAAM,CAACC,WAAW,EAAElB,OAAO,CAAC,GACrCE,YAAY,CACjB,GAAGc,gBAAgB;EACtB;EACA,OAAOf,WAAW;AACpB","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export let interfaceSnippets = /*#__PURE__*/function (interfaceSnippets) {
18
+ interfaceSnippets[interfaceSnippets["loadInterfacesReference"] = 0] = "loadInterfacesReference";
19
+ interfaceSnippets[interfaceSnippets["loadAllInterfacesReference"] = 1] = "loadAllInterfacesReference";
20
+ interfaceSnippets[interfaceSnippets["loadOrderedInterfacesReference"] = 2] = "loadOrderedInterfacesReference";
21
+ interfaceSnippets[interfaceSnippets["searchInterfacesReference"] = 3] = "searchInterfacesReference";
22
+ interfaceSnippets[interfaceSnippets["loadInterfaceMetadataSnippet"] = 4] = "loadInterfaceMetadataSnippet";
23
+ interfaceSnippets[interfaceSnippets["subscribeToObjectSetInstructions"] = 5] = "subscribeToObjectSetInstructions";
24
+ return interfaceSnippets;
25
+ }({});
26
+ export let actionSnippets = /*#__PURE__*/function (actionSnippets) {
27
+ actionSnippets[actionSnippets["applyAction"] = 0] = "applyAction";
28
+ actionSnippets[actionSnippets["batchApplyAction"] = 1] = "batchApplyAction";
29
+ return actionSnippets;
30
+ }({});
31
+ export let objectSnippets = /*#__PURE__*/function (objectSnippets) {
32
+ objectSnippets[objectSnippets["loadSingleObjectGuide"] = 0] = "loadSingleObjectGuide";
33
+ objectSnippets[objectSnippets["loadObjectsReference"] = 1] = "loadObjectsReference";
34
+ objectSnippets[objectSnippets["loadAllObjectsReference"] = 2] = "loadAllObjectsReference";
35
+ objectSnippets[objectSnippets["loadOrderedInterfacesReference"] = 3] = "loadOrderedInterfacesReference";
36
+ // what
37
+ objectSnippets[objectSnippets["searchObjectsGuide"] = 4] = "searchObjectsGuide";
38
+ // There's specific search queries under this one too, but a little verbose
39
+ objectSnippets[objectSnippets["aggregationTemplate"] = 5] = "aggregationTemplate";
40
+ /* Types of aggregation + group bys
41
+ approximateDistinctAggregationTemplate,
42
+ exactDistinctAggregationTemplate,
43
+ numericAggregationTemplate,
44
+ countAggregationTemplate,
45
+ fixedWidthGroupByTemplate,
46
+ durationGroupByTemplate,
47
+ exactGroupByTemplate,
48
+ rangeGroupByTemplate,
49
+ */
50
+ objectSnippets[objectSnippets["objectSetOperationsGuide"] = 6] = "objectSetOperationsGuide";
51
+ /* Types of set operations
52
+ objectSetOperationsUnion,
53
+ objectSetOperationsSubtract,
54
+ objectSetOperationsIntersect,
55
+ */
56
+ objectSnippets[objectSnippets["loadObjectMetadataSnippet"] = 7] = "loadObjectMetadataSnippet";
57
+ objectSnippets[objectSnippets["subscribeToObjectSetInstructions"] = 8] = "subscribeToObjectSetInstructions";
58
+ return objectSnippets;
59
+ }({});
60
+ export const snippetNameMapping = new Map([["loadInterfaceMetadataSnippet", "Load {{interfaceName}} metadata"], ["loadInterfacesReference", "Load pages of {{interfaceName}}"], ["loadAllInterfacesReference", "Load all {{interfaceName}}"], ["loadOrderedInterfacesReference", "Load ordered {{interfaceName}}"], ["searchInterfacesReference", "Filtering"], ["subscribeToObjectSetInstructions", "Subscribe to object sets"]]);
61
+ //# sourceMappingURL=snippetTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snippetTypes.js","names":["interfaceSnippets","actionSnippets","objectSnippets","snippetNameMapping","Map"],"sources":["snippetTypes.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum interfaceSnippets {\n loadInterfacesReference,\n loadAllInterfacesReference,\n loadOrderedInterfacesReference,\n searchInterfacesReference,\n loadInterfaceMetadataSnippet,\n subscribeToObjectSetInstructions,\n}\n\nexport enum actionSnippets {\n applyAction,\n batchApplyAction,\n}\n\nexport enum objectSnippets {\n loadSingleObjectGuide,\n loadObjectsReference,\n loadAllObjectsReference,\n loadOrderedInterfacesReference, // what\n searchObjectsGuide, // There's specific search queries under this one too, but a little verbose\n aggregationTemplate,\n /* Types of aggregation + group bys\n approximateDistinctAggregationTemplate,\n exactDistinctAggregationTemplate,\n numericAggregationTemplate,\n countAggregationTemplate,\n fixedWidthGroupByTemplate,\n durationGroupByTemplate,\n exactGroupByTemplate,\n rangeGroupByTemplate,\n */\n objectSetOperationsGuide,\n /* Types of set operations\n objectSetOperationsUnion,\n objectSetOperationsSubtract,\n objectSetOperationsIntersect,\n */\n loadObjectMetadataSnippet,\n subscribeToObjectSetInstructions,\n}\n\nexport const snippetNameMapping: Map<string, string> = new Map<string, string>([\n [\"loadInterfaceMetadataSnippet\", \"Load {{interfaceName}} metadata\"],\n [\"loadInterfacesReference\", \"Load pages of {{interfaceName}}\"],\n [\"loadAllInterfacesReference\", \"Load all {{interfaceName}}\"],\n [\"loadOrderedInterfacesReference\", \"Load ordered {{interfaceName}}\"],\n [\"searchInterfacesReference\", \"Filtering\"],\n [\"subscribeToObjectSetInstructions\", \"Subscribe to object sets\"],\n]);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAS7B,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAK1B,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAIQ;EAJtBA,cAAc,CAAdA,cAAc;EAKJ;EALVA,cAAc,CAAdA,cAAc;EAOxB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhBYA,cAAc,CAAdA,cAAc;EAkBxB;AACF;AACA;AACA;AACA;EAtBYA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AA2B1B,OAAO,MAAMC,kBAAuC,GAAG,IAAIC,GAAG,CAAiB,CAC7E,CAAC,8BAA8B,EAAE,iCAAiC,CAAC,EACnE,CAAC,yBAAyB,EAAE,iCAAiC,CAAC,EAC9D,CAAC,4BAA4B,EAAE,4BAA4B,CAAC,EAC5D,CAAC,gCAAgC,EAAE,gCAAgC,CAAC,EACpE,CAAC,2BAA2B,EAAE,WAAW,CAAC,EAC1C,CAAC,kCAAkC,EAAE,0BAA0B,CAAC,CACjE,CAAC","ignoreList":[]}
@@ -624,6 +624,12 @@ export function addNamespaceToActionDefinition(def) {
624
624
 
625
625
  // Adds a namespace to an interface parameter name if it is supposed to be namespaced
626
626
  export function getInterfaceParameterName(def, parameter) {
627
+ if (def.useNonNamespacedParameters) {
628
+ return getNonNamespacedParameterName(def, parameter);
629
+ }
627
630
  return isTargetParameter(parameter) || !Object.keys(def.interfaceType.propertiesV2).includes(addNamespaceIfNone(parameter)) ? parameter : addNamespaceIfNone(parameter);
628
631
  }
632
+ export function getNonNamespacedParameterName(def, parameter) {
633
+ return def.conflictingParameterOverrides?.[parameter] ?? (parameter.split(".").pop() || parameter);
634
+ }
629
635
  //# sourceMappingURL=defineAction.js.map