@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.
- package/CHANGELOG.md +7 -0
- package/build/browser/index.js +30 -26
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +30 -26
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
- package/build/esm/index.js +30 -26
- package/build/esm/index.js.map +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAU7E,wBAAsB,0BAA0B,CAC9C,EACE,iBAAiB,EAAE,QAAQ,EAC3B,EAAE,EACF,MAAM,EAAE,UAAU,EAClB,SAAc,EACd,QAAQ,EAAE,gBAAgB,GAC3B,EAAE,IAAI,CACL,eAAe,EACb,mBAAmB,GACnB,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,UAAU,CACb,
|
|
1
|
+
{"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAU7E,wBAAsB,0BAA0B,CAC9C,EACE,iBAAiB,EAAE,QAAQ,EAC3B,EAAE,EACF,MAAM,EAAE,UAAU,EAClB,SAAc,EACd,QAAQ,EAAE,gBAAgB,GAC3B,EAAE,IAAI,CACL,eAAe,EACb,mBAAmB,GACnB,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,UAAU,CACb,iBAuOF"}
|
package/build/esm/index.js
CHANGED
|
@@ -71,7 +71,7 @@ var EnhancedAction = class extends EnhancedBase {
|
|
|
71
71
|
return this.og.operations;
|
|
72
72
|
}
|
|
73
73
|
get paramsIdentifier() {
|
|
74
|
-
return `${this.shortApiName}.
|
|
74
|
+
return `${this.shortApiName}.Params`;
|
|
75
75
|
}
|
|
76
76
|
get definitionIdentifier() {
|
|
77
77
|
return `${this.shortApiName}.Definition`;
|
|
@@ -1940,7 +1940,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
|
|
|
1940
1940
|
|
|
1941
1941
|
|
|
1942
1942
|
|
|
1943
|
-
|
|
1943
|
+
|
|
1944
1944
|
export type ${objectDefIdentifier} = ${object.shortApiName}.Definition;
|
|
1945
1945
|
|
|
1946
1946
|
|
|
@@ -2008,17 +2008,17 @@ $ObjectSet<${objectDefIdentifier},
|
|
|
2008
2008
|
${objectSetIdentifier}
|
|
2009
2009
|
>
|
|
2010
2010
|
{
|
|
2011
|
-
readonly aggregate: <AO extends $AggregateOpts<${objectDefIdentifier}>>(
|
|
2011
|
+
readonly aggregate: <const AO extends $AggregateOpts<${objectDefIdentifier}>>(
|
|
2012
2012
|
req: $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<${objectDefIdentifier}, AO>,
|
|
2013
2013
|
) => Promise<$AggregationsResults<${objectDefIdentifier}, AO>>;
|
|
2014
2014
|
|
|
2015
2015
|
|
|
2016
|
-
readonly pivotTo: <L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>["objectSet"];
|
|
2016
|
+
readonly pivotTo: <const L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>["objectSet"];
|
|
2017
2017
|
${object instanceof EnhancedObjectType ? `
|
|
2018
2018
|
readonly fetchOne: <
|
|
2019
|
-
L extends ${propertyKeysIdentifier},
|
|
2020
|
-
R extends boolean,
|
|
2021
|
-
S extends false | "throw" = $NullabilityAdherenceDefault,
|
|
2019
|
+
const L extends ${propertyKeysIdentifier},
|
|
2020
|
+
const R extends boolean,
|
|
2021
|
+
const S extends false | "throw" = $NullabilityAdherenceDefault,
|
|
2022
2022
|
>(
|
|
2023
2023
|
primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}["primaryKeyType"]],
|
|
2024
2024
|
options?: $SelectArg<${objectDefIdentifier}, L, R, S>,
|
|
@@ -2030,9 +2030,9 @@ readonly fetchOne: <
|
|
|
2030
2030
|
;
|
|
2031
2031
|
|
|
2032
2032
|
readonly fetchOneWithErrors: <
|
|
2033
|
-
L extends ${propertyKeysIdentifier},
|
|
2034
|
-
R extends boolean,
|
|
2035
|
-
S extends false | "throw" = $NullabilityAdherenceDefault,
|
|
2033
|
+
const L extends ${propertyKeysIdentifier},
|
|
2034
|
+
const R extends boolean,
|
|
2035
|
+
const S extends false | "throw" = $NullabilityAdherenceDefault,
|
|
2036
2036
|
>(
|
|
2037
2037
|
primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}["primaryKeyType"]],
|
|
2038
2038
|
options?: $SelectArg<${objectDefIdentifier}, L, R, S>,
|
|
@@ -2048,10 +2048,10 @@ readonly fetchOneWithErrors: <
|
|
|
2048
2048
|
` : ""}
|
|
2049
2049
|
|
|
2050
2050
|
readonly fetchPage: <
|
|
2051
|
-
L extends ${propertyKeysIdentifier},
|
|
2052
|
-
R extends boolean,
|
|
2053
|
-
const A extends $Augments,
|
|
2054
|
-
S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
|
|
2051
|
+
const L extends ${propertyKeysIdentifier},
|
|
2052
|
+
const R extends boolean,
|
|
2053
|
+
const const A extends $Augments,
|
|
2054
|
+
const S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
|
|
2055
2055
|
>(
|
|
2056
2056
|
args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,
|
|
2057
2057
|
) => Promise<
|
|
@@ -2062,10 +2062,10 @@ readonly fetchPage: <
|
|
|
2062
2062
|
>;
|
|
2063
2063
|
|
|
2064
2064
|
readonly fetchPageWithErrors: <
|
|
2065
|
-
L extends ${propertyKeysIdentifier},
|
|
2066
|
-
R extends boolean,
|
|
2065
|
+
const L extends ${propertyKeysIdentifier},
|
|
2066
|
+
const R extends boolean,
|
|
2067
2067
|
const A extends $Augments,
|
|
2068
|
-
S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
|
|
2068
|
+
const S extends $NullabilityAdherence = $NullabilityAdherenceDefault,
|
|
2069
2069
|
>(
|
|
2070
2070
|
args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,
|
|
2071
2071
|
) => Promise<$Result<
|
|
@@ -2191,9 +2191,9 @@ async function generatePerActionDataFiles({
|
|
|
2191
2191
|
return JSON.stringify(type);
|
|
2192
2192
|
} else if (type.type === "object") {
|
|
2193
2193
|
const obj = enhancedOntology.requireObjectType(type.object);
|
|
2194
|
-
return `ObjectActionDataType<"${obj.fullApiName}", ${obj.getImportedDefinitionIdentifier(true)}>`;
|
|
2194
|
+
return `ObjectActionDataType<"${obj.fullApiName}", ${obj.getImportedDefinitionIdentifier(true)}.Definition>`;
|
|
2195
2195
|
} else if (type.type === "objectSet") {
|
|
2196
|
-
return `ObjectSetActionDataType<"${type.objectSet}", ${getObjectDefIdentifier(type.objectSet, true)}>`;
|
|
2196
|
+
return `ObjectSetActionDataType<"${type.objectSet}", ${getObjectDefIdentifier(type.objectSet, true)}.Definition>`;
|
|
2197
2197
|
}
|
|
2198
2198
|
return void 0;
|
|
2199
2199
|
}
|
|
@@ -2206,9 +2206,9 @@ async function generatePerActionDataFiles({
|
|
|
2206
2206
|
if (typeof input === "string") {
|
|
2207
2207
|
return `ActionParam.PrimitiveType<${JSON.stringify(input)}>`;
|
|
2208
2208
|
} else if (input.type === "object") {
|
|
2209
|
-
return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
|
|
2209
|
+
return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}.Definition>`;
|
|
2210
2210
|
} else if (input.type === "objectSet") {
|
|
2211
|
-
return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;
|
|
2211
|
+
return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}.Definition>`;
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
2214
|
function createV2Types() {
|
|
@@ -2219,7 +2219,7 @@ async function generatePerActionDataFiles({
|
|
|
2219
2219
|
${createParamsDef()}
|
|
2220
2220
|
|
|
2221
2221
|
${getDescriptionIfPresent(action.description)}
|
|
2222
|
-
export interface
|
|
2222
|
+
export interface Params {
|
|
2223
2223
|
${stringify(parameters, {
|
|
2224
2224
|
"*": (ogValue, _, ogKey) => {
|
|
2225
2225
|
const key = `${getDescriptionIfPresent(ogValue.description)}
|
|
@@ -2229,10 +2229,12 @@ async function generatePerActionDataFiles({
|
|
|
2229
2229
|
}
|
|
2230
2230
|
})}
|
|
2231
2231
|
}
|
|
2232
|
+
/** @deprecated **/
|
|
2233
|
+
export type Parameters = Params;
|
|
2232
2234
|
|
|
2233
2235
|
|
|
2234
2236
|
// Represents the definition of the action
|
|
2235
|
-
export interface Definition extends ActionDefinition<"${action.shortApiName}", ${uniqueApiNamesString}, ${action.shortApiName}>, VersionBound<$ExpectedClientVersion> {
|
|
2237
|
+
export interface Definition extends ActionDefinition<"${action.shortApiName}", ${uniqueApiNamesString}, ${action.shortApiName}.Signatures>, VersionBound<$ExpectedClientVersion> {
|
|
2236
2238
|
${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {
|
|
2237
2239
|
return `${key}: ${JSON.stringify(value)};`;
|
|
2238
2240
|
}).join("\n")}
|
|
@@ -2241,9 +2243,11 @@ async function generatePerActionDataFiles({
|
|
|
2241
2243
|
}
|
|
2242
2244
|
|
|
2243
2245
|
// Represents a fqn of the action
|
|
2244
|
-
export interface
|
|
2246
|
+
export interface Signatures {
|
|
2245
2247
|
${getDescriptionIfPresent(action.description)}
|
|
2246
|
-
|
|
2248
|
+
applyAction<P extends ${action.paramsIdentifier}, OP extends ApplyActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
2249
|
+
|
|
2250
|
+
batchApplyAction<P extends ReadonlyArray<${action.paramsIdentifier}>, OP extends ApplyBatchActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
|
|
2247
2251
|
}
|
|
2248
2252
|
|
|
2249
2253
|
}
|
|
@@ -2254,7 +2258,7 @@ async function generatePerActionDataFiles({
|
|
|
2254
2258
|
export type ${oldParamsIdentifier} = ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>;
|
|
2255
2259
|
|
|
2256
2260
|
/** @deprecated Use \`${action.definitionIdentifier}\` **/
|
|
2257
|
-
export type ${action.shortApiName} = ${action.shortApiName}.
|
|
2261
|
+
export type ${action.shortApiName} = ${action.shortApiName}.Signatures;
|
|
2258
2262
|
`;
|
|
2259
2263
|
}
|
|
2260
2264
|
function createV2Object() {
|