@osdk/generator-converters 2.1.0-beta.20 → 2.1.0-beta.22

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,25 @@
1
1
  # @osdk/generator-converters
2
2
 
3
+ ## 2.1.0-beta.22
4
+
5
+ ### Minor Changes
6
+
7
+ - c9da74c: Improves code quality by fixing linting errors
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [73fa373]
12
+ - @osdk/api@2.1.0-beta.22
13
+
14
+ ## 2.1.0-beta.21
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [3ea2e79]
19
+ - Updated dependencies [656f975]
20
+ - Updated dependencies [f34b3d4]
21
+ - @osdk/api@2.1.0-beta.21
22
+
3
23
  ## 2.1.0-beta.20
4
24
 
5
25
  ### Minor Changes
@@ -61,11 +61,11 @@ function actionPropertyToSdkPropertyDefinition(parameterType) {
61
61
  case "array":
62
62
  return actionPropertyToSdkPropertyDefinition(parameterType.subType);
63
63
  default:
64
- throw new Error(`Unsupported action parameter type: ${parameterType}`);
64
+ throw new Error(`Unsupported action parameter type: ${parameterType.type}`);
65
65
  }
66
66
  }
67
67
  function createModifiedEntities(addedObjects, modifiedObjects) {
68
- let entities = {};
68
+ const entities = {};
69
69
  for (const key of addedObjects) {
70
70
  entities[key] = {
71
71
  created: true,
@@ -1 +1 @@
1
- {"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["getModifiedEntityTypes","wireActionTypeV2ToSdkActionMetadata","input","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","Error","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: input.status,\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description,\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n default:\n throw new Error(`Unsupported action parameter type: ${parameterType}`);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n let entities = {};\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n }\n else {\n entities[key] = { created: false, modified: true };\n }\n }\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,wBAAwB;AAC/D,OAAO,SAASC,mCAAmCA,CAACC,KAAK,EAAE;EACvD,MAAMC,mBAAmB,GAAGH,sBAAsB,CAACE,KAAK,CAAC;EACzD,OAAO;IACHE,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEH,KAAK,CAACG,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACP,KAAK,CAACI,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEE,6CAA6C,CAACD,KAAK,CAAC,CAAC,CAAC,CAAC;IACnJE,WAAW,EAAEZ,KAAK,CAACY,WAAW;IAC9BC,WAAW,EAAEb,KAAK,CAACa,WAAW;IAC9BC,gBAAgB,EAAEC,sBAAsB,CAACd,mBAAmB,CAACe,YAAY,EAAEf,mBAAmB,CAACgB,eAAe,CAAC;IAC/GC,GAAG,EAAElB,KAAK,CAACkB,GAAG;IACdC,MAAM,EAAEnB,KAAK,CAACmB;EAClB,CAAC;AACL;AACA,SAASR,6CAA6CA,CAACD,KAAK,EAAE;EAC1D,OAAO;IACHU,YAAY,EAAEV,KAAK,CAACW,QAAQ,CAACnB,IAAI,KAAK,OAAO;IAC7CA,IAAI,EAAEoB,qCAAqC,CAACZ,KAAK,CAACW,QAAQ,CAACnB,IAAI,KAAK,OAAO,GAAGQ,KAAK,CAACW,QAAQ,CAACE,OAAO,GAAGb,KAAK,CAACW,QAAQ,CAAC;IACtHG,QAAQ,EAAE,CAACd,KAAK,CAACe,QAAQ;IACzBZ,WAAW,EAAEH,KAAK,CAACG;E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ypeV2ToSdkActionMetadata.js","names":["getModifiedEntityTypes","wireActionTypeV2ToSdkActionMetadata","input","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","Error","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: input.status,\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description,\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n default:\n throw new Error(`Unsupported action parameter type: ${parameterType.type}`);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n const entities = {};\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n }\n else {\n entities[key] = { created: false, modified: true };\n }\n }\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,wBAAwB;AAC/D,OAAO,SAASC,mCAAmCA,CAACC,KAAK,EAAE;EACvD,MAAMC,mBAAmB,GAAGH,sBAAsB,CAACE,KAAK,CAAC;EACzD,OAAO;IACHE,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEH,KAAK,CAACG,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACP,KAAK,CAACI,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEE,6CAA6C,CAACD,KAAK,CAAC,CAAC,CAAC,CAAC;IACnJE,WAAW,EAAEZ,KAAK,CAACY,WAAW;IAC9BC,WAAW,EAAEb,KAAK,CAACa,WAAW;IAC9BC,gBAAgB,EAAEC,sBAAsB,CAACd,mBAAmB,CAACe,YAAY,EAAEf,mBAAmB,CAACgB,eAAe,CAAC;IAC/GC,GAAG,EAAElB,KAAK,CAACkB,GAAG;IACdC,MAAM,EAAEnB,KAAK,CAACmB;EAClB,CAAC;AACL;AACA,SAASR,6CAA6CA,CAAC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EACA,KAAK,MAAMxB,GAAG,IAAIQ,eAAe,EAAE;IAC/B,IAAIc,QAAQ,CAACtB,GAAG,CAAC,EAAE;MACfsB,QAAQ,CAACtB,GAAG,CAAC,CAACwB,QAAQ,GAAG,IAAI;IACjC,CAAC,MACI;MACDF,QAAQ,CAACtB,GAAG,CAAC,GAAG;QAAEuB,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACtD;EACJ;EACA,OAAOF,QAAQ;AACnB","ignoreList":[]}
@@ -3,11 +3,11 @@ import type { QueryParameterV2, QueryTypeV2 } from "@osdk/internal.foundry.core"
3
3
  export declare function wireQueryTypeV2ToSdkQueryMetadata(input: QueryTypeV2): QueryMetadata;
