@seamapi/http 1.116.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 +364 -16
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +146 -17
- package/dist/index.cjs +368 -16
- 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/ical/ical.d.ts +0 -13
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js +0 -12
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js.map +1 -1
- 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 +15 -6
- package/lib/seam/connect/routes/seam-http-endpoints.js +67 -4
- 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/ical/ical.ts +0 -41
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +158 -15
- 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,8 +7166,8 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
|
|
|
6985
7166
|
}
|
|
6986
7167
|
};
|
|
6987
7168
|
|
|
6988
|
-
// src/lib/seam/connect/routes/seam/customer/v1/connectors/
|
|
6989
|
-
var
|
|
7169
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts
|
|
7170
|
+
var SeamHttpSeamCustomerV1ConnectorsExternalSites = class _SeamHttpSeamCustomerV1ConnectorsExternalSites {
|
|
6990
7171
|
client;
|
|
6991
7172
|
defaults;
|
|
6992
7173
|
ltsVersion = seamApiLtsVersion;
|
|
@@ -7006,28 +7187,28 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
7006
7187
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7007
7188
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7008
7189
|
}
|
|
7009
|
-
return new
|
|
7190
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7010
7191
|
}
|
|
7011
7192
|
static fromApiKey(apiKey, options = {}) {
|
|
7012
7193
|
const constructorOptions = { ...options, apiKey };
|
|
7013
7194
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7014
7195
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7015
7196
|
}
|
|
7016
|
-
return new
|
|
7197
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7017
7198
|
}
|
|
7018
7199
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7019
7200
|
const constructorOptions = { ...options, clientSessionToken };
|
|
7020
7201
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7021
7202
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7022
7203
|
}
|
|
7023
|
-
return new
|
|
7204
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7024
7205
|
}
|
|
7025
7206
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7026
7207
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7027
7208
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7028
7209
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7029
7210
|
throw new SeamHttpInvalidOptionsError(
|
|
7030
|
-
"The client option cannot be used with
|
|
7211
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsExternalSites.fromPublishableKey"
|
|
7031
7212
|
);
|
|
7032
7213
|
}
|
|
7033
7214
|
const client = createClient(clientOptions);
|
|
@@ -7035,7 +7216,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
7035
7216
|
const { token } = await clientSessions.getOrCreate({
|
|
7036
7217
|
user_identifier_key: userIdentifierKey
|
|
7037
7218
|
});
|
|
7038
|
-
return
|
|
7219
|
+
return _SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClientSessionToken(
|
|
7039
7220
|
token,
|
|
7040
7221
|
options
|
|
7041
7222
|
);
|
|
@@ -7047,7 +7228,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
7047
7228
|
"Missing consoleSessionToken or workspaceId"
|
|
7048
7229
|
);
|
|
7049
7230
|
}
|
|
7050
|
-
return new
|
|
7231
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7051
7232
|
}
|
|
7052
7233
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7053
7234
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -7056,7 +7237,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
7056
7237
|
"Missing personalAccessToken or workspaceId"
|
|
7057
7238
|
);
|
|
7058
7239
|
}
|
|
7059
|
-
return new
|
|
7240
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
7060
7241
|
}
|
|
7061
7242
|
createPaginator(request) {
|
|
7062
7243
|
return new SeamPaginator(this, request);
|
|
@@ -7077,19 +7258,113 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
7077
7258
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7078
7259
|
await clientSessions.get();
|
|
7079
7260
|
}
|
|
7080
|
-
|
|
7261
|
+
list(parameters, options = {}) {
|
|
7081
7262
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7082
7263
|
throw new Error(
|
|
7083
7264
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7084
7265
|
);
|
|
7085
7266
|
}
|
|
7086
7267
|
return new SeamHttpRequest(this, {
|
|
7087
|
-
pathname: "/seam/customer/v1/connectors/
|
|
7268
|
+
pathname: "/seam/customer/v1/connectors/external_sites/list",
|
|
7088
7269
|
method: "POST",
|
|
7089
7270
|
body: parameters,
|
|
7090
|
-
responseKey: "
|
|
7271
|
+
responseKey: "external_sites",
|
|
7272
|
+
options
|
|
7273
|
+
});
|
|
7274
|
+
}
|
|
7275
|
+
};
|
|
7276
|
+
|
|
7277
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
|
|
7278
|
+
var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
|
|
7279
|
+
client;
|
|
7280
|
+
defaults;
|
|
7281
|
+
ltsVersion = seamApiLtsVersion;
|
|
7282
|
+
static ltsVersion = seamApiLtsVersion;
|
|
7283
|
+
constructor(apiKeyOrOptions = {}) {
|
|
7284
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
7285
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
7286
|
+
throw new Error(
|
|
7287
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7288
|
+
);
|
|
7289
|
+
}
|
|
7290
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
7291
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7292
|
+
}
|
|
7293
|
+
static fromClient(client, options = {}) {
|
|
7294
|
+
const constructorOptions = { ...options, client };
|
|
7295
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7296
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7297
|
+
}
|
|
7298
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7299
|
+
}
|
|
7300
|
+
static fromApiKey(apiKey, options = {}) {
|
|
7301
|
+
const constructorOptions = { ...options, apiKey };
|
|
7302
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7303
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7304
|
+
}
|
|
7305
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7306
|
+
}
|
|
7307
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7308
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
7309
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7310
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7311
|
+
}
|
|
7312
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7313
|
+
}
|
|
7314
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7315
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7316
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7317
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7318
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7319
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey"
|
|
7320
|
+
);
|
|
7321
|
+
}
|
|
7322
|
+
const client = createClient(clientOptions);
|
|
7323
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7324
|
+
const { token } = await clientSessions.getOrCreate({
|
|
7325
|
+
user_identifier_key: userIdentifierKey
|
|
7326
|
+
});
|
|
7327
|
+
return _SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken(
|
|
7328
|
+
token,
|
|
7091
7329
|
options
|
|
7330
|
+
);
|
|
7331
|
+
}
|
|
7332
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7333
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7334
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7335
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7336
|
+
"Missing consoleSessionToken or workspaceId"
|
|
7337
|
+
);
|
|
7338
|
+
}
|
|
7339
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7340
|
+
}
|
|
7341
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7342
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7343
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7344
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7345
|
+
"Missing personalAccessToken or workspaceId"
|
|
7346
|
+
);
|
|
7347
|
+
}
|
|
7348
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7349
|
+
}
|
|
7350
|
+
createPaginator(request) {
|
|
7351
|
+
return new SeamPaginator(this, request);
|
|
7352
|
+
}
|
|
7353
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
7354
|
+
const { headers } = this.client.defaults;
|
|
7355
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7356
|
+
clientSessionToken
|
|
7092
7357
|
});
|
|
7358
|
+
for (const key of Object.keys(authHeaders)) {
|
|
7359
|
+
if (headers[key] == null) {
|
|
7360
|
+
throw new Error(
|
|
7361
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7362
|
+
);
|
|
7363
|
+
}
|
|
7364
|
+
}
|
|
7365
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7366
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7367
|
+
await clientSessions.get();
|
|
7093
7368
|
}
|
|
7094
7369
|
validateConfig(parameters, options = {}) {
|
|
7095
7370
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -7199,6 +7474,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
7199
7474
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7200
7475
|
await clientSessions.get();
|
|
7201
7476
|
}
|
|
7477
|
+
get externalSites() {
|
|
7478
|
+
return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
7479
|
+
this.client,
|
|
7480
|
+
this.defaults
|
|
7481
|
+
);
|
|
7482
|
+
}
|
|
7202
7483
|
get ical() {
|
|
7203
7484
|
return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
7204
7485
|
this.client,
|
|
@@ -11310,6 +11591,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11310
11591
|
return seam.update(...args);
|
|
11311
11592
|
};
|
|
11312
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
|
+
}
|
|
11313
11601
|
get "/access_methods/delete"() {
|
|
11314
11602
|
const { client, defaults } = this;
|
|
11315
11603
|
return function accessMethodsDelete(...args) {
|
|
@@ -11345,6 +11633,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11345
11633
|
return seam.list(...args);
|
|
11346
11634
|
};
|
|
11347
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
|
+
}
|
|
11348
11643
|
get "/access_methods/unmanaged/get"() {
|
|
11349
11644
|
const { client, defaults } = this;
|
|
11350
11645
|
return function accessMethodsUnmanagedGet(...args) {
|
|
@@ -11579,6 +11874,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11579
11874
|
return seam.scanCredential(...args);
|
|
11580
11875
|
};
|
|
11581
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
|
+
}
|
|
11582
11884
|
get "/acs/encoders/simulate/next_credential_encode_will_fail"() {
|
|
11583
11885
|
const { client, defaults } = this;
|
|
11584
11886
|
return function acsEncodersSimulateNextCredentialEncodeWillFail(...args) {
|
|
@@ -12262,6 +12564,54 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12262
12564
|
return seam.getResourceLocator(...args);
|
|
12263
12565
|
};
|
|
12264
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
|
+
}
|
|
12265
12615
|
get "/seam/console/v1/timelines/get"() {
|
|
12266
12616
|
const { client, defaults } = this;
|
|
12267
12617
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12478,19 +12828,19 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12478
12828
|
return seam.update(...args);
|
|
12479
12829
|
};
|
|
12480
12830
|
}
|
|
12481
|
-
get "/seam/customer/v1/connectors/
|
|
12831
|
+
get "/seam/customer/v1/connectors/external_sites/list"() {
|
|
12482
12832
|
const { client, defaults } = this;
|
|
12483
12833
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12484
12834
|
throw new Error(
|
|
12485
12835
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12486
12836
|
);
|
|
12487
12837
|
}
|
|
12488
|
-
return function
|
|
12489
|
-
const seam =
|
|
12838
|
+
return function seamCustomerV1ConnectorsExternalSitesList(...args) {
|
|
12839
|
+
const seam = SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
12490
12840
|
client,
|
|
12491
12841
|
defaults
|
|
12492
12842
|
);
|
|
12493
|
-
return seam.
|
|
12843
|
+
return seam.list(...args);
|
|
12494
12844
|
};
|
|
12495
12845
|
}
|
|
12496
12846
|
get "/seam/customer/v1/connectors/ical/validate-config"() {
|
|
@@ -13635,6 +13985,7 @@ exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
|
13635
13985
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
13636
13986
|
exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
13637
13987
|
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
13988
|
+
exports.SeamHttpSeamConsoleV1Sites = SeamHttpSeamConsoleV1Sites;
|
|
13638
13989
|
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
13639
13990
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
13640
13991
|
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
@@ -13643,6 +13994,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
|
|
|
13643
13994
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
13644
13995
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
13645
13996
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
13997
|
+
exports.SeamHttpSeamCustomerV1ConnectorsExternalSites = SeamHttpSeamCustomerV1ConnectorsExternalSites;
|
|
13646
13998
|
exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
|
|
13647
13999
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
13648
14000
|
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|