@osdk/typescript-sdk-docs 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/build/browser/generatedNoCheck/docsNoComputedVariables.js +7 -7
- package/build/browser/generatedNoCheck/docsNoComputedVariables.js.map +1 -1
- package/build/cjs/index.cjs +7 -7
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/generatedNoCheck/docsNoComputedVariables.js +7 -7
- package/build/esm/generatedNoCheck/docsNoComputedVariables.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docsNoComputedVariables.js","names":["snippets"],"sources":["docsNoComputedVariables.ts"],"sourcesContent":["\n// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport type { SdkSnippets } from \"@osdk/docs-spec-core\";\nimport type { OSDK_SNIPPETS_SPEC } from \"@osdk/docs-spec-sdk\";\n\nexport const snippets: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n \"kind\": \"sdk\",\n \"versions\": {\n \"1.0.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { type GetObjectError, isOk, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst result: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.get(\\\"primaryKey\\\");\\nif (isOk(result)) {\\n const object: {{objectType}} = result.value;\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst firstPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}.page({ pageSize: 30 });\\n\\nif (isOk(firstPage)) {\\n const secondPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .page({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n\\n const objects = isOk(secondPage) ? [...firstPage.value.data, ...secondPage.value.data] : firstPage.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { isOk, Page, type Result, type SearchObjectsError } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, SearchObjectsError> = await client.ontology.objects.{{objectType}}\\n .orderBy(sortBy => sortBy.{{titleProperty}}.asc())\\n .page({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .where(query => query.{{titleProperty}}.isNull())\\n .page({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { type GetObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.get(\\\"primaryKey\\\");\"\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import { type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .page({ pageSize: 30 });\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst objects: Result<{{objectType}}[], LoadObjectSetError> = await client.ontology.objects.{{objectType}}.all();\\n\\nif (isOk(objects)) {\\n const object = objects.value[0];\\n}\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import { type GetLinkedObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}) {\\n return source.{{linkApiName}}.get(linkedObjectPrimaryKey);\\n}\",\n \"computedVariables\": [\n \"linkedPrimaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import { type GetLinkedObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}) {\\n {{#isLinkManySided}}\\n return source.{{linkApiName}}.page({ pageSize: 30 });\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return source.{{linkApiName}}.get();\\n {{/isLinkManySided}}\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{property}}.isNull()))\\n .groupBy(property => property.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"const num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .count()\\n .compute()\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .approximateDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"distinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.approximateDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .exactDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"exactDistinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.exactDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"const {{operation}}{{objectType}} = await client.ontology.objects.{{objectType}}\\n .{{operation}}(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses \\\"metricName\\\" as the metric name instead of the default \\\"{{operation}}\\\"\\nconst {{operation}}{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.{{operation}}(),\\n }))\\n .compute()\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.fixedWidth(10))\\n .count()\\n .compute()\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.by{{duration}}({{#durationText}}{{arg}}{{/durationText}}))\\n .count()\\n .compute()\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.ranges([{\\n startValue: {{propertyValueV1}},\\n endValue: {{propertyValueIncrementedV1}}\\n }]))\\n .count()\\n .compute()\",\n \"computedVariables\": [\n \"propertyValueV1\",\n \"propertyValueIncrementedV1\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"import { ActionValidationResult, ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.actions.{{actionApiName}}({{^hasParameters}}{},{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n},{{/hasParameters}} {\\n mode: ActionExecutionMode.VALIDATE_AND_EXECUTE,\\n returnEdits: ReturnEditsMode.ALL,\\n }\\n);\\n// Check if http request was successful\\nif (!isOk(result)) {\\n throw result.error;\\n}\\n// Check if the validation was successful\\nconsole.log(result.value.validation);\\nif (result.value.validation.result === ActionValidationResult.VALID) {\\n // If ReturnEditsMode.ALL is used, new and updated objects edits will contain the primary key of the object\\n if (result.value.edits.type === \\\"edits\\\") {\\n console.log(result.value.edits);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"import { ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.bulkActions.{{actionApiName}}(\\n [\\n {{^hasParameters}}{},{}{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },\\n {\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },{{/hasParameters}}\\n ],\\n {\\n returnEdits: ReturnEditsMode.NONE,\\n }\\n);\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"import { type Result, isOk, Attachment, type AttachmentsError } from \\\"{{{packageName}}}\\\";\\n\\nasync function uploadMyFile() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return client.ontology.attachments.upload(\\\"myFile\\\", blob);\\n}\\n\\nconst result: Result<Attachment, AttachmentsError> = await uploadMyFile();\\n\\nif (isOk(result)) {\\n const attachment = result.value;\\n console.log(attachment);\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"{{#needsImports}}\\nimport { {{#hasAttachmentImports}}Attachment{{#hasDateInputs}},{{/hasDateInputs}}{{^hasDateInputs}}{{#hasTimestampInputs}},{{/hasTimestampInputs}}{{/hasDateInputs}}{{/hasAttachmentImports}}{{#hasDateInputs}}LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{/needsImports}}\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.queries.{{funcApiName}}({{{functionInputValuesV1}}});\",\n \"computedVariables\": [\n \"functionInputValuesV1\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.startsWith(\\\"foo\\\"));\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTermsInOrder(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAnyTerm(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTerms(\\\"foo bar\\\"));\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.eq({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"// Not supported\"\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.isNull());\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{operation}}({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.within{{distanceUnitText}}(\\n // New York City\\n GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n 100.0,\\n ));\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinBoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinPolygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}Polygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}BoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.and(\\n Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.or(\\n query.{{primaryKeyPropertyV1.apiName}}.isNull(),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.points.all();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.from{{timeUnitValue}}Ago(1).all();\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { Timestamp } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.range({\\n startTime: Timestamp.fromISOString(\\\"2022-08-13T12:34:56Z\\\"),\\n endTime: Timestamp.fromISOString(\\\"2022-08-14T12:34:56Z\\\"),\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getLastPoint();\\n}\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"// Not supported.\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Subscribing to object sets is only supported in 2.x versions of the SDK.\"\n }\n ]\n }\n },\n \"1.1.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { type GetObjectError, isOk, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst result: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.fetchOneWithErrors(\\\"primaryKey\\\");\\nif (isOk(result)) {\\n const object: {{objectType}} = result.value;\\n} else {\\n console.error(result.error.errorType);\\n}\\n// You can also fetch a single object without the Result wrapper\\ntry {\\n const object: {{objectType}} = await client.ontology.objects.{{objectType}}.fetchOne(\\\"primaryKey\\\");\\n}\\ncatch(e) {\\n throw e;\\n}\"\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst firstPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}.fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(firstPage)) {\\n const secondPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .fetchPageWithErrors({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n\\n const objects = isOk(secondPage) ? [...firstPage.value.data, ...secondPage.value.data] : firstPage.value.data;\\n const object = objects[0];\\n}\\n\\n// To fetch a page without a result wrapper, use fetchPage with a try/catch instead\\ntry {\\n const firstPage: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}.fetchPage({ pageSize: 30 });\\n const secondPage: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}\\n .fetchPage({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n const objects = [...firstPage.data, ...secondPage.data];\\n const object = objects[0];\\n}\\ncatch (e) {\\n throw e;\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { isOk, Page, type Result, type SearchObjectsError } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, SearchObjectsError> = await client.ontology.objects.{{objectType}}\\n .orderBy(sortBy => sortBy.{{titleProperty}}.asc())\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .where(query => query.{{titleProperty}}.isNull())\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { type GetObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.fetchOneWithErrors(\\\"primaryKey\\\");\\n\\n// You can also fetch a single object without the result wrapper\\nconst responseNoWrapper: {{objectType}} = await client.ontology.objects.{{objectType}}.fetchOne(\\\"primaryKey\\\");\\n\"\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import type { LoadObjectSetError, Page, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\n// To fetch a page without a result wrapper, use fetchPage instead\\nconst responseNoErrorWrapper: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}\\n .fetchPage({ pageSize: 30 });\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst objects: {{objectType}}[]= [];\\n\\nfor await(const obj of client.ontology.objects.{{objectType}}.asyncIter()) {\\n objects.push(obj);\\n}\\nconst object = objects.value[0];\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import type { GetLinkedObjectError, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}): Result<{{linkedObjectType}}, GetLinkedObjectError>\\n{\\n return source.{{linkApiName}}.fetchOneWithErrors(linkedObjectPrimaryKey);\\n}\\n\\n// You can also get a linked object without the result wrapper\\nfunction getLinkedNoWrapper{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}): {{linkedObjectType}} {\\n return source.{{linkApiName}}.fetchOne(linkedObjectPrimaryKey);\\n}\",\n \"computedVariables\": [\n \"linkedPrimaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import type { GetLinkedObjectError, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}) {\\n {{#isLinkManySided}}\\n return source.{{linkApiName}}.fetchPageWithErrors({ pageSize: 30 });\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return source.{{linkApiName}}.fetchOneWithErrors();\\n {{/isLinkManySided}}\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{property}}.isNull()))\\n .groupBy(property => property.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"const num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .count()\\n .compute()\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .approximateDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"distinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.approximateDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .exactDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"exactDistinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.exactDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"const {{operation}}{{objectType}} = await client.ontology.objects.{{objectType}}\\n .{{operation}}(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses \\\"metricName\\\" as the metric name instead of the default \\\"{{operation}}\\\"\\nconst {{operation}}{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.{{operation}}(),\\n }))\\n .compute()\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.fixedWidth(10))\\n .count()\\n .compute()\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.by{{duration}}({{#durationText}}{{arg}}{{/durationText}}))\\n .count()\\n .compute()\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.ranges([{\\n startValue: {{propertyValueV1}},\\n endValue: {{propertyValueIncrementedV1}}\\n }]))\\n .count()\\n .compute()\",\n \"computedVariables\": [\n \"propertyValueV1\",\n \"propertyValueIncrementedV1\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"import { ActionValidationResult, ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.actions.{{actionApiName}}({{^hasParameters}}{},{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n},{{/hasParameters}} {\\n mode: ActionExecutionMode.VALIDATE_AND_EXECUTE,\\n returnEdits: ReturnEditsMode.ALL,\\n }\\n);\\n// Check if http request was successful\\nif (!isOk(result)) {\\n throw result.error;\\n}\\n// Check if the validation was successful\\nconsole.log(result.value.validation);\\nif (result.value.validation.result === ActionValidationResult.VALID) {\\n // If ReturnEditsMode.ALL is used, new and updated objects edits will contain the primary key of the object\\n if (result.value.edits.type === \\\"edits\\\") {\\n console.log(result.value.edits);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"import { ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.batchActions.{{actionApiName}}(\\n [\\n {{^hasParameters}}{},{}{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },\\n {\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },{{/hasParameters}}\\n ],\\n {\\n returnEdits: ReturnEditsMode.NONE,\\n }\\n);\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"import { type Result, isOk, type Attachment, type AttachmentsError } from \\\"{{{packageName}}}\\\";\\n\\nasync function uploadMyFile() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return client.ontology.attachments.upload(\\\"myFile\\\", blob);\\n}\\n\\nconst result: Result<Attachment, AttachmentsError> = await uploadMyFile();\\n\\nif (isOk(result)) {\\n const attachment = result.value;\\n console.log(attachment);\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"{{#needsImports}}\\nimport { {{#hasAttachmentImports}}Attachment{{#hasDateInputs}},{{/hasDateInputs}}{{^hasDateInputs}}{{#hasTimestampInputs}},{{/hasTimestampInputs}}{{/hasDateInputs}}{{/hasAttachmentImports}}{{#hasDateInputs}}LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{/needsImports}}\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.queries.{{funcApiName}}({{{functionInputValuesV1}}});\",\n \"computedVariables\": [\n \"functionInputValuesV1\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.startsWith(\\\"foo\\\"));\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTermsInOrder(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAnyTerm(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTerms(\\\"foo bar\\\"));\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.eq({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"// Not supported\"\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.isNull());\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{operation}}({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.within{{distanceUnitText}}(\\n // New York City\\n GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n 100.0,\\n ));\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinBoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinPolygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}Polygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}BoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.and(\\n Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.or(\\n query.{{primaryKeyPropertyV1.apiName}}.isNull(),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.points.all();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.from{{timeUnitValue}}Ago(1).all();\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { Timestamp } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.range({\\n startTime: Timestamp.fromISOString(\\\"2022-08-13T12:34:56Z\\\"),\\n endTime: Timestamp.fromISOString(\\\"2022-08-14T12:34:56Z\\\"),\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getLastPoint();\\n}\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"// Not supported.\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Subscribing to object sets is only supported in 2.x versions of the SDK.\"\n }\n ]\n }\n },\n \"2.0.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\ntry {\\n const object: Osdk.Instance<{{objectType}}> = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n}\\ncatch(e) {\\n throw e;\\n}\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const firstPage: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30 });\\n if (firstPage.nextPageToken === undefined) {\\n console.log(firstPage.data);\\n }\\n const secondPage: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30, $nextPageToken: firstPage.nextPageToken });\\n console.log([...firstPage.data, ...secondPage.data]);\\n}\\ncatch (e) {\\n throw e;\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk.Instance<{{objectType}}>> = await client({{objectType}})\\n .fetchPage({\\n $orderBy: {\\\"{{titleProperty}}\\\": \\\"asc\\\"},\\n $pageSize: 30\\n });\\n const objects = page.data;\\n const object = objects[0];\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk.Instance<{{objectType}}>> = await client({{objectType}})\\n .where({\\n {{titleProperty}}: {$isNull: true}\\n })\\n .fetchPage({\\n $pageSize: 30\\n });\\n const objects = page.data;\\n const object = objects[0];\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nconst responseNoErrorWrapper: Osdk.Instance<{{objectType}}> = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n\\n\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk, PageResult } from \\\"@osdk/client\\\";\\ntry {\\n const responseNoErrorWrapper: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30 });\\n} catch (e) {\\n throw e;\\n}\\n\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getAll(): Promise<Array<Osdk.Instance<{{objectType}}>>> {\\n const objects: Osdk.Instance<{{objectType}}>[]= [];\\n for await(const obj of client({{objectType}}).asyncIter()) {\\n objects.push(obj);\\n }\\n\\n return objects;\\n}\\n\\n// If Array.fromAsync() is available in your target environment\\nfunction getAllFromAsync(): Promise<Array<Osdk.Instance<{{objectType}}>>> {\\n return Array.fromAsync(client({{objectType}}).asyncIter());\\n}\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getLinked{{linkedObjectType}}(source: Osdk.Instance<{{objectType}}>) {\\n try {\\n {{#isLinkManySided}}\\n return await source.$link.{{linkApiName}}.fetchPage();\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return await source.$link.{{linkApiName}}.fetchOne();\\n {{/isLinkManySided}}\\n } catch (error) {\\n return { error };\\n }\\n}\"\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nasync function getLinkedWithPivot{{linkedObjectType}}(){\\n return await client({{sourceObjectType}}).pivotTo(\\\"{{linkApiName}}\\\").fetchPage();\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst num{{objectType}} = await client({{objectType}})\\n .where({ {{property}}: { $isNull : false }})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n //$groupBy: { {{property}}: \\\"exact\\\" },\\n });\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst num{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: {$count: \\\"unordered\\\"},\\n });\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst distinct{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:approximateDistinct\\\" : \\\"unordered\\\" },\\n });\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst distinct{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:exactDistinct\\\" : \\\"unordered\\\" },\\n });\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{operation}}{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:{{operation}}\\\" : \\\"unordered\\\" }\\n });\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $fixedWidth: 10 } }\\n });\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $duration: [ {{#durationText}}{{arg}}{{/durationText}}, \\\"{{#durationText}}{{unit}}{{/durationText}}\\\"] } }\\n });\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n })\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $ranges: [[{{{propertyValueV2}}}, {{{propertyValueIncrementedV2}}} ]]} }\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\",\n \"propertyValueIncrementedV2\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\n{{/hasMediaParameter}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n // alternatively, you can get the Rid from the attachment property on the object type you are modifying\\n // const attachmentRid = objectTypeWithAttachment.{attachmentProperty}?.rid;\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // Create media reference\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: mediaBlob,\\n fileName: \\\"myMedia\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n // alternatively, you can get the Rid from the media property on the object type you are modifying\\n // const mediaRid = objectTypeWithMedia.{mediaProperty}?.rid;\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).applyAction(\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\n{{/hasMediaParameter}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callBatchAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // Create media reference\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: mediaBlob,\\n fileName: \\\"myMedia\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).batchApplyAction([\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n ],\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport type { AttachmentUpload } from \\\"@osdk/api\\\";\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\n\\n// To call an action with an attachment property, you first need to upload the file\\nasync function createAttachmentReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return createAttachmentUpload(blob, \\\"myFile\\\");\\n}\\n\\nconst myAttachmentUpload: AttachmentUpload = await createAttachmentReference();\\n// then pass the attachment to the action in the action parameter.\\nconst actionResult = client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{property}}: myAttachmentUpload\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"castInterfaceToObjectReference\": [\n {\n \"template\": \"import { {{objectTypeApiName}}, {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n try {\\n const page = await client({{interfaceApiName}}).fetchPage();\\n\\n const interfaces = page.data;\\n const {{interfaceApiNameCamelCase}}: Osdk<{{interfaceApiName}}> = interfaces[0];\\n\\n // Cast from interface to object type\\n const {{objectTypeApiNameCamelCase}}: Osdk<{{objectTypeApiName}}> = {{interfaceApiNameCamelCase}}.$as({{objectTypeApiName}});\\n // Or from object type back to interface\\n const {{interfaceApiNameCamelCase}}2: Osdk<{{interfaceApiName}}> = {{objectTypeApiNameCamelCase}}.$as({{interfaceApiName}});\\n } catch (e) {\\n throw e;\\n }\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\n{{#hasAttachmentUpload}}\\nimport type { AttachmentUpload } from \\\"@osdk/api\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\n{{/hasAttachmentUpload}}\\n{{^hasAttachmentUpload}}\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport { {{funcApiName}}, type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n{{/hasAttachmentUpload}}\\n\\n{{#hasAttachmentUpload}}\\nasync function callFunctionWithAttachmentUpload() {\\n async function createAttachmentReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return createAttachmentUpload(blob, \\\"myFile\\\");\\n }\\n const attachment: AttachmentUpload = await createAttachmentReference();\\n{{/hasAttachmentUpload}}\\n{{^hasAttachmentUpload}}\\nasync function callFunctionWithAttachmentLoaded(objectWithAttachment: Osdk.Instance<{{objectType}}>) {\\n const attachment = objectWithAttachment.{{attachmentProperty}}?.rid;\\n if (attachment == null) {\\n throw new Error(\\\"Attachment is required\\\");\\n }\\n{{/hasAttachmentUpload}}\\n const result = await client({{funcApiName}}).executeFunction({{{functionInputValuesV2}}});\\n return result;\\n}\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}\\nimport { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\n\\nconst result = await client({{funcApiName}}).executeFunction({{{functionInputValuesV2}}});\\n{{/hasAttachmentProperty}}\",\n \"computedVariables\": [\n \"functionInputValuesV2\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $startsWith: \\\"foo\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAnyTerm: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAnyTerm: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAllTerms: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAllTerms: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $eq: {{{propertyValueV2}}} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $eq: {{{propertyValueV2}}} }\\n {{/structSubPropertyApiName}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $in: [{{{propertyValueV2}}}] }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $in: [{{{propertyValueV2}}}] }\\n {{/structSubPropertyApiName}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $isNull: true }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $isNull: true }\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { ${{operation}}: {{{propertyValueV2}}} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { ${{operation}}: {{{propertyValueV2}}} }\\n {{/structSubPropertyApiName}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128]} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $not: { {{property}}: { $eq: {{{propertyValueV2}}} }}});\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $and:[\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true }}},\\n { {{property}}: { $eq: {{{propertyValueV2}}} }}\\n ]});\",\n \"computedVariables\": [\n \"primaryKeyPropertyV2\",\n \"propertyValueV2\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $or:[\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true }}},\\n { {{property}}: { $eq: {{{propertyValueV2}}} }}\\n ]});\",\n \"computedVariables\": [\n \"primaryKeyPropertyV2\",\n \"propertyValueV2\"\n ]\n }\n ],\n \"containsTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst filteredObjects = client({{objectType}})\\n .where({\\n {{property}}: { $contains: {{{arrayElementValue}}} }\\n })\",\n \"computedVariables\": [\n \"arrayElementValue\"\n ]\n }\n ],\n \"loadInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\nconst response: PageResult<Osdk<{{interfaceApiName}}>>\\n = await client({{interfaceApiName}}).fetchPage({ $pageSize: 30 });\"\n }\n ],\n \"loadAllInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nconst interfaces: Osdk<{{interfaceApiName}}>[] = [];\\n\\nfor await(const int of client({{interfaceApiName}}).asyncIter()) {\\n interfaces.push(int);\\n}\\nconst interface1 = interfaces[0];\"\n }\n ],\n \"loadOrderedInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk<{{interfaceApiName}}>> = await client({{interfaceApiName}})\\n .fetchPage({\\n $orderBy: { {{property}}: \\\"asc\\\"},\\n $pageSize: 30\\n });\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"searchInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk<{{interfaceApiName}}>> = await client({{interfaceApiName}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $startsWith: \\\"foo\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n {{/structSubPropertyApiName}}\\n })\\n .fetchPage({\\n $pageSize: 30\\n });\\n\\n const interfaces = page.data;\\n const interface1 = interfaces[0];\\n} catch (e) {\\n throw e;\\n}\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllPoints();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n })\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return await obj.{{property}}?.getAllPoints({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getFirstTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getLastTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getLastPoint();\\n}\"\n }\n ],\n \"loadGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadGeotimeSeriesLastPointSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst objectTypeMetadata = await client.fetchMetadata({{objectType}});\\n\\nif (objectTypeMetadata?.icon?.type === \\\"blueprint\\\") {\\n const blueprintIconName = objectTypeMetadata.icon.name;\\n}\\nconst currentVisibility = objectTypeMetadata.visibility;\\nconst currentDescription = objectTypeMetadata.description;\"\n }\n ],\n \"loadInterfaceMetadataSnippet\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst interfaceTypeMetadata = await client.fetchMetadata({{interfaceApiName}});\\n\\nconst implementingObjectTypes = interfaceTypeMetadata.implementedBy;\\nconst interfaceRid = interfaceTypeMetadata.rid;\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"uploadMedia\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"readMedia\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"derivedPropertyBaseExample\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n })\\n .where({\\n \\\"newPropertyName\\\": { $gt: 0 }\\n }).aggregate({\\n $select: { \\\"newPropertyName:max\\\": \\\"unordered\\\" }\\n })\"\n }\n ],\n \"derivedPropertyApproximateDistinctAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximateDistinct\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyExactDistinctAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:exactDistinct\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCollectToListAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst maxObjectsInList = 75; // Adjust this value as needed between 1 and 100\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectList\\\", { limit: maxObjectsInList })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCollectToSetAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst maxObjectsInSet = 75; // Adjust this value as needed between 1 and 100\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectSet\\\", { limit: maxObjectsInSet })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCountAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertySelectPropertyAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyApproximatePercentileAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximatePercentile\\\", { percentile: 95 })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyNumericAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:{{operation}}\\\")\\n }).fetchPage();\"\n }\n ],\n \"objectSetOperationsGuide\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n// Object set operations can be chained. e.g. To find all objects in objectSetA\\n// that are present in objectSetB but do not exist in objectSetC:\\nconst result = objectSetA\\n .intersect(objectSetB)\\n .subtract(objectSetC)\"\n }\n ],\n \"objectSetOperationsUnion\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n// Combine objectSetA, objectSetB and objectSetC\\nconst result = objectSetA\\n .union(objectSetB)\\n .union(objectSetC) // alternatively: objectSetA.union(objectSetB, objectSetC)\"\n }\n ],\n \"objectSetOperationsSubtract\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n\\n// Return objects in objectSetA that are not present in either objectSetB or objectSetC\\nconst result = objectSetA\\n .subtract(objectSetB)\\n .subtract(objectSetC) // alternatively: objectSetA.subtract(objectSetB, objectSetC)\"\n }\n ],\n \"objectSetOperationsIntersect\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n\\n// Return all objects common to objectSetA, objectSetB and objectSetC\\nconst result = objectSetA\\n .intersect(objectSetB)\\n .intersect(objectSetC) // alternatively: objectSetA.intersect(objectSetB, objectSetC)\"\n }\n ],\n \"searchAround\": [\n {\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\n// Object set containing objects a, b and c\\nconst objects = client({{sourceObjectType}})\\n .where({ {{rawLinkedPrimaryKeyProperty.apiName}}: { $in: [\\\"a\\\", \\\"b\\\", \\\"c\\\"]}});\\n\\n// Traverse the selected link type to find all objects of type\\n// Find {{linkedObjectType}} objects linked to the filtered {{sourceObjectType}} objects\\nconst linkedObjects = await objects.pivotTo(\\\"{{linkApiName}}\\\").fetchPage();\"\n }\n ]\n }\n },\n \"2.1.0\": {\n \"snippets\": {\n \"loadGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues();\\n}\"\n }\n ],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n })\\n}\"\n }\n ],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }\n ],\n \"loadGeotimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getLastTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getLatestValue();\\n}\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"import { {{objectOrInterfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst subscription = client({{objectOrInterfaceApiName}}).subscribe(\\n {\\n onChange(update) {\\n if (update.state === \\\"ADDED_OR_UPDATED\\\") {\\n // An object has received an update or an object was added to the object set\\n // Get the object using the $primaryKey from your cache\\n // const currentObject = objects[update.object.$primaryKey];\\n // use the update.object[\\\"<propertyName>\\\"] to update your cache\\n //currentObject[\\\"<propertyName>\\\"] = update.object[\\\"<propertyName>\\\"] ?? currentObject[\\\"<propertyName>\\\"];\\n }\\n else if (update.state === \\\"REMOVED\\\") {\\n // The object was removed from the object set, which could mean it was deleted or no longer meets the filter criteria\\n // Remove the object from your cache using the $primaryKey\\n // delete objects[update.object.$primaryKey];\\n }\\n },\\n onSuccessfulSubscription() {\\n // The subscription was successful and you can expect to receive updates\\n },\\n onError(err) {\\n // There was an error with the subscription and you will not receive any more updates\\n throw new Error(err.error instanceof Error ? err.error.message : String(err.error));\\n },\\n onOutOfDate() {\\n // We could not keep track of all changes. Please reload the objects in your set.\\n },\\n },\\n { properties: [ {{{propertyNames}}} ] }\\n);\\n\\n// To stop receiving updates, call unsubscribe\\nsubscription.unsubscribe();\"\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference, MediaUpload {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference, MediaUpload } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n // alternatively, you can get the Rid from the attachment property on the object type you are modifying\\n // const attachmentRid = objectTypeWithAttachment.{attachmentProperty}?.rid;\\n\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // You can upload media data via your Action\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaUpload: MediaUpload = { data: mediaBlob, fileName: \\\"myMedia\\\" };\\n\\n // You can also pass an existing media reference into your Action\\n const objectPage = await client({{objectType}}).fetchPage();\\n const mediaReference: MediaReference = objectPage.data[0].{{property}}!.getMediaReference();\\n\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).applyAction(\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference, MediaUpload {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference, MediaUpload } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callBatchAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // You can upload media data via your Action\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaUpload: MediaUpload = { data: mediaBlob, fileName: \\\"myMedia\\\" };\\n\\n // You can also pass an existing media reference into your Action\\n const objectPage = await client({{objectType}}).fetchPage();\\n const mediaReference: MediaReference = objectPage.data[0].{{property}}!.getMediaReference();\\n\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).batchApplyAction([\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n ],\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"uploadMediaOntologyEdits\": [\n {\n \"template\": \"import type { Client } from \\\"@osdk/client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport type { Edits } from \\\"@osdk/functions\\\";\\nimport { createEditBatch, uploadMedia } from \\\"@osdk/functions\\\";\\n\\nasync function createObject(client: Client): Promise<Edits.Object<{{objectType}}>[]> {\\n const batch = createEditBatch<Edits.Object<{{objectType}}>>(client);\\n\\n const blob = new Blob([\\\"Hello, world\\\"], { type: \\\"text/plain\\\" });\\n const mediaReference = await uploadMedia(client, { data: blob, fileName: \\\"foundryFile.txt\\\" });\\n\\n const props = { myMediaProperty: mediaReference /* Other properties... */ };\\n // @ts-ignore\\n batch.create({{objectType}}, props);\\n\\n return batch.getEdits();\\n}\\n\\nexport default createObject;\"\n }\n ],\n \"uploadMedia\": [\n {\n \"template\": \"import { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\nimport { {{objectType}}, {{actionApiName}} } from \\\"{{{packageName}}}\\\"\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n// To upload media with 2.x, it has to be linked to an Action call\\nasync function createMediaReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const data = await file.blob();\\n // Upload media to an object type with a media property. This returns a media reference that can passed to\\n // a media parameter in an Action.\\n return await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data,\\n fileName: \\\"myFile\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n}\\nconst mediaReference: MediaReference = await createMediaReference();\\nconst actionResult = client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{mediaParameter}}: mediaReference\\n});\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"readMedia\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nconst result = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n// Fetch metadata of a media property\\nconst mediaMetadata = await result.{{property}}?.fetchMetadata();\\nconsole.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\\n// Fetch contents of a media property\\nconst mediaContent = await result.{{property}}?.fetchContents();\\nif (mediaContent?.ok) {\\n const data = await mediaContent.blob();\\n}\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ]\n }\n },\n \"2.4.0\": {\n \"snippets\": {\n \"derivedPropertyNumericExpression\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}WithExpression = await client({{objectType}})\\n .withProperties({\\n {{^isUnary}}\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .aggregate(\\\"{{property}}\\\").{{operation}}(\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\"))\\n }).fetchPage();\\n {{/isUnary}}\\n {{#isUnary}}\\n \\\"{{operation}}_{{property}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").{{operation}}()\\n }).fetchPage();\\n {{/isUnary}}\"\n }\n ],\n \"derivedPropertyDatetimeExpression\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}WithExpression = await client({{objectType}})\\n .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 }).fetchPage();\"\n }\n ],\n \"nearestNeighborsTextQuery\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst result = await client({{objectType}})\\n .nearestNeighbors(\\\"coffee\\\", 5, \\\"{{property}}\\\")\\n .fetchPage();\"\n }\n ],\n \"nearestNeighborsVectorQuery\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\n// Note that this vector maps to an arbitrary string\\n// It must match the dimension of the \\\"{{property}}\\\" property: {{vectorDimensionSize}}\\nconst vector_query = Array.from({ length: {{vectorDimensionSize}} }, () => 0.3);\\nconst result = await client({{objectType}})\\n .nearestNeighbors(vector_query, 5, \\\"{{property}}\\\")\\n .fetchPage();\"\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d,CAAC,CACF;QACD,6BAA6B,EAAE,CAC7B;UACE,UAAU,EAAE;QACd,CAAC;MAEL;IACF;EACF;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"docsNoComputedVariables.js","names":["snippets"],"sources":["docsNoComputedVariables.ts"],"sourcesContent":["\n// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport type { SdkSnippets } from \"@osdk/docs-spec-core\";\nimport type { OSDK_SNIPPETS_SPEC } from \"@osdk/docs-spec-sdk\";\n\nexport const snippets: SdkSnippets<typeof OSDK_SNIPPETS_SPEC> = {\n \"kind\": \"sdk\",\n \"versions\": {\n \"1.0.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { type GetObjectError, isOk, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst result: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.get(\\\"primaryKey\\\");\\nif (isOk(result)) {\\n const object: {{objectType}} = result.value;\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst firstPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}.page({ pageSize: 30 });\\n\\nif (isOk(firstPage)) {\\n const secondPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .page({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n\\n const objects = isOk(secondPage) ? [...firstPage.value.data, ...secondPage.value.data] : firstPage.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { isOk, Page, type Result, type SearchObjectsError } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, SearchObjectsError> = await client.ontology.objects.{{objectType}}\\n .orderBy(sortBy => sortBy.{{titleProperty}}.asc())\\n .page({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .where(query => query.{{titleProperty}}.isNull())\\n .page({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { type GetObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.get(\\\"primaryKey\\\");\"\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import { type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .page({ pageSize: 30 });\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst objects: Result<{{objectType}}[], LoadObjectSetError> = await client.ontology.objects.{{objectType}}.all();\\n\\nif (isOk(objects)) {\\n const object = objects.value[0];\\n}\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import { type GetLinkedObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}) {\\n return source.{{linkApiName}}.get(linkedObjectPrimaryKey);\\n}\",\n \"computedVariables\": [\n \"linkedPrimaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import { type GetLinkedObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}) {\\n {{#isLinkManySided}}\\n return source.{{linkApiName}}.page({ pageSize: 30 });\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return source.{{linkApiName}}.get();\\n {{/isLinkManySided}}\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{property}}.isNull()))\\n .groupBy(property => property.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"const num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .count()\\n .compute()\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .approximateDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"distinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.approximateDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .exactDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"exactDistinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.exactDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"const {{operation}}{{objectType}} = await client.ontology.objects.{{objectType}}\\n .{{operation}}(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses \\\"metricName\\\" as the metric name instead of the default \\\"{{operation}}\\\"\\nconst {{operation}}{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.{{operation}}(),\\n }))\\n .compute()\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.fixedWidth(10))\\n .count()\\n .compute()\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.by{{duration}}({{#durationText}}{{arg}}{{/durationText}}))\\n .count()\\n .compute()\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.ranges([{\\n startValue: {{propertyValueV1}},\\n endValue: {{propertyValueIncrementedV1}}\\n }]))\\n .count()\\n .compute()\",\n \"computedVariables\": [\n \"propertyValueV1\",\n \"propertyValueIncrementedV1\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"import { ActionValidationResult, ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.actions.{{actionApiName}}({{^hasParameters}}{},{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n},{{/hasParameters}} {\\n mode: ActionExecutionMode.VALIDATE_AND_EXECUTE,\\n returnEdits: ReturnEditsMode.ALL,\\n }\\n);\\n// Check if http request was successful\\nif (!isOk(result)) {\\n throw result.error;\\n}\\n// Check if the validation was successful\\nconsole.log(result.value.validation);\\nif (result.value.validation.result === ActionValidationResult.VALID) {\\n // If ReturnEditsMode.ALL is used, new and updated objects edits will contain the primary key of the object\\n if (result.value.edits.type === \\\"edits\\\") {\\n console.log(result.value.edits);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"import { ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.bulkActions.{{actionApiName}}(\\n [\\n {{^hasParameters}}{},{}{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },\\n {\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },{{/hasParameters}}\\n ],\\n {\\n returnEdits: ReturnEditsMode.NONE,\\n }\\n);\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"import { type Result, isOk, Attachment, type AttachmentsError } from \\\"{{{packageName}}}\\\";\\n\\nasync function uploadMyFile() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return client.ontology.attachments.upload(\\\"myFile\\\", blob);\\n}\\n\\nconst result: Result<Attachment, AttachmentsError> = await uploadMyFile();\\n\\nif (isOk(result)) {\\n const attachment = result.value;\\n console.log(attachment);\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"{{#needsImports}}\\nimport { {{#hasAttachmentImports}}Attachment{{#hasDateInputs}},{{/hasDateInputs}}{{^hasDateInputs}}{{#hasTimestampInputs}},{{/hasTimestampInputs}}{{/hasDateInputs}}{{/hasAttachmentImports}}{{#hasDateInputs}}LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{/needsImports}}\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.queries.{{funcApiName}}({{{functionInputValuesV1}}});\",\n \"computedVariables\": [\n \"functionInputValuesV1\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.startsWith(\\\"foo\\\"));\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTermsInOrder(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAnyTerm(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTerms(\\\"foo bar\\\"));\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.eq({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"// Not supported\"\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.isNull());\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{operation}}({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.within{{distanceUnitText}}(\\n // New York City\\n GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n 100.0,\\n ));\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinBoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinPolygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}Polygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}BoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.and(\\n Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.or(\\n query.{{primaryKeyPropertyV1.apiName}}.isNull(),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.points.all();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.from{{timeUnitValue}}Ago(1).all();\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { Timestamp } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.range({\\n startTime: Timestamp.fromISOString(\\\"2022-08-13T12:34:56Z\\\"),\\n endTime: Timestamp.fromISOString(\\\"2022-08-14T12:34:56Z\\\"),\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getLastPoint();\\n}\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"// Not supported.\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Subscribing to object sets is only supported in 2.x versions of the SDK.\"\n }\n ]\n }\n },\n \"1.1.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { type GetObjectError, isOk, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst result: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.fetchOneWithErrors(\\\"primaryKey\\\");\\nif (isOk(result)) {\\n const object: {{objectType}} = result.value;\\n} else {\\n console.error(result.error.errorType);\\n}\\n// You can also fetch a single object without the Result wrapper\\ntry {\\n const object: {{objectType}} = await client.ontology.objects.{{objectType}}.fetchOne(\\\"primaryKey\\\");\\n}\\ncatch(e) {\\n throw e;\\n}\"\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst firstPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}.fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(firstPage)) {\\n const secondPage: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .fetchPageWithErrors({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n\\n const objects = isOk(secondPage) ? [...firstPage.value.data, ...secondPage.value.data] : firstPage.value.data;\\n const object = objects[0];\\n}\\n\\n// To fetch a page without a result wrapper, use fetchPage with a try/catch instead\\ntry {\\n const firstPage: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}.fetchPage({ pageSize: 30 });\\n const secondPage: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}\\n .fetchPage({ pageSize: 30, pageToken: firstPage.value.nextPageToken });\\n const objects = [...firstPage.data, ...secondPage.data];\\n const object = objects[0];\\n}\\ncatch (e) {\\n throw e;\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { isOk, Page, type Result, type SearchObjectsError } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, SearchObjectsError> = await client.ontology.objects.{{objectType}}\\n .orderBy(sortBy => sortBy.{{titleProperty}}.asc())\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { isOk, type LoadObjectSetError, Page, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst page: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .where(query => query.{{titleProperty}}.isNull())\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\nif (isOk(page)) {\\n const objects = page.value.data;\\n const object = objects[0];\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { type GetObjectError, type Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<{{objectType}}, GetObjectError> = await client.ontology.objects.{{objectType}}.fetchOneWithErrors(\\\"primaryKey\\\");\\n\\n// You can also fetch a single object without the result wrapper\\nconst responseNoWrapper: {{objectType}} = await client.ontology.objects.{{objectType}}.fetchOne(\\\"primaryKey\\\");\\n\"\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import type { LoadObjectSetError, Page, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst response: Result<Page<{{objectType}}>, LoadObjectSetError> = await client.ontology.objects.{{objectType}}\\n .fetchPageWithErrors({ pageSize: 30 });\\n\\n// To fetch a page without a result wrapper, use fetchPage instead\\nconst responseNoErrorWrapper: Page<{{objectType}}> = await client.ontology.objects.{{objectType}}\\n .fetchPage({ pageSize: 30 });\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nconst objects: {{objectType}}[]= [];\\n\\nfor await(const obj of client.ontology.objects.{{objectType}}.asyncIter()) {\\n objects.push(obj);\\n}\\nconst object = objects.value[0];\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import type { GetLinkedObjectError, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}): Result<{{linkedObjectType}}, GetLinkedObjectError>\\n{\\n return source.{{linkApiName}}.fetchOneWithErrors(linkedObjectPrimaryKey);\\n}\\n\\n// You can also get a linked object without the result wrapper\\nfunction getLinkedNoWrapper{{linkedObjectType}}(source: {{sourceObjectType}}, linkedObjectPrimaryKey: {{linkedPrimaryKeyPropertyV1.type}}): {{linkedObjectType}} {\\n return source.{{linkApiName}}.fetchOne(linkedObjectPrimaryKey);\\n}\",\n \"computedVariables\": [\n \"linkedPrimaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import type { GetLinkedObjectError, Result } from \\\"{{{packageName}}}\\\";\\nimport { {{sourceObjectType}}, {{linkedObjectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getLinked{{linkedObjectType}}(source: {{sourceObjectType}}) {\\n {{#isLinkManySided}}\\n return source.{{linkApiName}}.fetchPageWithErrors({ pageSize: 30 });\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return source.{{linkApiName}}.fetchOneWithErrors();\\n {{/isLinkManySided}}\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{property}}.isNull()))\\n .groupBy(property => property.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"const num{{objectType}} = await client.ontology.objects.{{objectType}}\\n .count()\\n .compute()\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .approximateDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"distinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.approximateDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst distinct{{objectType}} = await client.ontology.objects.{{objectType}}\\n .exactDistinct(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses metricName as the metric name instead of the default \\\"exactDistinctCount\\\"\\nconst distinct{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.exactDistinct(),\\n }))\\n .compute()\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"const {{operation}}{{objectType}} = await client.ontology.objects.{{objectType}}\\n .{{operation}}(obj => obj.{{property}})\\n .compute()\\n\\n// This is equivalent to the above, but uses \\\"metricName\\\" as the metric name instead of the default \\\"{{operation}}\\\"\\nconst {{operation}}{{objectType}}CustomName = await client.ontology.objects.{{objectType}}\\n .aggregate(obj => ({\\n metricName: obj.{{property}}.{{operation}}(),\\n }))\\n .compute()\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.fixedWidth(10))\\n .count()\\n .compute()\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.by{{duration}}({{#durationText}}{{arg}}{{/durationText}}))\\n .count()\\n .compute()\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"const grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.exact())\\n .count()\\n .compute()\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst grouped{{objectType}} = await client.ontology.objects.{{objectType}}\\n .groupBy(obj => obj.{{property}}.ranges([{\\n startValue: {{propertyValueV1}},\\n endValue: {{propertyValueIncrementedV1}}\\n }]))\\n .count()\\n .compute()\",\n \"computedVariables\": [\n \"propertyValueV1\",\n \"propertyValueIncrementedV1\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"import { ActionValidationResult, ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.actions.{{actionApiName}}({{^hasParameters}}{},{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n},{{/hasParameters}} {\\n mode: ActionExecutionMode.VALIDATE_AND_EXECUTE,\\n returnEdits: ReturnEditsMode.ALL,\\n }\\n);\\n// Check if http request was successful\\nif (!isOk(result)) {\\n throw result.error;\\n}\\n// Check if the validation was successful\\nconsole.log(result.value.validation);\\nif (result.value.validation.result === ActionValidationResult.VALID) {\\n // If ReturnEditsMode.ALL is used, new and updated objects edits will contain the primary key of the object\\n if (result.value.edits.type === \\\"edits\\\") {\\n console.log(result.value.edits);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"import { ActionExecutionMode, ReturnEditsMode{{#hasAttachmentImports}}, Attachment{{/hasAttachmentImports}}{{#hasDateInputs}}, LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}, Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.batchActions.{{actionApiName}}(\\n [\\n {{^hasParameters}}{},{}{{/hasParameters}}{{#hasParameters}}{\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },\\n {\\n {{#actionParameterSampleValuesV1}}\\n \\\"{{key}}\\\": {{{value}}}{{^last}}, {{/last}}\\n {{/actionParameterSampleValuesV1}}\\n },{{/hasParameters}}\\n ],\\n {\\n returnEdits: ReturnEditsMode.NONE,\\n }\\n);\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV1\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"import { type Result, isOk, type Attachment, type AttachmentsError } from \\\"{{{packageName}}}\\\";\\n\\nasync function uploadMyFile() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return client.ontology.attachments.upload(\\\"myFile\\\", blob);\\n}\\n\\nconst result: Result<Attachment, AttachmentsError> = await uploadMyFile();\\n\\nif (isOk(result)) {\\n const attachment = result.value;\\n console.log(attachment);\\n} else {\\n console.error(result.error.errorType);\\n}\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"{{#needsImports}}\\nimport { {{#hasAttachmentImports}}Attachment{{#hasDateInputs}},{{/hasDateInputs}}{{^hasDateInputs}}{{#hasTimestampInputs}},{{/hasTimestampInputs}}{{/hasDateInputs}}{{/hasAttachmentImports}}{{#hasDateInputs}}LocalDate{{#hasTimestampInputs}}, {{/hasTimestampInputs}}{{/hasDateInputs}}{{#hasTimestampInputs}}Timestamp{{/hasTimestampInputs}} } from \\\"{{{packageName}}}\\\";\\n\\n{{/needsImports}}\\n{{#hasAttachmentUpload}}\\nconst attachment: Attachment = uploadMyFile();\\n{{/hasAttachmentUpload}}\\n{{#attachmentProperty}}\\nconst attachment: Attachment = {{{attachmentProperty}}};\\n{{/attachmentProperty}}\\nconst result = await client.ontology.queries.{{funcApiName}}({{{functionInputValuesV1}}});\",\n \"computedVariables\": [\n \"functionInputValuesV1\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.startsWith(\\\"foo\\\"));\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTermsInOrder(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAnyTerm(\\\"foo bar\\\"));\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.containsAllTerms(\\\"foo bar\\\"));\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.eq({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"// Not supported\"\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"const {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.isNull());\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"{{#isDateProperty}}\\nimport { LocalDate } from \\\"{{{packageName}}}\\\";\\n\\n{{/isDateProperty}}\\n{{#isTimestampProperty}}\\nimport { Timestamp } from \\\"{{{packageName}}}\\\";\\n\\n{{/isTimestampProperty}}\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{operation}}({{{propertyValueV1}}}));\",\n \"computedVariables\": [\n \"propertyValueV1\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.within{{distanceUnitText}}(\\n // New York City\\n GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n 100.0,\\n ));\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinBoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.withinPolygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { Polygon } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}Polygon(Polygon.fromGeoJson({\\n type: \\\"Polygon\\\",\\n coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]],\\n }));\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { GeoPoint } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => query.{{property}}.{{intersects}}BoundingBox({\\n topLeft: GeoPoint.fromCoordinates({ latitude: 40.7128, longitude: -74.0060 }),\\n bottomRight: GeoPoint.fromCoordinates({ latitude: 25.123, longitude: 80.4231 }),\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.and(\\n Op.not(query.{{primaryKeyPropertyV1.apiName}}.isNull()),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { Op } from \\\"{{{packageName}}}\\\";\\n\\nconst {{objectType}}ObjectSet = client.ontology.objects.{{objectType}}\\n .where(query => Op.or(\\n query.{{primaryKeyPropertyV1.apiName}}.isNull(),\\n query.{{primaryKeyPropertyV1.apiName}}.eq(\\\"primaryKey\\\"),\\n ));\",\n \"computedVariables\": [\n \"primaryKeyPropertyV1\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.points.all();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.from{{timeUnitValue}}Ago(1).all();\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { Timestamp } from \\\"{{{packageName}}}\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getRelativeTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.range({\\n startTime: Timestamp.fromISOString(\\\"2022-08-13T12:34:56Z\\\"),\\n endTime: Timestamp.fromISOString(\\\"2022-08-14T12:34:56Z\\\"),\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}/ontology/objects\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: {{objectType}}) {\\n return obj.{{property}}.getLastPoint();\\n}\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"// Not supported.\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Subscribing to object sets is only supported in 2.x versions of the SDK.\"\n }\n ]\n }\n },\n \"2.0.0\": {\n \"snippets\": {\n \"loadSingleObjectGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\ntry {\\n const object: Osdk.Instance<{{objectType}}> = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n}\\ncatch(e) {\\n throw e;\\n}\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ],\n \"loadObjectPageGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const firstPage: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30 });\\n if (firstPage.nextPageToken === undefined) {\\n console.log(firstPage.data);\\n }\\n const secondPage: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30, $nextPageToken: firstPage.nextPageToken });\\n console.log([...firstPage.data, ...secondPage.data]);\\n}\\ncatch (e) {\\n throw e;\\n}\"\n }\n ],\n \"orderObjectsGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk.Instance<{{objectType}}>> = await client({{objectType}})\\n .fetchPage({\\n $orderBy: {\\\"{{titleProperty}}\\\": \\\"asc\\\"},\\n $pageSize: 30\\n });\\n const objects = page.data;\\n const object = objects[0];\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"searchObjectsGuide\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk.Instance<{{objectType}}>> = await client({{objectType}})\\n .where({\\n {{titleProperty}}: {$isNull: true}\\n })\\n .fetchPage({\\n $pageSize: 30\\n });\\n const objects = page.data;\\n const object = objects[0];\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"loadSingleObjectReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nconst responseNoErrorWrapper: Osdk.Instance<{{objectType}}> = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n\\n\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ],\n \"loadObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk, PageResult } from \\\"@osdk/client\\\";\\ntry {\\n const responseNoErrorWrapper: PageResult<Osdk.Instance<{{objectType}}>>\\n = await client({{objectType}}).fetchPage({ $pageSize: 30 });\\n} catch (e) {\\n throw e;\\n}\\n\"\n }\n ],\n \"loadAllObjectsReference\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getAll(): Promise<Array<Osdk.Instance<{{objectType}}>>> {\\n const objects: Osdk.Instance<{{objectType}}>[]= [];\\n for await(const obj of client({{objectType}}).asyncIter()) {\\n objects.push(obj);\\n }\\n\\n return objects;\\n}\\n\\n// If Array.fromAsync() is available in your target environment\\nfunction getAllFromAsync(): Promise<Array<Osdk.Instance<{{objectType}}>>> {\\n return Array.fromAsync(client({{objectType}}).asyncIter());\\n}\"\n }\n ],\n \"loadLinkedObjectReference\": [\n {\n \"template\": \"import { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getLinked{{linkedObjectType}}(source: Osdk.Instance<{{objectType}}>) {\\n try {\\n {{#isLinkManySided}}\\n return await source.$link.{{linkApiName}}.fetchPage();\\n {{/isLinkManySided}}\\n {{^isLinkManySided}}\\n return await source.$link.{{linkApiName}}.fetchOne();\\n {{/isLinkManySided}}\\n } catch (error) {\\n return { error };\\n }\\n}\"\n }\n ],\n \"loadLinkedObjectsReference\": [\n {\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nasync function getLinkedWithPivot{{linkedObjectType}}(){\\n return await client({{sourceObjectType}}).pivotTo(\\\"{{linkApiName}}\\\").fetchPage();\\n}\"\n }\n ],\n \"aggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst num{{objectType}} = await client({{objectType}})\\n .where({ {{property}}: { $isNull : false }})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n //$groupBy: { {{property}}: \\\"exact\\\" },\\n });\"\n }\n ],\n \"countAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst num{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: {$count: \\\"unordered\\\"},\\n });\"\n }\n ],\n \"approximateDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst distinct{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:approximateDistinct\\\" : \\\"unordered\\\" },\\n });\"\n }\n ],\n \"exactDistinctAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst distinct{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:exactDistinct\\\" : \\\"unordered\\\" },\\n });\"\n }\n ],\n \"numericAggregationTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{operation}}{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { \\\"{{property}}:{{operation}}\\\" : \\\"unordered\\\" }\\n });\"\n }\n ],\n \"fixedWidthGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $fixedWidth: 10 } }\\n });\"\n }\n ],\n \"durationGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $duration: [ {{#durationText}}{{arg}}{{/durationText}}, \\\"{{#durationText}}{{unit}}{{/durationText}}\\\"] } }\\n });\"\n }\n ],\n \"exactGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: \\\"exact\\\" }\\n })\"\n }\n ],\n \"rangeGroupByTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst grouped{{objectType}} = await client({{objectType}})\\n .aggregate({\\n $select: { $count: \\\"unordered\\\" },\\n $groupBy: { {{property}}: { $ranges: [[{{{propertyValueV2}}}, {{{propertyValueIncrementedV2}}} ]]} }\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\",\n \"propertyValueIncrementedV2\"\n ]\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\n{{/hasMediaParameter}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n // alternatively, you can get the Rid from the attachment property on the object type you are modifying\\n // const attachmentRid = objectTypeWithAttachment.{attachmentProperty}?.rid;\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // Create media reference\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: mediaBlob,\\n fileName: \\\"myMedia\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n // alternatively, you can get the Rid from the media property on the object type you are modifying\\n // const mediaRid = objectTypeWithMedia.{mediaProperty}?.rid;\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).applyAction(\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\n{{/hasMediaParameter}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callBatchAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // Create media reference\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaReference: MediaReference = await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data: mediaBlob,\\n fileName: \\\"myMedia\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).batchApplyAction([\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n ],\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"uploadAttachment\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport type { AttachmentUpload } from \\\"@osdk/api\\\";\\nimport { {{actionApiName}} } from \\\"{{{packageName}}}\\\";\\n\\n// To call an action with an attachment property, you first need to upload the file\\nasync function createAttachmentReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return createAttachmentUpload(blob, \\\"myFile\\\");\\n}\\n\\nconst myAttachmentUpload: AttachmentUpload = await createAttachmentReference();\\n// then pass the attachment to the action in the action parameter.\\nconst actionResult = client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{property}}: myAttachmentUpload\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"castInterfaceToObjectReference\": [\n {\n \"template\": \"import { {{objectTypeApiName}}, {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n try {\\n const page = await client({{interfaceApiName}}).fetchPage();\\n\\n const interfaces = page.data;\\n const {{interfaceApiNameCamelCase}}: Osdk<{{interfaceApiName}}> = interfaces[0];\\n\\n // Cast from interface to object type\\n const {{objectTypeApiNameCamelCase}}: Osdk<{{objectTypeApiName}}> = {{interfaceApiNameCamelCase}}.$as({{objectTypeApiName}});\\n // Or from object type back to interface\\n const {{interfaceApiNameCamelCase}}2: Osdk<{{interfaceApiName}}> = {{objectTypeApiNameCamelCase}}.$as({{interfaceApiName}});\\n } catch (e) {\\n throw e;\\n }\"\n }\n ],\n \"executeFunction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\n{{#hasAttachmentUpload}}\\nimport type { AttachmentUpload } from \\\"@osdk/api\\\";\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\nimport { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\n{{/hasAttachmentUpload}}\\n{{^hasAttachmentUpload}}\\nimport type { Osdk } from \\\"@osdk/client\\\";\\nimport { {{funcApiName}}, type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n{{/hasAttachmentUpload}}\\n\\n{{#hasAttachmentUpload}}\\nasync function callFunctionWithAttachmentUpload() {\\n async function createAttachmentReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const blob = await file.blob();\\n return createAttachmentUpload(blob, \\\"myFile\\\");\\n }\\n const attachment: AttachmentUpload = await createAttachmentReference();\\n{{/hasAttachmentUpload}}\\n{{^hasAttachmentUpload}}\\nasync function callFunctionWithAttachmentLoaded(objectWithAttachment: Osdk.Instance<{{objectType}}>) {\\n const attachment = objectWithAttachment.{{attachmentProperty}}?.rid;\\n if (attachment == null) {\\n throw new Error(\\\"Attachment is required\\\");\\n }\\n{{/hasAttachmentUpload}}\\n const result = await client({{funcApiName}}).executeFunction({{{functionInputValuesV2}}});\\n return result;\\n}\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}\\nimport { {{funcApiName}} } from \\\"{{{packageName}}}\\\";\\n\\nconst result = await client({{funcApiName}}).executeFunction({{{functionInputValuesV2}}});\\n{{/hasAttachmentProperty}}\",\n \"computedVariables\": [\n \"functionInputValuesV2\"\n ]\n }\n ],\n \"stringStartsWithTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $startsWith: \\\"foo\\\" } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $startsWith: \\\"foo\\\" } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $startsWith: \\\"foo\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n })\"\n }\n ],\n \"containsAllTermsInOrderTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $containsAllTermsInOrder: \\\"foo bar\\\" } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $containsAllTermsInOrder: \\\"foo bar\\\" } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAllTermsInOrder: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n })\"\n }\n ],\n \"containsAnyTermTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $containsAnyTerm: \\\"foo bar\\\" } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $containsAnyTerm: \\\"foo bar\\\" } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAnyTerm: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAnyTerm: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n })\"\n }\n ],\n \"containsAllTermsTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $containsAllTerms: \\\"foo bar\\\" } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $containsAllTerms: \\\"foo bar\\\" } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $containsAllTerms: \\\"foo bar\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $containsAllTerms: \\\"foo bar\\\" }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n })\"\n }\n ],\n \"equalityTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $eq: {{{propertyValueV2}}} } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $eq: {{{propertyValueV2}}} } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $eq: {{{propertyValueV2}}} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $eq: {{{propertyValueV2}}} }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"inFilterTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { $in: [{{{propertyValueV2}}}] } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { $in: [{{{propertyValueV2}}}] } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $in: [{{{propertyValueV2}}}] }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $in: [{{{propertyValueV2}}}] }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"nullTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $isNull: true }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $isNull: true }\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"rangeTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { $contains: { {{structSubPropertyApiName}}: { ${{operation}}: {{{propertyValueV2}}} } } }\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $contains: { ${{operation}}: {{{propertyValueV2}}} } }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n {{^arrayContains}}\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { ${{operation}}: {{{propertyValueV2}}} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { ${{operation}}: {{{propertyValueV2}}} }\\n {{/structSubPropertyApiName}}\\n {{/arrayContains}}\\n });\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"withinDistanceTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128]} }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { $distance: [100, \\\"{{distanceUnit}}\\\"], $of: [-74.0060, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n })\"\n }\n ],\n \"withinBoundingBoxTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"withinPolygonTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $within: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"intersectsPolygonTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $intersects: { type: \\\"Polygon\\\", coordinates: [[[10.0, 40.0], [20.0, 50.0], [20.0, 30.0], [10.0, 40.0]]]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"intersectsBboxTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $intersects: { $bbox: [-74.0060, 25.123, 80.4231, 40.7128]}}\\n {{/structSubPropertyApiName}}\\n });\"\n }\n ],\n \"notTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $not: { {{property}}: { $eq: {{{propertyValueV2}}} }}});\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"andTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $and:[\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true }}},\\n { {{property}}: { $eq: {{{propertyValueV2}}} }}\\n ]});\",\n \"computedVariables\": [\n \"primaryKeyPropertyV2\",\n \"propertyValueV2\"\n ]\n }\n ],\n \"orTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}ObjectSet = client({{objectType}})\\n .where({ $or:[\\n { $not: { {{primaryKeyPropertyV2.apiName}}: { $isNull: true }}},\\n { {{property}}: { $eq: {{{propertyValueV2}}} }}\\n ]});\",\n \"computedVariables\": [\n \"primaryKeyPropertyV2\",\n \"propertyValueV2\"\n ]\n }\n ],\n \"containsTemplate\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst filteredObjects = client({{objectType}})\\n .where({\\n {{property}}: { $contains: {{{arrayElementValue}}} }\\n })\",\n \"computedVariables\": [\n \"arrayElementValue\"\n ]\n }\n ],\n \"loadInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\nconst response: PageResult<Osdk<{{interfaceApiName}}>>\\n = await client({{interfaceApiName}}).fetchPage({ $pageSize: 30 });\"\n }\n ],\n \"loadAllInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { Osdk } from \\\"@osdk/client\\\";\\n\\nconst interfaces: Osdk<{{interfaceApiName}}>[] = [];\\n\\nfor await(const int of client({{interfaceApiName}}).asyncIter()) {\\n interfaces.push(int);\\n}\\nconst interface1 = interfaces[0];\"\n }\n ],\n \"loadOrderedInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk<{{interfaceApiName}}>> = await client({{interfaceApiName}})\\n .fetchPage({\\n $orderBy: { {{property}}: \\\"asc\\\"},\\n $pageSize: 30\\n });\\n} catch (e) {\\n throw e;\\n}\"\n }\n ],\n \"searchInterfacesReference\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { type Osdk, type PageResult } from \\\"@osdk/client\\\";\\n\\ntry {\\n const page: PageResult<Osdk<{{interfaceApiName}}>> = await client({{interfaceApiName}})\\n .where({\\n {{#structSubPropertyApiName}}\\n {{property}}: { {{structSubPropertyApiName}}: { $startsWith: \\\"foo\\\" }}\\n {{/structSubPropertyApiName}}\\n {{^structSubPropertyApiName}}\\n {{property}}: { $startsWith: \\\"foo\\\" }\\n {{/structSubPropertyApiName}}\\n })\\n .fetchPage({\\n $pageSize: 30\\n });\\n\\n const interfaces = page.data;\\n const interface1 = interfaces[0];\\n} catch (e) {\\n throw e;\\n}\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"loadTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllPoints();\\n}\"\n }\n ],\n \"loadRelativeTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllPoints({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n })\\n}\"\n }\n ],\n \"loadAbsoluteTimeSeriesPointsSnippet\": [\n {\n \"template\": \"import { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport { type Osdk } from \\\"@osdk/client\\\";\\n\\nasync function getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return await obj.{{property}}?.getAllPoints({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }\n ],\n \"loadTimeSeriesFirstPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getFirstTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getFirstPoint();\\n}\"\n }\n ],\n \"loadTimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getLastTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getLastPoint();\\n}\"\n }\n ],\n \"loadGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadGeotimeSeriesLastPointSnippet\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"loadObjectMetadataSnippet\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst objectTypeMetadata = await client.fetchMetadata({{objectType}});\\n\\nif (objectTypeMetadata?.icon?.type === \\\"blueprint\\\") {\\n const blueprintIconName = objectTypeMetadata.icon.name;\\n}\\nconst currentVisibility = objectTypeMetadata.visibility;\\nconst currentDescription = objectTypeMetadata.description;\"\n }\n ],\n \"loadInterfaceMetadataSnippet\": [\n {\n \"template\": \"import { {{interfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst interfaceTypeMetadata = await client.fetchMetadata({{interfaceApiName}});\\n\\nconst implementingObjectTypes = interfaceTypeMetadata.implementedBy;\\nconst interfaceRid = interfaceTypeMetadata.rid;\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"uploadMedia\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"readMedia\": [\n {\n \"template\": \"// Upgrade to 2.1 for official support\"\n }\n ],\n \"derivedPropertyBaseExample\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n })\\n .where({\\n \\\"newPropertyName\\\": { $gt: 0 }\\n }).aggregate({\\n $select: { \\\"newPropertyName:max\\\": \\\"unordered\\\" }\\n })\"\n }\n ],\n \"derivedPropertyApproximateDistinctAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximateDistinct\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyExactDistinctAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:exactDistinct\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCollectToListAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst maxObjectsInList = 75; // Adjust this value as needed between 1 and 100\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectList\\\", { limit: maxObjectsInList })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCollectToSetAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst maxObjectsInSet = 75; // Adjust this value as needed between 1 and 100\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:collectSet\\\", { limit: maxObjectsInSet })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyCountAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertySelectPropertyAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").selectProperty(\\\"{{property}}\\\")\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyApproximatePercentileAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:approximatePercentile\\\", { percentile: 95 })\\n }).fetchPage();\"\n }\n ],\n \"derivedPropertyNumericAggregation\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst sum{{objectType}} = await client({{objectType}})\\n .withProperties({\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"{{property}}:{{operation}}\\\")\\n }).fetchPage();\"\n }\n ],\n \"objectSetOperationsGuide\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n// Object set operations can be chained. e.g. To find all objects in objectSetA\\n// that are present in objectSetB but do not exist in objectSetC:\\nconst result = objectSetA\\n .intersect(objectSetB)\\n .subtract(objectSetC)\"\n }\n ],\n \"objectSetOperationsUnion\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n// Combine objectSetA, objectSetB and objectSetC\\nconst result = objectSetA\\n .union(objectSetB)\\n .union(objectSetC) // alternatively: objectSetA.union(objectSetB, objectSetC)\"\n }\n ],\n \"objectSetOperationsSubtract\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n\\n// Return objects in objectSetA that are not present in either objectSetB or objectSetC\\nconst result = objectSetA\\n .subtract(objectSetB)\\n .subtract(objectSetC) // alternatively: objectSetA.subtract(objectSetB, objectSetC)\"\n }\n ],\n \"objectSetOperationsIntersect\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nconst objectSetA = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"a\\\"}})\\nconst objectSetB = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"b\\\"}})\\nconst objectSetC = client({{objectType}}).where({ {{titleProperty}}: { $containsAnyTerm: \\\"c\\\"}})\\n\\n\\n// Return all objects common to objectSetA, objectSetB and objectSetC\\nconst result = objectSetA\\n .intersect(objectSetB)\\n .intersect(objectSetC) // alternatively: objectSetA.intersect(objectSetB, objectSetC)\"\n }\n ],\n \"searchAround\": [\n {\n \"template\": \"import { {{sourceObjectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\n// Object set containing objects a, b and c\\nconst objects = client({{sourceObjectType}})\\n .where({ {{rawLinkedPrimaryKeyProperty.apiName}}: { $in: [\\\"a\\\", \\\"b\\\", \\\"c\\\"]}});\\n\\n// Traverse the selected link type to find all objects of type\\n// Find {{linkedObjectType}} objects linked to the filtered {{sourceObjectType}} objects\\nconst linkedObjects = await objects.pivotTo(\\\"{{linkApiName}}\\\").fetchPage();\"\n }\n ]\n }\n },\n \"2.1.0\": {\n \"snippets\": {\n \"loadGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAllTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues();\\n}\"\n }\n ],\n \"loadRelativeGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\n// Only supports ranges in the past\\nfunction getRelativeTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $before: 1,\\n $unit: \\\"{{timeUnit}}\\\",\\n })\\n}\"\n }\n ],\n \"loadAbsoluteGeotimeSeriesPointsSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getAbsoluteTimeSeriesPoints(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getAllValues({\\n $startTime: \\\"2022-08-13T12:34:56Z\\\",\\n $endTime: \\\"2022-08-14T12:34:56Z\\\",\\n });\\n}\"\n }\n ],\n \"loadGeotimeSeriesLastPointSnippet\": [\n {\n \"template\": \"import type { Osdk } from \\\"@osdk/client\\\";\\nimport { type {{objectType}} } from \\\"{{{packageName}}}\\\";\\n\\nfunction getLastTimeSeriesPoint(obj: Osdk.Instance<{{objectType}}>) {\\n return obj.{{property}}?.getLatestValue();\\n}\"\n }\n ],\n \"subscribeToObjectSetInstructions\": [\n {\n \"template\": \"import { {{objectOrInterfaceApiName}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst subscription = client({{objectOrInterfaceApiName}}).subscribe(\\n {\\n onChange(update) {\\n if (update.state === \\\"ADDED_OR_UPDATED\\\") {\\n // An object has received an update or an object was added to the object set\\n // Get the object using the $primaryKey from your cache\\n // const currentObject = objects[update.object.$primaryKey];\\n // use the update.object[\\\"<propertyName>\\\"] to update your cache\\n //currentObject[\\\"<propertyName>\\\"] = update.object[\\\"<propertyName>\\\"] ?? currentObject[\\\"<propertyName>\\\"];\\n }\\n else if (update.state === \\\"REMOVED\\\") {\\n // The object was removed from the object set, which could mean it was deleted or no longer meets the filter criteria\\n // Remove the object from your cache using the $primaryKey\\n // delete objects[update.object.$primaryKey];\\n }\\n },\\n onSuccessfulSubscription() {\\n // The subscription was successful and you can expect to receive updates\\n },\\n onError(err) {\\n // There was an error with the subscription and you will not receive any more updates\\n throw new Error(err.error instanceof Error ? err.error.message : String(err.error));\\n },\\n onOutOfDate() {\\n // We could not keep track of all changes. Please reload the objects in your set.\\n },\\n },\\n { properties: [ {{{propertyNames}}} ] }\\n);\\n\\n// To stop receiving updates, call unsubscribe\\nsubscription.unsubscribe();\"\n }\n ],\n \"applyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference, MediaUpload {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference, MediaUpload } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n // alternatively, you can get the Rid from the attachment property on the object type you are modifying\\n // const attachmentRid = objectTypeWithAttachment.{attachmentProperty}?.rid;\\n\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // You can upload media data via your Action\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaUpload: MediaUpload = { data: mediaBlob, fileName: \\\"myMedia\\\" };\\n\\n // You can also pass an existing media reference into your Action\\n const objectPage = await client({{objectType}}).fetchPage();\\n const mediaReference: MediaReference = objectPage.data[0].{{property}}!.getMediaReference();\\n\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).applyAction(\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"batchApplyAction\": [\n {\n \"template\": \"// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n{{#hasAttachmentProperty}}\\nimport type { AttachmentUpload {{#hasMediaParameter}}, MediaReference, MediaUpload {{/hasMediaParameter}} } from \\\"@osdk/api\\\";\\n{{/hasAttachmentProperty}}\\n{{^hasAttachmentProperty}}{{#hasMediaParameter}}\\nimport type { MediaReference, MediaUpload } from \\\"@osdk/api\\\";\\n{{/hasMediaParameter}}{{/hasAttachmentProperty}}\\n{{#hasAttachmentProperty}}\\nimport { createAttachmentUpload } from \\\"@osdk/client\\\";\\n{{/hasAttachmentProperty}}\\nimport { {{actionApiName}} {{#hasMediaParameter}}, {{objectType}} {{/hasMediaParameter}} } from \\\"{{{packageName}}}\\\";\\n\\nasync function callBatchAction() {\\n{{#hasAttachmentProperty}}\\n // Create attachment upload\\n const attachmentFile = await fetch(\\\"file.json\\\");\\n const attachmentBlob = await attachmentFile.blob();\\n const attachment: AttachmentUpload = createAttachmentUpload(attachmentBlob, \\\"myFile\\\");\\n\\n{{/hasAttachmentProperty}}\\n{{#hasMediaParameter}}\\n // You can upload media data via your Action\\n const mediaFile = await fetch(\\\"media.mp4\\\");\\n const mediaBlob = await mediaFile.blob();\\n const mediaUpload: MediaUpload = { data: mediaBlob, fileName: \\\"myMedia\\\" };\\n\\n // You can also pass an existing media reference into your Action\\n const objectPage = await client({{objectType}}).fetchPage();\\n const mediaReference: MediaReference = objectPage.data[0].{{property}}!.getMediaReference();\\n\\n{{/hasMediaParameter}}\\n const result = await client({{actionApiName}}).batchApplyAction([\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n {\\n {{#actionParameterSampleValuesV2}}\\n \\\"{{key}}\\\": {{{value}}},\\n {{/actionParameterSampleValuesV2}}\\n },\\n ],\\n {\\n $returnEdits: true,\\n }\\n );\\n if (result.type === \\\"edits\\\") {\\n // use the result object to report back on action results\\n const updatedObject = result.editedObjectTypes[0];\\n console.log(\\\"Updated object\\\", updatedObject);\\n }\\n}\",\n \"computedVariables\": [\n \"actionParameterSampleValuesV2\"\n ]\n }\n ],\n \"uploadMediaOntologyEdits\": [\n {\n \"template\": \"import type { Client } from \\\"@osdk/client\\\";\\nimport { {{objectType}} } from \\\"{{{packageName}}}\\\";\\nimport type { Edits } from \\\"@osdk/functions\\\";\\nimport { createEditBatch, uploadMedia } from \\\"@osdk/functions\\\";\\n\\nasync function createObject(client: Client): Promise<Edits.Object<{{objectType}}>[]> {\\n const batch = createEditBatch<Edits.Object<{{objectType}}>>(client);\\n\\n const blob = new Blob([\\\"Hello, world\\\"], { type: \\\"text/plain\\\" });\\n const mediaReference = await uploadMedia(client, { data: blob, fileName: \\\"foundryFile.txt\\\" });\\n\\n const props = { myMediaProperty: mediaReference /* Other properties... */ };\\n // @ts-ignore\\n batch.create({{objectType}}, props);\\n\\n return batch.getEdits();\\n}\\n\\nexport default createObject;\"\n }\n ],\n \"uploadMedia\": [\n {\n \"template\": \"import { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \\\"@osdk/api/unstable\\\";\\nimport { {{objectType}}, {{actionApiName}} } from \\\"{{{packageName}}}\\\"\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nimport type { MediaReference } from \\\"@osdk/api\\\";\\n// To upload media with 2.x, it has to be linked to an Action call\\nasync function createMediaReference() {\\n const file = await fetch(\\\"file.json\\\");\\n const data = await file.blob();\\n // Upload media to an object type with a media property. This returns a media reference that can passed to\\n // a media parameter in an Action.\\n return await client(\\n __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference,\\n ).createMediaReference({\\n data,\\n fileName: \\\"myFile\\\",\\n objectType: {{objectType}},\\n propertyType: \\\"{{property}}\\\",\\n });\\n}\\nconst mediaReference: MediaReference = await createMediaReference();\\nconst actionResult = client({{actionApiName}}).applyAction({\\n {{primaryKeyPropertyV2.apiName}}: {{{propertyValueV2}}},\\n {{mediaParameter}}: mediaReference\\n});\",\n \"computedVariables\": [\n \"propertyValueV2\"\n ]\n }\n ],\n \"readMedia\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\nconst result = await client({{objectType}}).fetchOne({{{primaryKeyPropertyValueV2}}});\\n// Fetch metadata of a media property\\nconst mediaMetadata = await result.{{property}}?.fetchMetadata();\\nconsole.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\\n// Fetch contents of a media property\\nconst mediaContent = await result.{{property}}?.fetchContents();\\nif (mediaContent?.ok) {\\n const data = await mediaContent.blob();\\n}\",\n \"computedVariables\": [\n \"primaryKeyPropertyValueV2\"\n ]\n }\n ]\n }\n },\n \"2.4.0\": {\n \"snippets\": {\n \"derivedPropertyNumericExpression\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}WithExpression = await client({{objectType}})\\n .withProperties({\\n {{^isUnary}}\\n \\\"newPropertyName\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .aggregate(\\\"{{property}}\\\").{{operation}}(\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\").aggregate(\\\"$count\\\"))\\n }).fetchPage();\\n {{/isUnary}}\\n {{#isUnary}}\\n \\\"{{operation}}_{{property}}\\\": (baseObjectSet) =>\\n baseObjectSet.pivotTo(\\\"{{linkApiName}}\\\")\\n .selectProperty(\\\"{{property}}\\\").{{operation}}()\\n }).fetchPage();\\n {{/isUnary}}\"\n }\n ],\n \"derivedPropertyDatetimeExpression\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst {{objectType}}WithExpression = await client({{objectType}})\\n .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 }).fetchPage();\"\n }\n ],\n \"nearestNeighborsTextQuery\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\nconst result = await client({{objectType}})\\n .nearestNeighbors(\\\"coffee\\\", 5, \\\"{{property}}\\\")\\n .fetchPage();\"\n }\n ],\n \"nearestNeighborsVectorQuery\": [\n {\n \"template\": \"import { {{objectType}} } from \\\"{{{packageName}}}\\\";\\n// Edit this import if your client location differs\\nimport { client } from \\\"./client\\\";\\n\\n// Note that this vector maps to an arbitrary string\\n// It must match the dimension of the \\\"{{property}}\\\" property: {{vectorDimensionSize}}\\nconst vector_query = Array.from({ length: {{vectorDimensionSize}} }, () => 0.3);\\nconst result = await client({{objectType}})\\n .nearestNeighbors(vector_query, 5, \\\"{{property}}\\\")\\n .fetchPage();\"\n }\n ]\n }\n }\n }\n};\n "],"mappings":"AACA;AACA;;AAKA,OAAO,MAAMA,QAAgD,GAAG;EAC9D,MAAM,EAAE,KAAK;EACb,UAAU,EAAE;IACV,OAAO,EAAE;MACP,UAAU,EAAE;QACV,uBAAuB,EAAE,CACvB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,qBAAqB,EAAE,CACrB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,mBAAmB,EAAE,CACnB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,oBAAoB,EAAE,CACpB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,2BAA2B,EAAE,CAC3B;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,sBAAsB,EAAE,CACtB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,yBAAyB,EAAE,CACzB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,2BAA2B,EAAE,CAC3B;UACE,UAAU,EAAE,6XAA6X;UACzY,mBAAmB,EAAE,CACnB,4BAA4B;QAEhC,CAAC,CACF;QACD,4BAA4B,EAAE,CAC5B;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,qBAAqB,EAAE,CACrB;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,0BAA0B,EAAE,CAC1B;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,wCAAwC,EAAE,CACxC;UACE,UAAU,EAAE;QACd,CAAC,CACF;QACD,kCAAkC,EAAE,CAClC;UACE,UAAU,EAAE;QACd,CA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