4
4
  export declare function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input: QueryTypeV2): {
5
5
  type: string;
6
- apiName: import("@osdk/internal.foundry.core").QueryApiName;
6
+ apiName: string;
7
7
  description: string | undefined;
8
- displayName: import("@osdk/internal.foundry.core").DisplayName | undefined;
9
- version: import("@osdk/internal.foundry.core").FunctionVersion;
10
- rid: import("@osdk/internal.foundry.core").FunctionRid;
8
+ displayName: string | undefined;
9
+ version: string;
10
+ rid: string;
11
11
  };
12
12
  export declare function wireQueryParameterV2ToQueryParameterDefinition(parameter: QueryParameterV2): QueryParameterDefinition<any>;
13
13
  //# sourceMappingURL=wireQueryTypeV2ToSdkQueryMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.d.ts","sourceRoot":"","sources":["../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,WAAW,GACjB,aAAa,CAef;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,WAAW;;;;;;;EAUnB;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,EAAE,gBAAgB,GAC1B,wBAAwB,CAAC,GAAG,CAAC,CAK/B"}
1
+ {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.d.ts","sourceRoot":"","sources":["../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,WAAW,GACjB,aAAa,CAef;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,WAAW,GACjB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CASA;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,EAAE,gBAAgB,GAC1B,wBAAwB,CAAC,GAAG,CAAC,CAK/B"}
@@ -61,11 +61,11 @@ function actionPropertyToSdkPropertyDefinition(parameterType) {
61
61
  case "array":
62
62
  return actionPropertyToSdkPropertyDefinition(parameterType.subType);
63
63
  default:
64
- throw new Error(`Unsupported action parameter type: ${parameterType}`);
64
+ throw new Error(`Unsupported action parameter type: ${parameterType.type}`);
65
65
  }
66
66
  }
