@osdk/react-sdk-docs 0.9.0 → 0.9.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/react-sdk-docs
2
2
 
3
+ ## 0.9.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.9.0
4
10
 
5
11
  ### Minor Changes
@@ -19,9 +19,9 @@ export const REACT_OSDK_SNIPPETS = {
19
19
  ...snippets,
20
20
  computedVariables: {
21
21
  actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,
22
- propertyValueV2: handlePropertyValueV2,
22
+ linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
23
23
  primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,
24
- linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2
24
+ propertyValueV2: handlePropertyValueV2
25
25
  }
26
26
  };
27
27
  function handleActionParameterSampleValuesV2({
@@ -32,8 +32,8 @@ function handleActionParameterSampleValuesV2({
32
32
  }
33
33
  return rawActionTypeParameterValues.map((param, index, array) => ({
34
34
  key: param.key,
35
- value: renderType(param.value),
36
- last: index === array.length - 1
35
+ last: index === array.length - 1,
36
+ value: renderType(param.value)
37
37
  }));
38
38
  }
39
39
  function handlePropertyValueV2({
@@ -60,8 +60,8 @@ function handleLinkedPrimaryKeyPropertyV2({
60
60
  }
61
61
  return {
62
62
  apiName: rawLinkedPrimaryKeyProperty.apiName,
63
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),
64
- type: rawLinkedPrimaryKeyProperty.type
63
+ type: rawLinkedPrimaryKeyProperty.type,
64
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value)
65
65
  };
66
66
  }
67
67
  function renderPropertyValue(propertyValue) {
@@ -78,18 +78,26 @@ function renderType(type) {
78
78
  case "array":
79
79
  case "set":
80
80
  case "list":
81
- return `[${renderType(type.subtype)}]`;
81
+ {
82
+ return `[${renderType(type.subtype)}]`;
83
+ }
82
84
  case "boolean":
83
- return type.value ? "true" : "false";
85
+ {
86
+ return type.value ? "true" : "false";
87
+ }
84
88
  case "byte":
85
89
  case "integer":
86
90
  case "long":
87
91
  case "short":
88
- return type.value.toString();
92
+ {
93
+ return type.value.toString();
94
+ }
89
95
  case "decimal":
90
96
  case "double":
91
97
  case "float":
92
- return type.value.toString();
98
+ {
99
+ return type.value.toString();
100
+ }
93
101
  case "date":
94
102
  {
95
103
  const offsetDate = new Date();
@@ -103,9 +111,13 @@ function renderType(type) {
103
111
  return `"${offsetDate.toISOString()}"`;
104
112
  }
105
113
  case "object":
106
- return `"primaryKeyValue" /* or myObjectInstance */`;
114
+ {
115
+ return `"primaryKeyValue" /* or myObjectInstance */`;
116
+ }
107
117
  case "objectSet":
108
- return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
118
+ {
119
+ return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
120
+ }
109
121
  case "anonymousCustomType":
110
122
  case "customType":
111
123
  {
@@ -118,20 +130,34 @@ function renderType(type) {
118
130
  }
119
131
  case "interface":
120
132
  case "marking":
121
- return "{}";
133
+ {
134
+ return "{}";
135
+ }
122
136
  case "attachment":
123
- return type.hasAttachments ? "attachment" : "{}";
137
+ {
138
+ return type.hasAttachments ? "attachment" : "{}";
139
+ }
124
140
  case "mediaReference":
125
- return "mediaUpload";
141
+ {
142
+ return "mediaUpload";
143
+ }
126
144
  case "objectType":
127
- return `"${type.objectTypeApiName}"`;
145
+ {
146
+ return `"${type.objectTypeApiName}"`;
147
+ }
128
148
  case "map":
129
- return `{key: ${renderType(type.valueType)}}`;
149
+ {
150
+ return `{key: ${renderType(type.valueType)}}`;
151
+ }
130
152
  case "string":
131
- return `"${type.value ?? "value"}"`;
153
+ {
154
+ return `"${type.value ?? "value"}"`;
155
+ }
132
156
  case "unknown":
133
157
  default:
134
- return `"value"`;
158
+ {
159
+ return `"value"`;
160
+ }
135
161
  }
136
162
  }
137
163
  //# sourceMappingURL=docs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","names":["snippets","REACT_OSDK_SNIPPETS","computedVariables","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","propertyValueV2","handlePropertyValueV2","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","rawActionTypeParameterValues","Error","map","param","index","array","key","value","renderType","last","length","rawPropertyValue","renderPropertyValue","rawPrimaryKeyProperty","apiName","rawLinkedPrimaryKeyProperty","type","propertyValue","subtype","toString","offsetDate","Date","setDate","getDate","daysOffset","toISOString","slice","objectTypeApiName","entries","Object","parameters","rendered","name","join","hasAttachments","valueType"],"sources":["docs.ts"],"sourcesContent":["/*\n * Copyright 2026 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 FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nexport const REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n propertyValueV2: handlePropertyValueV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n },\n};\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\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),\n last: index === array.length - 1,\n }));\n}\n\nfunction handlePropertyValueV2({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}): string {\n return renderPropertyValue(rawPropertyValue);\n}\n\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}): { apiName: string; value: string } {\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),\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}): { apiName: string; value: string; type: string } {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),\n type: rawLinkedPrimaryKeyProperty.type,\n };\n}\n\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue);\n}\n\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR,\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 return `[${renderType(type.subtype)}]`;\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 return type.value.toString();\n case \"date\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\":\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\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]) => `\"${name}\": ${renderType(value)}`)\n .join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\":\n return \"{}\";\n case \"attachment\":\n return type.hasAttachments ? \"attachment\" : \"{}\";\n case \"mediaReference\":\n return \"mediaUpload\";\n case \"objectType\":\n return `\"${type.objectTypeApiName}\"`;\n case \"map\":\n return `{key: ${renderType(type.valueType)}}`;\n case \"string\":\n return `\"${type.value ?? \"value\"}\"`;\n case \"unknown\":\n default:\n return `\"value\"`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;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js","names":["snippets","REACT_OSDK_SNIPPETS","computedVariables","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","propertyValueV2","handlePropertyValueV2","rawActionTypeParameterValues","Error","map","param","index","array","key","last","length","value","renderType","rawPropertyValue","renderPropertyValue","rawPrimaryKeyProperty","apiName","rawLinkedPrimaryKeyProperty","type","propertyValue","subtype","toString","offsetDate","Date","setDate","getDate","daysOffset","toISOString","slice","objectTypeApiName","entries","Object","parameters","rendered","name","join","hasAttachments","valueType"],"sources":["docs.ts"],"sourcesContent":["/*\n * Copyright 2026 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 FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\n\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nexport const REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n propertyValueV2: handlePropertyValueV2,\n },\n};\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\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),\n }));\n}\n\nfunction handlePropertyValueV2({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}): string {\n return renderPropertyValue(rawPropertyValue);\n}\n\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}): { apiName: string; value: string } {\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),\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}): { apiName: string; value: string; type: string } {\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(rawLinkedPrimaryKeyProperty.value),\n };\n}\n\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue);\n}\n\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR\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 return `[${renderType(type.subtype)}]`;\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 return type.value.toString();\n }\n case \"date\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\": {\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\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(([name, value]) => `\"${name}\": ${renderType(value)}`)\n .join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\": {\n return \"{}\";\n }\n case \"attachment\": {\n return type.hasAttachments ? \"attachment\" : \"{}\";\n }\n case \"mediaReference\": {\n return \"mediaUpload\";\n }\n case \"objectType\": {\n return `\"${type.objectTypeApiName}\"`;\n }\n case \"map\": {\n return `{key: ${renderType(type.valueType)}}`;\n }\n case \"string\": {\n return `\"${type.value ?? \"value\"}\"`;\n }\n case \"unknown\":\n default: {\n return `\"value\"`;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,QAAQ,QAAQ,+CAA+C;AAExE,OAAO,MAAMC,mBAA2D,GAAG;EACzE,GAAGD,QAAQ;EACXE,iBAAiB,EAAE;IACjBC,6BAA6B,EAAEC,mCAAmC;IAClEC,0BAA0B,EAAEC,gCAAgC;IAC5DC,oBAAoB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AW,CAAC,CAAC,GAAG;MACxC;IACA,KAAK,QAAQ;MAAE;QACb,OAAO,6CAA6C;MACtD;IACA,KAAK,WAAW;MAAE;QAChB,OAAO,UAAUT,IAAI,CAACW,iBAAiB,sCAAsC;MAC/E;IACA,KAAK,qBAAqB;IAC1B,KAAK,YAAY;MAAE;QACjB,MAAMC,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACZ,IAAI,CAACc,UAAU,IAAI,CAAC,CAAC,CAAC;QACrD,IAAIF,OAAO,CAACpB,MAAM,GAAG,CAAC,EAAE;UACtB,MAAMuB,QAAQ,GAAGH,OAAO,CACrB1B,GAAG,CAAC,CAAC,CAAC8B,IAAI,EAAEvB,KAAK,CAAC,KAAK,IAAIuB,IAAI,MAAMtB,UAAU,CAACD,KAAK,CAAC,EAAE,CAAC,CACzDwB,IAAI,CAAC,IAAI,CAAC;UACb,OAAO,KAAKF,QAAQ,IAAI;QAC1B;QACA,OAAO,IAAI;MACb;IACA,KAAK,WAAW;IAChB,KAAK,SAAS;MAAE;QACd,OAAO,IAAI;MACb;IACA,KAAK,YAAY;MAAE;QACjB,OAAOf,IAAI,CAACkB,cAAc,GAAG,YAAY,GAAG,IAAI;MAClD;IACA,KAAK,gBAAgB;MAAE;QACrB,OAAO,aAAa;MACtB;IACA,KAAK,YAAY;MAAE;QACjB,OAAO,IAAIlB,IAAI,CAACW,iBAAiB,GAAG;MACtC;IACA,KAAK,KAAK;MAAE;QACV,OAAO,SAASjB,UAAU,CAACM,IAAI,CAACmB,SAAS,CAAC,GAAG;MAC/C;IACA,KAAK,QAAQ;MAAE;QACb,OAAO,IAAInB,IAAI,CAACP,KAAK,IAAI,OAAO,GAAG;MACrC;IACA,KAAK,SAAS;IACd;MAAS;QACP,OAAO,SAAS;MAClB;EACF;AACF","ignoreList":[]}
@@ -320,9 +320,9 @@ var REACT_OSDK_SNIPPETS = {
320
320
  ...snippets,
321
321
  computedVariables: {
322
322
  actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,
323
- propertyValueV2: handlePropertyValueV2,
323
+ linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
324
324
  primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,
325
- linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2
325
+ propertyValueV2: handlePropertyValueV2
326
326
  }
327
327
  };
328
328
  function handleActionParameterSampleValuesV2({
@@ -333,8 +333,8 @@ function handleActionParameterSampleValuesV2({
333
333
  }
334
334
  return rawActionTypeParameterValues.map((param, index, array) => ({
335
335
  key: param.key,
336
- value: renderType(param.value),
337
- last: index === array.length - 1
336
+ last: index === array.length - 1,
337
+ value: renderType(param.value)
338
338
  }));
339
339
  }
340
340
  function handlePropertyValueV2({
@@ -361,8 +361,8 @@ function handleLinkedPrimaryKeyPropertyV2({
361
361
  }
362
362
  return {
363
363
  apiName: rawLinkedPrimaryKeyProperty.apiName,
364
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),
365
- type: rawLinkedPrimaryKeyProperty.type
364
+ type: rawLinkedPrimaryKeyProperty.type,
365
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value)
366
366
  };
367
367
  }
368
368
  function renderPropertyValue(propertyValue) {
@@ -378,19 +378,23 @@ function renderType(type) {
378
378
  switch (type.type) {
379
379
  case "array":
380
380
  case "set":
381
- case "list":
381
+ case "list": {
382
382
  return `[${renderType(type.subtype)}]`;
383
- case "boolean":
383
+ }
384
+ case "boolean": {
384
385
  return type.value ? "true" : "false";
386
+ }
385
387
  case "byte":
386
388
  case "integer":
387
389
  case "long":
388
- case "short":
390
+ case "short": {
389
391
  return type.value.toString();
392
+ }
390
393
  case "decimal":
391
394
  case "double":
392
- case "float":
395
+ case "float": {
393
396
  return type.value.toString();
397
+ }
394
398
  case "date": {
395
399
  const offsetDate = /* @__PURE__ */ new Date();
396
400
  offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));
@@ -401,10 +405,12 @@ function renderType(type) {
401
405
  offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));
402
406
  return `"${offsetDate.toISOString()}"`;
403
407
  }
404
- case "object":
408
+ case "object": {
405
409
  return `"primaryKeyValue" /* or myObjectInstance */`;
406
- case "objectSet":
410
+ }
411
+ case "objectSet": {
407
412
  return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
413
+ }
408
414
  case "anonymousCustomType":
409
415
  case "customType": {
410
416
  const entries = Object.entries(type.parameters ?? {});
@@ -415,21 +421,28 @@ function renderType(type) {
415
421
  return "{}";
416
422
  }
417
423
  case "interface":
418
- case "marking":
424
+ case "marking": {
419
425
  return "{}";
420
- case "attachment":
426
+ }
427
+ case "attachment": {
421
428
  return type.hasAttachments ? "attachment" : "{}";
422
- case "mediaReference":
429
+ }
430
+ case "mediaReference": {
423
431
  return "mediaUpload";
424
- case "objectType":
432
+ }
433
+ case "objectType": {
425
434
  return `"${type.objectTypeApiName}"`;
426
- case "map":
435
+ }
436
+ case "map": {
427
437
  return `{key: ${renderType(type.valueType)}}`;
428
- case "string":
438
+ }
439
+ case "string": {
429
440
  return `"${type.value ?? "value"}"`;
441
+ }
430
442
  case "unknown":
431
- default:
443
+ default: {
432
444
  return `"value"`;
445
+ }
433
446
  }
434
447
  }
435
448
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/generatedNoCheck/docsNoComputedVariables.ts","../../src/docs.ts"],"names":[],"mappings":";;;AAGO,IAAM,QAAA,GAAW;AAAA,EACtB,MAAA,EAAQ,KAAA;AAAA,EACR,UAAA,EAAY;AAAA,IACV,OAAA,EAAS;AAAA,MACP,UAAA,EAAY;AAAA,QACV,sBAAsB,CAAC;AAAA,UACrB,UAAA,EAAY;AAAA,SACb,CAAA;AAAA,QACD,4BAA4B,CAAC;AAAA,UAC3B,UAAA,EAAY;AAAA,SACb,CAAA;AAAA,QACD,6BAA6B,CAAC;AAAA,UAC5B,UAAA,EAAY;AAAA,SACb,CAAA;AAAA,QACD,kCAAkC,CAAC;AA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;AACH,MAAA,OAAO,IAAA;AAAA,IACT,KAAK,YAAA;AACH,MAAA,OAAO,IAAA,CAAK,iBAAiB,YAAA,GAAe,IAAA;AAAA,IAC9C,KAAK,gBAAA;AACH,MAAA,OAAO,aAAA;AAAA,IACT,KAAK,YAAA;AACH,MAAA,OAAO,CAAA,CAAA,EAAI,KAAK,iBAAiB,CAAA,CAAA,CAAA;AAAA,IACnC,KAAK,KAAA;AACH,MAAA,OAAO,CAAA,MAAA,EAAS,UAAA,CAAW,IAAA,CAAK,SAAS,CAAC,CAAA,CAAA,CAAA;AAAA,IAC5C,KAAK,QAAA;AACH,MAAA,OAAO,CAAA,CAAA,EAAI,IAAA,CAAK,KAAA,IAAS,OAAO,CAAA,CAAA,CAAA;AAAA,IAClC,KAAK,SAAA;AAAA,IACL;AACE,MAAA,OAAO,CAAA,OAAA,CAAA;AAAA;AAEb","file":"index.cjs","sourcesContent":["// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../documentation.yml instead.\n\nexport const snippets = {\n \"kind\": \"sdk\",\n \"versions\": {\n \"2.0.0\": {\n \"snippets\": {\n \"reactProviderSetup\": [{\n \"template\": \"import { OsdkProvider } from \\\"@osdk/react\\\";\\nimport { createClient } from \\\"@osdk/client\\\";\\n\\nconst client = createClient(\\n \\\"https://your-stack.palantirfoundry.com\\\",\\n \\\"ri.ontology.main.ontology.{UUID}\\\",\\n async () => \\\"your-token\\\"\\n);\\n\\nfunction App() {\\n return (\\n <OsdkProvider client={client}>\\n <YourApp />\\n </OsdkProvider>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsBasic\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n {isLoading && data && <span className=\\\"refresh-indicator\\\">Refreshing...</span>}\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsFilter\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Filtered{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{titleProperty}}: { $isNotNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectByPrimaryKey\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !object && <div className=\\\"skeleton\\\">Loading...</div>}\\n {object && (\\n <div>\\n <h2>{object.{{titleProperty}}}</h2>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"reactUseLinksBasic\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction Linked{{linkedObjectType}}({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error } = useLinks(source, \\\"{{linkApiName}}\\\");\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !links && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {links?.map(linked => (\\n <li key={linked.$primaryKey}>{linked.$primaryKey}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkActionBasic\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}Button() {\\n const { applyAction, isPending, error } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply {{actionApiName}}\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"reactUseOsdkAggregationBasic\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Count() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { $count: \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && data == null && <div className=\\\"skeleton\\\">Loading...</div>}\\n {data != null && <span>Total: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsEnabled\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Conditional{{objectType}}List({ shouldFetch }: { shouldFetch: boolean }) {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n enabled: shouldFetch\\n });\\n\\n return (\\n <div>\\n {!shouldFetch && <div>Select criteria to load data</div>}\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadSingleObjectGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !object && <div>Loading...</div>}\\n {object && <div>{object.{{titleProperty}}}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadObjectPageGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"orderObjectsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Sorted{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n orderBy: { {{titleProperty}}: \\\"asc\\\" }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchObjectsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Filtered{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{titleProperty}}: { $isNotNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadSingleObjectReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !object && <div>Loading...</div>}\\n {object && <div>{object.{{titleProperty}}}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadObjectsReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadAllObjectsReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\n// Note: For large datasets, consider using pagination with fetchMore\\nfunction All{{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}});\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadLinkedObjectReference\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction {{linkedObjectType}}Detail({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error } = useLinks(source, \\\"{{linkApiName}}\\\");\\n const linkedObject = links?.[0];\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !links && <div>Loading...</div>}\\n {linkedObject && <div>{linkedObject.$primaryKey}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadLinkedObjectsReference\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction Linked{{linkedObjectType}}List({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error, fetchMore } = useLinks(source, \\\"{{linkApiName}}\\\");\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !links && <div>Loading...</div>}\\n <ul>\\n {links?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"aggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Aggregation() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n where: { {{property}}: { $isNull: false } },\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"countAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Count() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { $count: \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Total: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"approximateDistinctAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}DistinctCount() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:approximateDistinct\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Distinct count: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"exactDistinctAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ExactDistinctCount() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:exactDistinct\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Exact distinct count: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"numericAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}{{operation}}() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:{{operation}}\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>{{operation}}: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"fixedWidthGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByFixedWidth() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $fixedWidth: 10 } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"durationGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByDuration() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $duration: [{{#durationText}}{{arg}}{{/durationText}}, \\\"{{#durationText}}{{unit}}{{/durationText}}\\\"] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"exactGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByExact() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"rangeGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByRange() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $ranges: [[{{{propertyValueV2}}}, {{{propertyValueV2}}}]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"applyAction\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}Button() {\\n const { applyAction, isPending, error } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div>Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"applyActionResponse\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}WithResult() {\\n const { applyAction, isPending, error, data } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n {data && <div>Action completed successfully</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply {{actionApiName}}\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"validateAction\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction, useDebouncedCallback } from \\\"@osdk/react\\\";\\nimport { useState } from \\\"react\\\";\\n\\nfunction {{actionApiName}}WithValidation() {\\n const { validateAction, applyAction, isPending, validationResult } = useOsdkAction({{actionApiName}});\\n const [params, setParams] = useState<Record<string, string>>({});\\n\\n const debouncedValidate = useDebouncedCallback(\\n (nextParams: Record<string, string>) => { validateAction(nextParams); },\\n 300\\n );\\n\\n const handleParamChange = (key: string, value: string) => {\\n const nextParams = { ...params, [key]: value };\\n setParams(nextParams);\\n debouncedValidate(nextParams);\\n };\\n\\n return (\\n <div>\\n <input\\n placeholder=\\\"Parameter value\\\"\\n onChange={(e) => handleParamChange(\\\"paramName\\\", e.target.value)}\\n />\\n {validationResult?.result === \\\"INVALID\\\" && (\\n <div>Validation errors present</div>\\n )}\\n <button\\n onClick={() => applyAction(params)}\\n disabled={isPending || validationResult?.result === \\\"INVALID\\\"}\\n >\\n {isPending ? \\\"Applying...\\\" : \\\"Apply\\\"}\\n </button>\\n </div>\\n );\\n}\"\n }],\n \"batchApplyAction\": [{\n \"template\": \"// Batch actions in React should be handled with multiple hook calls\\n// or by using the client directly for batch operations\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction Batch{{actionApiName}}() {\\n const { applyAction, isPending } = useOsdkAction({{actionApiName}});\\n\\n const handleBatchApply = async (items: Array<Parameters<typeof applyAction>[0]>) => {\\n await Promise.all(items.map(item => applyAction(item)));\\n };\\n\\n return (\\n <button onClick={() => handleBatchApply([])} disabled={isPending}>\\n Apply Batch\\n </button>\\n );\\n}\"\n }],\n \"clientSetup\": [{\n \"template\": \"import { OsdkProvider } from \\\"@osdk/react\\\";\\nimport { createClient } from \\\"@osdk/client\\\";\\n\\nconst client = createClient(\\n \\\"https://your-stack.palantirfoundry.com\\\",\\n \\\"ri.ontology.main.ontology.{UUID}\\\",\\n async () => \\\"your-token\\\"\\n);\\n\\nfunction App() {\\n return (\\n <OsdkProvider client={client}>\\n <YourApp />\\n </OsdkProvider>\\n );\\n}\"\n }],\n \"callFunction\": [{\n \"template\": \"import { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkFunction } from \\\"@osdk/react\\\";\\n\\nfunction {{funcApiName}}Caller() {\\n const { data, isLoading, error, refetch } = useOsdkFunction({{funcApiName}}, {\\n params: { /* function parameters */ }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n {data && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n <button onClick={refetch}>Refresh</button>\\n </div>\\n );\\n}\"\n }],\n \"executeFunction\": [{\n \"template\": \"import { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkFunction } from \\\"@osdk/react\\\";\\n\\nfunction {{funcApiName}}Executor() {\\n const { data, isLoading, error, refetch } = useOsdkFunction({{funcApiName}}, {\\n params: { /* function parameters */ }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n {data && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n <button onClick={refetch}>Refresh</button>\\n </div>\\n );\\n}\"\n }],\n \"stringStartsWithTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}StartsWith() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAnyTermTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAnyTerm() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAnyTerm: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAllTermsTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAllTerms() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAllTerms: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAllTermsInOrderTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAllTermsInOrder() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Contains() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $contains: \\\"value\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"equalityTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Equality() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $eq: {{{propertyValueV2}}} }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"inFilterTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}InFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $in: [{{{propertyValueV2}}}] }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"rangeTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Range() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { ${{operation}}: {{{propertyValueV2}}} }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"nullTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}NullFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $isNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"andTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}AndFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $and: [\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true } } },\\n { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n ]\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"primaryKeyPropertyV2\", \"propertyValueV2\"]\n }],\n \"orTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}OrFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $or: [\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true } } },\\n { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n ]\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"primaryKeyPropertyV2\", \"propertyValueV2\"]\n }],\n \"notTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}NotFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $not: { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"withinDistanceTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinDistance() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"withinBoundingBoxTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinBoundingBox() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"withinPolygonTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinPolygon() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"intersectsPolygonTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}IntersectsPolygon() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"intersectsBboxTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}IntersectsBbox() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}SetOperations() {\\n const client = useOsdkClient();\\n const combinedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.intersect(setB).subtract(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(combinedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsUnion\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Union() {\\n const client = useOsdkClient();\\n const unionSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.union(setB).union(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(unionSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsSubtract\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Subtract() {\\n const client = useOsdkClient();\\n const subtractedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.subtract(setB).subtract(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(subtractedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsIntersect\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Intersect() {\\n const client = useOsdkClient();\\n const intersectedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.intersect(setB).intersect(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(intersectedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyBaseExample\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{sourceObjectType}}DerivedProperty() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{sourceObjectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCountAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCount() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyNumericAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedNumeric() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:{{operation}}\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertySelectPropertyAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedSelectProperty() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyApproximateDistinctAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedApproxDistinct() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximateDistinct\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyExactDistinctAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedExactDistinct() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:exactDistinct\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyApproximatePercentileAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedPercentile() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximatePercentile\\\", { percentile: 95 })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCollectToListAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCollectList() {\\n const client = useOsdkClient();\\n const maxObjectsInList = 75;\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectList\\\", { limit: maxObjectsInList })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCollectToSetAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCollectSet() {\\n const client = useOsdkClient();\\n const maxObjectsInSet = 75;\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectSet\\\", { limit: maxObjectsInSet })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadObjectMetadataSnippet\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkMetadata } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Metadata() {\\n const { loading, metadata, error } = useOsdkMetadata({{objectType}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error}</div>}\\n {loading && !metadata && <div className=\\\"skeleton\\\">Loading...</div>}\\n {metadata && (\\n <div>\\n <div>Description: {metadata.description}</div>\\n <div>Visibility: {metadata.visibility}</div>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"loadInterfaceMetadataSnippet\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkMetadata } from \\\"@osdk/react\\\";\\n\\nfunction {{interfaceApiName}}Metadata() {\\n const { loading, metadata, error } = useOsdkMetadata({{interfaceApiName}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error}</div>}\\n {loading && !metadata && <div className=\\\"skeleton\\\">Loading...</div>}\\n {metadata && (\\n <div>\\n <div>RID: {metadata.rid}</div>\\n <div>Implemented by: {metadata.implementedBy?.join(\\\", \\\")}</div>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"loadInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{interfaceApiName}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{interfaceApiName}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadAllInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction All{{interfaceApiName}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{interfaceApiName}});\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadOrderedInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Ordered{{interfaceApiName}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n orderBy: { {{property}}: \\\"asc\\\" },\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Search{{interfaceApiName}}() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n where: {\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n },\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"castInterfaceToObjectReference\": [{\n \"template\": \"import { {{objectTypeApiName}}, {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction CastInterface() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n pageSize: 10\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => {\\n const casted = obj.$as({{objectTypeApiName}});\\n return <li key={casted.$primaryKey}>{casted.$primaryKey}</li>;\\n })}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"subscribeToObjectSetInstructions\": [{\n \"template\": \"import { {{objectOrInterfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectOrInterfaceApiName}}LiveList() {\\n const { data, isLoading, error } = useOsdkObjects({{objectOrInterfaceApiName}}, {\\n streamUpdates: true\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAllTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints();\\n}\"\n }],\n \"loadTimeSeriesFirstPointSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getFirstTimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getFirstPoint();\\n}\"\n }],\n \"loadTimeSeriesLastPointSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getLastTimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getLastPoint();\\n}\"\n }],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }],\n \"loadRelativeTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getRelativeTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n });\\n}\"\n }],\n \"loadGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAllGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues();\\n}\"\n }],\n \"loadGeotimeSeriesLastPointSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getLatestGeotimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getLatestValue();\\n}\"\n }],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAbsoluteGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getRelativeGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n });\\n}\"\n }],\n \"uploadAttachment\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction AttachmentUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const attachment = createAttachmentUpload(file, file.name);\\n await client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{property}}: attachment\\n });\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\", \"primaryKeyPropertyV2\"]\n }],\n \"readMedia\": [{\n \"template\": \"// Media does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function readMediaContent(obj: Osdk.Instance<typeof {{objectType}}>) {\\n const contents = await obj.{{property}}?.fetchContents();\\n if (contents?.ok) {\\n return contents.blob();\\n }\\n}\"\n }],\n \"uploadMedia\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\nimport { {{actionApiName}}, {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction MediaUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: file,\\n fileName: file.name,\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n await client({{actionApiName}}).applyAction({\\n // Pass the required action parameters including the primary key\\n {{mediaParameter}}: mediaReference\\n });\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\"\n }],\n \"uploadMediaOntologyEdits\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { createEditBatch, uploadMedia } from \\\"@osdk/functions\\\";\\n\\nfunction MediaOntologyEditsUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const batch = createEditBatch(client);\\n const mediaReference = await uploadMedia(client, { data: file, fileName: file.name });\\n // @ts-expect-error - batch.create types don't support media references yet\\n batch.create({{objectType}}, { {{property}}: mediaReference });\\n return batch.getEdits();\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\"\n }],\n \"uploadMediaEphemeral\": [{\n \"template\": \"// Ephemeral media upload is not yet supported in the React SDK\"\n }],\n \"derivedPropertyNumericExpression\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedNumericExpression() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n {{^isUnary}}\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .aggregate(\\\"{{property}}\\\").{{operation}}(\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\"))\\n {{/isUnary}}\\n {{#isUnary}}\\n \\\"{{operation}}_{{property}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").{{operation}}()\\n {{/isUnary}}\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyDatetimeExpression\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedDatetimeExpression() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n {{^isExtractPart}}\\n \\\"derivedPropertyDatetime_{{operation}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\")\\n .{{operation}}(baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\"))\\n {{/isExtractPart}}\\n {{#isExtractPart}}\\n \\\"YEARS_part_of_{{property}}_of_{{linkApiName}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").extractPart(\\\"YEARS\\\")\\n {{/isExtractPart}}\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"nearestNeighborsTextQuery\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}NearestNeighborsText() {\\n const client = useOsdkClient();\\n const resultSet = useMemo(() =>\\n client({{objectType}}).nearestNeighbors(\\\"coffee\\\", 5, \\\"{{property}}\\\"),\\n [client]);\\n\\n const { data, isLoading, error } = useObjectSet(resultSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"nearestNeighborsVectorQuery\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}NearestNeighborsVector() {\\n const client = useOsdkClient();\\n // Note that this vector maps to an arbitrary string\\n // It must match the dimension of the \\\"{{property}}\\\" property: {{vectorDimensionSize}}\\n const vectorQuery = useMemo(() =>\\n Array.from({ length: {{vectorDimensionSize}} }, () => 0.3),\\n []);\\n const resultSet = useMemo(() =>\\n client({{objectType}}).nearestNeighbors(vectorQuery, 5, \\\"{{property}}\\\"),\\n [client, vectorQuery]);\\n\\n const { data, isLoading, error } = useObjectSet(resultSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchAround\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction SearchAround{{linkedObjectType}}() {\\n const client = useOsdkClient();\\n const linkedSet = useMemo(() =>\\n client({{sourceObjectType}})\\n .where({ {{rawLinkedPrimaryKeyProperty.apiName}}: { $in: [\\\"a\\\", \\\"b\\\", \\\"c\\\"] } })\\n .pivotTo(\\\"{{linkApiName}}\\\"),\\n [client]);\\n\\n const { data, isLoading, error } = useObjectSet(linkedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }]\n }\n }\n }\n};","/*\n * Copyright 2026 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 { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\nexport const REACT_OSDK_SNIPPETS = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n propertyValueV2: handlePropertyValueV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2\n }\n};\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues\n}) {\n if (rawActionTypeParameterValues == null) {\n throw new Error(\"Cannot render a null rawActionTypeParameterValues\");\n }\n return rawActionTypeParameterValues.map((param, index, array) => ({\n key: param.key,\n value: renderType(param.value),\n last: index === array.length - 1\n }));\n}\nfunction handlePropertyValueV2({\n rawPropertyValue\n}) {\n return renderPropertyValue(rawPropertyValue);\n}\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value)\n };\n}\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),\n type: rawLinkedPrimaryKeyProperty.type\n };\n}\nfunction renderPropertyValue(propertyValue) {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n return renderType(propertyValue);\n}\nfunction renderType(type) {\n if (type == null) {\n throw new Error(\"Cannot render a null type value\");\n }\n switch (type.type) {\n case \"array\":\n case \"set\":\n case \"list\":\n return `[${renderType(type.subtype)}]`;\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 return type.value.toString();\n case \"date\":\n {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\":\n {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\":\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\n case \"objectSet\":\n return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;\n case \"anonymousCustomType\":\n case \"customType\":\n {\n const entries = Object.entries(type.parameters ?? {});\n if (entries.length > 0) {\n const rendered = entries.map(([name, value]) => `\"${name}\": ${renderType(value)}`).join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\":\n return \"{}\";\n case \"attachment\":\n return type.hasAttachments ? \"attachment\" : \"{}\";\n case \"mediaReference\":\n return \"mediaUpload\";\n case \"objectType\":\n return `\"${type.objectTypeApiName}\"`;\n case \"map\":\n return `{key: ${renderType(type.valueType)}}`;\n case \"string\":\n return `\"${type.value ?? \"value\"}\"`;\n case \"unknown\":\n default:\n return `\"value\"`;\n }\n}"]}
1
+ {"version":3,"sources":["../../src/generat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IACF,KAAK,qBAAA;AAAA,IACL,KAAK,YAAA,EACH;AACE,MAAA,MAAM,UAAU,MAAA,CAAO,OAAA,CAAQ,IAAA,CAAK,UAAA,IAAc,EAAE,CAAA;AACpD,MAAA,IAAI,OAAA,CAAQ,SAAS,CAAA,EAAG;AACtB,QAAA,MAAM,WAAW,OAAA,CAAQ,GAAA,CAAI,CAAC,CAAC,MAAM,KAAK,CAAA,KAAM,CAAA,CAAA,EAAI,IAAI,MAAM,UAAA,CAAW,KAAK,CAAC,CAAA,CAAE,CAAA,CAAE,KAAK,IAAI,CAAA;AAC5F,QAAA,OAAO,KAAK,QAAQ,CAAA,EAAA,CAAA;AAAA,MACtB;AACA,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,IACF,KAAK,WAAA;AAAA,IACL,KAAK,SAAA,EACH;AACE,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,IACF,KAAK,YAAA,EACH;AACE,MAAA,OAAO,IAAA,CAAK,iBAAiB,YAAA,GAAe,IAAA;AAAA,IAC9C;AAAA,IACF,KAAK,gBAAA,EACH;AACE,MAAA,OAAO,aAAA;AAAA,IACT;AAAA,IACF,KAAK,YAAA,EACH;AACE,MAAA,OAAO,CAAA,CAAA,EAAI,KAAK,iBAAiB,CAAA,CAAA,CAAA;AAAA,IACnC;AAAA,IACF,KAAK,KAAA,EACH;AACE,MAAA,OAAO,CAAA,MAAA,EAAS,UAAA,CAAW,IAAA,CAAK,SAAS,CAAC,CAAA,CAAA,CAAA;AAAA,IAC5C;AAAA,IACF,KAAK,QAAA,EACH;AACE,MAAA,OAAO,CAAA,CAAA,EAAI,IAAA,CAAK,KAAA,IAAS,OAAO,CAAA,CAAA,CAAA;AAAA,IAClC;AAAA,IACF,KAAK,SAAA;AAAA,IACL,SACE;AACE,MAAA,OAAO,CAAA,OAAA,CAAA;AAAA,IACT;AAAA;AAEN","file":"index.cjs","sourcesContent":["// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../documentation.yml instead.\n\nexport const snippets = {\n \"kind\": \"sdk\",\n \"versions\": {\n \"2.0.0\": {\n \"snippets\": {\n \"reactProviderSetup\": [{\n \"template\": \"import { OsdkProvider } from \\\"@osdk/react\\\";\\nimport { createClient } from \\\"@osdk/client\\\";\\n\\nconst client = createClient(\\n \\\"https://your-stack.palantirfoundry.com\\\",\\n \\\"ri.ontology.main.ontology.{UUID}\\\",\\n async () => \\\"your-token\\\"\\n);\\n\\nfunction App() {\\n return (\\n <OsdkProvider client={client}>\\n <YourApp />\\n </OsdkProvider>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsBasic\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n {isLoading && data && <span className=\\\"refresh-indicator\\\">Refreshing...</span>}\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsFilter\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Filtered{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{titleProperty}}: { $isNotNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectByPrimaryKey\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !object && <div className=\\\"skeleton\\\">Loading...</div>}\\n {object && (\\n <div>\\n <h2>{object.{{titleProperty}}}</h2>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"reactUseLinksBasic\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction Linked{{linkedObjectType}}({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error } = useLinks(source, \\\"{{linkApiName}}\\\");\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !links && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {links?.map(linked => (\\n <li key={linked.$primaryKey}>{linked.$primaryKey}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkActionBasic\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}Button() {\\n const { applyAction, isPending, error } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply {{actionApiName}}\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"reactUseOsdkAggregationBasic\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Count() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { $count: \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && data == null && <div className=\\\"skeleton\\\">Loading...</div>}\\n {data != null && <span>Total: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"reactUseOsdkObjectsEnabled\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Conditional{{objectType}}List({ shouldFetch }: { shouldFetch: boolean }) {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n enabled: shouldFetch\\n });\\n\\n return (\\n <div>\\n {!shouldFetch && <div>Select criteria to load data</div>}\\n {error && <div className=\\\"error-banner\\\">Error: {error.message}</div>}\\n {isLoading && !data && <div className=\\\"skeleton\\\">Loading...</div>}\\n <ul>\\n {data?.map(obj => (\\n <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>\\n ))}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadSingleObjectGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !object && <div>Loading...</div>}\\n {object && <div>{object.{{titleProperty}}}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadObjectPageGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"orderObjectsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Sorted{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n orderBy: { {{titleProperty}}: \\\"asc\\\" }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchObjectsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Filtered{{objectType}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{titleProperty}}: { $isNotNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadSingleObjectReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObject } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Detail({ primaryKey }: { primaryKey: string }) {\\n const { object, isLoading, error } = useOsdkObject({{objectType}}, primaryKey);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !object && <div>Loading...</div>}\\n {object && <div>{object.{{titleProperty}}}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadObjectsReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadAllObjectsReference\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\n// Note: For large datasets, consider using pagination with fetchMore\\nfunction All{{objectType}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{objectType}});\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadLinkedObjectReference\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction {{linkedObjectType}}Detail({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error } = useLinks(source, \\\"{{linkApiName}}\\\");\\n const linkedObject = links?.[0];\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !links && <div>Loading...</div>}\\n {linkedObject && <div>{linkedObject.$primaryKey}</div>}\\n </div>\\n );\\n}\"\n }],\n \"loadLinkedObjectsReference\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useLinks } from \\\"@osdk/react\\\";\\n\\nfunction Linked{{linkedObjectType}}List({ source }: { source: {{sourceObjectType}}.OsdkInstance }) {\\n const { links, isLoading, error, fetchMore } = useLinks(source, \\\"{{linkApiName}}\\\");\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !links && <div>Loading...</div>}\\n <ul>\\n {links?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"aggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Aggregation() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n where: { {{property}}: { $isNull: false } },\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"countAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Count() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { $count: \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Total: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"approximateDistinctAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}DistinctCount() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:approximateDistinct\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Distinct count: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"exactDistinctAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ExactDistinctCount() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:exactDistinct\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>Exact distinct count: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"numericAggregationTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}{{operation}}() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: { $select: { \\\"{{property}}:{{operation}}\\\": \\\"unordered\\\" } }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <span>{{operation}}: {data}</span>}\\n </div>\\n );\\n}\"\n }],\n \"fixedWidthGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByFixedWidth() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $fixedWidth: 10 } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"durationGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByDuration() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $duration: [{{#durationText}}{{arg}}{{/durationText}}, \\\"{{#durationText}}{{unit}}{{/durationText}}\\\"] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"exactGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByExact() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\"\n }],\n \"rangeGroupByTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAggregation } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}GroupedByRange() {\\n const { data, isLoading, error } = useOsdkAggregation({{objectType}}, {\\n aggregate: {\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $ranges: [[{{{propertyValueV2}}}, {{{propertyValueV2}}}]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && data == null && <div>Loading...</div>}\\n {data != null && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"applyAction\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}Button() {\\n const { applyAction, isPending, error } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div>Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"applyActionResponse\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction {{actionApiName}}WithResult() {\\n const { applyAction, isPending, error, data } = useOsdkAction({{actionApiName}});\\n\\n const handleClick = async () => {\\n await applyAction({\\n {{#actionParameterSampleValuesV2}}\\n {{key}}: {{value}}{{^last}},{{/last}}\\n {{/actionParameterSampleValuesV2}}\\n });\\n };\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {String(error.unknown ?? error.actionValidation)}</div>}\\n {data && <div>Action completed successfully</div>}\\n <button onClick={handleClick} disabled={isPending}>\\n {isPending ? \\\"Applying...\\\" : \\\"Apply {{actionApiName}}\\\"}\\n </button>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"actionParameterSampleValuesV2\"]\n }],\n \"validateAction\": [{\n \"template\": \"import { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction, useDebouncedCallback } from \\\"@osdk/react\\\";\\nimport { useState } from \\\"react\\\";\\n\\nfunction {{actionApiName}}WithValidation() {\\n const { validateAction, applyAction, isPending, validationResult } = useOsdkAction({{actionApiName}});\\n const [params, setParams] = useState<Record<string, string>>({});\\n\\n const debouncedValidate = useDebouncedCallback(\\n (nextParams: Record<string, string>) => { validateAction(nextParams); },\\n 300\\n );\\n\\n const handleParamChange = (key: string, value: string) => {\\n const nextParams = { ...params, [key]: value };\\n setParams(nextParams);\\n debouncedValidate(nextParams);\\n };\\n\\n return (\\n <div>\\n <input\\n placeholder=\\\"Parameter value\\\"\\n onChange={(e) => handleParamChange(\\\"paramName\\\", e.target.value)}\\n />\\n {validationResult?.result === \\\"INVALID\\\" && (\\n <div>Validation errors present</div>\\n )}\\n <button\\n onClick={() => applyAction(params)}\\n disabled={isPending || validationResult?.result === \\\"INVALID\\\"}\\n >\\n {isPending ? \\\"Applying...\\\" : \\\"Apply\\\"}\\n </button>\\n </div>\\n );\\n}\"\n }],\n \"batchApplyAction\": [{\n \"template\": \"// Batch actions in React should be handled with multiple hook calls\\n// or by using the client directly for batch operations\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkAction } from \\\"@osdk/react\\\";\\n\\nfunction Batch{{actionApiName}}() {\\n const { applyAction, isPending } = useOsdkAction({{actionApiName}});\\n\\n const handleBatchApply = async (items: Array<Parameters<typeof applyAction>[0]>) => {\\n await Promise.all(items.map(item => applyAction(item)));\\n };\\n\\n return (\\n <button onClick={() => handleBatchApply([])} disabled={isPending}>\\n Apply Batch\\n </button>\\n );\\n}\"\n }],\n \"clientSetup\": [{\n \"template\": \"import { OsdkProvider } from \\\"@osdk/react\\\";\\nimport { createClient } from \\\"@osdk/client\\\";\\n\\nconst client = createClient(\\n \\\"https://your-stack.palantirfoundry.com\\\",\\n \\\"ri.ontology.main.ontology.{UUID}\\\",\\n async () => \\\"your-token\\\"\\n);\\n\\nfunction App() {\\n return (\\n <OsdkProvider client={client}>\\n <YourApp />\\n </OsdkProvider>\\n );\\n}\"\n }],\n \"callFunction\": [{\n \"template\": \"import { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkFunction } from \\\"@osdk/react\\\";\\n\\nfunction {{funcApiName}}Caller() {\\n const { data, isLoading, error, refetch } = useOsdkFunction({{funcApiName}}, {\\n params: { /* function parameters */ }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n {data && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n <button onClick={refetch}>Refresh</button>\\n </div>\\n );\\n}\"\n }],\n \"executeFunction\": [{\n \"template\": \"import { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkFunction } from \\\"@osdk/react\\\";\\n\\nfunction {{funcApiName}}Executor() {\\n const { data, isLoading, error, refetch } = useOsdkFunction({{funcApiName}}, {\\n params: { /* function parameters */ }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n {data && <pre>{JSON.stringify(data, null, 2)}</pre>}\\n <button onClick={refetch}>Refresh</button>\\n </div>\\n );\\n}\"\n }],\n \"stringStartsWithTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}StartsWith() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAnyTermTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAnyTerm() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAnyTerm: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAllTermsTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAllTerms() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAllTerms: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsAllTermsInOrderTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}ContainsAllTermsInOrder() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"containsTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Contains() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $contains: \\\"value\\\" }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"equalityTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Equality() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $eq: {{{propertyValueV2}}} }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"inFilterTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}InFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $in: [{{{propertyValueV2}}}] }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"rangeTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Range() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { ${{operation}}: {{{propertyValueV2}}} }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"nullTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}NullFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $isNull: true }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"andTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}AndFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $and: [\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true } } },\\n { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n ]\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"primaryKeyPropertyV2\", \"propertyValueV2\"]\n }],\n \"orTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}OrFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $or: [\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true } } },\\n { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n ]\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"primaryKeyPropertyV2\", \"propertyValueV2\"]\n }],\n \"notTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}NotFilter() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n $not: { {{property}}: { $eq: {{{propertyValueV2}}} } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\"]\n }],\n \"withinDistanceTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinDistance() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"withinBoundingBoxTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinBoundingBox() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"withinPolygonTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}WithinPolygon() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"intersectsPolygonTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}IntersectsPolygon() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"intersectsBboxTemplate\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}IntersectsBbox() {\\n const { data, isLoading, error } = useOsdkObjects({{objectType}}, {\\n where: {\\n {{property}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128] } }\\n }\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsGuide\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}SetOperations() {\\n const client = useOsdkClient();\\n const combinedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.intersect(setB).subtract(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(combinedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsUnion\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Union() {\\n const client = useOsdkClient();\\n const unionSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.union(setB).union(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(unionSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsSubtract\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Subtract() {\\n const client = useOsdkClient();\\n const subtractedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.subtract(setB).subtract(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(subtractedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"objectSetOperationsIntersect\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}Intersect() {\\n const client = useOsdkClient();\\n const intersectedSet = useMemo(() => {\\n const setA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\" } });\\n const setB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\" } });\\n const setC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\" } });\\n return setA.intersect(setB).intersect(setC);\\n }, [client]);\\n\\n const { data, isLoading, error } = useObjectSet(intersectedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.{{titleProperty}}}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyBaseExample\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{sourceObjectType}}DerivedProperty() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{sourceObjectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCountAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCount() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyNumericAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedNumeric() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:{{operation}}\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertySelectPropertyAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedSelectProperty() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyApproximateDistinctAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedApproxDistinct() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximateDistinct\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyExactDistinctAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedExactDistinct() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:exactDistinct\\\")\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyApproximatePercentileAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedPercentile() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximatePercentile\\\", { percentile: 95 })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCollectToListAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCollectList() {\\n const client = useOsdkClient();\\n const maxObjectsInList = 75;\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectList\\\", { limit: maxObjectsInList })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyCollectToSetAggregation\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedCollectSet() {\\n const client = useOsdkClient();\\n const maxObjectsInSet = 75;\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectSet\\\", { limit: maxObjectsInSet })\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadObjectMetadataSnippet\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkMetadata } from \\\"@osdk/react\\\";\\n\\nfunction {{objectType}}Metadata() {\\n const { loading, metadata, error } = useOsdkMetadata({{objectType}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error}</div>}\\n {loading && !metadata && <div className=\\\"skeleton\\\">Loading...</div>}\\n {metadata && (\\n <div>\\n <div>Description: {metadata.description}</div>\\n <div>Visibility: {metadata.visibility}</div>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"loadInterfaceMetadataSnippet\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkMetadata } from \\\"@osdk/react\\\";\\n\\nfunction {{interfaceApiName}}Metadata() {\\n const { loading, metadata, error } = useOsdkMetadata({{interfaceApiName}});\\n\\n return (\\n <div>\\n {error && <div className=\\\"error-banner\\\">Error: {error}</div>}\\n {loading && !metadata && <div className=\\\"skeleton\\\">Loading...</div>}\\n {metadata && (\\n <div>\\n <div>RID: {metadata.rid}</div>\\n <div>Implemented by: {metadata.implementedBy?.join(\\\", \\\")}</div>\\n </div>\\n )}\\n </div>\\n );\\n}\"\n }],\n \"loadInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{interfaceApiName}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{interfaceApiName}}, {\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadAllInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction All{{interfaceApiName}}List() {\\n const { data, isLoading, error, fetchMore } = useOsdkObjects({{interfaceApiName}});\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n {fetchMore && <button onClick={fetchMore}>Load more</button>}\\n </div>\\n );\\n}\"\n }],\n \"loadOrderedInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Ordered{{interfaceApiName}}List() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n orderBy: { {{property}}: \\\"asc\\\" },\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchInterfacesReference\": [{\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction Search{{interfaceApiName}}() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n where: {\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n },\\n pageSize: 30\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"castInterfaceToObjectReference\": [{\n \"template\": \"import { {{objectTypeApiName}}, {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction CastInterface() {\\n const { data, isLoading, error } = useOsdkObjects({{interfaceApiName}}, {\\n pageSize: 10\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => {\\n const casted = obj.$as({{objectTypeApiName}});\\n return <li key={casted.$primaryKey}>{casted.$primaryKey}</li>;\\n })}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"subscribeToObjectSetInstructions\": [{\n \"template\": \"import { {{objectOrInterfaceApiName}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkObjects } from \\\"@osdk/react\\\";\\n\\nfunction {{objectOrInterfaceApiName}}LiveList() {\\n const { data, isLoading, error } = useOsdkObjects({{objectOrInterfaceApiName}}, {\\n streamUpdates: true\\n });\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"loadTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAllTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints();\\n}\"\n }],\n \"loadTimeSeriesFirstPointSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getFirstTimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getFirstPoint();\\n}\"\n }],\n \"loadTimeSeriesLastPointSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getLastTimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getLastPoint();\\n}\"\n }],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }],\n \"loadRelativeTimeSeriesPointsSnippet\": [{\n \"template\": \"// Timeseries does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getRelativeTimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n });\\n}\"\n }],\n \"loadGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAllGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues();\\n}\"\n }],\n \"loadGeotimeSeriesLastPointSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getLatestGeotimeSeriesPoint(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getLatestValue();\\n}\"\n }],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getAbsoluteGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [{\n \"template\": \"// Geo-time series does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function getRelativeGeotimeSeriesPoints(obj: Osdk.Instance<typeof {{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n });\\n}\"\n }],\n \"uploadAttachment\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction AttachmentUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const attachment = createAttachmentUpload(file, file.name);\\n await client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{property}}: attachment\\n });\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\",\n \"computedVariables\": [\"propertyValueV2\", \"primaryKeyPropertyV2\"]\n }],\n \"readMedia\": [{\n \"template\": \"// Media does not have a dedicated React hook yet.\\n// Use the client API directly with a loaded OSDK object.\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport type { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function readMediaContent(obj: Osdk.Instance<typeof {{objectType}}>) {\\n const contents = await obj.{{property}}?.fetchContents();\\n if (contents?.ok) {\\n return contents.blob();\\n }\\n}\"\n }],\n \"uploadMedia\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\nimport { {{actionApiName}}, {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction MediaUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: file,\\n fileName: file.name,\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n await client({{actionApiName}}).applyAction({\\n // Pass the required action parameters including the primary key\\n {{mediaParameter}}: mediaReference\\n });\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\"\n }],\n \"uploadMediaOntologyEdits\": [{\n \"template\": \"import { useOsdkClient } from \\\"@osdk/react\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { createEditBatch, uploadMedia } from \\\"@osdk/functions\\\";\\n\\nfunction MediaOntologyEditsUploader() {\\n const client = useOsdkClient();\\n\\n const handleUpload = async (file: File) => {\\n const batch = createEditBatch(client);\\n const mediaReference = await uploadMedia(client, { data: file, fileName: file.name });\\n // @ts-expect-error - batch.create types don't support media references yet\\n batch.create({{objectType}}, { {{property}}: mediaReference });\\n return batch.getEdits();\\n };\\n\\n return (\\n <input type=\\\"file\\\" onChange={e => {\\n const file = e.target.files?.[0];\\n if (file) {\\n handleUpload(file);\\n }\\n }} />\\n );\\n}\"\n }],\n \"uploadMediaEphemeral\": [{\n \"template\": \"// Ephemeral media upload is not yet supported in the React SDK\"\n }],\n \"derivedPropertyNumericExpression\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedNumericExpression() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n {{^isUnary}}\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .aggregate(\\\"{{property}}\\\").{{operation}}(\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\"))\\n {{/isUnary}}\\n {{#isUnary}}\\n \\\"{{operation}}_{{property}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").{{operation}}()\\n {{/isUnary}}\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"derivedPropertyDatetimeExpression\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}DerivedDatetimeExpression() {\\n const client = useOsdkClient();\\n const derivedSet = useMemo(() =>\\n client({{objectType}}).withProperties({\\n {{^isExtractPart}}\\n \\\"derivedPropertyDatetime_{{operation}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\")\\n .{{operation}}(baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\"))\\n {{/isExtractPart}}\\n {{#isExtractPart}}\\n \\\"YEARS_part_of_{{property}}_of_{{linkApiName}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").extractPart(\\\"YEARS\\\")\\n {{/isExtractPart}}\\n }), [client]);\\n\\n const { data, isLoading, error } = useObjectSet(derivedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"nearestNeighborsTextQuery\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}NearestNeighborsText() {\\n const client = useOsdkClient();\\n const resultSet = useMemo(() =>\\n client({{objectType}}).nearestNeighbors(\\\"coffee\\\", 5, \\\"{{property}}\\\"),\\n [client]);\\n\\n const { data, isLoading, error } = useObjectSet(resultSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"nearestNeighborsVectorQuery\": [{\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction {{objectType}}NearestNeighborsVector() {\\n const client = useOsdkClient();\\n // Note that this vector maps to an arbitrary string\\n // It must match the dimension of the \\\"{{property}}\\\" property: {{vectorDimensionSize}}\\n const vectorQuery = useMemo(() =>\\n Array.from({ length: {{vectorDimensionSize}} }, () => 0.3),\\n []);\\n const resultSet = useMemo(() =>\\n client({{objectType}}).nearestNeighbors(vectorQuery, 5, \\\"{{property}}\\\"),\\n [client, vectorQuery]);\\n\\n const { data, isLoading, error } = useObjectSet(resultSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }],\n \"searchAround\": [{\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\nimport { useOsdkClient, useObjectSet } from \\\"@osdk/react\\\";\\nimport { useMemo } from \\\"react\\\";\\n\\nfunction SearchAround{{linkedObjectType}}() {\\n const client = useOsdkClient();\\n const linkedSet = useMemo(() =>\\n client({{sourceObjectType}})\\n .where({ {{rawLinkedPrimaryKeyProperty.apiName}}: { $in: [\\\"a\\\", \\\"b\\\", \\\"c\\\"] } })\\n .pivotTo(\\\"{{linkApiName}}\\\"),\\n [client]);\\n\\n const { data, isLoading, error } = useObjectSet(linkedSet);\\n\\n return (\\n <div>\\n {error && <div>Error: {error.message}</div>}\\n {isLoading && !data && <div>Loading...</div>}\\n <ul>\\n {data?.map(obj => <li key={obj.$primaryKey}>{obj.$primaryKey}</li>)}\\n </ul>\\n </div>\\n );\\n}\"\n }]\n }\n }\n }\n};","/*\n * Copyright 2026 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 { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\nexport const REACT_OSDK_SNIPPETS = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n propertyValueV2: handlePropertyValueV2\n }\n};\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues\n}) {\n if (rawActionTypeParameterValues == null) {\n throw new Error(\"Cannot render a null rawActionTypeParameterValues\");\n }\n return rawActionTypeParameterValues.map((param, index, array) => ({\n key: param.key,\n last: index === array.length - 1,\n value: renderType(param.value)\n }));\n}\nfunction handlePropertyValueV2({\n rawPropertyValue\n}) {\n return renderPropertyValue(rawPropertyValue);\n}\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty\n}) {\n if (rawPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawPrimaryKeyProperty\");\n }\n return {\n apiName: rawPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawPrimaryKeyProperty.value)\n };\n}\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty\n}) {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n type: rawLinkedPrimaryKeyProperty.type,\n value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value)\n };\n}\nfunction renderPropertyValue(propertyValue) {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n return renderType(propertyValue);\n}\nfunction renderType(type) {\n if (type == null) {\n throw new Error(\"Cannot render a null type value\");\n }\n switch (type.type) {\n case \"array\":\n case \"set\":\n case \"list\":\n {\n return `[${renderType(type.subtype)}]`;\n }\n case \"boolean\":\n {\n return type.value ? \"true\" : \"false\";\n }\n case \"byte\":\n case \"integer\":\n case \"long\":\n case \"short\":\n {\n return type.value.toString();\n }\n case \"decimal\":\n case \"double\":\n case \"float\":\n {\n return type.value.toString();\n }\n case \"date\":\n {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\":\n {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\":\n {\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\n }\n case \"objectSet\":\n {\n return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;\n }\n case \"anonymousCustomType\":\n case \"customType\":\n {\n const entries = Object.entries(type.parameters ?? {});\n if (entries.length > 0) {\n const rendered = entries.map(([name, value]) => `\"${name}\": ${renderType(value)}`).join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\":\n {\n return \"{}\";\n }\n case \"attachment\":\n {\n return type.hasAttachments ? \"attachment\" : \"{}\";\n }\n case \"mediaReference\":\n {\n return \"mediaUpload\";\n }\n case \"objectType\":\n {\n return `\"${type.objectTypeApiName}\"`;\n }\n case \"map\":\n {\n return `{key: ${renderType(type.valueType)}}`;\n }\n case \"string\":\n {\n return `\"${type.value ?? \"value\"}\"`;\n }\n case \"unknown\":\n default:\n {\n return `\"value\"`;\n }\n }\n}"]}
package/build/esm/docs.js CHANGED
@@ -19,9 +19,9 @@ export const REACT_OSDK_SNIPPETS = {
19
19
  ...snippets,
20
20
  computedVariables: {
21
21
  actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,
22
- propertyValueV2: handlePropertyValueV2,
22
+ linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,
23
23
  primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,
24
- linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2
24
+ propertyValueV2: handlePropertyValueV2
25
25
  }
26
26
  };
27
27
  function handleActionParameterSampleValuesV2({
@@ -32,8 +32,8 @@ function handleActionParameterSampleValuesV2({
32
32
  }
33
33
  return rawActionTypeParameterValues.map((param, index, array) => ({
34
34
  key: param.key,
35
- value: renderType(param.value),
36
- last: index === array.length - 1
35
+ last: index === array.length - 1,
36
+ value: renderType(param.value)
37
37
  }));
38
38
  }
39
39
  function handlePropertyValueV2({
@@ -60,8 +60,8 @@ function handleLinkedPrimaryKeyPropertyV2({
60
60
  }
61
61
  return {
62
62
  apiName: rawLinkedPrimaryKeyProperty.apiName,
63
- value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),
64
- type: rawLinkedPrimaryKeyProperty.type
63
+ type: rawLinkedPrimaryKeyProperty.type,
64
+ value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value)
65
65
  };
66
66
  }
67
67
  function renderPropertyValue(propertyValue) {
@@ -78,18 +78,26 @@ function renderType(type) {
78
78
  case "array":
79
79
  case "set":
80
80
  case "list":
81
- return `[${renderType(type.subtype)}]`;
81
+ {
82
+ return `[${renderType(type.subtype)}]`;
83
+ }
82
84
  case "boolean":
83
- return type.value ? "true" : "false";
85
+ {
86
+ return type.value ? "true" : "false";
87
+ }
84
88
  case "byte":
85
89
  case "integer":
86
90
  case "long":
87
91
  case "short":
88
- return type.value.toString();
92
+ {
93
+ return type.value.toString();
94
+ }
89
95
  case "decimal":
90
96
  case "double":
91
97
  case "float":
92
- return type.value.toString();
98
+ {
99
+ return type.value.toString();
100
+ }
93
101
  case "date":
94
102
  {
95
103
  const offsetDate = new Date();
@@ -103,9 +111,13 @@ function renderType(type) {
103
111
  return `"${offsetDate.toISOString()}"`;
104
112
  }
105
113
  case "object":
106
- return `"primaryKeyValue" /* or myObjectInstance */`;
114
+ {
115
+ return `"primaryKeyValue" /* or myObjectInstance */`;
116
+ }
107
117
  case "objectSet":
108
- return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
118
+ {
119
+ return `client(${type.objectTypeApiName}).where({ /* filter conditions */ })`;
120
+ }
109
121
  case "anonymousCustomType":
110
122
  case "customType":
111
123
  {
@@ -118,20 +130,34 @@ function renderType(type) {
118
130
  }
119
131
  case "interface":
120
132
  case "marking":
121
- return "{}";
133
+ {
134
+ return "{}";
135
+ }
122
136
  case "attachment":
123
- return type.hasAttachments ? "attachment" : "{}";
137
+ {
138
+ return type.hasAttachments ? "attachment" : "{}";
139
+ }
124
140
  case "mediaReference":
125
- return "mediaUpload";
141
+ {
142
+ return "mediaUpload";
143
+ }
126
144
  case "objectType":
127
- return `"${type.objectTypeApiName}"`;
145
+ {
146
+ return `"${type.objectTypeApiName}"`;
147
+ }
128
148
  case "map":
129
- return `{key: ${renderType(type.valueType)}}`;
149
+ {
150
+ return `{key: ${renderType(type.valueType)}}`;
151
+ }
130
152
  case "string":
131
- return `"${type.value ?? "value"}"`;
153
+ {
154
+ return `"${type.value ?? "value"}"`;
155
+ }
132
156
  case "unknown":
133
157
  default:
134
- return `"value"`;
158
+ {
159
+ return `"value"`;
160
+ }
135
161
  }
136
162
  }
137
163
  //# sourceMappingURL=docs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","names":["snippets","REACT_OSDK_SNIPPETS","computedVariables","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","propertyValueV2","handlePropertyValueV2","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","rawActionTypeParameterValues","Error","map","param","index","array","key","value","renderType","last","length","rawPropertyValue","renderPropertyValue","rawPrimaryKeyProperty","apiName","rawLinkedPrimaryKeyProperty","type","propertyValue","subtype","toString","offsetDate","Date","setDate","getDate","daysOffset","toISOString","slice","objectTypeApiName","entries","Object","parameters","rendered","name","join","hasAttachments","valueType"],"sources":["docs.ts"],"sourcesContent":["/*\n * Copyright 2026 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 FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nexport const REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n propertyValueV2: handlePropertyValueV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n },\n};\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\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),\n last: index === array.length - 1,\n }));\n}\n\nfunction handlePropertyValueV2({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}): string {\n return renderPropertyValue(rawPropertyValue);\n}\n\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}): { apiName: string; value: string } {\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),\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}): { apiName: string; value: string; type: string } {\n if (rawLinkedPrimaryKeyProperty == null) {\n throw new Error(\"Cannot render with null rawLinkedPrimaryKeyProperty\");\n }\n\n return {\n apiName: rawLinkedPrimaryKeyProperty.apiName,\n value: renderPropertyValue(rawLinkedPrimaryKeyProperty.value),\n type: rawLinkedPrimaryKeyProperty.type,\n };\n}\n\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined,\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue);\n}\n\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR,\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 return `[${renderType(type.subtype)}]`;\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 return type.value.toString();\n case \"date\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\":\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\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]) => `\"${name}\": ${renderType(value)}`)\n .join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\":\n return \"{}\";\n case \"attachment\":\n return type.hasAttachments ? \"attachment\" : \"{}\";\n case \"mediaReference\":\n return \"mediaUpload\";\n case \"objectType\":\n return `\"${type.objectTypeApiName}\"`;\n case \"map\":\n return `{key: ${renderType(type.valueType)}}`;\n case \"string\":\n return `\"${type.value ?? \"value\"}\"`;\n case \"unknown\":\n default:\n return `\"value\"`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,SAASA,QAAQ,QAAQ,+CAA+C;AAExE,OAAO,MAAMC,mBAA2D,GAAG;EACzE,GAAGD,QAAQ;EACXE,iBAAiB,EAAE;IACjBC,6BAA6B,EAAEC,mCAAmC;IAClEC,eAAe,EAAEC,qBAAqB;IACtCC,oBAAoB,EAAEC,0BAA0B;IAChDC,0BAA0B,EAAEC;EAC9B;AACF,CAAC;AAED,SAASN,mCAAmCA,CAAC;EAC3CO;AAGF,CAAC,EAAwD;EACvD,IAAIA,4BAA4B,IAAI,IAAI,EAAE;IACxC,MAAM,IAAIC,KAAK,CAAC,mDAAmD,CAAC;EACtE;EAEA,OAAOD,4BAA4B,CAACE,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,EAAEC,KAAK,MAAM;IAChEC,GAAG,EAAEH,KAAK,CAACG,GAAG;IACdC,KAAK,EAAEC,UAAU,CAACL,KAAK,CAACI,KAAK,CAAC;IAC9BE,IAAI,EAAEL,KAAK,KAAKC,KAAK,CAACK,MAAM,GAAG;EACjC,CAAC,CAAC,CAAC;AACL;AAEA,SAASf,qBAAqBA,CAAC;EAC7BgB;AAGF,CAAC,EAAU;EACT,OAAOC,mBAAmB,CAACD,gBAAgB,CAAC;AAC9C;AAEA,SAASd,0BAA0BA,CAAC;EAClCgB;AAGF,CAAC,EAAsC;EACrC,IAAIA,qBAAqB,IAAI,IAAI,EAAE;IACjC,MAAM,IAAIZ,KAAK,CAAC,+CAA+C,CAAC;EAClE;EAEA,OAAO;IACLa,OAAO,EAAED,qBAAqB,CAACC,OAAO;IACtCP,KAAK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MACR,OAAO,SAASnB,UAAU,CAACQ,IAAI,CAACmB,SAAS,CAAC,GAAG;IAC/C,KAAK,QAAQ;MACX,OAAO,IAAInB,IAAI,CAACT,KAAK,IAAI,OAAO,GAAG;IACrC,KAAK,SAAS;IACd;MACE,OAAO,SAAS;EACpB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"docs.js","names":["snippets","REACT_OSDK_SNIPPETS","computedVariables","actionParameterSampleValuesV2","handleActionParameterSampleValuesV2","linkedPrimaryKeyPropertyV2","handleLinkedPrimaryKeyPropertyV2","primaryKeyPropertyV2","handlePrimaryKeyPropertyV2","propertyValueV2","handlePropertyValueV2","rawActionTypeParameterValues","Error","map","param","index","array","key","last","length","value","renderType","rawPropertyValue","renderPropertyValue","rawPrimaryKeyProperty","apiName","rawLinkedPrimaryKeyProperty","type","propertyValue","subtype","toString","offsetDate","Date","setDate","getDate","daysOffset","toISOString","slice","objectTypeApiName","entries","Object","parameters","rendered","name","join","hasAttachments","valueType"],"sources":["docs.ts"],"sourcesContent":["/*\n * Copyright 2026 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 FunctionSampleValueTypeIR,\n OSDK_SNIPPETS_SPEC,\n PropertySampleIR,\n PropertySampleValueTypeIR,\n} from \"@osdk/docs-spec-sdk\";\n\nimport { snippets } from \"./generatedNoCheck/docsNoComputedVariables.js\";\n\nexport const REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n ...snippets,\n computedVariables: {\n actionParameterSampleValuesV2: handleActionParameterSampleValuesV2,\n linkedPrimaryKeyPropertyV2: handleLinkedPrimaryKeyPropertyV2,\n primaryKeyPropertyV2: handlePrimaryKeyPropertyV2,\n propertyValueV2: handlePropertyValueV2,\n },\n};\n\nfunction handleActionParameterSampleValuesV2({\n rawActionTypeParameterValues,\n}: {\n rawActionTypeParameterValues?: ActionParameterSampleValuesIR;\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),\n }));\n}\n\nfunction handlePropertyValueV2({\n rawPropertyValue,\n}: {\n rawPropertyValue?: PropertySampleValueTypeIR;\n}): string {\n return renderPropertyValue(rawPropertyValue);\n}\n\nfunction handlePrimaryKeyPropertyV2({\n rawPrimaryKeyProperty,\n}: {\n rawPrimaryKeyProperty?: PropertySampleIR;\n}): { apiName: string; value: string } {\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),\n };\n}\n\nfunction handleLinkedPrimaryKeyPropertyV2({\n rawLinkedPrimaryKeyProperty,\n}: {\n rawLinkedPrimaryKeyProperty?: {\n apiName: string;\n value: PropertySampleValueTypeIR;\n type: string;\n };\n}): { apiName: string; value: string; type: string } {\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(rawLinkedPrimaryKeyProperty.value),\n };\n}\n\nfunction renderPropertyValue(\n propertyValue: PropertySampleValueTypeIR | undefined\n): string {\n if (propertyValue == null) {\n throw new Error(\"Cannot render a null property value\");\n }\n\n return renderType(propertyValue);\n}\n\nfunction renderType(\n type:\n | ActionParameterSampleValueTypeIR\n | FunctionSampleValueTypeIR\n | PropertySampleValueTypeIR\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 return `[${renderType(type.subtype)}]`;\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 return type.value.toString();\n }\n case \"date\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString().slice(0, 10)}\"`;\n }\n case \"timestamp\": {\n const offsetDate = new Date();\n offsetDate.setDate(offsetDate.getDate() + (type.daysOffset ?? 0));\n return `\"${offsetDate.toISOString()}\"`;\n }\n case \"object\": {\n return `\"primaryKeyValue\" /* or myObjectInstance */`;\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(([name, value]) => `\"${name}\": ${renderType(value)}`)\n .join(\", \");\n return `{ ${rendered} }`;\n }\n return \"{}\";\n }\n case \"interface\":\n case \"marking\": {\n return \"{}\";\n }\n case \"attachment\": {\n return type.hasAttachments ? \"attachment\" : \"{}\";\n }\n case \"mediaReference\": {\n return \"mediaUpload\";\n }\n case \"objectType\": {\n return `\"${type.objectTypeApiName}\"`;\n }\n case \"map\": {\n return `{key: ${renderType(type.valueType)}}`;\n }\n case \"string\": {\n return `\"${type.value ?? \"value\"}\"`;\n }\n case \"unknown\":\n default: {\n return `\"value\"`;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AACP,KAAK,IAAI,OAAO,GAAG;MACrC;IACA,KAAK,SAAS;IACd;MAAS;QACP,OAAO,SAAS;MAClB;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,mBAAmB,sBAAuB;AACxD,cAIE,0BAGK,qBAAsB;AAG7B,OAAO,cAAMA,qBAAqB,mBAAmB","names":["REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC>"],"sources":["../../src/docs.ts"],"version":3,"file":"docs.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,mBAAmB,sBAAuB;AACxD,cAIE,0BAGK,qBAAsB;AAI7B,OAAO,cAAMA,qBAAqB,mBAAmB","names":["REACT_OSDK_SNIPPETS: SdkSnippets<typeof OSDK_SNIPPETS_SPEC>"],"sources":["../../src/docs.ts"],"version":3,"file":"docs.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/react-sdk-docs",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-main-bbb89ce6c40d68bdf04f62ac40cc186dbd68750d",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  "devDependencies": {
34
34
  "typescript": "~5.5.4",
35
35
  "yaml": "^2.8.1",
36
- "@osdk/monorepo.tsconfig": "~0.7.0",
37
- "@osdk/monorepo.api-extractor": "~0.7.0"
36
+ "@osdk/monorepo.api-extractor": "~0.7.0",
37
+ "@osdk/monorepo.tsconfig": "~0.7.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
@@ -58,8 +58,8 @@
58
58
  "check-spelling": "cspell --quiet .",
59
59
  "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
60
60
  "codegen": "node codegen.mjs",
61
- "fix-lint": "eslint . --fix && dprint fmt",
62
- "lint": "eslint . && dprint check",
61
+ "fix-lint": "oxlint -c ../../oxlint.config.ts --fix . && oxfmt -c ../../oxfmt.config.ts .",
62
+ "lint": "oxlint -c ../../oxlint.config.ts . && oxfmt -c ../../oxfmt.config.ts --check .",
63
63
  "transpileBrowser": "monorepo.tool.transpile -f esm -m normal -t browser",
64
64
  "transpileCjs": "monorepo.tool.transpile -f cjs -m bundle -t node",
65
65
  "transpileEsm": "monorepo.tool.transpile -f esm -m normal -t node",