@seamapi/http 1.40.1 → 1.42.0
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/connect.cjs +638 -213
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +256 -224
- package/lib/seam/connect/resolve-action-attempt.d.ts +32 -168
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +12 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +9 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/acs/encoders/encoders.d.ts +0 -12
- package/lib/seam/connect/routes/acs/encoders/encoders.js +0 -9
- package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -1
- package/lib/seam/connect/routes/customers/customers.d.ts +47 -0
- package/lib/seam/connect/routes/customers/customers.js +105 -0
- package/lib/seam/connect/routes/customers/customers.js.map +1 -0
- package/lib/seam/connect/routes/customers/index.d.ts +1 -0
- package/lib/seam/connect/routes/{unstable-partner/resources → customers}/index.js +1 -1
- package/lib/seam/connect/routes/customers/index.js.map +1 -0
- package/lib/seam/connect/routes/devices/simulate/simulate.d.ts +1 -1
- package/lib/seam/connect/routes/index.d.ts +1 -0
- package/lib/seam/connect/routes/index.js +1 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/phones/simulate/simulate.d.ts +1 -1
- package/lib/seam/connect/routes/seam/customer/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/{partner/v1/resources → customer}/index.js +1 -1
- package/lib/seam/connect/routes/seam/customer/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.js +102 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.d.ts +60 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js +126 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/automations/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +5 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js +10 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/portals/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/portals/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/portals/index.js.map +1 -0
- package/lib/seam/connect/routes/{unstable-partner/resources/resources.d.ts → seam/customer/v1/portals/portals.d.ts} +20 -20
- package/lib/seam/connect/routes/{unstable-partner/resources/resources.js → seam/customer/v1/portals/portals.js} +21 -21
- package/lib/seam/connect/routes/{unstable-partner/resources/resources.js.map → seam/customer/v1/portals/portals.js.map} +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/settings/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/settings/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/settings/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/{partner/v1/resources/resources.d.ts → customer/v1/settings/settings.d.ts} +15 -15
- package/lib/seam/connect/routes/seam/{partner/v1/resources/resources.js → customer/v1/settings/settings.js} +14 -14
- package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js.map +1 -0
- package/lib/seam/connect/routes/seam/{partner → customer}/v1/v1.d.ts +15 -11
- package/lib/seam/connect/routes/seam/{partner → customer}/v1/v1.js +23 -15
- package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/index.js +1 -0
- package/lib/seam/connect/routes/seam/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/partner/v1/index.d.ts +0 -2
- package/lib/seam/connect/routes/seam/partner/v1/index.js +0 -2
- package/lib/seam/connect/routes/seam/partner/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +19 -10
- package/lib/seam/connect/routes/seam-http-endpoints.js +84 -27
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/seam-http.d.ts +2 -0
- package/lib/seam/connect/routes/seam-http.js +4 -0
- package/lib/seam/connect/routes/seam-http.js.map +1 -1
- package/lib/seam/connect/routes/unstable-partner/index.d.ts +0 -1
- package/lib/seam/connect/routes/unstable-partner/index.js +0 -1
- package/lib/seam/connect/routes/unstable-partner/index.js.map +1 -1
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.d.ts +0 -2
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.js +0 -4
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/access-methods/access-methods.ts +38 -0
- package/src/lib/seam/connect/routes/acs/encoders/encoders.ts +0 -39
- package/src/lib/seam/connect/routes/customers/customers.ts +234 -0
- package/src/lib/seam/connect/routes/{seam/partner/v1/resources → customers}/index.ts +1 -1
- package/src/lib/seam/connect/routes/devices/simulate/simulate.ts +1 -1
- package/src/lib/seam/connect/routes/index.ts +1 -0
- package/src/lib/seam/connect/routes/phones/simulate/simulate.ts +1 -1
- package/src/lib/seam/connect/routes/{unstable-partner/resources → seam/customer}/index.ts +1 -1
- package/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts +215 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts +303 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +10 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/portals/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/{partner/v1/resources/resources.ts → customer/v1/portals/portals.ts} +31 -32
- package/src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts +6 -0
- package/src/lib/seam/connect/routes/{unstable-partner/resources/resources.ts → seam/customer/v1/settings/settings.ts} +30 -33
- package/src/lib/seam/connect/routes/seam/{partner → customer}/v1/v1.ts +33 -20
- package/src/lib/seam/connect/routes/seam/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/index.ts +0 -2
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +216 -72
- package/src/lib/seam/connect/routes/seam-http.ts +5 -0
- package/src/lib/seam/connect/routes/unstable-partner/index.ts +0 -1
- package/src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts +0 -8
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/seam/partner/v1/resources/index.d.ts +0 -1
- package/lib/seam/connect/routes/seam/partner/v1/resources/index.js.map +0 -1
- package/lib/seam/connect/routes/seam/partner/v1/resources/resources.js.map +0 -1
- package/lib/seam/connect/routes/seam/partner/v1/v1.js.map +0 -1
- package/lib/seam/connect/routes/unstable-partner/resources/index.d.ts +0 -1
- package/lib/seam/connect/routes/unstable-partner/resources/index.js.map +0 -1
package/dist/connect.cjs
CHANGED
|
@@ -1619,6 +1619,15 @@ var _SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
1619
1619
|
options
|
|
1620
1620
|
});
|
|
1621
1621
|
}
|
|
1622
|
+
encode(parameters, options = {}) {
|
|
1623
|
+
return new SeamHttpRequest(this, {
|
|
1624
|
+
pathname: "/access_methods/encode",
|
|
1625
|
+
method: "POST",
|
|
1626
|
+
body: parameters,
|
|
1627
|
+
responseKey: "action_attempt",
|
|
1628
|
+
options
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1622
1631
|
get(parameters, options = {}) {
|
|
1623
1632
|
return new SeamHttpRequest(this, {
|
|
1624
1633
|
pathname: "/access_methods/get",
|
|
@@ -2621,15 +2630,6 @@ var _SeamHttpAcsEncoders = class _SeamHttpAcsEncoders {
|
|
|
2621
2630
|
get simulate() {
|
|
2622
2631
|
return SeamHttpAcsEncodersSimulate.fromClient(this.client, this.defaults);
|
|
2623
2632
|
}
|
|
2624
|
-
encodeAccessMethod(parameters, options = {}) {
|
|
2625
|
-
return new SeamHttpRequest(this, {
|
|
2626
|
-
pathname: "/acs/encoders/encode_access_method",
|
|
2627
|
-
method: "POST",
|
|
2628
|
-
body: parameters,
|
|
2629
|
-
responseKey: "action_attempt",
|
|
2630
|
-
options
|
|
2631
|
-
});
|
|
2632
|
-
}
|
|
2633
2633
|
encodeCredential(parameters, options = {}) {
|
|
2634
2634
|
return new SeamHttpRequest(this, {
|
|
2635
2635
|
pathname: "/acs/encoders/encode_credential",
|
|
@@ -3792,6 +3792,109 @@ var _SeamHttpConnectedAccounts = class _SeamHttpConnectedAccounts {
|
|
|
3792
3792
|
_SeamHttpConnectedAccounts.ltsVersion = seamApiLtsVersion;
|
|
3793
3793
|
var SeamHttpConnectedAccounts = _SeamHttpConnectedAccounts;
|
|
3794
3794
|
|
|
3795
|
+
// src/lib/seam/connect/routes/customers/customers.ts
|
|
3796
|
+
var _SeamHttpCustomers = class _SeamHttpCustomers {
|
|
3797
|
+
constructor(apiKeyOrOptions = {}) {
|
|
3798
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
3799
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
3800
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
3801
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
3802
|
+
}
|
|
3803
|
+
static fromClient(client, options = {}) {
|
|
3804
|
+
const constructorOptions = { ...options, client };
|
|
3805
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
3806
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
3807
|
+
}
|
|
3808
|
+
return new _SeamHttpCustomers(constructorOptions);
|
|
3809
|
+
}
|
|
3810
|
+
static fromApiKey(apiKey, options = {}) {
|
|
3811
|
+
const constructorOptions = { ...options, apiKey };
|
|
3812
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
3813
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
3814
|
+
}
|
|
3815
|
+
return new _SeamHttpCustomers(constructorOptions);
|
|
3816
|
+
}
|
|
3817
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
3818
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
3819
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
3820
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
3821
|
+
}
|
|
3822
|
+
return new _SeamHttpCustomers(constructorOptions);
|
|
3823
|
+
}
|
|
3824
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
3825
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
3826
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
3827
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
3828
|
+
throw new SeamHttpInvalidOptionsError(
|
|
3829
|
+
"The client option cannot be used with SeamHttpCustomers.fromPublishableKey"
|
|
3830
|
+
);
|
|
3831
|
+
}
|
|
3832
|
+
const client = createClient(clientOptions);
|
|
3833
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
3834
|
+
const { token } = await clientSessions.getOrCreate({
|
|
3835
|
+
user_identifier_key: userIdentifierKey
|
|
3836
|
+
});
|
|
3837
|
+
return _SeamHttpCustomers.fromClientSessionToken(token, options);
|
|
3838
|
+
}
|
|
3839
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
3840
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
3841
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
3842
|
+
throw new SeamHttpInvalidOptionsError(
|
|
3843
|
+
"Missing consoleSessionToken or workspaceId"
|
|
3844
|
+
);
|
|
3845
|
+
}
|
|
3846
|
+
return new _SeamHttpCustomers(constructorOptions);
|
|
3847
|
+
}
|
|
3848
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
3849
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
3850
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
3851
|
+
throw new SeamHttpInvalidOptionsError(
|
|
3852
|
+
"Missing personalAccessToken or workspaceId"
|
|
3853
|
+
);
|
|
3854
|
+
}
|
|
3855
|
+
return new _SeamHttpCustomers(constructorOptions);
|
|
3856
|
+
}
|
|
3857
|
+
createPaginator(request) {
|
|
3858
|
+
return new SeamPaginator(this, request);
|
|
3859
|
+
}
|
|
3860
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
3861
|
+
const { headers } = this.client.defaults;
|
|
3862
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
3863
|
+
clientSessionToken
|
|
3864
|
+
});
|
|
3865
|
+
for (const key of Object.keys(authHeaders)) {
|
|
3866
|
+
if (headers[key] == null) {
|
|
3867
|
+
throw new Error(
|
|
3868
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
3869
|
+
);
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
3873
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
3874
|
+
await clientSessions.get();
|
|
3875
|
+
}
|
|
3876
|
+
createPortal(parameters, options = {}) {
|
|
3877
|
+
return new SeamHttpRequest(this, {
|
|
3878
|
+
pathname: "/customers/create_portal",
|
|
3879
|
+
method: "POST",
|
|
3880
|
+
body: parameters,
|
|
3881
|
+
responseKey: "magic_link",
|
|
3882
|
+
options
|
|
3883
|
+
});
|
|
3884
|
+
}
|
|
3885
|
+
pushData(parameters, options = {}) {
|
|
3886
|
+
return new SeamHttpRequest(this, {
|
|
3887
|
+
pathname: "/customers/push_data",
|
|
3888
|
+
method: "POST",
|
|
3889
|
+
body: parameters,
|
|
3890
|
+
responseKey: void 0,
|
|
3891
|
+
options
|
|
3892
|
+
});
|
|
3893
|
+
}
|
|
3894
|
+
};
|
|
3895
|
+
_SeamHttpCustomers.ltsVersion = seamApiLtsVersion;
|
|
3896
|
+
var SeamHttpCustomers = _SeamHttpCustomers;
|
|
3897
|
+
|
|
3795
3898
|
// src/lib/seam/connect/routes/devices/simulate/simulate.ts
|
|
3796
3899
|
var _SeamHttpDevicesSimulate = class _SeamHttpDevicesSimulate {
|
|
3797
3900
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -5159,8 +5262,8 @@ var _SeamHttpPhones = class _SeamHttpPhones {
|
|
|
5159
5262
|
_SeamHttpPhones.ltsVersion = seamApiLtsVersion;
|
|
5160
5263
|
var SeamHttpPhones = _SeamHttpPhones;
|
|
5161
5264
|
|
|
5162
|
-
// src/lib/seam/connect/routes/seam/
|
|
5163
|
-
var
|
|
5265
|
+
// src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts
|
|
5266
|
+
var _SeamHttpSeamCustomerV1AutomationRuns = class _SeamHttpSeamCustomerV1AutomationRuns {
|
|
5164
5267
|
constructor(apiKeyOrOptions = {}) {
|
|
5165
5268
|
this.ltsVersion = seamApiLtsVersion;
|
|
5166
5269
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -5177,28 +5280,28 @@ var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1Bui
|
|
|
5177
5280
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5178
5281
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5179
5282
|
}
|
|
5180
|
-
return new
|
|
5283
|
+
return new _SeamHttpSeamCustomerV1AutomationRuns(constructorOptions);
|
|
5181
5284
|
}
|
|
5182
5285
|
static fromApiKey(apiKey, options = {}) {
|
|
5183
5286
|
const constructorOptions = { ...options, apiKey };
|
|
5184
5287
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5185
5288
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5186
5289
|
}
|
|
5187
|
-
return new
|
|
5290
|
+
return new _SeamHttpSeamCustomerV1AutomationRuns(constructorOptions);
|
|
5188
5291
|
}
|
|
5189
5292
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5190
5293
|
const constructorOptions = { ...options, clientSessionToken };
|
|
5191
5294
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5192
5295
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5193
5296
|
}
|
|
5194
|
-
return new
|
|
5297
|
+
return new _SeamHttpSeamCustomerV1AutomationRuns(constructorOptions);
|
|
5195
5298
|
}
|
|
5196
5299
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5197
5300
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5198
5301
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5199
5302
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5200
5303
|
throw new SeamHttpInvalidOptionsError(
|
|
5201
|
-
"The client option cannot be used with
|
|
5304
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1AutomationRuns.fromPublishableKey"
|
|
5202
5305
|
);
|
|
5203
5306
|
}
|
|
5204
5307
|
const client = createClient(clientOptions);
|
|
@@ -5206,7 +5309,7 @@ var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1Bui
|
|
|
5206
5309
|
const { token } = await clientSessions.getOrCreate({
|
|
5207
5310
|
user_identifier_key: userIdentifierKey
|
|
5208
5311
|
});
|
|
5209
|
-
return
|
|
5312
|
+
return _SeamHttpSeamCustomerV1AutomationRuns.fromClientSessionToken(
|
|
5210
5313
|
token,
|
|
5211
5314
|
options
|
|
5212
5315
|
);
|
|
@@ -5218,7 +5321,350 @@ var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1Bui
|
|
|
5218
5321
|
"Missing consoleSessionToken or workspaceId"
|
|
5219
5322
|
);
|
|
5220
5323
|
}
|
|
5221
|
-
return new
|
|
5324
|
+
return new _SeamHttpSeamCustomerV1AutomationRuns(constructorOptions);
|
|
5325
|
+
}
|
|
5326
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5327
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5328
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5329
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5330
|
+
"Missing personalAccessToken or workspaceId"
|
|
5331
|
+
);
|
|
5332
|
+
}
|
|
5333
|
+
return new _SeamHttpSeamCustomerV1AutomationRuns(constructorOptions);
|
|
5334
|
+
}
|
|
5335
|
+
createPaginator(request) {
|
|
5336
|
+
return new SeamPaginator(this, request);
|
|
5337
|
+
}
|
|
5338
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5339
|
+
const { headers } = this.client.defaults;
|
|
5340
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5341
|
+
clientSessionToken
|
|
5342
|
+
});
|
|
5343
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5344
|
+
if (headers[key] == null) {
|
|
5345
|
+
throw new Error(
|
|
5346
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5347
|
+
);
|
|
5348
|
+
}
|
|
5349
|
+
}
|
|
5350
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5351
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5352
|
+
await clientSessions.get();
|
|
5353
|
+
}
|
|
5354
|
+
list(parameters, options = {}) {
|
|
5355
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5356
|
+
throw new Error(
|
|
5357
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5358
|
+
);
|
|
5359
|
+
}
|
|
5360
|
+
return new SeamHttpRequest(this, {
|
|
5361
|
+
pathname: "/seam/customer/v1/automation_runs/list",
|
|
5362
|
+
method: "POST",
|
|
5363
|
+
body: parameters,
|
|
5364
|
+
responseKey: "automation_runs",
|
|
5365
|
+
options
|
|
5366
|
+
});
|
|
5367
|
+
}
|
|
5368
|
+
};
|
|
5369
|
+
_SeamHttpSeamCustomerV1AutomationRuns.ltsVersion = seamApiLtsVersion;
|
|
5370
|
+
var SeamHttpSeamCustomerV1AutomationRuns = _SeamHttpSeamCustomerV1AutomationRuns;
|
|
5371
|
+
|
|
5372
|
+
// src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts
|
|
5373
|
+
var _SeamHttpSeamCustomerV1Automations = class _SeamHttpSeamCustomerV1Automations {
|
|
5374
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5375
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5376
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5377
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5378
|
+
throw new Error(
|
|
5379
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5380
|
+
);
|
|
5381
|
+
}
|
|
5382
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5383
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5384
|
+
}
|
|
5385
|
+
static fromClient(client, options = {}) {
|
|
5386
|
+
const constructorOptions = { ...options, client };
|
|
5387
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5388
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5389
|
+
}
|
|
5390
|
+
return new _SeamHttpSeamCustomerV1Automations(constructorOptions);
|
|
5391
|
+
}
|
|
5392
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5393
|
+
const constructorOptions = { ...options, apiKey };
|
|
5394
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5395
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5396
|
+
}
|
|
5397
|
+
return new _SeamHttpSeamCustomerV1Automations(constructorOptions);
|
|
5398
|
+
}
|
|
5399
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5400
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5401
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5402
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5403
|
+
}
|
|
5404
|
+
return new _SeamHttpSeamCustomerV1Automations(constructorOptions);
|
|
5405
|
+
}
|
|
5406
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5407
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5408
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5409
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5410
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5411
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1Automations.fromPublishableKey"
|
|
5412
|
+
);
|
|
5413
|
+
}
|
|
5414
|
+
const client = createClient(clientOptions);
|
|
5415
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5416
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5417
|
+
user_identifier_key: userIdentifierKey
|
|
5418
|
+
});
|
|
5419
|
+
return _SeamHttpSeamCustomerV1Automations.fromClientSessionToken(
|
|
5420
|
+
token,
|
|
5421
|
+
options
|
|
5422
|
+
);
|
|
5423
|
+
}
|
|
5424
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5425
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5426
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5427
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5428
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5429
|
+
);
|
|
5430
|
+
}
|
|
5431
|
+
return new _SeamHttpSeamCustomerV1Automations(constructorOptions);
|
|
5432
|
+
}
|
|
5433
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5434
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5435
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5436
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5437
|
+
"Missing personalAccessToken or workspaceId"
|
|
5438
|
+
);
|
|
5439
|
+
}
|
|
5440
|
+
return new _SeamHttpSeamCustomerV1Automations(constructorOptions);
|
|
5441
|
+
}
|
|
5442
|
+
createPaginator(request) {
|
|
5443
|
+
return new SeamPaginator(this, request);
|
|
5444
|
+
}
|
|
5445
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5446
|
+
const { headers } = this.client.defaults;
|
|
5447
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5448
|
+
clientSessionToken
|
|
5449
|
+
});
|
|
5450
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5451
|
+
if (headers[key] == null) {
|
|
5452
|
+
throw new Error(
|
|
5453
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5454
|
+
);
|
|
5455
|
+
}
|
|
5456
|
+
}
|
|
5457
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5458
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5459
|
+
await clientSessions.get();
|
|
5460
|
+
}
|
|
5461
|
+
delete(parameters, options = {}) {
|
|
5462
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5463
|
+
throw new Error(
|
|
5464
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5465
|
+
);
|
|
5466
|
+
}
|
|
5467
|
+
return new SeamHttpRequest(this, {
|
|
5468
|
+
pathname: "/seam/customer/v1/automations/delete",
|
|
5469
|
+
method: "POST",
|
|
5470
|
+
body: parameters,
|
|
5471
|
+
responseKey: void 0,
|
|
5472
|
+
options
|
|
5473
|
+
});
|
|
5474
|
+
}
|
|
5475
|
+
get(parameters, options = {}) {
|
|
5476
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5477
|
+
throw new Error(
|
|
5478
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5479
|
+
);
|
|
5480
|
+
}
|
|
5481
|
+
return new SeamHttpRequest(this, {
|
|
5482
|
+
pathname: "/seam/customer/v1/automations/get",
|
|
5483
|
+
method: "GET",
|
|
5484
|
+
params: parameters,
|
|
5485
|
+
responseKey: void 0,
|
|
5486
|
+
options
|
|
5487
|
+
});
|
|
5488
|
+
}
|
|
5489
|
+
update(parameters, options = {}) {
|
|
5490
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5491
|
+
throw new Error(
|
|
5492
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5493
|
+
);
|
|
5494
|
+
}
|
|
5495
|
+
return new SeamHttpRequest(this, {
|
|
5496
|
+
pathname: "/seam/customer/v1/automations/update",
|
|
5497
|
+
method: "PATCH",
|
|
5498
|
+
body: parameters,
|
|
5499
|
+
responseKey: void 0,
|
|
5500
|
+
options
|
|
5501
|
+
});
|
|
5502
|
+
}
|
|
5503
|
+
};
|
|
5504
|
+
_SeamHttpSeamCustomerV1Automations.ltsVersion = seamApiLtsVersion;
|
|
5505
|
+
var SeamHttpSeamCustomerV1Automations = _SeamHttpSeamCustomerV1Automations;
|
|
5506
|
+
|
|
5507
|
+
// src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts
|
|
5508
|
+
var _SeamHttpSeamCustomerV1Portals = class _SeamHttpSeamCustomerV1Portals {
|
|
5509
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5510
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5511
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5512
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5513
|
+
throw new Error(
|
|
5514
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5515
|
+
);
|
|
5516
|
+
}
|
|
5517
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5518
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5519
|
+
}
|
|
5520
|
+
static fromClient(client, options = {}) {
|
|
5521
|
+
const constructorOptions = { ...options, client };
|
|
5522
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5523
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5524
|
+
}
|
|
5525
|
+
return new _SeamHttpSeamCustomerV1Portals(constructorOptions);
|
|
5526
|
+
}
|
|
5527
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5528
|
+
const constructorOptions = { ...options, apiKey };
|
|
5529
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5530
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5531
|
+
}
|
|
5532
|
+
return new _SeamHttpSeamCustomerV1Portals(constructorOptions);
|
|
5533
|
+
}
|
|
5534
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5535
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5536
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5537
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5538
|
+
}
|
|
5539
|
+
return new _SeamHttpSeamCustomerV1Portals(constructorOptions);
|
|
5540
|
+
}
|
|
5541
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5542
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5543
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5544
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5545
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5546
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1Portals.fromPublishableKey"
|
|
5547
|
+
);
|
|
5548
|
+
}
|
|
5549
|
+
const client = createClient(clientOptions);
|
|
5550
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5551
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5552
|
+
user_identifier_key: userIdentifierKey
|
|
5553
|
+
});
|
|
5554
|
+
return _SeamHttpSeamCustomerV1Portals.fromClientSessionToken(token, options);
|
|
5555
|
+
}
|
|
5556
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5557
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5558
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5559
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5560
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5561
|
+
);
|
|
5562
|
+
}
|
|
5563
|
+
return new _SeamHttpSeamCustomerV1Portals(constructorOptions);
|
|
5564
|
+
}
|
|
5565
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5566
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5567
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5568
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5569
|
+
"Missing personalAccessToken or workspaceId"
|
|
5570
|
+
);
|
|
5571
|
+
}
|
|
5572
|
+
return new _SeamHttpSeamCustomerV1Portals(constructorOptions);
|
|
5573
|
+
}
|
|
5574
|
+
createPaginator(request) {
|
|
5575
|
+
return new SeamPaginator(this, request);
|
|
5576
|
+
}
|
|
5577
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5578
|
+
const { headers } = this.client.defaults;
|
|
5579
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5580
|
+
clientSessionToken
|
|
5581
|
+
});
|
|
5582
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5583
|
+
if (headers[key] == null) {
|
|
5584
|
+
throw new Error(
|
|
5585
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5586
|
+
);
|
|
5587
|
+
}
|
|
5588
|
+
}
|
|
5589
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5590
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5591
|
+
await clientSessions.get();
|
|
5592
|
+
}
|
|
5593
|
+
get(parameters, options = {}) {
|
|
5594
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5595
|
+
throw new Error(
|
|
5596
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5597
|
+
);
|
|
5598
|
+
}
|
|
5599
|
+
return new SeamHttpRequest(this, {
|
|
5600
|
+
pathname: "/seam/customer/v1/portals/get",
|
|
5601
|
+
method: "POST",
|
|
5602
|
+
body: parameters,
|
|
5603
|
+
responseKey: "customer_portal",
|
|
5604
|
+
options
|
|
5605
|
+
});
|
|
5606
|
+
}
|
|
5607
|
+
};
|
|
5608
|
+
_SeamHttpSeamCustomerV1Portals.ltsVersion = seamApiLtsVersion;
|
|
5609
|
+
var SeamHttpSeamCustomerV1Portals = _SeamHttpSeamCustomerV1Portals;
|
|
5610
|
+
|
|
5611
|
+
// src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts
|
|
5612
|
+
var _SeamHttpSeamCustomerV1Settings = class _SeamHttpSeamCustomerV1Settings {
|
|
5613
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5614
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5615
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5616
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5617
|
+
throw new Error(
|
|
5618
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5619
|
+
);
|
|
5620
|
+
}
|
|
5621
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5622
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5623
|
+
}
|
|
5624
|
+
static fromClient(client, options = {}) {
|
|
5625
|
+
const constructorOptions = { ...options, client };
|
|
5626
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5627
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5628
|
+
}
|
|
5629
|
+
return new _SeamHttpSeamCustomerV1Settings(constructorOptions);
|
|
5630
|
+
}
|
|
5631
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5632
|
+
const constructorOptions = { ...options, apiKey };
|
|
5633
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5634
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5635
|
+
}
|
|
5636
|
+
return new _SeamHttpSeamCustomerV1Settings(constructorOptions);
|
|
5637
|
+
}
|
|
5638
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5639
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5640
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5641
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5642
|
+
}
|
|
5643
|
+
return new _SeamHttpSeamCustomerV1Settings(constructorOptions);
|
|
5644
|
+
}
|
|
5645
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5646
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5647
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5648
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5649
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5650
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1Settings.fromPublishableKey"
|
|
5651
|
+
);
|
|
5652
|
+
}
|
|
5653
|
+
const client = createClient(clientOptions);
|
|
5654
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5655
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5656
|
+
user_identifier_key: userIdentifierKey
|
|
5657
|
+
});
|
|
5658
|
+
return _SeamHttpSeamCustomerV1Settings.fromClientSessionToken(token, options);
|
|
5659
|
+
}
|
|
5660
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5661
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5662
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5663
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5664
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5665
|
+
);
|
|
5666
|
+
}
|
|
5667
|
+
return new _SeamHttpSeamCustomerV1Settings(constructorOptions);
|
|
5222
5668
|
}
|
|
5223
5669
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5224
5670
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -5227,7 +5673,7 @@ var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1Bui
|
|
|
5227
5673
|
"Missing personalAccessToken or workspaceId"
|
|
5228
5674
|
);
|
|
5229
5675
|
}
|
|
5230
|
-
return new
|
|
5676
|
+
return new _SeamHttpSeamCustomerV1Settings(constructorOptions);
|
|
5231
5677
|
}
|
|
5232
5678
|
createPaginator(request) {
|
|
5233
5679
|
return new SeamPaginator(this, request);
|
|
@@ -5248,26 +5694,26 @@ var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1Bui
|
|
|
5248
5694
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5249
5695
|
await clientSessions.get();
|
|
5250
5696
|
}
|
|
5251
|
-
|
|
5697
|
+
update(parameters, options = {}) {
|
|
5252
5698
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5253
5699
|
throw new Error(
|
|
5254
5700
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5255
5701
|
);
|
|
5256
5702
|
}
|
|
5257
5703
|
return new SeamHttpRequest(this, {
|
|
5258
|
-
pathname: "/seam/
|
|
5259
|
-
method: "
|
|
5704
|
+
pathname: "/seam/customer/v1/settings/update",
|
|
5705
|
+
method: "PATCH",
|
|
5260
5706
|
body: parameters,
|
|
5261
|
-
responseKey:
|
|
5707
|
+
responseKey: void 0,
|
|
5262
5708
|
options
|
|
5263
5709
|
});
|
|
5264
5710
|
}
|
|
5265
5711
|
};
|
|
5266
|
-
|
|
5267
|
-
var
|
|
5712
|
+
_SeamHttpSeamCustomerV1Settings.ltsVersion = seamApiLtsVersion;
|
|
5713
|
+
var SeamHttpSeamCustomerV1Settings = _SeamHttpSeamCustomerV1Settings;
|
|
5268
5714
|
|
|
5269
|
-
// src/lib/seam/connect/routes/seam/
|
|
5270
|
-
var
|
|
5715
|
+
// src/lib/seam/connect/routes/seam/customer/v1/v1.ts
|
|
5716
|
+
var _SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
5271
5717
|
constructor(apiKeyOrOptions = {}) {
|
|
5272
5718
|
this.ltsVersion = seamApiLtsVersion;
|
|
5273
5719
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -5284,28 +5730,28 @@ var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingB
|
|
|
5284
5730
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5285
5731
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5286
5732
|
}
|
|
5287
|
-
return new
|
|
5733
|
+
return new _SeamHttpSeamCustomerV1(constructorOptions);
|
|
5288
5734
|
}
|
|
5289
5735
|
static fromApiKey(apiKey, options = {}) {
|
|
5290
5736
|
const constructorOptions = { ...options, apiKey };
|
|
5291
5737
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5292
5738
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5293
5739
|
}
|
|
5294
|
-
return new
|
|
5740
|
+
return new _SeamHttpSeamCustomerV1(constructorOptions);
|
|
5295
5741
|
}
|
|
5296
5742
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5297
5743
|
const constructorOptions = { ...options, clientSessionToken };
|
|
5298
5744
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5299
5745
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5300
5746
|
}
|
|
5301
|
-
return new
|
|
5747
|
+
return new _SeamHttpSeamCustomerV1(constructorOptions);
|
|
5302
5748
|
}
|
|
5303
5749
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5304
5750
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5305
5751
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5306
5752
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5307
5753
|
throw new SeamHttpInvalidOptionsError(
|
|
5308
|
-
"The client option cannot be used with
|
|
5754
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1.fromPublishableKey"
|
|
5309
5755
|
);
|
|
5310
5756
|
}
|
|
5311
5757
|
const client = createClient(clientOptions);
|
|
@@ -5313,10 +5759,7 @@ var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingB
|
|
|
5313
5759
|
const { token } = await clientSessions.getOrCreate({
|
|
5314
5760
|
user_identifier_key: userIdentifierKey
|
|
5315
5761
|
});
|
|
5316
|
-
return
|
|
5317
|
-
token,
|
|
5318
|
-
options
|
|
5319
|
-
);
|
|
5762
|
+
return _SeamHttpSeamCustomerV1.fromClientSessionToken(token, options);
|
|
5320
5763
|
}
|
|
5321
5764
|
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5322
5765
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
@@ -5325,7 +5768,7 @@ var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingB
|
|
|
5325
5768
|
"Missing consoleSessionToken or workspaceId"
|
|
5326
5769
|
);
|
|
5327
5770
|
}
|
|
5328
|
-
return new
|
|
5771
|
+
return new _SeamHttpSeamCustomerV1(constructorOptions);
|
|
5329
5772
|
}
|
|
5330
5773
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5331
5774
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -5334,7 +5777,7 @@ var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingB
|
|
|
5334
5777
|
"Missing personalAccessToken or workspaceId"
|
|
5335
5778
|
);
|
|
5336
5779
|
}
|
|
5337
|
-
return new
|
|
5780
|
+
return new _SeamHttpSeamCustomerV1(constructorOptions);
|
|
5338
5781
|
}
|
|
5339
5782
|
createPaginator(request) {
|
|
5340
5783
|
return new SeamPaginator(this, request);
|
|
@@ -5355,18 +5798,30 @@ var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingB
|
|
|
5355
5798
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5356
5799
|
await clientSessions.get();
|
|
5357
5800
|
}
|
|
5358
|
-
get
|
|
5359
|
-
return
|
|
5801
|
+
get automationRuns() {
|
|
5802
|
+
return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
|
|
5360
5803
|
this.client,
|
|
5361
5804
|
this.defaults
|
|
5362
5805
|
);
|
|
5363
5806
|
}
|
|
5807
|
+
get automations() {
|
|
5808
|
+
return SeamHttpSeamCustomerV1Automations.fromClient(
|
|
5809
|
+
this.client,
|
|
5810
|
+
this.defaults
|
|
5811
|
+
);
|
|
5812
|
+
}
|
|
5813
|
+
get portals() {
|
|
5814
|
+
return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults);
|
|
5815
|
+
}
|
|
5816
|
+
get settings() {
|
|
5817
|
+
return SeamHttpSeamCustomerV1Settings.fromClient(this.client, this.defaults);
|
|
5818
|
+
}
|
|
5364
5819
|
};
|
|
5365
|
-
|
|
5366
|
-
var
|
|
5820
|
+
_SeamHttpSeamCustomerV1.ltsVersion = seamApiLtsVersion;
|
|
5821
|
+
var SeamHttpSeamCustomerV1 = _SeamHttpSeamCustomerV1;
|
|
5367
5822
|
|
|
5368
|
-
// src/lib/seam/connect/routes/seam/partner/v1/
|
|
5369
|
-
var
|
|
5823
|
+
// src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts
|
|
5824
|
+
var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1BuildingBlocksSpaces {
|
|
5370
5825
|
constructor(apiKeyOrOptions = {}) {
|
|
5371
5826
|
this.ltsVersion = seamApiLtsVersion;
|
|
5372
5827
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -5383,28 +5838,28 @@ var _SeamHttpSeamPartnerV1Resources = class _SeamHttpSeamPartnerV1Resources {
|
|
|
5383
5838
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5384
5839
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5385
5840
|
}
|
|
5386
|
-
return new
|
|
5841
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions);
|
|
5387
5842
|
}
|
|
5388
5843
|
static fromApiKey(apiKey, options = {}) {
|
|
5389
5844
|
const constructorOptions = { ...options, apiKey };
|
|
5390
5845
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5391
5846
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5392
5847
|
}
|
|
5393
|
-
return new
|
|
5848
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions);
|
|
5394
5849
|
}
|
|
5395
5850
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5396
5851
|
const constructorOptions = { ...options, clientSessionToken };
|
|
5397
5852
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5398
5853
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5399
5854
|
}
|
|
5400
|
-
return new
|
|
5855
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions);
|
|
5401
5856
|
}
|
|
5402
5857
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5403
5858
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5404
5859
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5405
5860
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5406
5861
|
throw new SeamHttpInvalidOptionsError(
|
|
5407
|
-
"The client option cannot be used with
|
|
5862
|
+
"The client option cannot be used with SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromPublishableKey"
|
|
5408
5863
|
);
|
|
5409
5864
|
}
|
|
5410
5865
|
const client = createClient(clientOptions);
|
|
@@ -5412,7 +5867,10 @@ var _SeamHttpSeamPartnerV1Resources = class _SeamHttpSeamPartnerV1Resources {
|
|
|
5412
5867
|
const { token } = await clientSessions.getOrCreate({
|
|
5413
5868
|
user_identifier_key: userIdentifierKey
|
|
5414
5869
|
});
|
|
5415
|
-
return
|
|
5870
|
+
return _SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClientSessionToken(
|
|
5871
|
+
token,
|
|
5872
|
+
options
|
|
5873
|
+
);
|
|
5416
5874
|
}
|
|
5417
5875
|
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5418
5876
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
@@ -5421,7 +5879,7 @@ var _SeamHttpSeamPartnerV1Resources = class _SeamHttpSeamPartnerV1Resources {
|
|
|
5421
5879
|
"Missing consoleSessionToken or workspaceId"
|
|
5422
5880
|
);
|
|
5423
5881
|
}
|
|
5424
|
-
return new
|
|
5882
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions);
|
|
5425
5883
|
}
|
|
5426
5884
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5427
5885
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -5430,7 +5888,7 @@ var _SeamHttpSeamPartnerV1Resources = class _SeamHttpSeamPartnerV1Resources {
|
|
|
5430
5888
|
"Missing personalAccessToken or workspaceId"
|
|
5431
5889
|
);
|
|
5432
5890
|
}
|
|
5433
|
-
return new
|
|
5891
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions);
|
|
5434
5892
|
}
|
|
5435
5893
|
createPaginator(request) {
|
|
5436
5894
|
return new SeamPaginator(this, request);
|
|
@@ -5451,26 +5909,26 @@ var _SeamHttpSeamPartnerV1Resources = class _SeamHttpSeamPartnerV1Resources {
|
|
|
5451
5909
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5452
5910
|
await clientSessions.get();
|
|
5453
5911
|
}
|
|
5454
|
-
|
|
5912
|
+
autoMap(parameters, options = {}) {
|
|
5455
5913
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5456
5914
|
throw new Error(
|
|
5457
5915
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5458
5916
|
);
|
|
5459
5917
|
}
|
|
5460
5918
|
return new SeamHttpRequest(this, {
|
|
5461
|
-
pathname: "/seam/partner/v1/
|
|
5919
|
+
pathname: "/seam/partner/v1/building_blocks/spaces/auto_map",
|
|
5462
5920
|
method: "POST",
|
|
5463
5921
|
body: parameters,
|
|
5464
|
-
responseKey: "
|
|
5922
|
+
responseKey: "spaces",
|
|
5465
5923
|
options
|
|
5466
5924
|
});
|
|
5467
5925
|
}
|
|
5468
5926
|
};
|
|
5469
|
-
|
|
5470
|
-
var
|
|
5927
|
+
_SeamHttpSeamPartnerV1BuildingBlocksSpaces.ltsVersion = seamApiLtsVersion;
|
|
5928
|
+
var SeamHttpSeamPartnerV1BuildingBlocksSpaces = _SeamHttpSeamPartnerV1BuildingBlocksSpaces;
|
|
5471
5929
|
|
|
5472
|
-
// src/lib/seam/connect/routes/seam/partner/v1/
|
|
5473
|
-
var
|
|
5930
|
+
// src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts
|
|
5931
|
+
var _SeamHttpSeamPartnerV1BuildingBlocks = class _SeamHttpSeamPartnerV1BuildingBlocks {
|
|
5474
5932
|
constructor(apiKeyOrOptions = {}) {
|
|
5475
5933
|
this.ltsVersion = seamApiLtsVersion;
|
|
5476
5934
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -5487,28 +5945,28 @@ var _SeamHttpSeamPartnerV1 = class _SeamHttpSeamPartnerV1 {
|
|
|
5487
5945
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5488
5946
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5489
5947
|
}
|
|
5490
|
-
return new
|
|
5948
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions);
|
|
5491
5949
|
}
|
|
5492
5950
|
static fromApiKey(apiKey, options = {}) {
|
|
5493
5951
|
const constructorOptions = { ...options, apiKey };
|
|
5494
5952
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5495
5953
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5496
5954
|
}
|
|
5497
|
-
return new
|
|
5955
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions);
|
|
5498
5956
|
}
|
|
5499
5957
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5500
5958
|
const constructorOptions = { ...options, clientSessionToken };
|
|
5501
5959
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5502
5960
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5503
5961
|
}
|
|
5504
|
-
return new
|
|
5962
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions);
|
|
5505
5963
|
}
|
|
5506
5964
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5507
5965
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5508
5966
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5509
5967
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5510
5968
|
throw new SeamHttpInvalidOptionsError(
|
|
5511
|
-
"The client option cannot be used with
|
|
5969
|
+
"The client option cannot be used with SeamHttpSeamPartnerV1BuildingBlocks.fromPublishableKey"
|
|
5512
5970
|
);
|
|
5513
5971
|
}
|
|
5514
5972
|
const client = createClient(clientOptions);
|
|
@@ -5516,7 +5974,10 @@ var _SeamHttpSeamPartnerV1 = class _SeamHttpSeamPartnerV1 {
|
|
|
5516
5974
|
const { token } = await clientSessions.getOrCreate({
|
|
5517
5975
|
user_identifier_key: userIdentifierKey
|
|
5518
5976
|
});
|
|
5519
|
-
return
|
|
5977
|
+
return _SeamHttpSeamPartnerV1BuildingBlocks.fromClientSessionToken(
|
|
5978
|
+
token,
|
|
5979
|
+
options
|
|
5980
|
+
);
|
|
5520
5981
|
}
|
|
5521
5982
|
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5522
5983
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
@@ -5525,7 +5986,7 @@ var _SeamHttpSeamPartnerV1 = class _SeamHttpSeamPartnerV1 {
|
|
|
5525
5986
|
"Missing consoleSessionToken or workspaceId"
|
|
5526
5987
|
);
|
|
5527
5988
|
}
|
|
5528
|
-
return new
|
|
5989
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions);
|
|
5529
5990
|
}
|
|
5530
5991
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5531
5992
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -5534,7 +5995,7 @@ var _SeamHttpSeamPartnerV1 = class _SeamHttpSeamPartnerV1 {
|
|
|
5534
5995
|
"Missing personalAccessToken or workspaceId"
|
|
5535
5996
|
);
|
|
5536
5997
|
}
|
|
5537
|
-
return new
|
|
5998
|
+
return new _SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions);
|
|
5538
5999
|
}
|
|
5539
6000
|
createPaginator(request) {
|
|
5540
6001
|
return new SeamPaginator(this, request);
|
|
@@ -5555,18 +6016,15 @@ var _SeamHttpSeamPartnerV1 = class _SeamHttpSeamPartnerV1 {
|
|
|
5555
6016
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5556
6017
|
await clientSessions.get();
|
|
5557
6018
|
}
|
|
5558
|
-
get
|
|
5559
|
-
return
|
|
6019
|
+
get spaces() {
|
|
6020
|
+
return SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClient(
|
|
5560
6021
|
this.client,
|
|
5561
6022
|
this.defaults
|
|
5562
6023
|
);
|
|
5563
6024
|
}
|
|
5564
|
-
get resources() {
|
|
5565
|
-
return SeamHttpSeamPartnerV1Resources.fromClient(this.client, this.defaults);
|
|
5566
|
-
}
|
|
5567
6025
|
};
|
|
5568
|
-
|
|
5569
|
-
var
|
|
6026
|
+
_SeamHttpSeamPartnerV1BuildingBlocks.ltsVersion = seamApiLtsVersion;
|
|
6027
|
+
var SeamHttpSeamPartnerV1BuildingBlocks = _SeamHttpSeamPartnerV1BuildingBlocks;
|
|
5570
6028
|
|
|
5571
6029
|
// src/lib/seam/connect/routes/spaces/spaces.ts
|
|
5572
6030
|
var _SeamHttpSpaces = class _SeamHttpSpaces {
|
|
@@ -6962,113 +7420,6 @@ var _SeamHttpUnstablePartnerBuildingBlocks = class _SeamHttpUnstablePartnerBuild
|
|
|
6962
7420
|
_SeamHttpUnstablePartnerBuildingBlocks.ltsVersion = seamApiLtsVersion;
|
|
6963
7421
|
var SeamHttpUnstablePartnerBuildingBlocks = _SeamHttpUnstablePartnerBuildingBlocks;
|
|
6964
7422
|
|
|
6965
|
-
// src/lib/seam/connect/routes/unstable-partner/resources/resources.ts
|
|
6966
|
-
var _SeamHttpUnstablePartnerResources = class _SeamHttpUnstablePartnerResources {
|
|
6967
|
-
constructor(apiKeyOrOptions = {}) {
|
|
6968
|
-
this.ltsVersion = seamApiLtsVersion;
|
|
6969
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
6970
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
6971
|
-
throw new Error(
|
|
6972
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6973
|
-
);
|
|
6974
|
-
}
|
|
6975
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
6976
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6977
|
-
}
|
|
6978
|
-
static fromClient(client, options = {}) {
|
|
6979
|
-
const constructorOptions = { ...options, client };
|
|
6980
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6981
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6982
|
-
}
|
|
6983
|
-
return new _SeamHttpUnstablePartnerResources(constructorOptions);
|
|
6984
|
-
}
|
|
6985
|
-
static fromApiKey(apiKey, options = {}) {
|
|
6986
|
-
const constructorOptions = { ...options, apiKey };
|
|
6987
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6988
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6989
|
-
}
|
|
6990
|
-
return new _SeamHttpUnstablePartnerResources(constructorOptions);
|
|
6991
|
-
}
|
|
6992
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6993
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
6994
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6995
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6996
|
-
}
|
|
6997
|
-
return new _SeamHttpUnstablePartnerResources(constructorOptions);
|
|
6998
|
-
}
|
|
6999
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7000
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7001
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7002
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7003
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7004
|
-
"The client option cannot be used with SeamHttpUnstablePartnerResources.fromPublishableKey"
|
|
7005
|
-
);
|
|
7006
|
-
}
|
|
7007
|
-
const client = createClient(clientOptions);
|
|
7008
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7009
|
-
const { token } = await clientSessions.getOrCreate({
|
|
7010
|
-
user_identifier_key: userIdentifierKey
|
|
7011
|
-
});
|
|
7012
|
-
return _SeamHttpUnstablePartnerResources.fromClientSessionToken(
|
|
7013
|
-
token,
|
|
7014
|
-
options
|
|
7015
|
-
);
|
|
7016
|
-
}
|
|
7017
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7018
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7019
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7020
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7021
|
-
"Missing consoleSessionToken or workspaceId"
|
|
7022
|
-
);
|
|
7023
|
-
}
|
|
7024
|
-
return new _SeamHttpUnstablePartnerResources(constructorOptions);
|
|
7025
|
-
}
|
|
7026
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7027
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7028
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7029
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7030
|
-
"Missing personalAccessToken or workspaceId"
|
|
7031
|
-
);
|
|
7032
|
-
}
|
|
7033
|
-
return new _SeamHttpUnstablePartnerResources(constructorOptions);
|
|
7034
|
-
}
|
|
7035
|
-
createPaginator(request) {
|
|
7036
|
-
return new SeamPaginator(this, request);
|
|
7037
|
-
}
|
|
7038
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
7039
|
-
const { headers } = this.client.defaults;
|
|
7040
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7041
|
-
clientSessionToken
|
|
7042
|
-
});
|
|
7043
|
-
for (const key of Object.keys(authHeaders)) {
|
|
7044
|
-
if (headers[key] == null) {
|
|
7045
|
-
throw new Error(
|
|
7046
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7047
|
-
);
|
|
7048
|
-
}
|
|
7049
|
-
}
|
|
7050
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7051
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7052
|
-
await clientSessions.get();
|
|
7053
|
-
}
|
|
7054
|
-
push(parameters, options = {}) {
|
|
7055
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7056
|
-
throw new Error(
|
|
7057
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7058
|
-
);
|
|
7059
|
-
}
|
|
7060
|
-
return new SeamHttpRequest(this, {
|
|
7061
|
-
pathname: "/unstable_partner/resources/push",
|
|
7062
|
-
method: "POST",
|
|
7063
|
-
body: parameters,
|
|
7064
|
-
responseKey: void 0,
|
|
7065
|
-
options
|
|
7066
|
-
});
|
|
7067
|
-
}
|
|
7068
|
-
};
|
|
7069
|
-
_SeamHttpUnstablePartnerResources.ltsVersion = seamApiLtsVersion;
|
|
7070
|
-
var SeamHttpUnstablePartnerResources = _SeamHttpUnstablePartnerResources;
|
|
7071
|
-
|
|
7072
7423
|
// src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts
|
|
7073
7424
|
var _SeamHttpUnstablePartner = class _SeamHttpUnstablePartner {
|
|
7074
7425
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -7161,12 +7512,6 @@ var _SeamHttpUnstablePartner = class _SeamHttpUnstablePartner {
|
|
|
7161
7512
|
this.defaults
|
|
7162
7513
|
);
|
|
7163
7514
|
}
|
|
7164
|
-
get resources() {
|
|
7165
|
-
return SeamHttpUnstablePartnerResources.fromClient(
|
|
7166
|
-
this.client,
|
|
7167
|
-
this.defaults
|
|
7168
|
-
);
|
|
7169
|
-
}
|
|
7170
7515
|
};
|
|
7171
7516
|
_SeamHttpUnstablePartner.ltsVersion = seamApiLtsVersion;
|
|
7172
7517
|
var SeamHttpUnstablePartner = _SeamHttpUnstablePartner;
|
|
@@ -7871,6 +8216,9 @@ var _SeamHttp = class _SeamHttp {
|
|
|
7871
8216
|
get connectedAccounts() {
|
|
7872
8217
|
return SeamHttpConnectedAccounts.fromClient(this.client, this.defaults);
|
|
7873
8218
|
}
|
|
8219
|
+
get customers() {
|
|
8220
|
+
return SeamHttpCustomers.fromClient(this.client, this.defaults);
|
|
8221
|
+
}
|
|
7874
8222
|
get devices() {
|
|
7875
8223
|
return SeamHttpDevices.fromClient(this.client, this.defaults);
|
|
7876
8224
|
}
|
|
@@ -8155,6 +8503,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8155
8503
|
return seam.delete(...args);
|
|
8156
8504
|
};
|
|
8157
8505
|
}
|
|
8506
|
+
get ["/access_methods/encode"]() {
|
|
8507
|
+
const { client, defaults } = this;
|
|
8508
|
+
return function accessMethodsEncode(...args) {
|
|
8509
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
8510
|
+
return seam.encode(...args);
|
|
8511
|
+
};
|
|
8512
|
+
}
|
|
8158
8513
|
get ["/access_methods/get"]() {
|
|
8159
8514
|
const { client, defaults } = this;
|
|
8160
8515
|
return function accessMethodsGet(...args) {
|
|
@@ -8354,13 +8709,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8354
8709
|
return seam.list(...args);
|
|
8355
8710
|
};
|
|
8356
8711
|
}
|
|
8357
|
-
get ["/acs/encoders/encode_access_method"]() {
|
|
8358
|
-
const { client, defaults } = this;
|
|
8359
|
-
return function acsEncodersEncodeAccessMethod(...args) {
|
|
8360
|
-
const seam = SeamHttpAcsEncoders.fromClient(client, defaults);
|
|
8361
|
-
return seam.encodeAccessMethod(...args);
|
|
8362
|
-
};
|
|
8363
|
-
}
|
|
8364
8712
|
get ["/acs/encoders/encode_credential"]() {
|
|
8365
8713
|
const { client, defaults } = this;
|
|
8366
8714
|
return function acsEncodersEncodeCredential(...args) {
|
|
@@ -8717,6 +9065,20 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8717
9065
|
return seam.update(...args);
|
|
8718
9066
|
};
|
|
8719
9067
|
}
|
|
9068
|
+
get ["/customers/create_portal"]() {
|
|
9069
|
+
const { client, defaults } = this;
|
|
9070
|
+
return function customersCreatePortal(...args) {
|
|
9071
|
+
const seam = SeamHttpCustomers.fromClient(client, defaults);
|
|
9072
|
+
return seam.createPortal(...args);
|
|
9073
|
+
};
|
|
9074
|
+
}
|
|
9075
|
+
get ["/customers/push_data"]() {
|
|
9076
|
+
const { client, defaults } = this;
|
|
9077
|
+
return function customersPushData(...args) {
|
|
9078
|
+
const seam = SeamHttpCustomers.fromClient(client, defaults);
|
|
9079
|
+
return seam.pushData(...args);
|
|
9080
|
+
};
|
|
9081
|
+
}
|
|
8720
9082
|
get ["/devices/delete"]() {
|
|
8721
9083
|
const { client, defaults } = this;
|
|
8722
9084
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -8981,31 +9343,103 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8981
9343
|
return seam.createSandboxPhone(...args);
|
|
8982
9344
|
};
|
|
8983
9345
|
}
|
|
8984
|
-
get ["/seam/
|
|
9346
|
+
get ["/seam/customer/v1/automation_runs/list"]() {
|
|
8985
9347
|
const { client, defaults } = this;
|
|
8986
9348
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
8987
9349
|
throw new Error(
|
|
8988
9350
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
8989
9351
|
);
|
|
8990
9352
|
}
|
|
8991
|
-
return function
|
|
8992
|
-
const seam =
|
|
9353
|
+
return function seamCustomerV1AutomationRunsList(...args) {
|
|
9354
|
+
const seam = SeamHttpSeamCustomerV1AutomationRuns.fromClient(
|
|
8993
9355
|
client,
|
|
8994
9356
|
defaults
|
|
8995
9357
|
);
|
|
8996
|
-
return seam.
|
|
9358
|
+
return seam.list(...args);
|
|
8997
9359
|
};
|
|
8998
9360
|
}
|
|
8999
|
-
get ["/seam/
|
|
9361
|
+
get ["/seam/customer/v1/automations/delete"]() {
|
|
9000
9362
|
const { client, defaults } = this;
|
|
9001
9363
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9002
9364
|
throw new Error(
|
|
9003
9365
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9004
9366
|
);
|
|
9005
9367
|
}
|
|
9006
|
-
return function
|
|
9007
|
-
const seam =
|
|
9008
|
-
|
|
9368
|
+
return function seamCustomerV1AutomationsDelete(...args) {
|
|
9369
|
+
const seam = SeamHttpSeamCustomerV1Automations.fromClient(
|
|
9370
|
+
client,
|
|
9371
|
+
defaults
|
|
9372
|
+
);
|
|
9373
|
+
return seam.delete(...args);
|
|
9374
|
+
};
|
|
9375
|
+
}
|
|
9376
|
+
get ["/seam/customer/v1/automations/get"]() {
|
|
9377
|
+
const { client, defaults } = this;
|
|
9378
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9379
|
+
throw new Error(
|
|
9380
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9381
|
+
);
|
|
9382
|
+
}
|
|
9383
|
+
return function seamCustomerV1AutomationsGet(...args) {
|
|
9384
|
+
const seam = SeamHttpSeamCustomerV1Automations.fromClient(
|
|
9385
|
+
client,
|
|
9386
|
+
defaults
|
|
9387
|
+
);
|
|
9388
|
+
return seam.get(...args);
|
|
9389
|
+
};
|
|
9390
|
+
}
|
|
9391
|
+
get ["/seam/customer/v1/automations/update"]() {
|
|
9392
|
+
const { client, defaults } = this;
|
|
9393
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9394
|
+
throw new Error(
|
|
9395
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9396
|
+
);
|
|
9397
|
+
}
|
|
9398
|
+
return function seamCustomerV1AutomationsUpdate(...args) {
|
|
9399
|
+
const seam = SeamHttpSeamCustomerV1Automations.fromClient(
|
|
9400
|
+
client,
|
|
9401
|
+
defaults
|
|
9402
|
+
);
|
|
9403
|
+
return seam.update(...args);
|
|
9404
|
+
};
|
|
9405
|
+
}
|
|
9406
|
+
get ["/seam/customer/v1/portals/get"]() {
|
|
9407
|
+
const { client, defaults } = this;
|
|
9408
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9409
|
+
throw new Error(
|
|
9410
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9411
|
+
);
|
|
9412
|
+
}
|
|
9413
|
+
return function seamCustomerV1PortalsGet(...args) {
|
|
9414
|
+
const seam = SeamHttpSeamCustomerV1Portals.fromClient(client, defaults);
|
|
9415
|
+
return seam.get(...args);
|
|
9416
|
+
};
|
|
9417
|
+
}
|
|
9418
|
+
get ["/seam/customer/v1/settings/update"]() {
|
|
9419
|
+
const { client, defaults } = this;
|
|
9420
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9421
|
+
throw new Error(
|
|
9422
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9423
|
+
);
|
|
9424
|
+
}
|
|
9425
|
+
return function seamCustomerV1SettingsUpdate(...args) {
|
|
9426
|
+
const seam = SeamHttpSeamCustomerV1Settings.fromClient(client, defaults);
|
|
9427
|
+
return seam.update(...args);
|
|
9428
|
+
};
|
|
9429
|
+
}
|
|
9430
|
+
get ["/seam/partner/v1/building_blocks/spaces/auto_map"]() {
|
|
9431
|
+
const { client, defaults } = this;
|
|
9432
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9433
|
+
throw new Error(
|
|
9434
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9435
|
+
);
|
|
9436
|
+
}
|
|
9437
|
+
return function seamPartnerV1BuildingBlocksSpacesAutoMap(...args) {
|
|
9438
|
+
const seam = SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClient(
|
|
9439
|
+
client,
|
|
9440
|
+
defaults
|
|
9441
|
+
);
|
|
9442
|
+
return seam.autoMap(...args);
|
|
9009
9443
|
};
|
|
9010
9444
|
}
|
|
9011
9445
|
get ["/spaces/add_acs_entrances"]() {
|
|
@@ -9503,18 +9937,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9503
9937
|
return seam.organizeSpaces(...args);
|
|
9504
9938
|
};
|
|
9505
9939
|
}
|
|
9506
|
-
get ["/unstable_partner/resources/push"]() {
|
|
9507
|
-
const { client, defaults } = this;
|
|
9508
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9509
|
-
throw new Error(
|
|
9510
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9511
|
-
);
|
|
9512
|
-
}
|
|
9513
|
-
return function unstablePartnerResourcesPush(...args) {
|
|
9514
|
-
const seam = SeamHttpUnstablePartnerResources.fromClient(client, defaults);
|
|
9515
|
-
return seam.push(...args);
|
|
9516
|
-
};
|
|
9517
|
-
}
|
|
9518
9940
|
get ["/user_identities/add_acs_user"]() {
|
|
9519
9941
|
const { client, defaults } = this;
|
|
9520
9942
|
return function userIdentitiesAddAcsUser(...args) {
|
|
@@ -9848,6 +10270,7 @@ exports.SeamHttpBridges = SeamHttpBridges;
|
|
|
9848
10270
|
exports.SeamHttpClientSessions = SeamHttpClientSessions;
|
|
9849
10271
|
exports.SeamHttpConnectWebviews = SeamHttpConnectWebviews;
|
|
9850
10272
|
exports.SeamHttpConnectedAccounts = SeamHttpConnectedAccounts;
|
|
10273
|
+
exports.SeamHttpCustomers = SeamHttpCustomers;
|
|
9851
10274
|
exports.SeamHttpDevices = SeamHttpDevices;
|
|
9852
10275
|
exports.SeamHttpDevicesSimulate = SeamHttpDevicesSimulate;
|
|
9853
10276
|
exports.SeamHttpDevicesUnmanaged = SeamHttpDevicesUnmanaged;
|
|
@@ -9867,10 +10290,13 @@ exports.SeamHttpNoiseSensorsSimulate = SeamHttpNoiseSensorsSimulate;
|
|
|
9867
10290
|
exports.SeamHttpPhones = SeamHttpPhones;
|
|
9868
10291
|
exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
9869
10292
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
9870
|
-
exports.
|
|
10293
|
+
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
10294
|
+
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
10295
|
+
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
10296
|
+
exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
|
|
10297
|
+
exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
|
|
9871
10298
|
exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
|
|
9872
10299
|
exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;
|
|
9873
|
-
exports.SeamHttpSeamPartnerV1Resources = SeamHttpSeamPartnerV1Resources;
|
|
9874
10300
|
exports.SeamHttpSpaces = SeamHttpSpaces;
|
|
9875
10301
|
exports.SeamHttpThermostats = SeamHttpThermostats;
|
|
9876
10302
|
exports.SeamHttpThermostatsDailyPrograms = SeamHttpThermostatsDailyPrograms;
|
|
@@ -9882,7 +10308,6 @@ exports.SeamHttpUnstableAccessMethods = SeamHttpUnstableAccessMethods;
|
|
|
9882
10308
|
exports.SeamHttpUnstableLocations = SeamHttpUnstableLocations;
|
|
9883
10309
|
exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
|
|
9884
10310
|
exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;
|
|
9885
|
-
exports.SeamHttpUnstablePartnerResources = SeamHttpUnstablePartnerResources;
|
|
9886
10311
|
exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
|
|
9887
10312
|
exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
9888
10313
|
exports.SeamHttpWebhooks = SeamHttpWebhooks;
|