67
67
  function createModifiedEntities(addedObjects, modifiedObjects) {
68
- let entities = {};
68
+ const entities = {};
69
69
  for (const key of addedObjects) {
70
70
  entities[key] = {
71
71
  created: true,
@@ -1 +1 @@
1
- {"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["getModifiedEntityTypes","wireActionTypeV2ToSdkActionMetadata","input","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","Error","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: input.status,\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description,\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n default:\n throw new Error(`Unsupported action parameter type: ${parameterType}`);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n let entities = {};\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n }\n else {\n entities[key] = { created: false, modified: true };\n }\n }\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,wBAAwB;AAC/D,OAAO,SAASC,mCAAmCA,CAACC,KAAK,EAAE;EACvD,MAAMC,mBAAmB,GAAGH,sBAAsB,CAACE,KAAK,CAAC;EACzD,OAAO;IACHE,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEH,KAAK,CAACG,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACP,KAAK,CAACI,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEE,6CAA6C,CAACD,KAAK,CAAC,CAAC,CAAC,CAAC;IACnJE,WAAW,EAAEZ,KAAK,CAACY,WAAW;IAC9BC,WAAW,EAAEb,KAAK,CAACa,WAAW;IAC9BC,gBAAgB,EAAEC,sBAAsB,CAACd,mBAAmB,CAACe,YAAY,EAAEf,mBAAmB,CAACgB,eAAe,CAAC;IAC/GC,GAAG,EAAElB,KAAK,CAACkB,GAAG;IACdC,MAAM,EAAEnB,KAAK,CAACmB;EAClB,CAAC;AACL;AACA,SAASR,6CAA6CA,CAACD,KAAK,EAAE;EAC1D,OAAO;IACHU,YAAY,EAAEV,KAAK,CAACW,QAAQ,C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,CAAC,EAAE;MACfsB,QAAQ,CAACtB,GAAG,CAAC,CAACwB,QAAQ,GAAG,IAAI;IACjC,CAAC,MACI;MACDF,QAAQ,CAACtB,GAAG,CAAC,GAAG;QAAEuB,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACtD;EACJ;EACA,OAAOF,QAAQ;AACnB","ignoreList":[]}
1
+ {"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["getModifiedEntityTypes","wireActionTypeV2ToSdkActionMetadata","input","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","Error","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: input.status,\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description,\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n default:\n throw new Error(`Unsupported action parameter type: ${parameterType.type}`);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n const entities = {};\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n }\n else {\n entities[key] = { created: false, modified: true };\n }\n }\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,wBAAwB;AAC/D,OAAO,SAASC,mCAAmCA,CAACC,KAAK,EAAE;EACvD,MAAMC,mBAAmB,GAAGH,sBAAsB,CAACE,KAAK,CAAC;EACzD,OAAO;IACHE,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEH,KAAK,CAACG,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACP,KAAK,CAACI,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEE,6CAA6C,CAACD,KAAK,CAAC,CAAC,CAAC,CAAC;IACnJE,WAAW,EAAEZ,KAAK,C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AAC;EACnF;AACJ;AACA,SAASa,sBAAsBA,CAACC,YAAY,EAAEC,eAAe,EAAE;EAC3D,MAAMc,QAAQ,GAAG,CAAC,CAAC;EACnB,KAAK,MAAMtB,GAAG,IAAIO,YAAY,EAAE;IAC5Be,QAAQ,CAACtB,GAAG,CAAC,GAAG;MAAEuB,OAAO,EAAE,IAAI;MAAEC,QAAQ,EAAE;IAAM,CAAC;EACtD;EACA,KAAK,MAAMxB,GAAG,IAAIQ,eAAe,EAAE;IAC/B,IAAIc,QAAQ,CAACtB,GAAG,CAAC,EAAE;MACfsB,QAAQ,CAACtB,GAAG,CAAC,CAACwB,QAAQ,GAAG,IAAI;IACjC,CAAC,MACI;MACDF,QAAQ,CAACtB,GAAG,CAAC,GAAG;QAAEuB,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACtD;EACJ;EACA,OAAOF,QAAQ;AACnB","ignoreList":[]}
@@ -3,11 +3,11 @@ import type { QueryParameterV2, QueryTypeV2 } from "@osdk/internal.foundry.core"
3
3
  export declare function wireQueryTypeV2ToSdkQueryMetadata(input: QueryTypeV2): QueryMetadata;
4
4
  export declare function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input: QueryTypeV2): {
5
5
  type: string;
6
- apiName: import("@osdk/internal.foundry.core").QueryApiName;
6
+ apiName: string;
7
7
  description: string | undefined;
8
- displayName: import("@osdk/internal.foundry.core").DisplayName | undefined;
9
- version: import("@osdk/internal.foundry.core").FunctionVersion;
10
- rid: import("@osdk/internal.foundry.core").FunctionRid;
8
+ displayName: string | undefined;
9
+ version: string;
10
+ rid: string;
11
11
  };
12
12
  export declare function wireQueryParameterV2ToQueryParameterDefinition(parameter: QueryParameterV2): QueryParameterDefinition<any>;
13
13
  //# sourceMappingURL=wireQueryTypeV2ToSdkQueryMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.d.ts","sourceRoot":"","sources":["../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,WAAW,GACjB,aAAa,CAef;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,WAAW;;;;;;;EAUnB;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,EAAE,gBAAgB,GAC1B,wBAAwB,CAAC,GAAG,CAAC,CAK/B"}
1
+ {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.d.ts","sourceRoot":"","sources":["../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,WAAW,GACjB,aAAa,CAef;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,WAAW,GACjB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CASA;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,EAAE,gBAAgB,GAC1B,wBAAwB,CAAC,GAAG,CAAC,CAK/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/generator-converters",
3
- "version": "2.1.0-beta.20",
3
+ "version": "2.1.0-beta.22",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -21,17 +21,17 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@osdk/internal.foundry.core": "2.8.0",
24
+ "@osdk/internal.foundry.core": "2.9.0",
25
25
  "consola": "^3.2.3",
26
- "@osdk/api": "~2.1.0-beta.20"
26
+ "@osdk/api": "~2.1.0-beta.22"
27
27
  },
28
28
  "devDependencies": {
29
29
  "ts-expect": "^1.3.0",
30
30
  "typescript": "~5.5.4",
31
31
  "vitest": "^2.1.2",
32
32
  "@osdk/monorepo.api-extractor": "~0.0.0",
33
- "@osdk/monorepo.tsconfig": "~0.0.0",
34
- "@osdk/monorepo.tsup": "~0.0.0"
33
+ "@osdk/monorepo.tsup": "~0.0.0",
34
+ "@osdk/monorepo.tsconfig": "~0.0.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"