@osdk/typescript-sdk-docs 0.14.0 → 0.14.1-main-bbb89ce6c40d68bdf04f62ac40cc186dbd68750d

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @osdk/typescript-sdk-docs
2
2
 
3
+ ## 0.14.1-main-bbb89ce6c40d68bdf04f62ac40cc186dbd68750d
4
+
5
+ ### Patch Changes
6
+
7
+ - 58b3367: Migrate @osdk/language-models, @osdk/react-sdk-docs, and @osdk/typescript-sdk-docs to lint with oxlint and format with oxfmt (configured via Ultracite) instead of ESLint and dprint (second increment of the repo-wide oxc migration)
8
+
3
9
  ## 0.14.0
4
10
 
5
11
  ### Minor Changes
@@ -20,24 +20,24 @@ const indentedNewLine = spacesCount => `\n${" ".repeat(spacesCount)}`;
20
20
  export const TYPESCRIPT_OSDK_SNIPPETS = {
21
21
  ...snippets,
22
22
  computedVariables: {
23
- functionInputValuesV1: handleFunctionInputValuesV1,
24
- functionInputValuesV2: handleFunctionInputValuesV2,
25
23
  actionParameterSampleValuesV1: handleActionParameterSampleValuesV1,
26
24
  actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,
27
- propertyValueV1: handlePropertyValueV1,
28
- propertyValueV2: handlePropertyValueV2,
29
- propertyValueIncrementedV1: handlePropertyValueIncrementedV1,
30
- propertyValueIncrementedV2: handlePropertyValueIncrementedV2,
31
- propertiesV1: handlePropertiesV1,
32
- propertiesV2: handlePropertiesV2,
25
+ arrayElementValue: handleArrayElementValue,
26
+ functionInputValuesV1: handleFunctionInputValuesV1,
27
+ functionInputValuesV2: handleFunctionInputValuesV2,
28
+ linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,
29
+ linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
30
+ linkedPropertiesV1: handleLinkedPropertiesV1,
31
+ linkedPropertiesV2: handleLinkedPropertiesV2,
33
32
  primaryKeyPropertyV1: handlePrimaryKeyPropertyV1,
34
33
  primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,
35
34
  primaryKeyPropertyValueV2: handlePrimaryKeyPropertyValueV2,
36
- linkedPropertiesV1: handleLinkedPropertiesV1,
37
- linkedPropertiesV2: handleLinkedPropertiesV2,
38
- linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,
39
- linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
40
- arrayElementValue: handleArrayElementValue
35
+ propertiesV1: handlePropertiesV1,
36
+ propertiesV2: handlePropertiesV2,
37
+ propertyValueIncrementedV1: handlePropertyValueIncrementedV1,
38
+ propertyValueIncrementedV2: handlePropertyValueIncrementedV2,
39
+ propertyValueV1: handlePropertyValueV1,
40
+ propertyValueV2: handlePropertyValueV2
41
41
  }
42
42
  };
43
43
 
@@ -180,8 +180,8 @@ function handleLinkedPrimaryKeyPropertyV1({
180
180
  }
181
181
  return {
182
182
  apiName: rawLinkedPrimaryKeyProperty.apiName,
183
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V1),
184
- type: rawLinkedPrimaryKeyProperty.type
183
+ type: rawLinkedPrimaryKeyProperty.type,
184
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V1)
185
185
  };
186
186
  }
187
187
  function handleLinkedPrimaryKeyPropertyV2({
@@ -192,8 +192,8 @@ function handleLinkedPrimaryKeyPropertyV2({
192
192
  }
193
193
  return {
194
194
  apiName: rawLinkedPrimaryKeyProperty.apiName,
195
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V2),
196
- type: rawLinkedPrimaryKeyProperty.type
195
+ type: rawLinkedPrimaryKeyProperty.type,
196
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V2)
197
197
  };
198
198
  }
199
199
 
@@ -218,8 +218,8 @@ function renderActionParameterValues(rawActionTypeParameterValues, majorVersion)
218
218
  }
219
219
  return rawActionTypeParameterValues.map((param, index, array) => ({
220
220
  key: param.key,
221
- value: renderType(param.value, majorVersion, "actionParameter"),
222
- last: index === array.length - 1
221
+ last: index === array.length - 1,
222
+ value: renderType(param.value, majorVersion, "actionParameter")
223
223
  }));
224
224
  }
225
225
 
