@osdk/generator 1.10.0 → 1.11.0-next-20240426195134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 1.11.0-next-20240426195134
4
+
5
+ ### Minor Changes
6
+
7
+ - 2bb1acb: Added batch action support for 2.0 client
8
+
3
9
  ## 1.10.0
4
10
 
5
11
  ### Minor Changes
@@ -356,13 +356,13 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
356
356
 
357
357
 
358
358
  // Represents the runtime arguments for the action
359
- export type ${paramsIdentifier} = NOOP<OsdkActionParameters<${paramsDefIdentifier}>>;
359
+ export type ${paramsIdentifier} = NOOP<OsdkActionParameters<${paramsDefIdentifier}>> | NOOP<OsdkActionParameters<${paramsDefIdentifier}>>[];
360
360
 
361
361
 
362
362
  // Represents a fqn of the action
363
363
  export interface ${action.apiName} {
364
364
  ${getDescriptionIfPresent(action.description)}
365
- <OP extends ApplyActionOptions>(args: ${paramsIdentifier}, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
365
+ <P extends ${paramsIdentifier}, OP extends P extends NOOP<OsdkActionParameters<${paramsDefIdentifier}>>[]? ApplyBatchActionOptions: ApplyActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
366
366
  }
367
367
 
368
368
 
@@ -400,7 +400,7 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
400
400
  const importObjects = referencedObjectDefs.size > 0 ? `import type {${[...referencedObjectDefs].join(",")}} from "../objects${importExt}";` : "";
401
401
  await fs2.writeFile(path16__namespace.default.join(outDir, `${action.apiName}.ts`), await formatTs(`
402
402
  import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType } from "@osdk/api";
403
- import type { ActionSignature, ApplyActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client';
403
+ import type { ActionSignature, ApplyActionOptions, ApplyBatchActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client';
404
404
  import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
405
405
  ${importObjects}
406
406
 
@@ -1681,7 +1681,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, v2 = false
1681
1681
 
1682
1682
  };`;
1683
1683
  }
1684
- var ExpectedOsdkVersion = "0.16.0";
1684
+ var ExpectedOsdkVersion = "0.17.0";
1685
1685
  async function generateOntologyMetadataFile(ontology, userAgent, fs2, outDir) {
1686
1686
  fs2.writeFile(path16__namespace.default.join(outDir, "OntologyMetadata.ts"), await formatTs(`
1687
1687
  import { OntologyMetadata as OM } from "@osdk/api";