@osdk/generator 1.14.0-beta.1 → 1.14.0-beta.2

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.
@@ -98,7 +98,7 @@ var EnhancedAction = class extends EnhancedBase {
98
98
  return this.og.operations;
99
99
  }
100
100
  get paramsIdentifier() {
101
- return `${this.shortApiName}.Parameters`;
101
+ return `${this.shortApiName}.Params`;
102
102
  }
103
103
  get definitionIdentifier() {
104
104
  return `${this.shortApiName}.Definition`;
@@ -1967,7 +1967,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
1967
1967
 
1968
1968
 
1969
1969
 
1970
- /** @deprecated use ${object.shortApiName}.Definition **/
1970
+
1971
1971
  export type ${objectDefIdentifier} = ${object.shortApiName}.Definition;
1972
1972
 
1973
1973
 
@@ -2035,17 +2035,17 @@ $ObjectSet<${objectDefIdentifier},
2035
2035
  ${objectSetIdentifier}
2036
2036
  >
2037
2037
  {
2038
- readonly aggregate: <AO extends $AggregateOpts<${objectDefIdentifier}>>(
2038
+ readonly aggregate: <const AO extends $AggregateOpts<${objectDefIdentifier}>>(
2039
2039
  req: $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<${objectDefIdentifier}, AO>,
2040
2040
  ) => Promise<$AggregationsResults<${objectDefIdentifier}, AO>>;
2041
2041
 
2042
2042
 
2043
- readonly pivotTo: <L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>["objectSet"];
2043
+ readonly pivotTo: <const L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>["objectSet"];
2044
2044
  ${object instanceof EnhancedObjectType ? `
2045
2045
  readonly fetchOne: <
2046
- L extends ${propertyKeysIdentifier},
2047
- R extends boolean,
2048
- S extends false | "throw" = $NullabilityAdherenceDefault,
2046
+ const L extends ${propertyKeysIdentifier},
2047
+ const R extends boolean,
2048
+ const S extends false | "throw" = $NullabilityAdherenceDefault,
2049
2049
  >(
2050
2050
  primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}["primaryKeyType"]],
2051
2051
  options?: $SelectArg<${objectDefIdentifier}, L, R, S>,
@@ -2057,9 +2057,9 @@ readonly fetchOne: <
2057
2057
  ;
2058
2058
 
2059
2059
  readonly fetchOneWithErrors: <
2060
- L extends ${propertyKeysIdentifier},
2061
- R extends boolean,
2062
- S extends false | "throw" = $NullabilityAdherenceDefault,
2060
+ const L extends ${propertyKeysIdentifier},
2061
+ const R extends boolean,
2062
+ const S extends false | "throw" = $NullabilityAdherenceDefault,
2063
2063
  >(
2064
2064
  primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}["primaryKeyType"]],
2065
2065
  options?: $SelectArg<${objectDefIdentifier}, L, R, S>,
@@ -2075,10 +2075,10 @@ readonly fetchOneWithErrors: <
2075
2075
  ` : ""}
2076
2076
 
2077
2077
  readonly fetchPage: <
2078
- L extends ${propertyKeysIdentifier},
2079
- R extends boolean,
2080
- const A extends $Augments,
2081
- S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
2078
+ const L extends ${propertyKeysIdentifier},
2079
+ const R extends boolean,
2080
+ const const A extends $Augments,
2081
+ const S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
2082
2082
  >(
2083
2083
  args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,
2084
2084
  ) => Promise<
@@ -2089,10 +2089,10 @@ readonly fetchPage: <
2089
2089
  >;
2090
2090
 
2091
2091
  readonly fetchPageWithErrors: <
2092
- L extends ${propertyKeysIdentifier},
2093
- R extends boolean,
2092
+ const L extends ${propertyKeysIdentifier},
2093
+ const R extends boolean,
2094
2094
  const A extends $Augments,
2095
- S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
2095
+ const S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
2096
2096
  >(
2097
2097
  args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,
2098
2098
  ) => Promise<$Result<
@@ -2218,9 +2218,9 @@ async function generatePerActionDataFiles({
2218
2218
  return JSON.stringify(type);
2219
2219
  } else if (type.type === "object") {
2220
2220
  const obj = enhancedOntology.requireObjectType(type.object);
2221
- return `ObjectActionDataType<"${obj.fullApiName}", ${obj.getImportedDefinitionIdentifier(true)}>`;
2221
+ return `ObjectActionDataType<"${obj.fullApiName}", ${obj.getImportedDefinitionIdentifier(true)}.Definition>`;
2222
2222
  } else if (type.type === "objectSet") {
2223
- return `ObjectSetActionDataType<"${type.objectSet}", ${getObjectDefIdentifier(type.objectSet, true)}>`;
2223
+ return `ObjectSetActionDataType<"${type.objectSet}", ${getObjectDefIdentifier(type.objectSet, true)}.Definition>`;
2224
2224
  }
2225
2225
  return void 0;
2226
2226
  }
@@ -2233,9 +2233,9 @@ async function generatePerActionDataFiles({
2233
2233
  if (typeof input === "string") {
2234
2234
  return `ActionParam.PrimitiveType<${JSON.stringify(input)}>`;
2235
2235
  } else if (input.type === "object") {
2236
- return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
2236
+ return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}.Definition>`;
2237
2237
  } else if (input.type === "objectSet") {
2238
- return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;
2238
+ return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}.Definition>`;
2239
2239
  }
2240
2240
  }
2241
2241
  function createV2Types() {
@@ -2246,7 +2246,7 @@ async function generatePerActionDataFiles({
2246
2246
  ${createParamsDef()}
2247
2247
 
2248
2248
  ${getDescriptionIfPresent(action.description)}
2249
- export interface Parameters {
2249
+ export interface Params {
2250
2250
  ${stringify(parameters, {
2251
2251
  "*": (ogValue, _, ogKey) => {
2252
2252
  const key = `${getDescriptionIfPresent(ogValue.description)}
@@ -2256,10 +2256,12 @@ async function generatePerActionDataFiles({
2256
2256
  }
2257
2257
  })}
2258
2258
  }
2259
+ /** @deprecated **/
2260
+ export type Parameters = Params;
2259
2261
 
2260
2262
 
2261
2263
  // Represents the definition of the action
2262
- export interface Definition extends ActionDefinition<"${action.shortApiName}", ${uniqueApiNamesString}, ${action.shortApiName}>, VersionBound<$ExpectedClientVersion> {
2264
+ export interface Definition extends ActionDefinition<"${action.shortApiName}", ${uniqueApiNamesString}, ${action.shortApiName}.Signatures>, VersionBound<$ExpectedClientVersion> {
2263
2265
  ${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {
2264
2266
  return `${key}: ${JSON.stringify(value)};`;
2265
2267
  }).join("\n")}
@@ -2268,9 +2270,11 @@ async function generatePerActionDataFiles({
2268
2270
  }
2269
2271
 
2270
2272
  // Represents a fqn of the action
2271
- export interface Signature {
2273
+ export interface Signatures {
2272
2274
  ${getDescriptionIfPresent(action.description)}
2273
- <P extends ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>, OP extends (P extends ReadonlyArray<${action.paramsIdentifier}> ? ApplyBatchActionOptions: ApplyActionOptions)>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
2275
+ applyAction<P extends ${action.paramsIdentifier}, OP extends ApplyActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
2276
+
2277
+ batchApplyAction<P extends ReadonlyArray<${action.paramsIdentifier}>, OP extends ApplyBatchActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
2274
2278
  }
2275
2279
 
2276
2280
  }
@@ -2281,7 +2285,7 @@ async function generatePerActionDataFiles({
2281
2285
  export type ${oldParamsIdentifier} = ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>;
2282
2286
 
2283
2287
  /** @deprecated Use \`${action.definitionIdentifier}\` **/
2284
- export type ${action.shortApiName} = ${action.shortApiName}.Signature;
2288
+ export type ${action.shortApiName} = ${action.shortApiName}.Signatures;
2285
2289
  `;
2286
2290
  }
2287
2291
  function createV2Object() {