@seamapi/http 1.111.0 → 1.113.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 +175 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +62 -3
- package/dist/index.cjs +177 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +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/ical/ical.d.ts +47 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js +116 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/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 +7 -3
- package/lib/seam/connect/routes/seam-http-endpoints.js +28 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/user-identities/user-identities.d.ts +13 -0
- package/lib/seam/connect/routes/user-identities/user-identities.js +9 -0
- package/lib/seam/connect/routes/user-identities/user-identities.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/seam/customer/v1/connectors/connectors.ts +9 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts +255 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/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 +74 -0
- package/src/lib/seam/connect/routes/user-identities/user-identities.ts +36 -0
- package/src/lib/version.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -111,6 +111,7 @@ __export(index_exports, {
|
|
|
111
111
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
112
112
|
SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
|
|
113
113
|
SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
|
|
114
|
+
SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
|
|
114
115
|
SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
|
|
115
116
|
SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
|
|
116
117
|
SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
|
|
@@ -228,6 +229,7 @@ __export(connect_exports, {
|
|
|
228
229
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
229
230
|
SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
|
|
230
231
|
SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
|
|
232
|
+
SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
|
|
231
233
|
SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
|
|
232
234
|
SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
|
|
233
235
|
SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
|
|
@@ -6983,6 +6985,128 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
|
|
|
6983
6985
|
}
|
|
6984
6986
|
};
|
|
6985
6987
|
|
|
6988
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
|
|
6989
|
+
var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
|
|
6990
|
+
client;
|
|
6991
|
+
defaults;
|
|
6992
|
+
ltsVersion = seamApiLtsVersion;
|
|
6993
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6994
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6995
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6996
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6997
|
+
throw new Error(
|
|
6998
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6999
|
+
);
|
|
7000
|
+
}
|
|
7001
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
7002
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7003
|
+
}
|
|
7004
|
+
static fromClient(client, options = {}) {
|
|
7005
|
+
const constructorOptions = { ...options, client };
|
|
7006
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7007
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7008
|
+
}
|
|
7009
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7010
|
+
}
|
|
7011
|
+
static fromApiKey(apiKey, options = {}) {
|
|
7012
|
+
const constructorOptions = { ...options, apiKey };
|
|
7013
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7014
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7015
|
+
}
|
|
7016
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7017
|
+
}
|
|
7018
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7019
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
7020
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7021
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7022
|
+
}
|
|
7023
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7024
|
+
}
|
|
7025
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7026
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7027
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7028
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7029
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7030
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey"
|
|
7031
|
+
);
|
|
7032
|
+
}
|
|
7033
|
+
const client = createClient(clientOptions);
|
|
7034
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7035
|
+
const { token } = await clientSessions.getOrCreate({
|
|
7036
|
+
user_identifier_key: userIdentifierKey
|
|
7037
|
+
});
|
|
7038
|
+
return _SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken(
|
|
7039
|
+
token,
|
|
7040
|
+
options
|
|
7041
|
+
);
|
|
7042
|
+
}
|
|
7043
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7044
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7045
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7046
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7047
|
+
"Missing consoleSessionToken or workspaceId"
|
|
7048
|
+
);
|
|
7049
|
+
}
|
|
7050
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7051
|
+
}
|
|
7052
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7053
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7054
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7055
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7056
|
+
"Missing personalAccessToken or workspaceId"
|
|
7057
|
+
);
|
|
7058
|
+
}
|
|
7059
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7060
|
+
}
|
|
7061
|
+
createPaginator(request) {
|
|
7062
|
+
return new SeamPaginator(this, request);
|
|
7063
|
+
}
|
|
7064
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
7065
|
+
const { headers } = this.client.defaults;
|
|
7066
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7067
|
+
clientSessionToken
|
|
7068
|
+
});
|
|
7069
|
+
for (const key of Object.keys(authHeaders)) {
|
|
7070
|
+
if (headers[key] == null) {
|
|
7071
|
+
throw new Error(
|
|
7072
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7073
|
+
);
|
|
7074
|
+
}
|
|
7075
|
+
}
|
|
7076
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7077
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7078
|
+
await clientSessions.get();
|
|
7079
|
+
}
|
|
7080
|
+
generateConfig(parameters, options = {}) {
|
|
7081
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7082
|
+
throw new Error(
|
|
7083
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7084
|
+
);
|
|
7085
|
+
}
|
|
7086
|
+
return new SeamHttpRequest(this, {
|
|
7087
|
+
pathname: "/seam/customer/v1/connectors/ical/generate-config",
|
|
7088
|
+
method: "POST",
|
|
7089
|
+
body: parameters,
|
|
7090
|
+
responseKey: "generated_config",
|
|
7091
|
+
options
|
|
7092
|
+
});
|
|
7093
|
+
}
|
|
7094
|
+
validateConfig(parameters, options = {}) {
|
|
7095
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7096
|
+
throw new Error(
|
|
7097
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7098
|
+
);
|
|
7099
|
+
}
|
|
7100
|
+
return new SeamHttpRequest(this, {
|
|
7101
|
+
pathname: "/seam/customer/v1/connectors/ical/validate-config",
|
|
7102
|
+
method: "POST",
|
|
7103
|
+
body: parameters,
|
|
7104
|
+
responseKey: "validation_result",
|
|
7105
|
+
options
|
|
7106
|
+
});
|
|
7107
|
+
}
|
|
7108
|
+
};
|
|
7109
|
+
|
|
6986
7110
|
// src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts
|
|
6987
7111
|
var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
6988
7112
|
client;
|
|
@@ -7075,6 +7199,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
7075
7199
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7076
7200
|
await clientSessions.get();
|
|
7077
7201
|
}
|
|
7202
|
+
get ical() {
|
|
7203
|
+
return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
7204
|
+
this.client,
|
|
7205
|
+
this.defaults
|
|
7206
|
+
);
|
|
7207
|
+
}
|
|
7078
7208
|
authorize(parameters, options = {}) {
|
|
7079
7209
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7080
7210
|
throw new Error(
|
|
@@ -10230,6 +10360,15 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
|
|
|
10230
10360
|
options
|
|
10231
10361
|
});
|
|
10232
10362
|
}
|
|
10363
|
+
listAccessibleEntrances(parameters, options = {}) {
|
|
10364
|
+
return new SeamHttpRequest(this, {
|
|
10365
|
+
pathname: "/user_identities/list_accessible_entrances",
|
|
10366
|
+
method: "POST",
|
|
10367
|
+
body: parameters,
|
|
10368
|
+
responseKey: "acs_entrances",
|
|
10369
|
+
options
|
|
10370
|
+
});
|
|
10371
|
+
}
|
|
10233
10372
|
listAcsSystems(parameters, options = {}) {
|
|
10234
10373
|
return new SeamHttpRequest(this, {
|
|
10235
10374
|
pathname: "/user_identities/list_acs_systems",
|
|
@@ -12321,6 +12460,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12321
12460
|
return seam.update(...args);
|
|
12322
12461
|
};
|
|
12323
12462
|
}
|
|
12463
|
+
get "/seam/customer/v1/connectors/ical/generate-config"() {
|
|
12464
|
+
const { client, defaults } = this;
|
|
12465
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12466
|
+
throw new Error(
|
|
12467
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12468
|
+
);
|
|
12469
|
+
}
|
|
12470
|
+
return function seamCustomerV1ConnectorsIcalGenerateConfig(...args) {
|
|
12471
|
+
const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
12472
|
+
client,
|
|
12473
|
+
defaults
|
|
12474
|
+
);
|
|
12475
|
+
return seam.generateConfig(...args);
|
|
12476
|
+
};
|
|
12477
|
+
}
|
|
12478
|
+
get "/seam/customer/v1/connectors/ical/validate-config"() {
|
|
12479
|
+
const { client, defaults } = this;
|
|
12480
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12481
|
+
throw new Error(
|
|
12482
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12483
|
+
);
|
|
12484
|
+
}
|
|
12485
|
+
return function seamCustomerV1ConnectorsIcalValidateConfig(...args) {
|
|
12486
|
+
const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
12487
|
+
client,
|
|
12488
|
+
defaults
|
|
12489
|
+
);
|
|
12490
|
+
return seam.validateConfig(...args);
|
|
12491
|
+
};
|
|
12492
|
+
}
|
|
12324
12493
|
get "/seam/customer/v1/customers/automations/get"() {
|
|
12325
12494
|
const { client, defaults } = this;
|
|
12326
12495
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12978,6 +13147,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12978
13147
|
return seam.listAccessibleDevices(...args);
|
|
12979
13148
|
};
|
|
12980
13149
|
}
|
|
13150
|
+
get "/user_identities/list_accessible_entrances"() {
|
|
13151
|
+
const { client, defaults } = this;
|
|
13152
|
+
return function userIdentitiesListAccessibleEntrances(...args) {
|
|
13153
|
+
const seam = SeamHttpUserIdentities.fromClient(client, defaults);
|
|
13154
|
+
return seam.listAccessibleEntrances(...args);
|
|
13155
|
+
};
|
|
13156
|
+
}
|
|
12981
13157
|
get "/user_identities/list_acs_systems"() {
|
|
12982
13158
|
const { client, defaults } = this;
|
|
12983
13159
|
return function userIdentitiesListAcsSystems(...args) {
|
|
@@ -13435,6 +13611,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
|
|
|
13435
13611
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
13436
13612
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
13437
13613
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
13614
|
+
exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
|
|
13438
13615
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
13439
13616
|
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|
|
13440
13617
|
exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;
|