@seamapi/http 1.117.0 → 1.118.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 +377 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +146 -3
- package/dist/index.cjs +381 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +24 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +18 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/acs/encoders/encoders.d.ts +12 -0
- package/lib/seam/connect/routes/acs/encoders/encoders.js +9 -0
- package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/v1/sites/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/index.js +6 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.d.ts +73 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.js +140 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.d.ts +2 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.js +4 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +14 -4
- package/lib/seam/connect/routes/seam-http-endpoints.js +73 -0
- package/lib/seam/connect/routes/seam-http-endpoints.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 +76 -0
- package/src/lib/seam/connect/routes/acs/encoders/encoders.ts +39 -0
- package/src/lib/seam/connect/routes/seam/console/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/console/v1/sites/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts +327 -0
- package/src/lib/seam/connect/routes/seam/console/v1/v1.ts +5 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +8 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +170 -0
- package/src/lib/version.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -103,6 +103,7 @@ __export(index_exports, {
|
|
|
103
103
|
SeamHttpRequest: () => SeamHttpRequest,
|
|
104
104
|
SeamHttpSeamConsole: () => SeamHttpSeamConsole,
|
|
105
105
|
SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
|
|
106
|
+
SeamHttpSeamConsoleV1Sites: () => SeamHttpSeamConsoleV1Sites,
|
|
106
107
|
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
107
108
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
108
109
|
SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
|
|
@@ -111,6 +112,7 @@ __export(index_exports, {
|
|
|
111
112
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
112
113
|
SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
|
|
113
114
|
SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
|
|
115
|
+
SeamHttpSeamCustomerV1ConnectorsExternalSites: () => SeamHttpSeamCustomerV1ConnectorsExternalSites,
|
|
114
116
|
SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
|
|
115
117
|
SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
|
|
116
118
|
SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
|
|
@@ -221,6 +223,7 @@ __export(connect_exports, {
|
|
|
221
223
|
SeamHttpRequest: () => SeamHttpRequest,
|
|
222
224
|
SeamHttpSeamConsole: () => SeamHttpSeamConsole,
|
|
223
225
|
SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
|
|
226
|
+
SeamHttpSeamConsoleV1Sites: () => SeamHttpSeamConsoleV1Sites,
|
|
224
227
|
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
225
228
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
226
229
|
SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
|
|
@@ -229,6 +232,7 @@ __export(connect_exports, {
|
|
|
229
232
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
230
233
|
SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
|
|
231
234
|
SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
|
|
235
|
+
SeamHttpSeamCustomerV1ConnectorsExternalSites: () => SeamHttpSeamCustomerV1ConnectorsExternalSites,
|
|
232
236
|
SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
|
|
233
237
|
SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
|
|
234
238
|
SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
|
|
@@ -2135,6 +2139,15 @@ var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
2135
2139
|
get unmanaged() {
|
|
2136
2140
|
return SeamHttpAccessMethodsUnmanaged.fromClient(this.client, this.defaults);
|
|
2137
2141
|
}
|
|
2142
|
+
assignCard(parameters, options = {}) {
|
|
2143
|
+
return new SeamHttpRequest(this, {
|
|
2144
|
+
pathname: "/access_methods/assign_card",
|
|
2145
|
+
method: "POST",
|
|
2146
|
+
body: parameters,
|
|
2147
|
+
responseKey: "action_attempt",
|
|
2148
|
+
options
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2138
2151
|
delete(parameters, options = {}) {
|
|
2139
2152
|
return new SeamHttpRequest(this, {
|
|
2140
2153
|
pathname: "/access_methods/delete",
|
|
@@ -2180,6 +2193,15 @@ var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
2180
2193
|
options
|
|
2181
2194
|
});
|
|
2182
2195
|
}
|
|
2196
|
+
unlockDoor(parameters, options = {}) {
|
|
2197
|
+
return new SeamHttpRequest(this, {
|
|
2198
|
+
pathname: "/access_methods/unlock_door",
|
|
2199
|
+
method: "POST",
|
|
2200
|
+
body: parameters,
|
|
2201
|
+
responseKey: "action_attempt",
|
|
2202
|
+
options
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2183
2205
|
};
|
|
2184
2206
|
|
|
2185
2207
|
// src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts
|
|
@@ -3217,6 +3239,15 @@ var SeamHttpAcsEncoders = class _SeamHttpAcsEncoders {
|
|
|
3217
3239
|
options
|
|
3218
3240
|
});
|
|
3219
3241
|
}
|
|
3242
|
+
scanToAssignCredential(parameters, options = {}) {
|
|
3243
|
+
return new SeamHttpRequest(this, {
|
|
3244
|
+
pathname: "/acs/encoders/scan_to_assign_credential",
|
|
3245
|
+
method: "POST",
|
|
3246
|
+
body: parameters,
|
|
3247
|
+
responseKey: "action_attempt",
|
|
3248
|
+
options
|
|
3249
|
+
});
|
|
3250
|
+
}
|
|
3220
3251
|
};
|
|
3221
3252
|
|
|
3222
3253
|
// src/lib/seam/connect/routes/acs/entrances/entrances.ts
|
|
@@ -6096,6 +6127,153 @@ var SeamHttpPhones = class _SeamHttpPhones {
|
|
|
6096
6127
|
}
|
|
6097
6128
|
};
|
|
6098
6129
|
|
|
6130
|
+
// src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts
|
|
6131
|
+
var SeamHttpSeamConsoleV1Sites = class _SeamHttpSeamConsoleV1Sites {
|
|
6132
|
+
client;
|
|
6133
|
+
defaults;
|
|
6134
|
+
ltsVersion = seamApiLtsVersion;
|
|
6135
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6136
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6137
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6138
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6139
|
+
throw new Error(
|
|
6140
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6141
|
+
);
|
|
6142
|
+
}
|
|
6143
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6144
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6145
|
+
}
|
|
6146
|
+
static fromClient(client, options = {}) {
|
|
6147
|
+
const constructorOptions = { ...options, client };
|
|
6148
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6149
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6150
|
+
}
|
|
6151
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
6152
|
+
}
|
|
6153
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6154
|
+
const constructorOptions = { ...options, apiKey };
|
|
6155
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6156
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6157
|
+
}
|
|
6158
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
6159
|
+
}
|
|
6160
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6161
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6162
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6163
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6164
|
+
}
|
|
6165
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
6166
|
+
}
|
|
6167
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6168
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6169
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6170
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6171
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6172
|
+
"The client option cannot be used with SeamHttpSeamConsoleV1Sites.fromPublishableKey"
|
|
6173
|
+
);
|
|
6174
|
+
}
|
|
6175
|
+
const client = createClient(clientOptions);
|
|
6176
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6177
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6178
|
+
user_identifier_key: userIdentifierKey
|
|
6179
|
+
});
|
|
6180
|
+
return _SeamHttpSeamConsoleV1Sites.fromClientSessionToken(token, options);
|
|
6181
|
+
}
|
|
6182
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6183
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6184
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6185
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6186
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6187
|
+
);
|
|
6188
|
+
}
|
|
6189
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
6190
|
+
}
|
|
6191
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6192
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6193
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6194
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6195
|
+
"Missing personalAccessToken or workspaceId"
|
|
6196
|
+
);
|
|
6197
|
+
}
|
|
6198
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
6199
|
+
}
|
|
6200
|
+
createPaginator(request) {
|
|
6201
|
+
return new SeamPaginator(this, request);
|
|
6202
|
+
}
|
|
6203
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6204
|
+
const { headers } = this.client.defaults;
|
|
6205
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6206
|
+
clientSessionToken
|
|
6207
|
+
});
|
|
6208
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6209
|
+
if (headers[key] == null) {
|
|
6210
|
+
throw new Error(
|
|
6211
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6212
|
+
);
|
|
6213
|
+
}
|
|
6214
|
+
}
|
|
6215
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6216
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6217
|
+
await clientSessions.get();
|
|
6218
|
+
}
|
|
6219
|
+
create(parameters, options = {}) {
|
|
6220
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6221
|
+
throw new Error(
|
|
6222
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6223
|
+
);
|
|
6224
|
+
}
|
|
6225
|
+
return new SeamHttpRequest(this, {
|
|
6226
|
+
pathname: "/seam/console/v1/sites/create",
|
|
6227
|
+
method: "POST",
|
|
6228
|
+
body: parameters,
|
|
6229
|
+
responseKey: "site",
|
|
6230
|
+
options
|
|
6231
|
+
});
|
|
6232
|
+
}
|
|
6233
|
+
delete(parameters, options = {}) {
|
|
6234
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6235
|
+
throw new Error(
|
|
6236
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6237
|
+
);
|
|
6238
|
+
}
|
|
6239
|
+
return new SeamHttpRequest(this, {
|
|
6240
|
+
pathname: "/seam/console/v1/sites/delete",
|
|
6241
|
+
method: "POST",
|
|
6242
|
+
body: parameters,
|
|
6243
|
+
responseKey: void 0,
|
|
6244
|
+
options
|
|
6245
|
+
});
|
|
6246
|
+
}
|
|
6247
|
+
list(parameters, options = {}) {
|
|
6248
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6249
|
+
throw new Error(
|
|
6250
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6251
|
+
);
|
|
6252
|
+
}
|
|
6253
|
+
return new SeamHttpRequest(this, {
|
|
6254
|
+
pathname: "/seam/console/v1/sites/list",
|
|
6255
|
+
method: "POST",
|
|
6256
|
+
body: parameters,
|
|
6257
|
+
responseKey: "sites",
|
|
6258
|
+
options
|
|
6259
|
+
});
|
|
6260
|
+
}
|
|
6261
|
+
update(parameters, options = {}) {
|
|
6262
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6263
|
+
throw new Error(
|
|
6264
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6265
|
+
);
|
|
6266
|
+
}
|
|
6267
|
+
return new SeamHttpRequest(this, {
|
|
6268
|
+
pathname: "/seam/console/v1/sites/update",
|
|
6269
|
+
method: "PATCH",
|
|
6270
|
+
body: parameters,
|
|
6271
|
+
responseKey: "site",
|
|
6272
|
+
options
|
|
6273
|
+
});
|
|
6274
|
+
}
|
|
6275
|
+
};
|
|
6276
|
+
|
|
6099
6277
|
// src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts
|
|
6100
6278
|
var SeamHttpSeamConsoleV1Timelines = class _SeamHttpSeamConsoleV1Timelines {
|
|
6101
6279
|
client;
|
|
@@ -6290,6 +6468,9 @@ var SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
|
6290
6468
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6291
6469
|
await clientSessions.get();
|
|
6292
6470
|
}
|
|
6471
|
+
get sites() {
|
|
6472
|
+
return SeamHttpSeamConsoleV1Sites.fromClient(this.client, this.defaults);
|
|
6473
|
+
}
|
|
6293
6474
|
get timelines() {
|
|
6294
6475
|
return SeamHttpSeamConsoleV1Timelines.fromClient(this.client, this.defaults);
|
|
6295
6476
|
}
|
|
@@ -6985,6 +7166,114 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
|
|
|
6985
7166
|
}
|
|
6986
7167
|
};
|
|
6987
7168
|
|
|
7169
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts
|
|
7170
|
+
var SeamHttpSeamCustomerV1ConnectorsExternalSites = class _SeamHttpSeamCustomerV1ConnectorsExternalSites {
|
|
7171
|
+
client;
|
|
7172
|
+
defaults;
|
|
7173
|
+
ltsVersion = seamApiLtsVersion;
|
|
7174
|
+
static ltsVersion = seamApiLtsVersion;
|
|
7175
|
+
constructor(apiKeyOrOptions = {}) {
|
|
7176
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
7177
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
7178
|
+
throw new Error(
|
|
7179
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7180
|
+
);
|
|
7181
|
+
}
|
|
7182
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
7183
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7184
|
+
}
|
|
7185
|
+
static fromClient(client, options = {}) {
|
|
7186
|
+
const constructorOptions = { ...options, client };
|
|
7187
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7188
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7189
|
+
}
|
|
7190
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7191
|
+
}
|
|
7192
|
+
static fromApiKey(apiKey, options = {}) {
|
|
7193
|
+
const constructorOptions = { ...options, apiKey };
|
|
7194
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7195
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7196
|
+
}
|
|
7197
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7198
|
+
}
|
|
7199
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7200
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
7201
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7202
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7203
|
+
}
|
|
7204
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7205
|
+
}
|
|
7206
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7207
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7208
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7209
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7210
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7211
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsExternalSites.fromPublishableKey"
|
|
7212
|
+
);
|
|
7213
|
+
}
|
|
7214
|
+
const client = createClient(clientOptions);
|
|
7215
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7216
|
+
const { token } = await clientSessions.getOrCreate({
|
|
7217
|
+
user_identifier_key: userIdentifierKey
|
|
7218
|
+
});
|
|
7219
|
+
return _SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClientSessionToken(
|
|
7220
|
+
token,
|
|
7221
|
+
options
|
|
7222
|
+
);
|
|
7223
|
+
}
|
|
7224
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7225
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7226
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7227
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7228
|
+
"Missing consoleSessionToken or workspaceId"
|
|
7229
|
+
);
|
|
7230
|
+
}
|
|
7231
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7232
|
+
}
|
|
7233
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7234
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7235
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7236
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7237
|
+
"Missing personalAccessToken or workspaceId"
|
|
7238
|
+
);
|
|
7239
|
+
}
|
|
7240
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7241
|
+
}
|
|
7242
|
+
createPaginator(request) {
|
|
7243
|
+
return new SeamPaginator(this, request);
|
|
7244
|
+
}
|
|
7245
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
7246
|
+
const { headers } = this.client.defaults;
|
|
7247
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7248
|
+
clientSessionToken
|
|
7249
|
+
});
|
|
7250
|
+
for (const key of Object.keys(authHeaders)) {
|
|
7251
|
+
if (headers[key] == null) {
|
|
7252
|
+
throw new Error(
|
|
7253
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7254
|
+
);
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7258
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7259
|
+
await clientSessions.get();
|
|
7260
|
+
}
|
|
7261
|
+
list(parameters, options = {}) {
|
|
7262
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7263
|
+
throw new Error(
|
|
7264
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7265
|
+
);
|
|
7266
|
+
}
|
|
7267
|
+
return new SeamHttpRequest(this, {
|
|
7268
|
+
pathname: "/seam/customer/v1/connectors/external_sites/list",
|
|
7269
|
+
method: "POST",
|
|
7270
|
+
body: parameters,
|
|
7271
|
+
responseKey: "external_sites",
|
|
7272
|
+
options
|
|
7273
|
+
});
|
|
7274
|
+
}
|
|
7275
|
+
};
|
|
7276
|
+
|
|
6988
7277
|
// src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
|
|
6989
7278
|
var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
|
|
6990
7279
|
client;
|
|
@@ -7185,6 +7474,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
7185
7474
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7186
7475
|
await clientSessions.get();
|
|
7187
7476
|
}
|
|
7477
|
+
get externalSites() {
|
|
7478
|
+
return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
7479
|
+
this.client,
|
|
7480
|
+
this.defaults
|
|
7481
|
+
);
|
|
7482
|
+
}
|
|
7188
7483
|
get ical() {
|
|
7189
7484
|
return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
7190
7485
|
this.client,
|
|
@@ -11296,6 +11591,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11296
11591
|
return seam.update(...args);
|
|
11297
11592
|
};
|
|
11298
11593
|
}
|
|
11594
|
+
get "/access_methods/assign_card"() {
|
|
11595
|
+
const { client, defaults } = this;
|
|
11596
|
+
return function accessMethodsAssignCard(...args) {
|
|
11597
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
11598
|
+
return seam.assignCard(...args);
|
|
11599
|
+
};
|
|
11600
|
+
}
|
|
11299
11601
|
get "/access_methods/delete"() {
|
|
11300
11602
|
const { client, defaults } = this;
|
|
11301
11603
|
return function accessMethodsDelete(...args) {
|
|
@@ -11331,6 +11633,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11331
11633
|
return seam.list(...args);
|
|
11332
11634
|
};
|
|
11333
11635
|
}
|
|
11636
|
+
get "/access_methods/unlock_door"() {
|
|
11637
|
+
const { client, defaults } = this;
|
|
11638
|
+
return function accessMethodsUnlockDoor(...args) {
|
|
11639
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
11640
|
+
return seam.unlockDoor(...args);
|
|
11641
|
+
};
|
|
11642
|
+
}
|
|
11334
11643
|
get "/access_methods/unmanaged/get"() {
|
|
11335
11644
|
const { client, defaults } = this;
|
|
11336
11645
|
return function accessMethodsUnmanagedGet(...args) {
|
|
@@ -11565,6 +11874,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11565
11874
|
return seam.scanCredential(...args);
|
|
11566
11875
|
};
|
|
11567
11876
|
}
|
|
11877
|
+
get "/acs/encoders/scan_to_assign_credential"() {
|
|
11878
|
+
const { client, defaults } = this;
|
|
11879
|
+
return function acsEncodersScanToAssignCredential(...args) {
|
|
11880
|
+
const seam = SeamHttpAcsEncoders.fromClient(client, defaults);
|
|
11881
|
+
return seam.scanToAssignCredential(...args);
|
|
11882
|
+
};
|
|
11883
|
+
}
|
|
11568
11884
|
get "/acs/encoders/simulate/next_credential_encode_will_fail"() {
|
|
11569
11885
|
const { client, defaults } = this;
|
|
11570
11886
|
return function acsEncodersSimulateNextCredentialEncodeWillFail(...args) {
|
|
@@ -12248,6 +12564,54 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12248
12564
|
return seam.getResourceLocator(...args);
|
|
12249
12565
|
};
|
|
12250
12566
|
}
|
|
12567
|
+
get "/seam/console/v1/sites/create"() {
|
|
12568
|
+
const { client, defaults } = this;
|
|
12569
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12570
|
+
throw new Error(
|
|
12571
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12572
|
+
);
|
|
12573
|
+
}
|
|
12574
|
+
return function seamConsoleV1SitesCreate(...args) {
|
|
12575
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12576
|
+
return seam.create(...args);
|
|
12577
|
+
};
|
|
12578
|
+
}
|
|
12579
|
+
get "/seam/console/v1/sites/delete"() {
|
|
12580
|
+
const { client, defaults } = this;
|
|
12581
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12582
|
+
throw new Error(
|
|
12583
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12584
|
+
);
|
|
12585
|
+
}
|
|
12586
|
+
return function seamConsoleV1SitesDelete(...args) {
|
|
12587
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12588
|
+
return seam.delete(...args);
|
|
12589
|
+
};
|
|
12590
|
+
}
|
|
12591
|
+
get "/seam/console/v1/sites/list"() {
|
|
12592
|
+
const { client, defaults } = this;
|
|
12593
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12594
|
+
throw new Error(
|
|
12595
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12596
|
+
);
|
|
12597
|
+
}
|
|
12598
|
+
return function seamConsoleV1SitesList(...args) {
|
|
12599
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12600
|
+
return seam.list(...args);
|
|
12601
|
+
};
|
|
12602
|
+
}
|
|
12603
|
+
get "/seam/console/v1/sites/update"() {
|
|
12604
|
+
const { client, defaults } = this;
|
|
12605
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12606
|
+
throw new Error(
|
|
12607
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12608
|
+
);
|
|
12609
|
+
}
|
|
12610
|
+
return function seamConsoleV1SitesUpdate(...args) {
|
|
12611
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12612
|
+
return seam.update(...args);
|
|
12613
|
+
};
|
|
12614
|
+
}
|
|
12251
12615
|
get "/seam/console/v1/timelines/get"() {
|
|
12252
12616
|
const { client, defaults } = this;
|
|
12253
12617
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12464,6 +12828,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12464
12828
|
return seam.update(...args);
|
|
12465
12829
|
};
|
|
12466
12830
|
}
|
|
12831
|
+
get "/seam/customer/v1/connectors/external_sites/list"() {
|
|
12832
|
+
const { client, defaults } = this;
|
|
12833
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12834
|
+
throw new Error(
|
|
12835
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12836
|
+
);
|
|
12837
|
+
}
|
|
12838
|
+
return function seamCustomerV1ConnectorsExternalSitesList(...args) {
|
|
12839
|
+
const seam = SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
12840
|
+
client,
|
|
12841
|
+
defaults
|
|
12842
|
+
);
|
|
12843
|
+
return seam.list(...args);
|
|
12844
|
+
};
|
|
12845
|
+
}
|
|
12467
12846
|
get "/seam/customer/v1/connectors/ical/validate-config"() {
|
|
12468
12847
|
const { client, defaults } = this;
|
|
12469
12848
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -13606,6 +13985,7 @@ exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
|
13606
13985
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
13607
13986
|
exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
13608
13987
|
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
13988
|
+
exports.SeamHttpSeamConsoleV1Sites = SeamHttpSeamConsoleV1Sites;
|
|
13609
13989
|
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
13610
13990
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
13611
13991
|
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
@@ -13614,6 +13994,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
|
|
|
13614
13994
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
13615
13995
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
13616
13996
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
13997
|
+
exports.SeamHttpSeamCustomerV1ConnectorsExternalSites = SeamHttpSeamCustomerV1ConnectorsExternalSites;
|
|
13617
13998
|
exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
|
|
13618
13999
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
13619
14000
|
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|