@@ -240,34 +240,50 @@ function renderType(type, majorVersion, context) {
240
240
  case "array":
241
241
  case "set":
242
242
  case "list":
243
- const arraySubType = renderType(type.subtype, majorVersion, context);
244
- return context === "arraySubType" ? arraySubType : `[${arraySubType}]`;
243
+ {
244
+ const arraySubType = renderType(type.subtype, majorVersion, context);
245
+ return context === "arraySubType" ? arraySubType : `[${arraySubType}]`;
246
+ }
245
247
  case "boolean":
246
- return type.value ? "true" : "false";
248
+ {
249
+ return type.value ? "true" : "false";
250
+ }
247
251
  case "byte":
248
252
  case "integer":
249
253
  case "long":
250
254
  case "short":
251
- return type.value.toString();
255
+ {
256
+ return type.value.toString();
257
+ }
252
258
  case "decimal":
253
259
  case "double":
254
260
  case "float":
255
- if (context === "actionParameter") {
256
- return `"${type.value.toString()}"`;
261
+ {
262
+ if (context === "actionParameter") {
263
+ return `"${type.value.toString()}"`;
264
+ }
265
+ return type.value.toString();
257
266
  }
258
- return type.value.toString();
259
267
  case "date":
260
- return getDateParameter(majorVersion, type.daysOffset);
268
+ {
269
+ return getDateParameter(majorVersion, type.daysOffset);
270
+ }
261
271
  case "timestamp":
262
- return getTimestampParameter(majorVersion, type.daysOffset);
272
+ {
273
+ return getTimestampParameter(majorVersion, type.daysOffset);
274
+ }
263
275
  case "object":
264
- const primaryKeyValue = type.primaryKeyType === "string" ? "\"primaryKeyValue\"" : "primaryKeyValue";
265
- if (context === "actionParameter") {
266
- return `${primaryKeyValue} /* or myObjectInstance */`;
276
+ {
277
+ const primaryKeyValue = type.primaryKeyType === "string" ? '"primaryKeyValue"' : "primaryKeyValue";
278
+ if (context === "actionParameter") {
279
+ return `${primaryKeyValue} /* or myObjectInstance */`;
280
+ }
281
+ return primaryKeyValue;
267
282
  }
268
- return primaryKeyValue;
269
283
  case "objectSet":
270
- return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
284
+ {
285
+ return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
286
+ }
271
287
  case "anonymousCustomType":
272
288
  case "customType":
273
289
  {
@@ -279,23 +295,35 @@ function renderType(type, majorVersion, context) {
279
295
  return "{}";
280
296
  }
281
297
  case "attachment":
282
- return type.hasAttachments ? "attachment" : "{}";
298
+ {
299
+ return type.hasAttachments ? "attachment" : "{}";
300
+ }
283
301
  case "interface":
284
302
  case "marking":
285
- return "{}";
303
+ {
304
+ return "{}";
305
+ }
286
306
  case "mediaReference":
287
- return context === "actionParameter" ? "mediaUpload" : "mediaReferenceRid";
307
+ {
308
+ return context === "actionParameter" ? "mediaUpload" : "mediaReferenceRid";
309
+ }
288
310
  case "objectType":
289
- return `"${type.objectTypeApiName}"`;
311
+ {
312
+ return `"${type.objectTypeApiName}"`;
313
+ }
290
314
  case "map":
291
- if (type.keyType.type === "object") {
292
- return `{[${getMapKeyObjectName(type.keyType.apiName)}.$objectSpecifier]: ${renderType(type.valueType, majorVersion, context)}}`;
315
+ {
316
+ if (type.keyType.type === "object") {
317
+ return `{[${getMapKeyObjectName(type.keyType.apiName)}.$objectSpecifier]: ${renderType(type.valueType, majorVersion, context)}}`;
318
+ }
319
+ return `{${renderType(type.valueType, majorVersion, context)}: ${renderType(type.valueType, majorVersion, context)}}`;
293
320
  }
294
- return `{${renderType(type.valueType, majorVersion, context)}: ${renderType(type.valueType, majorVersion, context)}}`;
295
321
  case "string":
296
322
  case "unknown":
297
323
  default:
298
- return `"${type.value ?? "value"}"`;
324
+ {
325
+ return `"${type.value ?? "value"}"`;
326
+ }
299
327
  }
300
328
  }
301
329
  function getMapKeyObjectName(apiName) {
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","names":["outdent","snippets","indentedNewLine","spacesCount","repeat","TYPESCRIPT_OSDK_SNIPPETS","computedVariables","functionInputValuesV1","handleFunctionInputValuesV1","functionInputValuesV2","handleFunctionInputValuesV2","actionParameterSampleValuesV1","handleActionParameterSampleValuesV1","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","propertyValueV1","handlePropertyValueV1","propertyValueV2","handlePropertyValueV2","propertyValueIncrementedV1","handlePropertyValueIncrementedV1","propertyValueIncrementedV2","handlePropertyValueIncrementedV2","propertiesV1","handlePropertiesV1","propertiesV2","handlePropertiesV2","primaryKeyPropertyV1","handlePrimaryKeyPropertyV1","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","primaryKeyPropertyValueV2","handlePrimaryKeyPropertyValueV2","linkedPropertiesV1","handleLinkedPropertiesV1","linkedPropertiesV2","handleLinkedPropertiesV2","linkedPrimaryKeyPropertyV1","handleLinkedPrimaryKeyPropertyV1","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","arrayElementValue","handleArrayElementValue","SdkMajorVersion","rawFunctionInputValues","renderFunctionInputValues","V1","V2","rawActionTypeParameterValues","renderActionParameterValues","rawPropertyValue","renderPropertyValue","rawPropertyValueIncremented","renderArrayElementPropertyValue","propertyValue","majorVersion","Error","renderType","rawProperties","map","prop","apiName","value","rawPrimaryKeyProperty","rawLinkedProperties","rawLinkedPrimaryKeyProperty","type","Object","keys","parameters","length","entries","key","join","param","index","array","last","context","arraySubType","subtype","toString","getDateParameter","daysOffset","getTimestampParameter","primaryKeyValue","primaryKeyType","objectTypeApiName","rendered","name","hasAttachments","keyType","getMapKeyObjectName","valueType","getDisplayName","processObjectApiName","input","tokens","split","result","token","titleCase","toLowerCase","charAt","slice","toUpperCase","objectApiName","lastIndexOf","offsetDate","Date","setDate","getDate","toISOString"],"sources":["docs.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 type { SdkSnippets } from \"@osdk/docs-spec-core\";\nimport type {\n ActionParameterSampleValuesIR,\n ActionParameterSampleValueTypeIR,\n FunctionSampleParametersIR,\n FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\nimport { outdent } from \"outdent\";\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nconst indentedNewLine = (spacesCount: number) => `\\n${\" \".repeat(spacesCount)}`;\n\nexport const TYPESCRIPT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> =\n {\n ...snippets,\n computedVariables: {\n functionInputValuesV1: handleFunctionInputValuesV1,\n functionInputValuesV2: handleFunctionInputValuesV2,\n actionParameterSampleValuesV1: handleActionParameterSampleValuesV1,\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n propertyValueV1: handlePropertyValueV1,\n propertyValueV2: handlePropertyValueV2,\n propertyValueIncrementedV1: handlePropertyValueIncrementedV1,\n propertyValueIncrementedV2: handlePropertyValueIncrementedV2,\n propertiesV1: handlePropertiesV1,\n propertiesV2: handlePropertiesV2,\n primaryKeyPropertyV1: handlePrimaryKeyPropertyV1,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n primaryKeyPropertyValueV2: handlePrimaryKeyPropertyValueV2,\n linkedPropertiesV1: handleLinkedPropertiesV1,\n linkedPropertiesV2: handleLinkedPropertiesV2,\n linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n arrayElementValue: handleArrayElementValue,\n },\n };\n\n// SDK major version enum\nenum SdkMajorVersion {\n V1 = 1,\n V2 = 2,\n}\n\n// Helper functions for properties\nfunction handleFunctionInputValuesV1({\n rawFunctionInputValues,\n}: {\n rawFunctionInputValues?: FunctionSampleParametersIR;\n}) {\n return renderFunctionInputValues(rawFunctionInputValues, SdkMajorVersion.V1);\n}\n\nfunction handleFunctionInputValuesV2({\n rawFunctionInputValues,\n}: {\n rawFunctionInputValues?: FunctionSampleParametersIR;\n}) {\n return renderFunctionInputValues(rawFunctionInputValues, SdkMajorVersion.V2);\n}\n\nfunction handleActionParameterSampleValuesV1({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\n}) {\n return renderActionParameterValues(\n rawActionTypeParameterValues,\n SdkMajorVersion.V1,\n );\n}\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\n}) {\n return renderActionParameterValues(\n rawActionTypeParameterValues,\n SdkMajorVersion.V2,\n );\n}\n\nfunction handlePropertyValueV1(\n { rawPropertyValue }: { rawPropertyValue?: PropertySampleValueTypeIR },\n) {\n return renderPropertyValue(rawPropertyValue, SdkMajorVersion.V1);\n}\n\nfunction handlePropertyValueV2(\n { rawPropertyValue }: { rawPropertyValue?: PropertySampleValueTypeIR },\n) {\n return renderPropertyValue(rawPropertyValue, SdkMajorVersion.V2);\n}\n\nfunction handlePropertyValueIncrementedV1({\n rawPropertyValueIncremented,\n}: {\n rawPropertyValueIncremented?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValueIncremented, SdkMajorVersion.V1);\n}\n\nfunction handlePropertyValueIncrementedV2({\n rawPropertyValueIncremented,\n}: {\n rawPropertyValueIncremented?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValueIncremented, SdkMajorVersion.V2);\n}\n\nfunction handleArrayElementValue(\n { rawPropertyValue }: { rawPropertyValue?: PropertySampleValueTypeIR },\n) {\n return renderArrayElementPropertyValue(rawPropertyValue, SdkMajorVersion.V2);\n}\n\nfunction renderArrayElementPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n majorVersion: SdkMajorVersion,\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue, majorVersion, \"arraySubType\");\n}\n\nfunction handlePropertiesV1(\n { rawProperties }: { rawProperties?: PropertySampleIR[] },\n) {\n if (rawProperties == null) {\n throw new Error(\"Cannot render with null rawProperties\");\n }\n\n return rawProperties.map(prop => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V1),\n }));\n}\n\nfunction handlePropertiesV2(\n { rawProperties }: { rawProperties?: PropertySampleIR[] },\n) {\n if (rawProperties == null) {\n throw new Error(\"Cannot render with null rawProperties\");\n }\n\n return rawProperties.map(prop => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V2),\n }));\n}\n\nfunction handlePrimaryKeyPropertyV1(\n { rawPrimaryKeyProperty }: { rawPrimaryKeyProperty?: PropertySampleIR },\n) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V1),\n };\n}\n\nfunction handlePrimaryKeyPropertyV2(\n { rawPrimaryKeyProperty }: { rawPrimaryKeyProperty?: PropertySampleIR },\n) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V2),\n };\n}\n\nfunction handlePrimaryKeyPropertyValueV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V2);\n}\n\nfunction handleLinkedPropertiesV1(\n { rawLinkedProperties }: { rawLinkedProperties?: PropertySampleIR[] },\n) {\n if (rawLinkedProperties == null) {\n throw new Error(\"Cannot render with null rawLinkedProperties\");\n }\n\n return rawLinkedProperties.map(prop => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V1),\n }));\n}\n\nfunction handleLinkedPropertiesV2(\n { rawLinkedProperties }: { rawLinkedProperties?: PropertySampleIR[] },\n) {\n if (rawLinkedProperties == null) {\n throw new Error(\"Cannot render with null rawLinkedProperties\");\n }\n\n return rawLinkedProperties.map(prop => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V2),\n }));\n}\n\nfunction handleLinkedPrimaryKeyPropertyV1({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n value: renderPropertyValue(\n rawLinkedPrimaryKeyProperty.value,\n SdkMajorVersion.V1,\n ),\n type: rawLinkedPrimaryKeyProperty.type,\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n value: renderPropertyValue(\n rawLinkedPrimaryKeyProperty.value,\n SdkMajorVersion.V2,\n ),\n type: rawLinkedPrimaryKeyProperty.type,\n };\n}\n\n// Common function to render function input values for any version\nfunction renderFunctionInputValues(\n rawFunctionInputValues: FunctionSampleParametersIR | undefined,\n majorVersion: SdkMajorVersion,\n): string {\n if (rawFunctionInputValues == null) {\n throw new Error(\"Cannot render a null rawFunctionInputValues\");\n }\n if (Object.keys(rawFunctionInputValues.parameters).length === 0) {\n return \"\";\n }\n\n return outdent`\n {\n ${\n Object.entries(rawFunctionInputValues.parameters)\n .map(([key, value]) =>\n `\"${key}\": ${renderType(value, majorVersion, \"functionInput\")}`\n )\n .join(`,${indentedNewLine(4)}`)\n }\n }`;\n}\n\n// Common function to render action parameter values for any version\nfunction renderActionParameterValues(\n rawActionTypeParameterValues: ActionParameterSampleValuesIR | undefined,\n majorVersion: SdkMajorVersion,\n): Array<{ key: string; value: string; last: boolean }> {\n if (rawActionTypeParameterValues == null) {\n throw new Error(\"Cannot render a null rawActionTypeParameterValues\");\n }\n\n return rawActionTypeParameterValues.map((param, index, array) => ({\n key: param.key,\n value: renderType(param.value, majorVersion, \"actionParameter\"),\n last: index === array.length - 1,\n }));\n}\n\n// Function to render property values\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n majorVersion: SdkMajorVersion,\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue, majorVersion, \"property\");\n}\n\n// Unified render function for all types\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR,\n majorVersion: SdkMajorVersion,\n context: \"property\" | \"functionInput\" | \"actionParameter\" | \"arraySubType\",\n): string {\n if (type == null) {\n throw new Error(\"Cannot render a null type value\");\n }\n\n switch (type.type) {\n case \"array\":\n case \"set\":\n case \"list\":\n const arraySubType = renderType(type.subtype, majorVersion, context);\n return context === \"arraySubType\" ? arraySubType : `[${arraySubType}]`;\n case \"boolean\":\n return type.value ? \"true\" : \"false\";\n case \"byte\":\n case \"integer\":\n case \"long\":\n case \"short\":\n return type.value.toString();\n case \"decimal\":\n case \"double\":\n case \"float\":\n if (context === \"actionParameter\") {\n return `\"${type.value.toString()}\"`;\n }\n return type.value.toString();\n case \"date\":\n return getDateParameter(majorVersion, type.daysOffset);\n case \"timestamp\":\n return getTimestampParameter(majorVersion, type.daysOffset);\n case \"object\":\n const primaryKeyValue = type.primaryKeyType === \"string\"\n ? \"\\\"primaryKeyValue\\\"\"\n : \"primaryKeyValue\";\n if (context === \"actionParameter\") {\n return `${primaryKeyValue} /* or myObjectInstance */`;\n }\n return primaryKeyValue;\n case \"objectSet\":\n return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;\n case \"anonymousCustomType\":\n case \"customType\": {\n const entries = Object.entries(type.parameters ?? {});\n if (entries.length > 0) {\n const rendered = entries\n .map(([name, value]) =>\n `\"${name}\": ${renderType(value, majorVersion, context)}`\n )\n .join(`,${indentedNewLine(8)}`);\n return `{${indentedNewLine(8)}${rendered}${indentedNewLine(4)}}`;\n }\n return \"{}\";\n }\n case \"attachment\":\n return type.hasAttachments ? \"attachment\" : \"{}\";\n case \"interface\":\n case \"marking\":\n return \"{}\";\n case \"mediaReference\":\n return context === \"actionParameter\"\n ? \"mediaUpload\"\n : \"mediaReferenceRid\";\n case \"objectType\":\n return `\"${type.objectTypeApiName}\"`;\n case \"map\":\n if (type.keyType.type === \"object\") {\n return `{[${\n getMapKeyObjectName(type.keyType.apiName)\n }.$objectSpecifier]: ${\n renderType(type.valueType, majorVersion, context)\n }}`;\n }\n return `{${\n renderType(\n type.valueType,\n majorVersion,\n context,\n )\n }: ${renderType(type.valueType, majorVersion, context)}}`;\n\n case \"string\":\n case \"unknown\":\n default:\n return `\"${type.value ?? \"value\"}\"`;\n }\n}\n\nfunction getMapKeyObjectName(apiName?: string) {\n if (apiName == null) {\n return \"osdkObject\";\n }\n return `${getDisplayName(processObjectApiName(apiName))}OsdkObject`;\n}\n\nfunction getDisplayName(input: string): string {\n const tokens = input.split(/[_-]|(?<=[a-z])(?=[A-Z])/);\n const result = tokens.map(token => titleCase(token.toLowerCase())).join(\"\");\n return result.charAt(0).toLowerCase() + result.slice(1);\n}\n\nfunction titleCase(token: string) {\n return (token[0] ?? \"\").toUpperCase() + token.slice(1);\n}\n\n// For objects that have namespaces prefixed to their api name, we remove it and only return the last portion\n// As that is what the TS OSDK uses to generate identifiers for objects\nfunction processObjectApiName(objectApiName: string) {\n const last = objectApiName.lastIndexOf(\".\");\n if (last === -1) {\n return objectApiName;\n }\n return objectApiName.slice(last + 1);\n}\n\n// Generic helper functions for date and timestamp\nfunction getDateParameter(\n majorVersion: SdkMajorVersion,\n daysOffset = 0,\n): string {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + daysOffset);\n const hasOffset = daysOffset !== 0;\n\n if (majorVersion >= SdkMajorVersion.V2) {\n return `\"${offsetDate.toISOString().split(\"T\")[0]}\"`;\n }\n return hasOffset\n ? `LocalDate.now().plusDays(${daysOffset})`\n : \"LocalDate.now()\";\n}\n\nfunction getTimestampParameter(\n majorVersion: SdkMajorVersion,\n daysOffset = 0,\n): string {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + daysOffset);\n const hasOffset = daysOffset !== 0;\n\n if (majorVersion >= SdkMajorVersion.V2) {\n return `\"${offsetDate.toISOString()}\"`;\n }\n return hasOffset\n ? `Timestamp.now().plusDays(${daysOffset})`\n : \"Timestamp.now()\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,OAAO,QAAQ,SAAS;AACjC,SAASC,QAAQ,QAAQ,+CAA+C;AAExE,MAAMC,eAAe,GAAIC,WAAmB,IAAK,KAAK,GAAG,CAACC,MAAM,CAACD,WAAW,CAAC,EAAE;AAE/E,OAAO,MAAME,wBAAgE,GAC3E;EACE,GAAGJ,QAAQ;EACXK,iBAAiB,EAAE;IACjBC,qBAAqB,EAAEC,2BAA2B;IAClDC,qBAAqB,EAAEC,2B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AA6B,EAC7B4B,UAAU,GAAG,CAAC,EACN;EACR,MAAMyB,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;EAC7BD,UAAU,CAACE,OAAO,CAACF,UAAU,CAACG,OAAO,CAAC,CAAC,GAAG5B,UAAU,CAAC;EAGrD,IAAI5B,YAAY,IAAIZ,eAAe,CAACI,EAAE,EAAE;IACtC,OAAO,IAAI6D,UAAU,CAACI,WAAW,CAAC,CAAC,CAACd,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;EACtD;EACA,OALkBf,UAAU,KAAK,CAAC,GAM9B,4BAA4BA,UAAU,GAAG,GACzC,iBAAiB;AACvB;AAEA,SAASC,qBAAqBA,CAC5B7B,YAA6B,EAC7B4B,UAAU,GAAG,CAAC,EACN;EACR,MAAMyB,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;EAC7BD,UAAU,CAACE,OAAO,CAACF,UAAU,CAACG,OAAO,CAAC,CAAC,GAAG5B,UAAU,CAAC;EAGrD,IAAI5B,YAAY,IAAIZ,eAAe,CAACI,EAAE,EAAE;IACtC,OAAO,IAAI6D,UAAU,CAACI,WAAW,CAAC,CAAC,GAAG;EACxC;EACA,OALkB7B,UAAU,KAAK,CAAC,GAM9B,4BAA4BA,UAAU,GAAG,GACzC,iBAAiB;AACvB","ignoreList":[]}
1
+ {"version":3,"file":"docs.js","names":["outdent","snippets","indentedNewLine","spacesCount","repeat","TYPESCRIPT_OSDK_SNIPPETS","computedVariables","actionParameterSampleValuesV1","handleActionParameterSampleValuesV1","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","arrayElementValue","handleArrayElementValue","functionInputValuesV1","handleFunctionInputValuesV1","functionInputValuesV2","handleFunctionInputValuesV2","linkedPrimaryKeyPropertyV1","handleLinkedPrimaryKeyPropertyV1","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","linkedPropertiesV1","handleLinkedPropertiesV1","linkedPropertiesV2","handleLinkedPropertiesV2","primaryKeyPropertyV1","handlePrimaryKeyPropertyV1","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","primaryKeyPropertyValueV2","handlePrimaryKeyPropertyValueV2","propertiesV1","handlePropertiesV1","propertiesV2","handlePropertiesV2","propertyValueIncrementedV1","handlePropertyValueIncrementedV1","propertyValueIncrementedV2","handlePropertyValueIncrementedV2","propertyValueV1","handlePropertyValueV1","propertyValueV2","handlePropertyValueV2","SdkMajorVersion","rawFunctionInputValues","renderFunctionInputValues","V1","V2","rawActionTypeParameterValues","renderActionParameterValues","rawPropertyValue","renderPropertyValue","rawPropertyValueIncremented","renderArrayElementPropertyValue","propertyValue","majorVersion","Error","renderType","rawProperties","map","prop","apiName","value","rawPrimaryKeyProperty","rawLinkedProperties","rawLinkedPrimaryKeyProperty","type","Object","keys","parameters","length","entries","key","join","param","index","array","last","context","arraySubType","subtype","toString","getDateParameter","daysOffset","getTimestampParameter","primaryKeyValue","primaryKeyType","objectTypeApiName","rendered","name","hasAttachments","keyType","getMapKeyObjectName","valueType","getDisplayName","processObjectApiName","input","tokens","split","result","token","titleCase","toLowerCase","charAt","slice","toUpperCase","objectApiName","lastIndexOf","offsetDate","Date","setDate","getDate","toISOString"],"sources":["docs.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 type { SdkSnippets } from \"@osdk/docs-spec-core\";\nimport type {\n ActionParameterSampleValuesIR,\n ActionParameterSampleValueTypeIR,\n FunctionSampleParametersIR,\n FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\nimport { outdent } from \"outdent\";\n\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nconst indentedNewLine = (spacesCount: number) => `\\n${\" \".repeat(spacesCount)}`;\n\nexport const TYPESCRIPT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> =\n {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV1: handleActionParameterSampleValuesV1,\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n arrayElementValue: handleArrayElementValue,\n functionInputValuesV1: handleFunctionInputValuesV1,\n functionInputValuesV2: handleFunctionInputValuesV2,\n linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n linkedPropertiesV1: handleLinkedPropertiesV1,\n linkedPropertiesV2: handleLinkedPropertiesV2,\n primaryKeyPropertyV1: handlePrimaryKeyPropertyV1,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n primaryKeyPropertyValueV2: handlePrimaryKeyPropertyValueV2,\n propertiesV1: handlePropertiesV1,\n propertiesV2: handlePropertiesV2,\n propertyValueIncrementedV1: handlePropertyValueIncrementedV1,\n propertyValueIncrementedV2: handlePropertyValueIncrementedV2,\n propertyValueV1: handlePropertyValueV1,\n propertyValueV2: handlePropertyValueV2,\n },\n };\n\n// SDK major version enum\nenum SdkMajorVersion {\n V1 = 1,\n V2 = 2,\n}\n\n// Helper functions for properties\nfunction handleFunctionInputValuesV1({\n rawFunctionInputValues,\n}: {\n rawFunctionInputValues?: FunctionSampleParametersIR;\n}) {\n return renderFunctionInputValues(rawFunctionInputValues, SdkMajorVersion.V1);\n}\n\nfunction handleFunctionInputValuesV2({\n rawFunctionInputValues,\n}: {\n rawFunctionInputValues?: FunctionSampleParametersIR;\n}) {\n return renderFunctionInputValues(rawFunctionInputValues, SdkMajorVersion.V2);\n}\n\nfunction handleActionParameterSampleValuesV1({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\n}) {\n return renderActionParameterValues(\n rawActionTypeParameterValues,\n SdkMajorVersion.V1\n );\n}\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\n}) {\n return renderActionParameterValues(\n rawActionTypeParameterValues,\n SdkMajorVersion.V2\n );\n}\n\nfunction handlePropertyValueV1({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValue, SdkMajorVersion.V1);\n}\n\nfunction handlePropertyValueV2({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValue, SdkMajorVersion.V2);\n}\n\nfunction handlePropertyValueIncrementedV1({\n rawPropertyValueIncremented,\n}: {\n rawPropertyValueIncremented?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValueIncremented, SdkMajorVersion.V1);\n}\n\nfunction handlePropertyValueIncrementedV2({\n rawPropertyValueIncremented,\n}: {\n rawPropertyValueIncremented?: PropertySampleValueTypeIR;\n}) {\n return renderPropertyValue(rawPropertyValueIncremented, SdkMajorVersion.V2);\n}\n\nfunction handleArrayElementValue({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}) {\n return renderArrayElementPropertyValue(rawPropertyValue, SdkMajorVersion.V2);\n}\n\nfunction renderArrayElementPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n majorVersion: SdkMajorVersion\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue, majorVersion, \"arraySubType\");\n}\n\nfunction handlePropertiesV1({\n rawProperties,\n}: {\n rawProperties?: PropertySampleIR[];\n}) {\n if (rawProperties == null) {\n throw new Error(\"Cannot render with null rawProperties\");\n }\n\n return rawProperties.map((prop) => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V1),\n }));\n}\n\nfunction handlePropertiesV2({\n rawProperties,\n}: {\n rawProperties?: PropertySampleIR[];\n}) {\n if (rawProperties == null) {\n throw new Error(\"Cannot render with null rawProperties\");\n }\n\n return rawProperties.map((prop) => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V2),\n }));\n}\n\nfunction handlePrimaryKeyPropertyV1({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V1),\n };\n}\n\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V2),\n };\n}\n\nfunction handlePrimaryKeyPropertyValueV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n\n return renderPropertyValue(rawPrimaryKeyProperty.value, SdkMajorVersion.V2);\n}\n\nfunction handleLinkedPropertiesV1({\n rawLinkedProperties,\n}: {\n rawLinkedProperties?: PropertySampleIR[];\n}) {\n if (rawLinkedProperties == null) {\n throw new Error(\"Cannot render with null rawLinkedProperties\");\n }\n\n return rawLinkedProperties.map((prop) => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V1),\n }));\n}\n\nfunction handleLinkedPropertiesV2({\n rawLinkedProperties,\n}: {\n rawLinkedProperties?: PropertySampleIR[];\n}) {\n if (rawLinkedProperties == null) {\n throw new Error(\"Cannot render with null rawLinkedProperties\");\n }\n\n return rawLinkedProperties.map((prop) => ({\n apiName: prop.apiName,\n value: renderPropertyValue(prop.value, SdkMajorVersion.V2),\n }));\n}\n\nfunction handleLinkedPrimaryKeyPropertyV1({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n type: rawLinkedPrimaryKeyProperty.type,\n value: renderPropertyValue(\n rawLinkedPrimaryKeyProperty.value,\n SdkMajorVersion.V1\n ),\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n type: rawLinkedPrimaryKeyProperty.type,\n value: renderPropertyValue(\n rawLinkedPrimaryKeyProperty.value,\n SdkMajorVersion.V2\n ),\n };\n}\n\n// Common function to render function input values for any version\nfunction renderFunctionInputValues(\n rawFunctionInputValues: FunctionSampleParametersIR | undefined,\n majorVersion: SdkMajorVersion\n): string {\n if (rawFunctionInputValues == null) {\n throw new Error(\"Cannot render a null rawFunctionInputValues\");\n }\n if (Object.keys(rawFunctionInputValues.parameters).length === 0) {\n return \"\";\n }\n\n return outdent`\n {\n ${Object.entries(rawFunctionInputValues.parameters)\n .map(\n ([key, value]) =>\n `\"${key}\": ${renderType(value, majorVersion, \"functionInput\")}`\n )\n .join(`,${indentedNewLine(4)}`)}\n }`;\n}\n\n// Common function to render action parameter values for any version\nfunction renderActionParameterValues(\n rawActionTypeParameterValues: ActionParameterSampleValuesIR | undefined,\n majorVersion: SdkMajorVersion\n): { key: string; value: string; last: boolean }[] {\n if (rawActionTypeParameterValues == null) {\n throw new Error(\"Cannot render a null rawActionTypeParameterValues\");\n }\n\n return rawActionTypeParameterValues.map((param, index, array) => ({\n key: param.key,\n last: index === array.length - 1,\n value: renderType(param.value, majorVersion, \"actionParameter\"),\n }));\n}\n\n// Function to render property values\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n majorVersion: SdkMajorVersion\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue, majorVersion, \"property\");\n}\n\n// Unified render function for all types\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR,\n majorVersion: SdkMajorVersion,\n context: \"property\" | \"functionInput\" | \"actionParameter\" | \"arraySubType\"\n): string {\n if (type == null) {\n throw new Error(\"Cannot render a null type value\");\n }\n\n switch (type.type) {\n case \"array\":\n case \"set\":\n case \"list\": {\n const arraySubType = renderType(type.subtype, majorVersion, context);\n return context === \"arraySubType\" ? arraySubType : `[${arraySubType}]`;\n }\n case \"boolean\": {\n return type.value ? \"true\" : \"false\";\n }\n case \"byte\":\n case \"integer\":\n case \"long\":\n case \"short\": {\n return type.value.toString();\n }\n case \"decimal\":\n case \"double\":\n case \"float\": {\n if (context === \"actionParameter\") {\n return `\"${type.value.toString()}\"`;\n }\n return type.value.toString();\n }\n case \"date\": {\n return getDateParameter(majorVersion, type.daysOffset);\n }\n case \"timestamp\": {\n return getTimestampParameter(majorVersion, type.daysOffset);\n }\n case \"object\": {\n const primaryKeyValue =\n type.primaryKeyType === \"string\"\n ? '\"primaryKeyValue\"'\n : \"primaryKeyValue\";\n if (context === \"actionParameter\") {\n return `${primaryKeyValue} /* or myObjectInstance */`;\n }\n return primaryKeyValue;\n }\n case \"objectSet\": {\n return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;\n }\n case \"anonymousCustomType\":\n case \"customType\": {\n const entries = Object.entries(type.parameters ?? {});\n if (entries.length > 0) {\n const rendered = entries\n .map(\n ([name, value]) =>\n `\"${name}\": ${renderType(value, majorVersion, context)}`\n )\n .join(`,${indentedNewLine(8)}`);\n return `{${indentedNewLine(8)}${rendered}${indentedNewLine(4)}}`;\n }\n return \"{}\";\n }\n case \"attachment\": {\n return type.hasAttachments ? \"attachment\" : \"{}\";\n }\n case \"interface\":\n case \"marking\": {\n return \"{}\";\n }\n case \"mediaReference\": {\n return context === \"actionParameter\"\n ? \"mediaUpload\"\n : \"mediaReferenceRid\";\n }\n case \"objectType\": {\n return `\"${type.objectTypeApiName}\"`;\n }\n case \"map\": {\n if (type.keyType.type === \"object\") {\n return `{[${getMapKeyObjectName(\n type.keyType.apiName\n )}.$objectSpecifier]: ${renderType(\n type.valueType,\n majorVersion,\n context\n )}}`;\n }\n return `{${renderType(\n type.valueType,\n majorVersion,\n context\n )}: ${renderType(type.valueType, majorVersion, context)}}`;\n }\n\n case \"string\":\n case \"unknown\":\n default: {\n return `\"${type.value ?? \"value\"}\"`;\n }\n }\n}\n\nfunction getMapKeyObjectName(apiName?: string) {\n if (apiName == null) {\n return \"osdkObject\";\n }\n return `${getDisplayName(processObjectApiName(apiName))}OsdkObject`;\n}\n\nfunction getDisplayName(input: string): string {\n const tokens = input.split(/[_-]|(?<=[a-z])(?=[A-Z])/);\n const result = tokens.map((token) => titleCase(token.toLowerCase())).join(\"\");\n return result.charAt(0).toLowerCase() + result.slice(1);\n}\n\nfunction titleCase(token: string) {\n return (token[0] ?? \"\").toUpperCase() + token.slice(1);\n}\n\n// For objects that have namespaces prefixed to their api name, we remove it and only return the last portion\n// As that is what the TS OSDK uses to generate identifiers for objects\nfunction processObjectApiName(objectApiName: string) {\n const last = objectApiName.lastIndexOf(\".\");\n if (last === -1) {\n return objectApiName;\n }\n return objectApiName.slice(last + 1);\n}\n\n// Generic helper functions for date and timestamp\nfunction getDateParameter(\n majorVersion: SdkMajorVersion,\n daysOffset = 0\n): string {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + daysOffset);\n const hasOffset = daysOffset !== 0;\n\n if (majorVersion >= SdkMajorVersion.V2) {\n return `\"${offsetDate.toISOString().split(\"T\")[0]}\"`;\n }\n return hasOffset\n ? `LocalDate.now().plusDays(${daysOffset})`\n : \"LocalDate.now()\";\n}\n\nfunction getTimestampParameter(\n majorVersion: SdkMajorVersion,\n daysOffset = 0\n): string {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + daysOffset);\n const hasOffset = daysOffset !== 0;\n\n if (majorVersion >= SdkMajorVersion.V2) {\n return `\"${offsetDate.toISOString()}\"`;\n }\n return hasOffset\n ? `Timestamp.now().plusDays(${daysOffset})`\n : \"Timestamp.now()\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,OAAO,QAAQ,SAAS;AAEjC,SAASC,QAAQ,QAAQ,+CAA+C;AAExE,MAAMC,eAAe,GAAIC,WAAmB,IAAK,KAAK,GAAG,CAACC,MAAM,CAACD,WAAW,CAAC,EAAE;AAE/E,OAAO,MAAME,wBAAgE,GAC3E;EACE,GAAGJ,QAAQ;EACXK,iBAAiB,EAAE;IACjBC,6BAA6B,EAAEC,mCAAmC;IAClEC,6BAA6B,EAAEC,mCAAmC;IAClEC,iBAAiB,EAAEC,uBAAuB;IAC1CC,qBAAqB,EAAEC,2BAA2B;IAClDC,qBAAqB,EAAEC,2BAA2B;IAClDC,0BAA0B,EAAEC,gCAAgC;IAC5DC,0BAA0B,EAAEC,gCAAgC;IAC5DC,kBAAkB,EAAEC,wBAAwB;IAC5CC,kBAAkB,EAAEC,wB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IAAI,CAAC,CAAC;EAC7BD,UAAU,CAACE,OAAO,CAACF,UAAU,CAACG,OAAO,CAAC,CAAC,GAAG5B,UAAU,CAAC;EAGrD,IAAI5B,YAAY,IAAIZ,eAAe,CAACI,EAAE,EAAE;IACtC,OAAO,IAAI6D,UAAU,CAACI,WAAW,CAAC,CAAC,CAACd,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;EACtD;EACA,OALkBf,UAAU,KAAK,CAAC,GAM9B,4BAA4BA,UAAU,GAAG,GACzC,iBAAiB;AACvB;AAEA,SAASC,qBAAqBA,CAC5B7B,YAA6B,EAC7B4B,UAAU,GAAG,CAAC,EACN;EACR,MAAMyB,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;EAC7BD,UAAU,CAACE,OAAO,CAACF,UAAU,CAACG,OAAO,CAAC,CAAC,GAAG5B,UAAU,CAAC;EAGrD,IAAI5B,YAAY,IAAIZ,eAAe,CAACI,EAAE,EAAE;IACtC,OAAO,IAAI6D,UAAU,CAACI,WAAW,CAAC,CAAC,GAAG;EACxC;EACA,OALkB7B,UAAU,KAAK,CAAC,GAM9B,4BAA4BA,UAAU,GAAG,GACzC,iBAAiB;AACvB","ignoreList":[]}
@@ -604,24 +604,24 @@ ${" ".repeat(spacesCount)}`;
604
604
  var TYPESCRIPT_OSDK_SNIPPETS = {
605
605
  ...snippets,
606
606
  computedVariables: {
607
- functionInputValuesV1: handleFunctionInputValuesV1,
608
- functionInputValuesV2: handleFunctionInputValuesV2,
609
607
  actionParameterSampleValuesV1: handleActionParameterSampleValuesV1,
610
608
  actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,
611
- propertyValueV1: handlePropertyValueV1,
612
- propertyValueV2: handlePropertyValueV2,
613
- propertyValueIncrementedV1: handlePropertyValueIncrementedV1,
614
- propertyValueIncrementedV2: handlePropertyValueIncrementedV2,
615
- propertiesV1: handlePropertiesV1,
616
- propertiesV2: handlePropertiesV2,
609
+ arrayElementValue: handleArrayElementValue,
610
+ functionInputValuesV1: handleFunctionInputValuesV1,
611
+ functionInputValuesV2: handleFunctionInputValuesV2,
612
+ linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,
613
+ linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
614
+ linkedPropertiesV1: handleLinkedPropertiesV1,
615
+ linkedPropertiesV2: handleLinkedPropertiesV2,
617
616
  primaryKeyPropertyV1: handlePrimaryKeyPropertyV1,
618
617
  primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,
619
618
  primaryKeyPropertyValueV2: handlePrimaryKeyPropertyValueV2,
620
- linkedPropertiesV1: handleLinkedPropertiesV1,
621
- linkedPropertiesV2: handleLinkedPropertiesV2,
622
- linkedPrimaryKeyPropertyV1: handleLinkedPrimaryKeyPropertyV1,
623
- linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
624
- arrayElementValue: handleArrayElementValue
619
+ propertiesV1: handlePropertiesV1,
620
+ propertiesV2: handlePropertiesV2,
621
+ propertyValueIncrementedV1: handlePropertyValueIncrementedV1,
622
+ propertyValueIncrementedV2: handlePropertyValueIncrementedV2,
623
+ propertyValueV1: handlePropertyValueV1,
624
+ propertyValueV2: handlePropertyValueV2
625
625
  }
626
626
  };
627
627
  var SdkMajorVersion = /* @__PURE__ */ (function(SdkMajorVersion2) {
@@ -762,8 +762,8 @@ function handleLinkedPrimaryKeyPropertyV1({
762
762
  }
763
763
  return {
764
764
  apiName: rawLinkedPrimaryKeyProperty.apiName,
765
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V1),
766
- type: rawLinkedPrimaryKeyProperty.type
765
+ type: rawLinkedPrimaryKeyProperty.type,
766
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V1)
767
767
  };
768
768
  }
769
769
  function handleLinkedPrimaryKeyPropertyV2({
@@ -774,8 +774,8 @@ function handleLinkedPrimaryKeyPropertyV2({
774
774
  }
775
775
  return {
776
776
  apiName: rawLinkedPrimaryKeyProperty.apiName,
777
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V2),
778
- type: rawLinkedPrimaryKeyProperty.type
777
+ type: rawLinkedPrimaryKeyProperty.type,
778
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value, SdkMajorVersion.V2)
779
779
  };
780
780
  }
781
781
  function renderFunctionInputValues(rawFunctionInputValues, majorVersion) {
@@ -796,8 +796,8 @@ function renderActionParameterValues(rawActionTypeParameterValues, majorVersion)
796
796
  }
797
797
  return rawActionTypeParameterValues.map((param, index, array) => ({
798
798
  key: param.key,
799
- value: renderType(param.value, majorVersion, "actionParameter"),
800
- last: index === array.length - 1
799
+ last: index === array.length - 1,
800
+ value: renderType(param.value, majorVersion, "actionParameter")
801
801
  }));
802
802
  }
803
803
  function renderPropertyValue(propertyValue, majorVersion) {
@@ -813,35 +813,43 @@ function renderType(type, majorVersion, context) {
813
813
  switch (type.type) {
814
814
  case "array":
815
815
  case "set":
816
- case "list":
816
+ case "list": {
817
817
  const arraySubType = renderType(type.subtype, majorVersion, context);
818
818
  return context === "arraySubType" ? arraySubType : `[${arraySubType}]`;
819
- case "boolean":
819
+ }
820
+ case "boolean": {
820
821
  return type.value ? "true" : "false";
822
+ }
821
823
  case "byte":
822
824
  case "integer":
823
825
  case "long":
824
- case "short":
826
+ case "short": {
825
827
  return type.value.toString();
828
+ }
826
829
  case "decimal":
827
830
  case "double":
828
- case "float":
831
+ case "float": {
829
832
  if (context === "actionParameter") {
830
833
  return `"${type.value.toString()}"`;
831
834
  }
832
835
  return type.value.toString();
833
- case "date":
836
+ }
837
+ case "date": {
834
838
  return getDateParameter(majorVersion, type.daysOffset);
835
- case "timestamp":
839
+ }
840
+ case "timestamp": {
836
841
  return getTimestampParameter(majorVersion, type.daysOffset);
837
- case "object":
842
+ }
843
+ case "object": {
838
844
  const primaryKeyValue = type.primaryKeyType === "string" ? '"primaryKeyValue"' : "primaryKeyValue";
839
845
  if (context === "actionParameter") {
840
846
  return `${primaryKeyValue} /* or myObjectInstance */`;
841
847
  }
842
848
  return primaryKeyValue;
843
- case "objectSet":
849
+ }
850
+ case "objectSet": {
844
851
  return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
852
+ }
845
853
  case "anonymousCustomType":
846
854
  case "customType": {
847
855
  const entries = Object.entries(type.parameters ?? {});
@@ -851,24 +859,30 @@ function renderType(type, majorVersion, context) {
851
859
  }
852
860
  return "{}";
853
861
  }
854
- case "attachment":
862
+ case "attachment": {
855
863
  return type.hasAttachments ? "attachment" : "{}";
864
+ }
856
865
  case "interface":
857
- case "marking":
866
+ case "marking": {
858
867
  return "{}";
859
- case "mediaReference":
868
+ }
869
+ case "mediaReference": {
860
870
  return context === "actionParameter" ? "mediaUpload" : "mediaReferenceRid";
861
- case "objectType":
871
+ }
872
+ case "objectType": {
862
873
  return `"${type.objectTypeApiName}"`;
863
- case "map":
874
+ }
875
+ case "map": {
864
876
  if (type.keyType.type === "object") {
865
877
  return `{[${getMapKeyObjectName(type.keyType.apiName)}.$objectSpecifier]: ${renderType(type.valueType, majorVersion, context)}}`;
866
878
  }
867
879
  return `{${renderType(type.valueType, majorVersion, context)}: ${renderType(type.valueType, majorVersion, context)}}`;
880
+ }
868
881
  case "string":
869
882
  case "unknown":
870
- default:
883
+ default: {
871
884
  return `"${type.value ?? "value"}"`;
885
+ }
872
886
  }
873
887
  }
874
888
  function getMapKeyObjectName(apiName) {