sim 2.2.26-preview.295.1 → 2.2.26-preview.297.1
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/dist/generated/v2-api.d.ts +6 -1
- package/dist/index.js +7 -4
- package/dist/runtime.js +7 -4
- package/package.json +1 -1
|
@@ -6464,6 +6464,10 @@ type ListConnectorTypesResponseRef0 = {
|
|
|
6464
6464
|
label?: string;
|
|
6465
6465
|
placeholder?: string;
|
|
6466
6466
|
optional: boolean;
|
|
6467
|
+
savedCredential?: {
|
|
6468
|
+
provider: string;
|
|
6469
|
+
label: string;
|
|
6470
|
+
};
|
|
6467
6471
|
};
|
|
6468
6472
|
configFields: Array<ListConnectorTypesResponseRef1>;
|
|
6469
6473
|
supportsIncrementalSync: boolean;
|
|
@@ -6493,6 +6497,7 @@ type ListConnectorTypesResponseRef1 = {
|
|
|
6493
6497
|
mode?: 'basic' | 'advanced';
|
|
6494
6498
|
canonicalParamId?: string;
|
|
6495
6499
|
multi?: boolean;
|
|
6500
|
+
apiKeyOnly?: boolean;
|
|
6496
6501
|
};
|
|
6497
6502
|
type ListConnectorTypesResponseRef2 = {
|
|
6498
6503
|
connectorType: string;
|
|
@@ -13153,7 +13158,7 @@ export declare const V2_OPERATIONS: {
|
|
|
13153
13158
|
};
|
|
13154
13159
|
readonly credentialId: {
|
|
13155
13160
|
readonly kind: 'string';
|
|
13156
|
-
readonly describe: 'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors.';
|
|
13161
|
+
readonly describe: 'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.';
|
|
13157
13162
|
};
|
|
13158
13163
|
readonly apiKey: {
|
|
13159
13164
|
readonly kind: 'string';
|
package/dist/index.js
CHANGED
|
@@ -10474,7 +10474,7 @@ var V2_OPERATIONS = {
|
|
|
10474
10474
|
connectorType: { kind: "string", required: true, describe: "Registered connector type." },
|
|
10475
10475
|
credentialId: {
|
|
10476
10476
|
kind: "string",
|
|
10477
|
-
describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors."
|
|
10477
|
+
describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors."
|
|
10478
10478
|
},
|
|
10479
10479
|
apiKey: {
|
|
10480
10480
|
kind: "string",
|
|
@@ -23345,7 +23345,7 @@ async function credentialValues(provider, raw) {
|
|
|
23345
23345
|
throw new SimApiError(`--credentials.${id} must be one of: ${field.options.map((option) => option.value).join(", ")}.`, 0);
|
|
23346
23346
|
}
|
|
23347
23347
|
}
|
|
23348
|
-
if (
|
|
23348
|
+
if (values.serviceAccountJson !== undefined && (provider.keyless !== undefined || offersConfigurationAlternative(provider))) {
|
|
23349
23349
|
return values;
|
|
23350
23350
|
}
|
|
23351
23351
|
const authMethod = typeof values.authMethod === "string" ? values.authMethod : undefined;
|
|
@@ -23355,9 +23355,12 @@ async function credentialValues(provider, raw) {
|
|
|
23355
23355
|
}
|
|
23356
23356
|
return values;
|
|
23357
23357
|
}
|
|
23358
|
+
function offersConfigurationAlternative(provider) {
|
|
23359
|
+
return provider.fields.some((field) => field.id === "serviceAccountJson" && !field.required);
|
|
23360
|
+
}
|
|
23358
23361
|
function asServiceAccountJson(values, provider) {
|
|
23359
|
-
const
|
|
23360
|
-
return
|
|
23362
|
+
const configuration = values.subject !== undefined && values.subjectProof !== undefined || provider.keyless !== undefined && values.authType === provider.keyless.authType || values.authType !== undefined && values.serviceAccountJson === undefined && !provider.fields.some((field) => field.id === "authType") && offersConfigurationAlternative(provider);
|
|
23363
|
+
return configuration ? { serviceAccountJson: JSON.stringify(values) } : values;
|
|
23361
23364
|
}
|
|
23362
23365
|
function withKeylessRetryHint(error, providerId) {
|
|
23363
23366
|
if (!(error instanceof SimApiError))
|
package/dist/runtime.js
CHANGED
|
@@ -10523,7 +10523,7 @@ var V2_OPERATIONS = {
|
|
|
10523
10523
|
connectorType: { kind: "string", required: true, describe: "Registered connector type." },
|
|
10524
10524
|
credentialId: {
|
|
10525
10525
|
kind: "string",
|
|
10526
|
-
describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors."
|
|
10526
|
+
describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors."
|
|
10527
10527
|
},
|
|
10528
10528
|
apiKey: {
|
|
10529
10529
|
kind: "string",
|
|
@@ -23394,7 +23394,7 @@ async function credentialValues(provider, raw) {
|
|
|
23394
23394
|
throw new SimApiError(`--credentials.${id} must be one of: ${field.options.map((option) => option.value).join(", ")}.`, 0);
|
|
23395
23395
|
}
|
|
23396
23396
|
}
|
|
23397
|
-
if (
|
|
23397
|
+
if (values.serviceAccountJson !== undefined && (provider.keyless !== undefined || offersConfigurationAlternative(provider))) {
|
|
23398
23398
|
return values;
|
|
23399
23399
|
}
|
|
23400
23400
|
const authMethod = typeof values.authMethod === "string" ? values.authMethod : undefined;
|
|
@@ -23404,9 +23404,12 @@ async function credentialValues(provider, raw) {
|
|
|
23404
23404
|
}
|
|
23405
23405
|
return values;
|
|
23406
23406
|
}
|
|
23407
|
+
function offersConfigurationAlternative(provider) {
|
|
23408
|
+
return provider.fields.some((field) => field.id === "serviceAccountJson" && !field.required);
|
|
23409
|
+
}
|
|
23407
23410
|
function asServiceAccountJson(values, provider) {
|
|
23408
|
-
const
|
|
23409
|
-
return
|
|
23411
|
+
const configuration = values.subject !== undefined && values.subjectProof !== undefined || provider.keyless !== undefined && values.authType === provider.keyless.authType || values.authType !== undefined && values.serviceAccountJson === undefined && !provider.fields.some((field) => field.id === "authType") && offersConfigurationAlternative(provider);
|
|
23412
|
+
return configuration ? { serviceAccountJson: JSON.stringify(values) } : values;
|
|
23410
23413
|
}
|
|
23411
23414
|
function withKeylessRetryHint(error, providerId) {
|
|
23412
23415
|
if (!(error instanceof SimApiError))
|