@osdk/generator 2.1.0-beta.22 → 2.1.0-beta.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.1.0-beta.23
4
+
5
+ ### Minor Changes
6
+
7
+ - d794c19: Adding support for struct action params.
8
+ - f0b519d: Upgrade to vitest 3 and vite 6
9
+ - 696c59c: Exposes $osdkMetadata from the root of generated packages for clients that want access to $osdkMetadata.extraUserAgent
10
+ - d665147: Update platform sdk deps
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [d794c19]
15
+ - Updated dependencies [f0b519d]
16
+ - Updated dependencies [62c1d63]
17
+ - Updated dependencies [d665147]
18
+ - @osdk/generator-converters@2.1.0-beta.23
19
+ - @osdk/api@2.1.0-beta.23
20
+
3
21
  ## 2.1.0-beta.22
4
22
 
5
23
  ### Minor Changes
@@ -380,7 +380,9 @@ describe("generator", () => {
380
380
  beforeEach(async () => {
381
381
  helper = createMockMinimalFiles();
382
382
  });
383
- test("should be able to generate a project", async () => {
383
+ test("should be able to generate a project", {
384
+ timeout: 20_000
385
+ }, async () => {
384
386
  await generateClientSdkVersionTwoPointZero(TodoWireOntology, "typescript-sdk/0.0.0 osdk-cli/0.0.0", helper.minimalFiles, BASE_PATH);
385
387
  const files = helper.getFiles();
386
388
  expect(files).toMatchObject({
@@ -410,6 +412,7 @@ describe("generator", () => {
410
412
  export * as $Objects from './ontology/objects';
411
413
  export { getCount, returnsTodo } from './ontology/queries';
412
414
  export * as $Queries from './ontology/queries';
415
+ export { $osdkMetadata } from './OntologyMetadata';
413
416
  export { $ontologyRid } from './OntologyMetadata';
414
417
  ",
415
418
  "/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos';
@@ -990,6 +993,7 @@ describe("generator", () => {
990
993
  export * as $Objects from './ontology/objects.js';
991
994
  export { getCount, returnsTodo } from './ontology/queries.js';
992
995
  export * as $Queries from './ontology/queries.js';
996
+ export { $osdkMetadata } from './OntologyMetadata.js';
993
997
  export { $ontologyRid } from './OntologyMetadata.js';
994
998
  ",
995
999
  "/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos.js';
@@ -1842,6 +1846,7 @@ describe("generator", () => {
1842
1846
  export * as $Objects from './ontology/objects.js';
1843
1847
  export {} from './ontology/queries.js';
1844
1848
  export * as $Queries from './ontology/queries.js';
1849
+ export { $osdkMetadata } from './OntologyMetadata.js';
1845
1850
  export { $ontologyRid } from './OntologyMetadata.js';
1846
1851
  ",
1847
1852
  "/foo/ontology/actions.ts": "export {};
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkVersionTwoPointZero.test.js","names":["consola","mkdir","readdir","rmdir","writeFile","immer","beforeEach","describe","expect","it","test","vi","compileThis","createMockMinimalFiles","TodoWireOntology","generateClientSdkVersionTwoPointZero","changeValue","draft","key","oldValue","newValue","changeKey","oldInterfaceName","newInterfaceName","changeArrayEntry","oldNew","newName","idx","findIndex","a","changeEachEntry","wireData","data","changer","changeSelf","oldName","Object","entries","k","keys","changeDataType","dataType","oldObjectName","newObjectName","type","subType","objectTypeApiName","objectApiName","changeNames","ontology","newNames","produce","sharedPropertyTypes","spts","oldSptName","newSptName","queryTypes","queries","oldActionName","newActionName","apiName","actionTypes","actions","interfaceTypes","interfaces","ifaceType","oldIfaceName","newIfaceName","extendsInterfaces","map","v","properties","property","objectTypes","objectType","implementsInterfaces","implementsInterfaces2","objects","queryType","output","values","parameters","linkTypes","l","action","op","operations","referencedOntology","sharedPropertyTypeMapping","displayName","pluralDisplayName","icon","color","name","titleProperty","rid","implementedByObjectTypes","links","allExtendsInterfaces","allLinks","allProperties","referencingOntology","primaryKey","status","getTask","version","fooBarTodoWireOntology","markTodoCompleted","deleteTodos","BASE_PATH","helper","minimalFiles","files","getFiles","toMatchObject","anything","diagnostics","q","console","error","file","fileName","getLineStarts","messageText","errors","filter","code","toHaveLength","tweakedFilesForSnapshotConsistency","toMatchInlineSnapshot","fn","rejects","toThrow","undefined","resolves","toBeUndefined","not","toEqual","skip","__dirname","recursive","e","path","contents","flag","options","Map","toContain","mockConsola","spyOn","toHaveBeenCalledWith","ret","replace"],"sources":["generateClientSdkVersionTwoPointZero.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { consola } from \"consola\";\nimport { mkdir, readdir, rmdir, writeFile } from \"fs/promises\";\nimport * as immer from \"immer\";\nimport { beforeEach, describe, expect, it, test, vi } from \"vitest\";\nimport { compileThis } from \"../util/test/compileThis.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generateClientSdkVersionTwoPointZero } from \"./generateClientSdkVersionTwoPointZero.js\";\nfunction changeValue(draft, key, oldValue, newValue) {\n if (draft[key] === oldValue) {\n draft[key] = newValue;\n }\n}\nfunction changeKey(draft, oldInterfaceName, newInterfaceName) {\n if (draft[oldInterfaceName]) {\n draft[newInterfaceName] = draft[oldInterfaceName];\n delete draft[oldInterfaceName];\n }\n}\nfunction changeArrayEntry(draft, oldNew, newName) {\n const idx = draft.findIndex(a => a === oldNew);\n if (idx >= 0) {\n draft[idx] = newName;\n }\n}\nfunction changeEachEntry(wireData, data, changer, changeSelf) {\n for (const [oldName, newName] of Object.entries(data)) {\n for (const k of Object.keys(wireData)) {\n changer(wireData[k], oldName, newName);\n if (changeSelf && k === oldName) {\n wireData[newName] = wireData[k];\n delete wireData[k];\n }\n }\n }\n}\nfunction changeDataType(dataType, oldObjectName, newObjectName) {\n if (dataType.type === \"array\") {\n changeDataType(dataType.subType, oldObjectName, newObjectName);\n }\n else if (dataType.type === \"object\" || dataType.type === \"objectSet\") {\n if (dataType.objectTypeApiName === oldObjectName) {\n dataType.objectTypeApiName = newObjectName;\n }\n if (dataType.objectApiName === oldObjectName) {\n dataType.objectApiName = newObjectName;\n }\n }\n}\nfunction changeNames(ontology, newNames) {\n return immer.produce(ontology, (draft) => {\n // Handle spt renames\n changeEachEntry(draft.sharedPropertyTypes, newNames.spts, (draft, oldSptName, newSptName) => {\n changeValue(draft, \"apiName\", oldSptName, newSptName);\n }, true);\n // Handle query renames\n changeEachEntry(draft.queryTypes, newNames.queries, (draft, oldActionName, newActionName) => {\n if (draft.apiName === oldActionName) {\n draft.apiName = newActionName;\n }\n }, true);\n // Handle action renames\n changeEachEntry(draft.actionTypes, newNames.actions, (draft, oldActionName, newActionName) => {\n changeValue(draft, \"apiName\", oldActionName, newActionName);\n }, true);\n // Handle interface renames\n changeEachEntry(draft.interfaceTypes, newNames.interfaces, (ifaceType, oldIfaceName, newIfaceName) => {\n changeValue(ifaceType, \"apiName\", oldIfaceName, newIfaceName);\n ifaceType.extendsInterfaces = ifaceType.extendsInterfaces.map(v => v === oldIfaceName ? newIfaceName : v);\n changeEachEntry(ifaceType.properties, newNames.spts, (property, oldSptName, newSptName) => {\n changeValue(property, \"apiName\", oldSptName, newSptName);\n }, true);\n }, true);\n changeEachEntry(draft.objectTypes, newNames.interfaces, (objectType, oldIfaceName, newIfaceName) => {\n changeArrayEntry(objectType.implementsInterfaces, oldIfaceName, newIfaceName);\n changeKey(objectType.implementsInterfaces2, oldIfaceName, newIfaceName);\n });\n // Handle object renames\n changeEachEntry(draft.queryTypes, newNames.objects, (queryType, oldObjectName, newObjectName) => {\n changeDataType(queryType.output, oldObjectName, newObjectName);\n for (const { dataType } of Object.values(queryType.parameters)) {\n changeDataType(dataType, oldObjectName, newObjectName);\n }\n });\n changeEachEntry(draft.objectTypes, newNames.objects, ({ objectType, linkTypes }, oldObjectName, newObjectName) => {\n changeValue(objectType, \"apiName\", oldObjectName, newObjectName);\n for (const l of linkTypes) {\n changeValue(l, \"objectTypeApiName\", oldObjectName, newObjectName);\n }\n }, true);\n changeEachEntry(draft.actionTypes, newNames.objects, (action, oldObjectName, newObjectName) => {\n for (const op of action.operations) {\n switch (op.type) {\n case \"deleteObject\":\n case \"modifyObject\":\n case \"createObject\":\n if (op.objectTypeApiName === oldObjectName) {\n op.objectTypeApiName = newObjectName;\n }\n }\n }\n for (const { dataType } of Object.values(action.parameters)) {\n changeDataType(dataType, oldObjectName, newObjectName);\n }\n });\n });\n}\nconst referencedOntology = {\n \"ontology\": {\n \"apiName\": \"dep\",\n \"rid\": \"ri.ontology.main.ontology.dep\",\n \"displayName\": \"\",\n \"description\": \"\",\n },\n \"actionTypes\": {},\n \"objectTypes\": {\n \"com.example.dep.Task\": {\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n \"objectType\": {\n \"apiName\": \"com.example.dep.Task\",\n \"primaryKey\": \"taskId\",\n displayName: \"Task\",\n pluralDisplayName: \"Tasks\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n titleProperty: \"taskId\",\n \"properties\": {\n \"taskId\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"rid\": \"ridForTaskId\",\n },\n \"body\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"rid\": \"ridForBody\",\n },\n \"shouldBeIgnored\": {\n \"dataType\": {\n \"type\": \"futureUnknownType\",\n },\n \"rid\": \"ridForShouldBeIgnored\",\n },\n },\n \"status\": \"ACTIVE\",\n \"rid\": \"ridForTask\",\n },\n \"linkTypes\": [],\n },\n },\n \"queryTypes\": {},\n \"interfaceTypes\": {\n \"com.example.dep.SomeInterface\": {\n apiName: \"com.example.dep.SomeInterface\",\n rid: \"idk2\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n properties: {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n implementedByObjectTypes: [],\n links: {},\n allExtendsInterfaces: [],\n allLinks: {},\n allProperties: {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n};\nconst referencingOntology = {\n ontology: TodoWireOntology.ontology,\n \"actionTypes\": {\n \"setTaskBody\": {\n \"apiName\": \"setTaskBody\",\n \"parameters\": {\n \"task\": {\n \"dataType\": {\n \"type\": \"object\",\n \"objectApiName\": \"com.example.dep.Task\",\n \"objectTypeApiName\": \"com.example.dep.Task\",\n },\n \"required\": true,\n },\n \"body\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"required\": true,\n },\n },\n \"status\": \"ACTIVE\",\n \"rid\": \"ri.a.b.c.d\",\n \"operations\": [\n {\n \"type\": \"modifyObject\",\n \"objectTypeApiName\": \"com.example.dep.Task\",\n },\n ],\n },\n },\n interfaceTypes: {\n ...referencedOntology.interfaceTypes,\n },\n objectTypes: {\n ...referencedOntology.objectTypes,\n \"Thing\": {\n implementsInterfaces: [\"com.example.dep.SomeInterface\"],\n implementsInterfaces2: {\n \"com.example.dep.SomeInterface\": {\n properties: {\n \"com.example.dep.spt\": \"body\",\n },\n },\n },\n linkTypes: [],\n objectType: {\n apiName: \"Thing\",\n displayName: \"Thing\",\n pluralDisplayName: \"Things\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n primaryKey: \"id\",\n properties: {\n \"id\": {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n \"body\": {\n dataType: {\n type: \"string\",\n },\n \"rid\": \"rid\",\n },\n },\n rid: \"ridForThing\",\n status: \"ACTIVE\",\n titleProperty: \"id\",\n },\n sharedPropertyTypeMapping: {},\n },\n \"UsesForeignSpt\": {\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"UsesForeignSpt\",\n primaryKey: \"id\",\n displayName: \"Uses Foreign Spt\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n pluralDisplayName: \"Uses Foreign Spts\",\n properties: {\n \"id\": {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n \"body\": {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n rid: \"theRid\",\n status: \"ACTIVE\",\n titleProperty: \"id\",\n },\n sharedPropertyTypeMapping: {\n \"com.example.dep.spt\": \"body\",\n },\n },\n },\n queryTypes: {\n getTask: {\n apiName: \"getTask\",\n output: {\n type: \"object\",\n objectApiName: \"com.example.dep.Task\",\n objectTypeApiName: \"com.example.dep.Task\",\n },\n parameters: {\n \"a\": {\n dataType: {\n type: \"object\",\n objectApiName: \"com.example.dep.Task\",\n objectTypeApiName: \"com.example.dep.Task\",\n },\n },\n },\n rid: \"ri.a.b.c\",\n version: \"0\",\n },\n },\n sharedPropertyTypes: {},\n};\nconst fooBarTodoWireOntology = changeNames(TodoWireOntology, {\n objects: { \"Todo\": \"foo.bar.Todo\", \"Person\": \"foo.bar.Person\" },\n actions: {\n markTodoCompleted: \"foo.bar.markTodoCompleted\",\n deleteTodos: \"foo.bar.deleteTodos\",\n },\n interfaces: {\n \"SomeInterface\": \"foo.bar.SomeInterface\",\n },\n queries: {\n \"getCount\": \"foo.bar.getCount\",\n \"returnsTodo\": \"foo.bar.returnsTodo\",\n },\n spts: {\n \"SomeProperty\": \"foo.bar.SomeProperty\",\n },\n});\nconst BASE_PATH = \"/foo\";\ndescribe(\"generator\", () => {\n let helper;\n beforeEach(async () => {\n helper = createMockMinimalFiles();\n });\n test(\"should be able to generate a project\", async () => {\n await generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", helper.minimalFiles, BASE_PATH);\n const files = helper.getFiles();\n expect(files).toMatchObject({\n [`${BASE_PATH}/index.ts`]: expect.anything(),\n [`${BASE_PATH}/OntologyMetadata.ts`]: expect.anything(),\n [`${BASE_PATH}/ontology/objects/Todo.ts`]: expect.anything(),\n });\n const diagnostics = compileThis(helper.getFiles(), BASE_PATH);\n for (const q of diagnostics) {\n console.error(`${q.file?.fileName}:${q.file?.getLineStarts()}`, q.messageText);\n }\n // TODO: Certain errors are expected since we can't resolve the static code, but we should fix them.\n const errors = diagnostics.filter(q => q.code !== 2792);\n expect(errors).toHaveLength(0);\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles())).toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: 'typescript-sdk/0.0.0 osdk-cli/0.0.0' };\n\n export const $ontologyRid = 'ridHere';\n \",\n \"/foo/index.ts\": \"export { deleteTodos, markTodoCompleted } from './ontology/actions';\n export * as $Actions from './ontology/actions';\n export { SomeInterface } from './ontology/interfaces';\n export * as $Interfaces from './ontology/interfaces';\n export { Person, Todo } from './ontology/objects';\n export * as $Objects from './ontology/objects';\n export { getCount, returnsTodo } from './ontology/queries';\n export * as $Queries from './ontology/queries';\n export { $ontologyRid } from './OntologyMetadata';\n \",\n \"/foo/ontology/actions.ts\": \"export { deleteTodos } from './actions/deleteTodos';\n export { markTodoCompleted } from './actions/markTodoCompleted';\n \",\n \"/foo/ontology/actions/deleteTodos.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace deleteTodos {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'Todo(s) to be deleted';\n multiplicity: true;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes in an array of objects\n */\n export interface Params {\n /**\n * Todo(s) to be deleted\n */\n readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes in an array of objects\n */\n applyAction<P extends deleteTodos.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<deleteTodos.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes in an array of objects\n * @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted\n */\n export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'deleteTodos';\n description: 'An action which takes in an array of objects';\n modifiedEntities: {};\n parameters: deleteTodos.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: deleteTodos.Signatures;\n };\n apiName: 'deleteTodos';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const deleteTodos: deleteTodos = {\n apiName: 'deleteTodos',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/actions/markTodoCompleted.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace markTodoCompleted {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'A Todo to mark completed';\n multiplicity: false;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes different types of parameters\n */\n export interface Params {\n /**\n * A Todo to mark completed\n */\n readonly object?: ActionParam.ObjectType<Todo>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes different types of parameters\n */\n applyAction<P extends markTodoCompleted.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<markTodoCompleted.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes different types of parameters\n * @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed\n */\n export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'markTodoCompleted';\n description: 'An action which takes different types of parameters';\n modifiedEntities: {\n Todo: {\n created: false;\n modified: true;\n };\n };\n parameters: markTodoCompleted.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: markTodoCompleted.Signatures;\n };\n apiName: 'markTodoCompleted';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const markTodoCompleted: markTodoCompleted = {\n apiName: 'markTodoCompleted',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/client';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'SomeProperty';\n\n export interface Props {\n readonly SomeProperty: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'SomeInterface';\n description: 'Some interface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Sum Property',\n * description: Some property\n */\n SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Person } from './objects/Person';\n export { Todo } from './objects/Todo';\n \",\n \"/foo/ontology/objects/Person.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import type { Todo } from './Todo';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Person {\n export type PropertyKeys = 'email';\n\n export interface Links {\n readonly Todos: Todo.ObjectSet;\n }\n\n export interface Props {\n readonly email: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = $Osdk.Instance<Person, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Person extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'Person';\n __DefinitionMetadata?: {\n objectSet: Person.ObjectSet;\n props: Person.Props;\n linksType: Person.Links;\n strictProps: Person.StrictProps;\n apiName: 'Person';\n description: 'A person';\n displayName: 'Person';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {\n Todos: $ObjectMetadata.Link<Todo, true>;\n };\n pluralDisplayName: 'Persons';\n primaryKeyApiName: 'email';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n email: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForPerson';\n status: 'ACTIVE';\n titleProperty: 'email';\n type: 'object';\n };\n }\n\n export const Person: Person = {\n type: 'object',\n apiName: 'Person',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects/Todo.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import type { Person } from './Person';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Todo {\n export type PropertyKeys = 'id' | 'body' | 'complete';\n\n export interface Links {\n readonly Assignee: $SingleLinkAccessor<Person>;\n }\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly complete: $PropType['boolean'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = $Osdk.Instance<Todo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Todo extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'Todo';\n __DefinitionMetadata?: {\n objectSet: Todo.ObjectSet;\n props: Todo.Props;\n linksType: Todo.Links;\n strictProps: Todo.StrictProps;\n apiName: 'Todo';\n description: 'Its a todo item.';\n displayName: 'AwesomeTodoDisplayname';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: ['SomeInterface'];\n interfaceMap: {\n SomeInterface: {\n SomeProperty: 'body';\n };\n };\n inverseInterfaceMap: {\n SomeInterface: {\n body: 'SomeProperty';\n };\n };\n links: {\n Assignee: $ObjectMetadata.Link<Person, false>;\n };\n pluralDisplayName: 'AwesomeTodoDisplayNames';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * display name: 'Body',\n * description: The text of the todo\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n complete: $PropertyDef<'boolean', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'ridForTodo';\n status: 'ACTIVE';\n titleProperty: 'body';\n type: 'object';\n };\n }\n\n export const Todo: Todo = {\n type: 'object',\n apiName: 'Todo',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount';\n export { returnsTodo } from './queries/returnsTodo';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import { $osdkMetadata } from '../../OntologyMetadata';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'getCount';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'getCount',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'returnsTodo';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'returnsTodo',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n });\n test(\"throws an error when target destination is not empty\", async () => {\n helper.minimalFiles.readdir = vi.fn(async (_path) => [\"file\"]);\n await expect(async () => {\n await expect(generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", helper.minimalFiles, BASE_PATH)).rejects.toThrow();\n });\n });\n it(\"throws an error if a namespace is provided that all top levels do not use\", async () => {\n await expect(generateClientSdkVersionTwoPointZero({ ...TodoWireOntology }, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, undefined, undefined, true));\n // Disabled for now since we can't really enforce it from dev console at the moment\n // .rejects.toThrowErrorMatchingInlineSnapshot(\n // `[Error: Found type { ns:'undefined', shortName: 'Todo'} but it is not in the generation namespace 'foo.bar'. This violates the contract of the generator.]`,\n // );\n });\n it(\"does not throw an error if a namespace is provided that all top levels use\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(fooBarTodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, undefined, undefined, true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/objects/foo.bar.Todo.ts\"])\n .toBeUndefined();\n expect(helper.getFiles()[\"/foo/ontology/objects/Todo.ts\"])\n .not.toBeUndefined();\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles()))\n .toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: '' };\n\n export const $ontologyRid = 'ridHere';\n \",\n \"/foo/index.ts\": \"export { deleteTodos, markTodoCompleted } from './ontology/actions.js';\n export * as $Actions from './ontology/actions.js';\n export { SomeInterface } from './ontology/interfaces.js';\n export * as $Interfaces from './ontology/interfaces.js';\n export { Person, Todo } from './ontology/objects.js';\n export * as $Objects from './ontology/objects.js';\n export { getCount, returnsTodo } from './ontology/queries.js';\n export * as $Queries from './ontology/queries.js';\n export { $ontologyRid } from './OntologyMetadata.js';\n \",\n \"/foo/ontology/actions.ts\": \"export { deleteTodos } from './actions/deleteTodos.js';\n export { markTodoCompleted } from './actions/markTodoCompleted.js';\n \",\n \"/foo/ontology/actions/deleteTodos.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace deleteTodos {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'Todo(s) to be deleted';\n multiplicity: true;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes in an array of objects\n */\n export interface Params {\n /**\n * Todo(s) to be deleted\n */\n readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes in an array of objects\n */\n applyAction<P extends deleteTodos.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<deleteTodos.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes in an array of objects\n * @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted\n */\n export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.deleteTodos';\n description: 'An action which takes in an array of objects';\n modifiedEntities: {};\n parameters: deleteTodos.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: deleteTodos.Signatures;\n };\n apiName: 'foo.bar.deleteTodos';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const deleteTodos: deleteTodos = {\n apiName: 'foo.bar.deleteTodos',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/actions/markTodoCompleted.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace markTodoCompleted {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'A Todo to mark completed';\n multiplicity: false;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes different types of parameters\n */\n export interface Params {\n /**\n * A Todo to mark completed\n */\n readonly object?: ActionParam.ObjectType<Todo>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes different types of parameters\n */\n applyAction<P extends markTodoCompleted.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<markTodoCompleted.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes different types of parameters\n * @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed\n */\n export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.markTodoCompleted';\n description: 'An action which takes different types of parameters';\n modifiedEntities: {\n 'foo.bar.Todo': {\n created: false;\n modified: true;\n };\n };\n parameters: markTodoCompleted.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: markTodoCompleted.Signatures;\n };\n apiName: 'foo.bar.markTodoCompleted';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const markTodoCompleted: markTodoCompleted = {\n apiName: 'foo.bar.markTodoCompleted',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface.js';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/api';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'SomeProperty';\n\n export interface Props {\n readonly SomeProperty: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'foo.bar.SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'foo.bar.SomeInterface';\n description: 'Some interface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Sum Property',\n * description: Some property\n */\n SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'foo.bar.SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Person } from './objects/Person.js';\n export { Todo } from './objects/Todo.js';\n \",\n \"/foo/ontology/objects/Person.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type { Todo } from './Todo.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace Person {\n export type PropertyKeys = 'email';\n\n export interface Links {\n readonly Todos: Todo.ObjectSet;\n }\n\n export interface Props {\n readonly email: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = $Osdk.Instance<Person, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Person extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'foo.bar.Person';\n __DefinitionMetadata?: {\n objectSet: Person.ObjectSet;\n props: Person.Props;\n linksType: Person.Links;\n strictProps: Person.StrictProps;\n apiName: 'foo.bar.Person';\n description: 'A person';\n displayName: 'Person';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {\n Todos: $ObjectMetadata.Link<Todo, true>;\n };\n pluralDisplayName: 'Persons';\n primaryKeyApiName: 'email';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n email: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForPerson';\n status: 'ACTIVE';\n titleProperty: 'email';\n type: 'object';\n };\n }\n\n export const Person: Person = {\n type: 'object',\n apiName: 'foo.bar.Person',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects/Todo.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type { Person } from './Person.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace Todo {\n export type PropertyKeys = 'id' | 'body' | 'complete';\n\n export interface Links {\n readonly Assignee: $SingleLinkAccessor<Person>;\n }\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly complete: $PropType['boolean'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = $Osdk.Instance<Todo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Todo extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'foo.bar.Todo';\n __DefinitionMetadata?: {\n objectSet: Todo.ObjectSet;\n props: Todo.Props;\n linksType: Todo.Links;\n strictProps: Todo.StrictProps;\n apiName: 'foo.bar.Todo';\n description: 'Its a todo item.';\n displayName: 'AwesomeTodoDisplayname';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: ['foo.bar.SomeInterface'];\n interfaceMap: {\n 'foo.bar.SomeInterface': {\n SomeProperty: 'body';\n };\n };\n inverseInterfaceMap: {\n 'foo.bar.SomeInterface': {\n body: 'SomeProperty';\n };\n };\n links: {\n Assignee: $ObjectMetadata.Link<Person, false>;\n };\n pluralDisplayName: 'AwesomeTodoDisplayNames';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * display name: 'Body',\n * description: The text of the todo\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n complete: $PropertyDef<'boolean', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'ridForTodo';\n status: 'ACTIVE';\n titleProperty: 'body';\n type: 'object';\n };\n }\n\n export const Todo: Todo = {\n type: 'object',\n apiName: 'foo.bar.Todo',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount.js';\n export { returnsTodo } from './queries/returnsTodo.js';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'foo.bar.getCount';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'foo.bar.getCount',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'foo.bar.Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'foo.bar.Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'foo.bar.returnsTodo';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'foo.bar.returnsTodo',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n });\n it(\"guards against empty objects\", async () => {\n await generateClientSdkVersionTwoPointZero({\n ontology: TodoWireOntology.ontology,\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n queryTypes: {},\n sharedPropertyTypes: {},\n }, \"\", helper.minimalFiles, BASE_PATH);\n expect(helper.getFiles()[`${BASE_PATH}/ontology/objects.ts`]).toEqual(\"export {};\\n\");\n });\n test.skip(\"runs generator locally\", async () => {\n try {\n await rmdir(`${__dirname}/generated`, { recursive: true });\n }\n catch (e) {\n }\n await mkdir(`${__dirname}/generated`, { recursive: true });\n await generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", {\n writeFile: async (path, contents) => {\n await writeFile(path, contents, { flag: \"w\" });\n },\n mkdir: async (path, options) => {\n await mkdir(path, options);\n },\n readdir: async (path) => await readdir(path),\n }, `${__dirname}/generated/`);\n });\n describe(\"$ontologyRid\", () => {\n it(\"does not exist when an ontology api name is provided\", async () => {\n const BASE_PATH = \"/foo\";\n await expect(generateClientSdkVersionTwoPointZero(fooBarTodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map())).resolves.toMatchInlineSnapshot(`undefined`);\n // expect(helper.getFiles()[\"/foo/index.ts\"]).not.toContain(\n // \"$ontologyRid\",\n // );\n });\n it(\"does exist when an ontology api name is not provided\", async () => {\n const BASE_PATH = \"/foo\";\n await expect(generateClientSdkVersionTwoPointZero(TodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, new Map())).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/index.ts\"]).toContain(\"$ontologyRid\");\n });\n });\n describe(\"query depends on foreign object\", () => {\n it(\"generates the correct code\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/queries/getTask.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Task as $Imported$com$example$dep$Task } from '@com.example.dep/osdk';\n\n export namespace getTask {\n export interface Signature {\n (query: getTask.Parameters): Promise<getTask.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly a: QueryParam.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n export type ReturnType = QueryResult.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n export interface getTask extends QueryDefinition<getTask.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getTask';\n rid: 'ri.a.b.c';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n a: {\n nullable: false;\n object: 'com.example.dep.Task';\n type: 'object';\n __OsdkTargetType?: $Imported$com$example$dep$Task;\n };\n };\n output: {\n nullable: false;\n object: 'com.example.dep.Task';\n type: 'object';\n __OsdkTargetType?: $Imported$com$example$dep$Task;\n };\n signature: getTask.Signature;\n };\n apiName: 'getTask';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getTask: getTask = {\n apiName: 'getTask',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n describe(\"object uses on foreign spt\", () => {\n it(\"stuff\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/objects/UsesForeignSpt.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace UsesForeignSpt {\n export type PropertyKeys = 'id' | 'body';\n\n export type Links = {};\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<UsesForeignSpt, UsesForeignSpt.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof UsesForeignSpt.Props = keyof UsesForeignSpt.Props,\n > = $Osdk.Instance<UsesForeignSpt, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof UsesForeignSpt.Props = keyof UsesForeignSpt.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface UsesForeignSpt extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'UsesForeignSpt';\n __DefinitionMetadata?: {\n objectSet: UsesForeignSpt.ObjectSet;\n props: UsesForeignSpt.Props;\n linksType: UsesForeignSpt.Links;\n strictProps: UsesForeignSpt.StrictProps;\n apiName: 'UsesForeignSpt';\n displayName: 'Uses Foreign Spt';\n icon: {\n type: 'blueprint';\n color: 'blue';\n name: 'document';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: 'Uses Foreign Spts';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * (no ontology metadata)\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'theRid';\n status: 'ACTIVE';\n titleProperty: 'id';\n type: 'object';\n };\n }\n\n export const UsesForeignSpt: UsesForeignSpt = {\n type: 'object',\n apiName: 'UsesForeignSpt',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n describe(\"action depends on foreign object\", () => {\n it(\"can generate the action\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/actions/setTaskBody.ts\"])\n .toMatchInlineSnapshot(`\n \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Task as $Imported$com$example$dep$Task } from '@com.example.dep/osdk';\n\n export namespace setTaskBody {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n body: {\n multiplicity: false;\n nullable: false;\n type: 'string';\n };\n task: {\n multiplicity: false;\n nullable: false;\n type: ActionMetadata.DataType.Object<$Imported$com$example$dep$Task>;\n };\n };\n\n export interface Params {\n readonly body: ActionParam.PrimitiveType<'string'>;\n\n readonly task: ActionParam.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n applyAction<P extends setTaskBody.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<setTaskBody.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * @param {ActionParam.PrimitiveType<\"string\">} body\n * @param {ActionParam.ObjectType<$Imported$com$example$dep$Task>} task\n */\n export interface setTaskBody extends ActionDefinition<setTaskBody.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'setTaskBody';\n modifiedEntities: {\n 'com.example.dep.Task': {\n created: false;\n modified: true;\n };\n };\n parameters: setTaskBody.ParamsDefinition;\n rid: 'ri.a.b.c.d';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: setTaskBody.Signatures;\n };\n apiName: 'setTaskBody';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const setTaskBody: setTaskBody = {\n apiName: 'setTaskBody',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n it(\"can generate an sdk package that is entirely a library\", async () => {\n const mockConsola = vi.spyOn(consola, \"info\");\n await expect(generateClientSdkVersionTwoPointZero(referencedOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\")).resolves.toMatchInlineSnapshot(`undefined`);\n expect(mockConsola).toHaveBeenCalledWith(`{\"type\":\"futureUnknownType\"} is not a supported propertyType`);\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles()))\n .toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: '' };\n\n export const $ontologyRid = 'ri.ontology.main.ontology.dep';\n \",\n \"/foo/index.ts\": \"export {} from './ontology/actions.js';\n export * as $Actions from './ontology/actions.js';\n export { SomeInterface } from './ontology/interfaces.js';\n export * as $Interfaces from './ontology/interfaces.js';\n export { Task } from './ontology/objects.js';\n export * as $Objects from './ontology/objects.js';\n export {} from './ontology/queries.js';\n export * as $Queries from './ontology/queries.js';\n export { $ontologyRid } from './OntologyMetadata.js';\n \",\n \"/foo/ontology/actions.ts\": \"export {};\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface.js';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/client';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'spt';\n\n export interface Props {\n readonly spt: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'com.example.dep.SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'com.example.dep.SomeInterface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Some Property'\n */\n spt: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk2';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'com.example.dep.SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Task } from './objects/Task.js';\n \",\n \"/foo/ontology/objects/Task.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Task {\n export type PropertyKeys = 'taskId' | 'body';\n\n export type Links = {};\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly taskId: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Task, Task.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Task.Props = keyof Task.Props,\n > = $Osdk.Instance<Task, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Task.Props = keyof Task.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Task extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'com.example.dep.Task';\n __DefinitionMetadata?: {\n objectSet: Task.ObjectSet;\n props: Task.Props;\n linksType: Task.Links;\n strictProps: Task.StrictProps;\n apiName: 'com.example.dep.Task';\n displayName: 'Task';\n icon: {\n type: 'blueprint';\n color: 'blue';\n name: 'document';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: 'Tasks';\n primaryKeyApiName: 'taskId';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n taskId: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForTask';\n status: 'ACTIVE';\n titleProperty: 'taskId';\n type: 'object';\n };\n }\n\n export const Task: Task = {\n type: 'object',\n apiName: 'com.example.dep.Task',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export {};\n \",\n }\n `);\n });\n});\nfunction tweakedFilesForSnapshotConsistency(files) {\n const ret = { ...files };\n ret[\"/foo/OntologyMetadata.ts\"] = ret[\"/foo/OntologyMetadata.ts\"].replace(/export type \\$ExpectedClientVersion = '.*?';/, `export type $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ACvDtH,MAAM,CAACoH,MAAM,CAAC,CAACG,YAAY,CAAC,CAAC,CAAC;IAC9BvH,MAAM,CAACwH,kCAAkC,CAAClB,MAAM,CAACG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACgB,qBAAqB,CAAC;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFvH,IAAI,CAAC,sDAAsD,EAAE,YAAY;IACrEoG,MAAM,CAACC,YAAY,CAAC7G,OAAO,GAAGS,EAAE,CAACuH,EAAE,CAAC,YAAiB,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM1H,MAAM,CAAC,YAAY;MACrB,MAAMA,MAAM,CAACO,oCAAoC,CAACD,gBAAgB,EAAE,qCAAqC,EAAEgG,MAAM,CAACC,YAAY,EAAEF,SAAS,CAAC,CAAC,CAACsB,OAAO,CAACC,OAAO,CAAC,CAAC;IACjK,CAAC,CAAC;EACN,CAAC,CAAC;EACF3H,EAAE,CAAC,2EAA2E,EAAE,YAAY;IACxF,MAAMD,MAAM,CAACO,oCAAoC,CAAC;MAAE,GAAGD;IAAiB,CAAC,EAAE,EAAE,EAAEgG,MAAM,CAACC,YAAY,EAAEF,SAAS,EAAE,QAAQ,EAAEwB,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAE,IAAI,CAAC,CAAC;IAChK;IACA;IACA;IACA;EACJ,CAAC,CAAC;EACF5H,EAAE,CAAC,4EAA4E,EAAE,YAAY;IACzF,MAAMD,MAAM,CAACO,oCAAoC,CAAC2F,sBAAsB,EAAE,EAAE,EAAEI,MAAM,CAACC,YAAY,EAAEF,SAAS,EAAE,QAAQ,EAAEwB,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAE,IAAI,CAAC,CAAC,CAACC,QAAQ,CAACL,qBAAqB,CAAC,WAAW,CAAC;IAC3MzH,MAAM,CAACsG,MAAM,CAACG,QAAQ,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAC7DsB,aAAa,CAAC,CAAC;IACpB/H,MAAM,CAACsG,MAAM,CAACG,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CACrDuB,GAAG,CAACD,aAAa,CAAC,CAAC;IACxB/H,MAAM,CAACwH,kCAAkC,CAAClB,MAAM,CAACG,QAAQ,CAAC,CAAC,CAAC,CAAC,CACxDgB,qBAAqB,CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;EACFxH,EAAE,CAAC,8BAA8B,EAAE,YAAY;IAC3C,MAAMM,oCAAoC,CAAC;MACvCkC,QAAQ,EAAEnC,gBAAgB,CAACmC,QAAQ;MACnCY,WAAW,EAAE,CAAC,CAAC;MACfE,cAAc,EAAE,CAAC,CAAC;MAClBU,WAAW,EAAE,CAAC,CAAC;MACfjB,UAAU,EAAE,CAAC,CAAC;MACdJ,mBAAmB,EAAE,CAAC;IAC1B,CAAC,EAAE,EAAE,EAAE0D,MAAM,CAACC,YAAY,EAAEF,SAAS,CAAC;IACtCrG,MAAM,CAACsG,MAAM,CAACG,QAAQ,CAAC,CAAC,CAAC,GAAGJ,SAAS,sBAAsB,CAAC,CAAC,CAAC4B,OAAO,CAAC,cAAc,CAAC;EACzF,CAAC,CAAC;EACF/H,IAAI,CAACgI,IAAI,CAAC,wBAAwB,EAAE,YAAY;IAC5C,IAAI;M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ACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;AACN,CAAC,CAAC;AACF,SAASD,kCAAkCA,CAAChB,KAAK,EAAE;EAC/C,MAAMuC,GAAG,GAAG;IAAE,GAAGvC;EAAM,CAAC;EACxBuC,GAAG,CAAC,0BAA0B,CAAC,GAAGA,GAAG,CAAC,0BAA0B,CAAC,CAACC,OAAO,CAAC,8CAA8C,EAAE,qDAAqD,CAAC;EAChL,OAAOD,GAAG;AACd","ignoreList":[]}
1
+ {"version":3,"file":"generateClientSdkVersionTwoPointZero.test.js","names":["consola","mkdir","readdir","rmdir","writeFile","immer","beforeEach","describe","expect","it","test","vi","compileThis","createMockMinimalFiles","TodoWireOntology","generateClientSdkVersionTwoPointZero","changeValue","draft","key","oldValue","newValue","changeKey","oldInterfaceName","newInterfaceName","changeArrayEntry","oldNew","newName","idx","findIndex","a","changeEachEntry","wireData","data","changer","changeSelf","oldName","Object","entries","k","keys","changeDataType","dataType","oldObjectName","newObjectName","type","subType","objectTypeApiName","objectApiName","changeNames","ontology","newNames","produce","sharedPropertyTypes","spts","oldSptName","newSptName","queryTypes","queries","oldActionName","newActionName","apiName","actionTypes","actions","interfaceTypes","interfaces","ifaceType","oldIfaceName","newIfaceName","extendsInterfaces","map","v","properties","property","objectTypes","objectType","implementsInterfaces","implementsInterfaces2","objects","queryType","output","values","parameters","linkTypes","l","action","op","operations","referencedOntology","sharedPropertyTypeMapping","displayName","pluralDisplayName","icon","color","name","titleProperty","rid","implementedByObjectTypes","links","allExtendsInterfaces","allLinks","allProperties","referencingOntology","primaryKey","status","getTask","version","fooBarTodoWireOntology","markTodoCompleted","deleteTodos","BASE_PATH","helper","timeout","minimalFiles","files","getFiles","toMatchObject","anything","diagnostics","q","console","error","file","fileName","getLineStarts","messageText","errors","filter","code","toHaveLength","tweakedFilesForSnapshotConsistency","toMatchInlineSnapshot","fn","rejects","toThrow","undefined","resolves","toBeUndefined","not","toEqual","skip","__dirname","recursive","e","path","contents","flag","options","Map","toContain","mockConsola","spyOn","toHaveBeenCalledWith","ret","replace"],"sources":["generateClientSdkVersionTwoPointZero.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { consola } from \"consola\";\nimport { mkdir, readdir, rmdir, writeFile } from \"fs/promises\";\nimport * as immer from \"immer\";\nimport { beforeEach, describe, expect, it, test, vi } from \"vitest\";\nimport { compileThis } from \"../util/test/compileThis.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generateClientSdkVersionTwoPointZero } from \"./generateClientSdkVersionTwoPointZero.js\";\nfunction changeValue(draft, key, oldValue, newValue) {\n if (draft[key] === oldValue) {\n draft[key] = newValue;\n }\n}\nfunction changeKey(draft, oldInterfaceName, newInterfaceName) {\n if (draft[oldInterfaceName]) {\n draft[newInterfaceName] = draft[oldInterfaceName];\n delete draft[oldInterfaceName];\n }\n}\nfunction changeArrayEntry(draft, oldNew, newName) {\n const idx = draft.findIndex(a => a === oldNew);\n if (idx >= 0) {\n draft[idx] = newName;\n }\n}\nfunction changeEachEntry(wireData, data, changer, changeSelf) {\n for (const [oldName, newName] of Object.entries(data)) {\n for (const k of Object.keys(wireData)) {\n changer(wireData[k], oldName, newName);\n if (changeSelf && k === oldName) {\n wireData[newName] = wireData[k];\n delete wireData[k];\n }\n }\n }\n}\nfunction changeDataType(dataType, oldObjectName, newObjectName) {\n if (dataType.type === \"array\") {\n changeDataType(dataType.subType, oldObjectName, newObjectName);\n }\n else if (dataType.type === \"object\" || dataType.type === \"objectSet\") {\n if (dataType.objectTypeApiName === oldObjectName) {\n dataType.objectTypeApiName = newObjectName;\n }\n if (dataType.objectApiName === oldObjectName) {\n dataType.objectApiName = newObjectName;\n }\n }\n}\nfunction changeNames(ontology, newNames) {\n return immer.produce(ontology, (draft) => {\n // Handle spt renames\n changeEachEntry(draft.sharedPropertyTypes, newNames.spts, (draft, oldSptName, newSptName) => {\n changeValue(draft, \"apiName\", oldSptName, newSptName);\n }, true);\n // Handle query renames\n changeEachEntry(draft.queryTypes, newNames.queries, (draft, oldActionName, newActionName) => {\n if (draft.apiName === oldActionName) {\n draft.apiName = newActionName;\n }\n }, true);\n // Handle action renames\n changeEachEntry(draft.actionTypes, newNames.actions, (draft, oldActionName, newActionName) => {\n changeValue(draft, \"apiName\", oldActionName, newActionName);\n }, true);\n // Handle interface renames\n changeEachEntry(draft.interfaceTypes, newNames.interfaces, (ifaceType, oldIfaceName, newIfaceName) => {\n changeValue(ifaceType, \"apiName\", oldIfaceName, newIfaceName);\n ifaceType.extendsInterfaces = ifaceType.extendsInterfaces.map(v => v === oldIfaceName ? newIfaceName : v);\n changeEachEntry(ifaceType.properties, newNames.spts, (property, oldSptName, newSptName) => {\n changeValue(property, \"apiName\", oldSptName, newSptName);\n }, true);\n }, true);\n changeEachEntry(draft.objectTypes, newNames.interfaces, (objectType, oldIfaceName, newIfaceName) => {\n changeArrayEntry(objectType.implementsInterfaces, oldIfaceName, newIfaceName);\n changeKey(objectType.implementsInterfaces2, oldIfaceName, newIfaceName);\n });\n // Handle object renames\n changeEachEntry(draft.queryTypes, newNames.objects, (queryType, oldObjectName, newObjectName) => {\n changeDataType(queryType.output, oldObjectName, newObjectName);\n for (const { dataType } of Object.values(queryType.parameters)) {\n changeDataType(dataType, oldObjectName, newObjectName);\n }\n });\n changeEachEntry(draft.objectTypes, newNames.objects, ({ objectType, linkTypes }, oldObjectName, newObjectName) => {\n changeValue(objectType, \"apiName\", oldObjectName, newObjectName);\n for (const l of linkTypes) {\n changeValue(l, \"objectTypeApiName\", oldObjectName, newObjectName);\n }\n }, true);\n changeEachEntry(draft.actionTypes, newNames.objects, (action, oldObjectName, newObjectName) => {\n for (const op of action.operations) {\n switch (op.type) {\n case \"deleteObject\":\n case \"modifyObject\":\n case \"createObject\":\n if (op.objectTypeApiName === oldObjectName) {\n op.objectTypeApiName = newObjectName;\n }\n }\n }\n for (const { dataType } of Object.values(action.parameters)) {\n changeDataType(dataType, oldObjectName, newObjectName);\n }\n });\n });\n}\nconst referencedOntology = {\n \"ontology\": {\n \"apiName\": \"dep\",\n \"rid\": \"ri.ontology.main.ontology.dep\",\n \"displayName\": \"\",\n \"description\": \"\",\n },\n \"actionTypes\": {},\n \"objectTypes\": {\n \"com.example.dep.Task\": {\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n \"objectType\": {\n \"apiName\": \"com.example.dep.Task\",\n \"primaryKey\": \"taskId\",\n displayName: \"Task\",\n pluralDisplayName: \"Tasks\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n titleProperty: \"taskId\",\n \"properties\": {\n \"taskId\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"rid\": \"ridForTaskId\",\n },\n \"body\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"rid\": \"ridForBody\",\n },\n \"shouldBeIgnored\": {\n \"dataType\": {\n \"type\": \"futureUnknownType\",\n },\n \"rid\": \"ridForShouldBeIgnored\",\n },\n },\n \"status\": \"ACTIVE\",\n \"rid\": \"ridForTask\",\n },\n \"linkTypes\": [],\n },\n },\n \"queryTypes\": {},\n \"interfaceTypes\": {\n \"com.example.dep.SomeInterface\": {\n apiName: \"com.example.dep.SomeInterface\",\n rid: \"idk2\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n properties: {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n implementedByObjectTypes: [],\n links: {},\n allExtendsInterfaces: [],\n allLinks: {},\n allProperties: {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n },\n },\n \"sharedPropertyTypes\": {\n \"com.example.dep.spt\": {\n apiName: \"com.example.dep.spt\",\n dataType: {\n type: \"string\",\n },\n displayName: \"Some Property\",\n rid: \"idk\",\n },\n },\n};\nconst referencingOntology = {\n ontology: TodoWireOntology.ontology,\n \"actionTypes\": {\n \"setTaskBody\": {\n \"apiName\": \"setTaskBody\",\n \"parameters\": {\n \"task\": {\n \"dataType\": {\n \"type\": \"object\",\n \"objectApiName\": \"com.example.dep.Task\",\n \"objectTypeApiName\": \"com.example.dep.Task\",\n },\n \"required\": true,\n },\n \"body\": {\n \"dataType\": {\n \"type\": \"string\",\n },\n \"required\": true,\n },\n },\n \"status\": \"ACTIVE\",\n \"rid\": \"ri.a.b.c.d\",\n \"operations\": [\n {\n \"type\": \"modifyObject\",\n \"objectTypeApiName\": \"com.example.dep.Task\",\n },\n ],\n },\n },\n interfaceTypes: {\n ...referencedOntology.interfaceTypes,\n },\n objectTypes: {\n ...referencedOntology.objectTypes,\n \"Thing\": {\n implementsInterfaces: [\"com.example.dep.SomeInterface\"],\n implementsInterfaces2: {\n \"com.example.dep.SomeInterface\": {\n properties: {\n \"com.example.dep.spt\": \"body\",\n },\n },\n },\n linkTypes: [],\n objectType: {\n apiName: \"Thing\",\n displayName: \"Thing\",\n pluralDisplayName: \"Things\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n primaryKey: \"id\",\n properties: {\n \"id\": {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n \"body\": {\n dataType: {\n type: \"string\",\n },\n \"rid\": \"rid\",\n },\n },\n rid: \"ridForThing\",\n status: \"ACTIVE\",\n titleProperty: \"id\",\n },\n sharedPropertyTypeMapping: {},\n },\n \"UsesForeignSpt\": {\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"UsesForeignSpt\",\n primaryKey: \"id\",\n displayName: \"Uses Foreign Spt\",\n icon: { type: \"blueprint\", color: \"blue\", name: \"document\" },\n pluralDisplayName: \"Uses Foreign Spts\",\n properties: {\n \"id\": {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n \"body\": {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n rid: \"theRid\",\n status: \"ACTIVE\",\n titleProperty: \"id\",\n },\n sharedPropertyTypeMapping: {\n \"com.example.dep.spt\": \"body\",\n },\n },\n },\n queryTypes: {\n getTask: {\n apiName: \"getTask\",\n output: {\n type: \"object\",\n objectApiName: \"com.example.dep.Task\",\n objectTypeApiName: \"com.example.dep.Task\",\n },\n parameters: {\n \"a\": {\n dataType: {\n type: \"object\",\n objectApiName: \"com.example.dep.Task\",\n objectTypeApiName: \"com.example.dep.Task\",\n },\n },\n },\n rid: \"ri.a.b.c\",\n version: \"0\",\n },\n },\n sharedPropertyTypes: {},\n};\nconst fooBarTodoWireOntology = changeNames(TodoWireOntology, {\n objects: { \"Todo\": \"foo.bar.Todo\", \"Person\": \"foo.bar.Person\" },\n actions: {\n markTodoCompleted: \"foo.bar.markTodoCompleted\",\n deleteTodos: \"foo.bar.deleteTodos\",\n },\n interfaces: {\n \"SomeInterface\": \"foo.bar.SomeInterface\",\n },\n queries: {\n \"getCount\": \"foo.bar.getCount\",\n \"returnsTodo\": \"foo.bar.returnsTodo\",\n },\n spts: {\n \"SomeProperty\": \"foo.bar.SomeProperty\",\n },\n});\nconst BASE_PATH = \"/foo\";\ndescribe(\"generator\", () => {\n let helper;\n beforeEach(async () => {\n helper = createMockMinimalFiles();\n });\n test(\"should be able to generate a project\", { timeout: 20_000 }, async () => {\n await generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", helper.minimalFiles, BASE_PATH);\n const files = helper.getFiles();\n expect(files).toMatchObject({\n [`${BASE_PATH}/index.ts`]: expect.anything(),\n [`${BASE_PATH}/OntologyMetadata.ts`]: expect.anything(),\n [`${BASE_PATH}/ontology/objects/Todo.ts`]: expect.anything(),\n });\n const diagnostics = compileThis(helper.getFiles(), BASE_PATH);\n for (const q of diagnostics) {\n console.error(`${q.file?.fileName}:${q.file?.getLineStarts()}`, q.messageText);\n }\n // TODO: Certain errors are expected since we can't resolve the static code, but we should fix them.\n const errors = diagnostics.filter(q => q.code !== 2792);\n expect(errors).toHaveLength(0);\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles())).toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: 'typescript-sdk/0.0.0 osdk-cli/0.0.0' };\n\n export const $ontologyRid = 'ridHere';\n \",\n \"/foo/index.ts\": \"export { deleteTodos, markTodoCompleted } from './ontology/actions';\n export * as $Actions from './ontology/actions';\n export { SomeInterface } from './ontology/interfaces';\n export * as $Interfaces from './ontology/interfaces';\n export { Person, Todo } from './ontology/objects';\n export * as $Objects from './ontology/objects';\n export { getCount, returnsTodo } from './ontology/queries';\n export * as $Queries from './ontology/queries';\n export { $osdkMetadata } from './OntologyMetadata';\n export { $ontologyRid } from './OntologyMetadata';\n \",\n \"/foo/ontology/actions.ts\": \"export { deleteTodos } from './actions/deleteTodos';\n export { markTodoCompleted } from './actions/markTodoCompleted';\n \",\n \"/foo/ontology/actions/deleteTodos.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace deleteTodos {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'Todo(s) to be deleted';\n multiplicity: true;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes in an array of objects\n */\n export interface Params {\n /**\n * Todo(s) to be deleted\n */\n readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes in an array of objects\n */\n applyAction<P extends deleteTodos.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<deleteTodos.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes in an array of objects\n * @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted\n */\n export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'deleteTodos';\n description: 'An action which takes in an array of objects';\n modifiedEntities: {};\n parameters: deleteTodos.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: deleteTodos.Signatures;\n };\n apiName: 'deleteTodos';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const deleteTodos: deleteTodos = {\n apiName: 'deleteTodos',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/actions/markTodoCompleted.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace markTodoCompleted {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'A Todo to mark completed';\n multiplicity: false;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes different types of parameters\n */\n export interface Params {\n /**\n * A Todo to mark completed\n */\n readonly object?: ActionParam.ObjectType<Todo>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes different types of parameters\n */\n applyAction<P extends markTodoCompleted.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<markTodoCompleted.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes different types of parameters\n * @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed\n */\n export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'markTodoCompleted';\n description: 'An action which takes different types of parameters';\n modifiedEntities: {\n Todo: {\n created: false;\n modified: true;\n };\n };\n parameters: markTodoCompleted.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: markTodoCompleted.Signatures;\n };\n apiName: 'markTodoCompleted';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const markTodoCompleted: markTodoCompleted = {\n apiName: 'markTodoCompleted',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/client';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'SomeProperty';\n\n export interface Props {\n readonly SomeProperty: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'SomeInterface';\n description: 'Some interface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Sum Property',\n * description: Some property\n */\n SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Person } from './objects/Person';\n export { Todo } from './objects/Todo';\n \",\n \"/foo/ontology/objects/Person.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import type { Todo } from './Todo';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Person {\n export type PropertyKeys = 'email';\n\n export interface Links {\n readonly Todos: Todo.ObjectSet;\n }\n\n export interface Props {\n readonly email: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = $Osdk.Instance<Person, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Person extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'Person';\n __DefinitionMetadata?: {\n objectSet: Person.ObjectSet;\n props: Person.Props;\n linksType: Person.Links;\n strictProps: Person.StrictProps;\n apiName: 'Person';\n description: 'A person';\n displayName: 'Person';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {\n Todos: $ObjectMetadata.Link<Todo, true>;\n };\n pluralDisplayName: 'Persons';\n primaryKeyApiName: 'email';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n email: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForPerson';\n status: 'ACTIVE';\n titleProperty: 'email';\n type: 'object';\n };\n }\n\n export const Person: Person = {\n type: 'object',\n apiName: 'Person',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects/Todo.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import type { Person } from './Person';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Todo {\n export type PropertyKeys = 'id' | 'body' | 'complete';\n\n export interface Links {\n readonly Assignee: $SingleLinkAccessor<Person>;\n }\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly complete: $PropType['boolean'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = $Osdk.Instance<Todo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Todo extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'Todo';\n __DefinitionMetadata?: {\n objectSet: Todo.ObjectSet;\n props: Todo.Props;\n linksType: Todo.Links;\n strictProps: Todo.StrictProps;\n apiName: 'Todo';\n description: 'Its a todo item.';\n displayName: 'AwesomeTodoDisplayname';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: ['SomeInterface'];\n interfaceMap: {\n SomeInterface: {\n SomeProperty: 'body';\n };\n };\n inverseInterfaceMap: {\n SomeInterface: {\n body: 'SomeProperty';\n };\n };\n links: {\n Assignee: $ObjectMetadata.Link<Person, false>;\n };\n pluralDisplayName: 'AwesomeTodoDisplayNames';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * display name: 'Body',\n * description: The text of the todo\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n complete: $PropertyDef<'boolean', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'ridForTodo';\n status: 'ACTIVE';\n titleProperty: 'body';\n type: 'object';\n };\n }\n\n export const Todo: Todo = {\n type: 'object',\n apiName: 'Todo',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount';\n export { returnsTodo } from './queries/returnsTodo';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import { $osdkMetadata } from '../../OntologyMetadata';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'getCount';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'getCount',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata';\n import { $osdkMetadata } from '../../OntologyMetadata';\n import type { Todo } from '../objects/Todo';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'returnsTodo';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'returnsTodo',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n });\n test(\"throws an error when target destination is not empty\", async () => {\n helper.minimalFiles.readdir = vi.fn(async (_path) => [\"file\"]);\n await expect(async () => {\n await expect(generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", helper.minimalFiles, BASE_PATH)).rejects.toThrow();\n });\n });\n it(\"throws an error if a namespace is provided that all top levels do not use\", async () => {\n await expect(generateClientSdkVersionTwoPointZero({ ...TodoWireOntology }, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, undefined, undefined, true));\n // Disabled for now since we can't really enforce it from dev console at the moment\n // .rejects.toThrowErrorMatchingInlineSnapshot(\n // `[Error: Found type { ns:'undefined', shortName: 'Todo'} but it is not in the generation namespace 'foo.bar'. This violates the contract of the generator.]`,\n // );\n });\n it(\"does not throw an error if a namespace is provided that all top levels use\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(fooBarTodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, undefined, undefined, true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/objects/foo.bar.Todo.ts\"])\n .toBeUndefined();\n expect(helper.getFiles()[\"/foo/ontology/objects/Todo.ts\"])\n .not.toBeUndefined();\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles()))\n .toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: '' };\n\n export const $ontologyRid = 'ridHere';\n \",\n \"/foo/index.ts\": \"export { deleteTodos, markTodoCompleted } from './ontology/actions.js';\n export * as $Actions from './ontology/actions.js';\n export { SomeInterface } from './ontology/interfaces.js';\n export * as $Interfaces from './ontology/interfaces.js';\n export { Person, Todo } from './ontology/objects.js';\n export * as $Objects from './ontology/objects.js';\n export { getCount, returnsTodo } from './ontology/queries.js';\n export * as $Queries from './ontology/queries.js';\n export { $osdkMetadata } from './OntologyMetadata.js';\n export { $ontologyRid } from './OntologyMetadata.js';\n \",\n \"/foo/ontology/actions.ts\": \"export { deleteTodos } from './actions/deleteTodos.js';\n export { markTodoCompleted } from './actions/markTodoCompleted.js';\n \",\n \"/foo/ontology/actions/deleteTodos.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace deleteTodos {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'Todo(s) to be deleted';\n multiplicity: true;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes in an array of objects\n */\n export interface Params {\n /**\n * Todo(s) to be deleted\n */\n readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes in an array of objects\n */\n applyAction<P extends deleteTodos.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<deleteTodos.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes in an array of objects\n * @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted\n */\n export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.deleteTodos';\n description: 'An action which takes in an array of objects';\n modifiedEntities: {};\n parameters: deleteTodos.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: deleteTodos.Signatures;\n };\n apiName: 'foo.bar.deleteTodos';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const deleteTodos: deleteTodos = {\n apiName: 'foo.bar.deleteTodos',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/actions/markTodoCompleted.ts\": \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace markTodoCompleted {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n object: {\n description: 'A Todo to mark completed';\n multiplicity: false;\n nullable: true;\n type: ActionMetadata.DataType.Object<Todo>;\n };\n };\n\n /**\n * An action which takes different types of parameters\n */\n export interface Params {\n /**\n * A Todo to mark completed\n */\n readonly object?: ActionParam.ObjectType<Todo>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n /**\n * An action which takes different types of parameters\n */\n applyAction<P extends markTodoCompleted.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<markTodoCompleted.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * An action which takes different types of parameters\n * @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed\n */\n export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.markTodoCompleted';\n description: 'An action which takes different types of parameters';\n modifiedEntities: {\n 'foo.bar.Todo': {\n created: false;\n modified: true;\n };\n };\n parameters: markTodoCompleted.ParamsDefinition;\n rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: markTodoCompleted.Signatures;\n };\n apiName: 'foo.bar.markTodoCompleted';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const markTodoCompleted: markTodoCompleted = {\n apiName: 'foo.bar.markTodoCompleted',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface.js';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/api';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'SomeProperty';\n\n export interface Props {\n readonly SomeProperty: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'foo.bar.SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'foo.bar.SomeInterface';\n description: 'Some interface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Sum Property',\n * description: Some property\n */\n SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'foo.bar.SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Person } from './objects/Person.js';\n export { Todo } from './objects/Todo.js';\n \",\n \"/foo/ontology/objects/Person.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type { Todo } from './Todo.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace Person {\n export type PropertyKeys = 'email';\n\n export interface Links {\n readonly Todos: Todo.ObjectSet;\n }\n\n export interface Props {\n readonly email: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = $Osdk.Instance<Person, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Person.Props = keyof Person.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Person extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'foo.bar.Person';\n __DefinitionMetadata?: {\n objectSet: Person.ObjectSet;\n props: Person.Props;\n linksType: Person.Links;\n strictProps: Person.StrictProps;\n apiName: 'foo.bar.Person';\n description: 'A person';\n displayName: 'Person';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {\n Todos: $ObjectMetadata.Link<Todo, true>;\n };\n pluralDisplayName: 'Persons';\n primaryKeyApiName: 'email';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n email: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForPerson';\n status: 'ACTIVE';\n titleProperty: 'email';\n type: 'object';\n };\n }\n\n export const Person: Person = {\n type: 'object',\n apiName: 'foo.bar.Person',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects/Todo.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type { Person } from './Person.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace Todo {\n export type PropertyKeys = 'id' | 'body' | 'complete';\n\n export interface Links {\n readonly Assignee: $SingleLinkAccessor<Person>;\n }\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly complete: $PropType['boolean'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = $Osdk.Instance<Todo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Todo.Props = keyof Todo.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Todo extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'foo.bar.Todo';\n __DefinitionMetadata?: {\n objectSet: Todo.ObjectSet;\n props: Todo.Props;\n linksType: Todo.Links;\n strictProps: Todo.StrictProps;\n apiName: 'foo.bar.Todo';\n description: 'Its a todo item.';\n displayName: 'AwesomeTodoDisplayname';\n icon: {\n type: 'blueprint';\n name: 'document';\n color: 'blue';\n };\n implements: ['foo.bar.SomeInterface'];\n interfaceMap: {\n 'foo.bar.SomeInterface': {\n SomeProperty: 'body';\n };\n };\n inverseInterfaceMap: {\n 'foo.bar.SomeInterface': {\n body: 'SomeProperty';\n };\n };\n links: {\n Assignee: $ObjectMetadata.Link<Person, false>;\n };\n pluralDisplayName: 'AwesomeTodoDisplayNames';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * display name: 'Body',\n * description: The text of the todo\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n complete: $PropertyDef<'boolean', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'ridForTodo';\n status: 'ACTIVE';\n titleProperty: 'body';\n type: 'object';\n };\n }\n\n export const Todo: Todo = {\n type: 'object',\n apiName: 'foo.bar.Todo',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount.js';\n export { returnsTodo } from './queries/returnsTodo.js';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'foo.bar.getCount';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'foo.bar.getCount',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'foo.bar.returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'foo.bar.Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'foo.bar.Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'foo.bar.returnsTodo';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'foo.bar.returnsTodo',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n });\n it(\"guards against empty objects\", async () => {\n await generateClientSdkVersionTwoPointZero({\n ontology: TodoWireOntology.ontology,\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n queryTypes: {},\n sharedPropertyTypes: {},\n }, \"\", helper.minimalFiles, BASE_PATH);\n expect(helper.getFiles()[`${BASE_PATH}/ontology/objects.ts`]).toEqual(\"export {};\\n\");\n });\n test.skip(\"runs generator locally\", async () => {\n try {\n await rmdir(`${__dirname}/generated`, { recursive: true });\n }\n catch (e) {\n }\n await mkdir(`${__dirname}/generated`, { recursive: true });\n await generateClientSdkVersionTwoPointZero(TodoWireOntology, \"typescript-sdk/0.0.0 osdk-cli/0.0.0\", {\n writeFile: async (path, contents) => {\n await writeFile(path, contents, { flag: \"w\" });\n },\n mkdir: async (path, options) => {\n await mkdir(path, options);\n },\n readdir: async (path) => await readdir(path),\n }, `${__dirname}/generated/`);\n });\n describe(\"$ontologyRid\", () => {\n it(\"does not exist when an ontology api name is provided\", async () => {\n const BASE_PATH = \"/foo\";\n await expect(generateClientSdkVersionTwoPointZero(fooBarTodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map())).resolves.toMatchInlineSnapshot(`undefined`);\n // expect(helper.getFiles()[\"/foo/index.ts\"]).not.toContain(\n // \"$ontologyRid\",\n // );\n });\n it(\"does exist when an ontology api name is not provided\", async () => {\n const BASE_PATH = \"/foo\";\n await expect(generateClientSdkVersionTwoPointZero(TodoWireOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", undefined, new Map())).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/index.ts\"]).toContain(\"$ontologyRid\");\n });\n });\n describe(\"query depends on foreign object\", () => {\n it(\"generates the correct code\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/queries/getTask.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Task as $Imported$com$example$dep$Task } from '@com.example.dep/osdk';\n\n export namespace getTask {\n export interface Signature {\n (query: getTask.Parameters): Promise<getTask.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly a: QueryParam.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n export type ReturnType = QueryResult.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n export interface getTask extends QueryDefinition<getTask.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getTask';\n rid: 'ri.a.b.c';\n type: 'query';\n version: '0';\n parameters: {\n /**\n * (no ontology metadata)\n */\n a: {\n nullable: false;\n object: 'com.example.dep.Task';\n type: 'object';\n __OsdkTargetType?: $Imported$com$example$dep$Task;\n };\n };\n output: {\n nullable: false;\n object: 'com.example.dep.Task';\n type: 'object';\n __OsdkTargetType?: $Imported$com$example$dep$Task;\n };\n signature: getTask.Signature;\n };\n apiName: 'getTask';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getTask: getTask = {\n apiName: 'getTask',\n type: 'query',\n version: '0',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n describe(\"object uses on foreign spt\", () => {\n it(\"stuff\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/objects/UsesForeignSpt.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { PropertyDef as $PropertyDef } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/api';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/api';\n\n export namespace UsesForeignSpt {\n export type PropertyKeys = 'id' | 'body';\n\n export type Links = {};\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly id: $PropType['integer'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<UsesForeignSpt, UsesForeignSpt.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof UsesForeignSpt.Props = keyof UsesForeignSpt.Props,\n > = $Osdk.Instance<UsesForeignSpt, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof UsesForeignSpt.Props = keyof UsesForeignSpt.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface UsesForeignSpt extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'UsesForeignSpt';\n __DefinitionMetadata?: {\n objectSet: UsesForeignSpt.ObjectSet;\n props: UsesForeignSpt.Props;\n linksType: UsesForeignSpt.Links;\n strictProps: UsesForeignSpt.StrictProps;\n apiName: 'UsesForeignSpt';\n displayName: 'Uses Foreign Spt';\n icon: {\n type: 'blueprint';\n color: 'blue';\n name: 'document';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: 'Uses Foreign Spts';\n primaryKeyApiName: 'id';\n primaryKeyType: 'integer';\n properties: {\n /**\n * (no ontology metadata)\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n id: $PropertyDef<'integer', 'non-nullable', 'single'>;\n };\n rid: 'theRid';\n status: 'ACTIVE';\n titleProperty: 'id';\n type: 'object';\n };\n }\n\n export const UsesForeignSpt: UsesForeignSpt = {\n type: 'object',\n apiName: 'UsesForeignSpt',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n describe(\"action depends on foreign object\", () => {\n it(\"can generate the action\", async () => {\n await expect(generateClientSdkVersionTwoPointZero(referencingOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\", new Map([[\"com.example.dep.Task\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.SomeInterface\", \"@com.example.dep/osdk\"]]), new Map([[\"com.example.dep.spt\", \"@com.example.dep/osdk\"]]), true)).resolves.toMatchInlineSnapshot(`undefined`);\n expect(helper.getFiles()[\"/foo/ontology/actions/setTaskBody.ts\"])\n .toMatchInlineSnapshot(`\n \"import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from '@osdk/api';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Task as $Imported$com$example$dep$Task } from '@com.example.dep/osdk';\n\n export namespace setTaskBody {\n // Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n body: {\n multiplicity: false;\n nullable: false;\n type: 'string';\n };\n task: {\n multiplicity: false;\n nullable: false;\n type: ActionMetadata.DataType.Object<$Imported$com$example$dep$Task>;\n };\n };\n\n export interface Params {\n readonly body: ActionParam.PrimitiveType<'string'>;\n\n readonly task: ActionParam.ObjectType<$Imported$com$example$dep$Task>;\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n applyAction<P extends setTaskBody.Params, OP extends ApplyActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n\n batchApplyAction<P extends ReadonlyArray<setTaskBody.Params>, OP extends ApplyBatchActionOptions>(\n args: P,\n options?: OP,\n ): Promise<ActionReturnTypeForOptions<OP>>;\n }\n }\n\n /**\n * @param {ActionParam.PrimitiveType<\"string\">} body\n * @param {ActionParam.ObjectType<$Imported$com$example$dep$Task>} task\n */\n export interface setTaskBody extends ActionDefinition<setTaskBody.Signatures> {\n __DefinitionMetadata?: {\n apiName: 'setTaskBody';\n modifiedEntities: {\n 'com.example.dep.Task': {\n created: false;\n modified: true;\n };\n };\n parameters: setTaskBody.ParamsDefinition;\n rid: 'ri.a.b.c.d';\n status: 'ACTIVE';\n type: 'action';\n\n signatures: setTaskBody.Signatures;\n };\n apiName: 'setTaskBody';\n type: 'action';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const setTaskBody: setTaskBody = {\n apiName: 'setTaskBody',\n type: 'action',\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n });\n it(\"can generate an sdk package that is entirely a library\", async () => {\n const mockConsola = vi.spyOn(consola, \"info\");\n await expect(generateClientSdkVersionTwoPointZero(referencedOntology, \"\", helper.minimalFiles, BASE_PATH, \"module\")).resolves.toMatchInlineSnapshot(`undefined`);\n expect(mockConsola).toHaveBeenCalledWith(`{\"type\":\"futureUnknownType\"} is not a supported propertyType`);\n expect(tweakedFilesForSnapshotConsistency(helper.getFiles()))\n .toMatchInlineSnapshot(`\n {\n \"/foo/OntologyMetadata.ts\": \"export type $ExpectedClientVersion = 'PLACEHOLDER';\n export const $osdkMetadata = { extraUserAgent: '' };\n\n export const $ontologyRid = 'ri.ontology.main.ontology.dep';\n \",\n \"/foo/index.ts\": \"export {} from './ontology/actions.js';\n export * as $Actions from './ontology/actions.js';\n export { SomeInterface } from './ontology/interfaces.js';\n export * as $Interfaces from './ontology/interfaces.js';\n export { Task } from './ontology/objects.js';\n export * as $Objects from './ontology/objects.js';\n export {} from './ontology/queries.js';\n export * as $Queries from './ontology/queries.js';\n export { $osdkMetadata } from './OntologyMetadata.js';\n export { $ontologyRid } from './OntologyMetadata.js';\n \",\n \"/foo/ontology/actions.ts\": \"export {};\n \",\n \"/foo/ontology/interfaces.ts\": \"export { SomeInterface } from './interfaces/SomeInterface.js';\n \",\n \"/foo/ontology/interfaces/SomeInterface.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from '@osdk/client';\n\n export type OsdkObjectLinks$SomeInterface = {};\n\n export namespace SomeInterface {\n export type PropertyKeys = 'spt';\n\n export interface Props {\n readonly spt: $PropType['string'] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = $Osdk.Instance<SomeInterface, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof SomeInterface.Props = keyof SomeInterface.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface SomeInterface extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'interface';\n apiName: 'com.example.dep.SomeInterface';\n __DefinitionMetadata?: {\n objectSet: SomeInterface.ObjectSet;\n props: SomeInterface.Props;\n linksType: OsdkObjectLinks$SomeInterface;\n strictProps: SomeInterface.StrictProps;\n apiName: 'com.example.dep.SomeInterface';\n displayName: 'Sum Interface';\n implements: [];\n links: {};\n properties: {\n /**\n * display name: 'Some Property'\n */\n spt: $PropertyDef<'string', 'nullable', 'single'>;\n };\n rid: 'idk2';\n type: 'interface';\n };\n }\n\n export const SomeInterface: SomeInterface = {\n type: 'interface',\n apiName: 'com.example.dep.SomeInterface',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/objects.ts\": \"export { Task } from './objects/Task.js';\n \",\n \"/foo/ontology/objects/Task.ts\": \"import type { PropertyDef as $PropertyDef } from '@osdk/client';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import type {\n PropertyKeys as $PropertyKeys,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from '@osdk/client';\n import type {\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from '@osdk/client';\n\n export namespace Task {\n export type PropertyKeys = 'taskId' | 'body';\n\n export type Links = {};\n\n export interface Props {\n readonly body: $PropType['string'] | undefined;\n readonly taskId: $PropType['string'];\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Task, Task.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Task.Props = keyof Task.Props,\n > = $Osdk.Instance<Task, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | '$rid' = never,\n K extends keyof Task.Props = keyof Task.Props,\n > = OsdkInstance<OPTIONS, K>;\n }\n\n export interface Task extends $ObjectTypeDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: 'object';\n apiName: 'com.example.dep.Task';\n __DefinitionMetadata?: {\n objectSet: Task.ObjectSet;\n props: Task.Props;\n linksType: Task.Links;\n strictProps: Task.StrictProps;\n apiName: 'com.example.dep.Task';\n displayName: 'Task';\n icon: {\n type: 'blueprint';\n color: 'blue';\n name: 'document';\n };\n implements: [];\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: 'Tasks';\n primaryKeyApiName: 'taskId';\n primaryKeyType: 'string';\n properties: {\n /**\n * (no ontology metadata)\n */\n body: $PropertyDef<'string', 'nullable', 'single'>;\n /**\n * (no ontology metadata)\n */\n taskId: $PropertyDef<'string', 'non-nullable', 'single'>;\n };\n rid: 'ridForTask';\n status: 'ACTIVE';\n titleProperty: 'taskId';\n type: 'object';\n };\n }\n\n export const Task: Task = {\n type: 'object',\n apiName: 'com.example.dep.Task',\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries.ts\": \"export {};\n \",\n }\n `);\n });\n});\nfunction tweakedFilesForSnapshotConsistency(files) {\n const ret = { ...files };\n ret[\"/foo/OntologyMetadata.ts\"] = ret[\"/foo/OntologyMetadata.ts\"].replace(/export type \\$ExpectedClientVersion = '.*?';/, `export type $ExpectedClientVersion = 'PLACEHOLDER';`);\n return ret;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,SAAS;AACjC,SAASC,KAAK,EAAEC,OAAO,EAAEC,KAAK,EAAEC,SAAS,QAAQ,aAAa;AAC9D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AACnE,SAASC,WAAW,QAAQ,6BAA6B;AACzD,S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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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,CAACI,QAAQ,CAAC,CAAC,CAAC,CAAC,CACxDgB,qBAAqB,CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;IACF,CAAC,CAAC;EACN,CAAC,CAAC;EACFzH,EAAE,CAAC,wDAAwD,EAAE,YAAY;IACrE,MAAM4I,WAAW,GAAG1I,EAAE,CAAC2I,KAAK,CAACtJ,OAAO,EAAE,MAAM,CAAC;IAC7C,MAAMQ,MAAM,CAACO,oCAAoC,CAACwE,kBAAkB,EAAE,EAAE,EAAEuB,MAAM,CAACE,YAAY,EAAEH,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC0B,QAAQ,CAACL,qBAAqB,CAAC,WAAW,CAAC;IAChK1H,MAAM,CAAC6I,WAAW,CAAC,CAACE,oBAAoB,CAAC,8DAA8D,CAAC;IACxG/I,MAAM,CAACyH,kCAAkC,CAACnB,MAAM,CAACI,QAAQ,CAAC,CAAC,CAAC,CAAC,CACxDgB,qBAAqB,CAAC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACJ,CAAC,CAAC;AACN,CAAC,CAAC;AACF,SAASD,kCAAkCA,CAAChB,KAAK,EAAE;EAC/C,MAAMuC,GAAG,GAAG;IAAE,GAAGvC;EAAM,CAAC;EACxBuC,GAAG,CAAC,0BAA0B,CAAC,GAAGA,GAAG,CAAC,0BAA0B,CAAC,CAACC,OAAO,CAAC,8CAA8C,EAAE,qDAAqD,CAAC;EAChL,OAAOD,GAAG;AACd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAQ7E,wBAAsB,0BAA0B,CAC9C,EACE,iBAAiB,EAAE,QAAQ,EAC3B,EAAE,EACF,MAAM,EAAE,UAAU,EAClB,SAAc,EACd,QAAQ,EAAE,gBAAgB,EAC1B,cAAsB,GACvB,EAAE,IAAI,CACL,eAAe,EACb,mBAAmB,GACnB,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,gBAAgB,CACnB,GACA,OAAO,CAAC,IAAI,CAAC,CAkQf"}
1
+ {"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAQ7E,wBAAsB,0BAA0B,CAC9C,EACE,iBAAiB,EAAE,QAAQ,EAC3B,EAAE,EACF,MAAM,EAAE,UAAU,EAClB,SAAc,EACd,QAAQ,EAAE,gBAAgB,EAC1B,cAAsB,GACvB,EAAE,IAAI,CACL,eAAe,EACb,mBAAmB,GACnB,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,gBAAgB,CACnB,GACA,OAAO,CAAC,IAAI,CAAC,CA0Qf"}