@seamapi/http 1.83.0 → 1.85.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 +36 -119
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +17 -33
- package/dist/index.cjs +36 -121
- 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 +14 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +15 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/index.js +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +4 -5
- package/lib/seam/connect/routes/seam-http-endpoints.js +13 -8
- 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/seam/customer/v1/connectors/connectors.ts +51 -1
- package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +0 -1
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +27 -28
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.d.ts +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.js +0 -6
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.js.map +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.d.ts +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.js +0 -6
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.js.map +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.d.ts +0 -34
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.js +0 -98
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.js.map +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/index.d.ts +0 -1
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/index.js +0 -6
- package/lib/seam/connect/routes/seam/customer/v1/webhooks/index.js.map +0 -1
- package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.ts +0 -6
- package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.ts +0 -6
- package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.ts +0 -216
- package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/index.ts +0 -6
package/dist/connect.cjs
CHANGED
|
@@ -6200,6 +6200,11 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6200
6200
|
await clientSessions.get();
|
|
6201
6201
|
}
|
|
6202
6202
|
create(parameters, options = {}) {
|
|
6203
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6204
|
+
throw new Error(
|
|
6205
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6206
|
+
);
|
|
6207
|
+
}
|
|
6203
6208
|
return new SeamHttpRequest(this, {
|
|
6204
6209
|
pathname: "/seam/customer/v1/connectors/create",
|
|
6205
6210
|
method: "POST",
|
|
@@ -6208,6 +6213,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6208
6213
|
options
|
|
6209
6214
|
});
|
|
6210
6215
|
}
|
|
6216
|
+
list(parameters, options = {}) {
|
|
6217
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6218
|
+
throw new Error(
|
|
6219
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6220
|
+
);
|
|
6221
|
+
}
|
|
6222
|
+
return new SeamHttpRequest(this, {
|
|
6223
|
+
pathname: "/seam/customer/v1/connectors/list",
|
|
6224
|
+
method: "GET",
|
|
6225
|
+
params: parameters,
|
|
6226
|
+
responseKey: "connectors",
|
|
6227
|
+
options
|
|
6228
|
+
});
|
|
6229
|
+
}
|
|
6211
6230
|
sync(parameters, options = {}) {
|
|
6212
6231
|
return new SeamHttpRequest(this, {
|
|
6213
6232
|
pathname: "/seam/customer/v1/connectors/sync",
|
|
@@ -7010,114 +7029,6 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
|
7010
7029
|
}
|
|
7011
7030
|
};
|
|
7012
7031
|
|
|
7013
|
-
// src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.ts
|
|
7014
|
-
var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId {
|
|
7015
|
-
client;
|
|
7016
|
-
defaults;
|
|
7017
|
-
ltsVersion = seamApiLtsVersion;
|
|
7018
|
-
static ltsVersion = seamApiLtsVersion;
|
|
7019
|
-
constructor(apiKeyOrOptions = {}) {
|
|
7020
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
7021
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
7022
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7023
|
-
}
|
|
7024
|
-
static fromClient(client, options = {}) {
|
|
7025
|
-
const constructorOptions = { ...options, client };
|
|
7026
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7027
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7028
|
-
}
|
|
7029
|
-
return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
|
|
7030
|
-
constructorOptions
|
|
7031
|
-
);
|
|
7032
|
-
}
|
|
7033
|
-
static fromApiKey(apiKey, options = {}) {
|
|
7034
|
-
const constructorOptions = { ...options, apiKey };
|
|
7035
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7036
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7037
|
-
}
|
|
7038
|
-
return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
|
|
7039
|
-
constructorOptions
|
|
7040
|
-
);
|
|
7041
|
-
}
|
|
7042
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7043
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
7044
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7045
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7046
|
-
}
|
|
7047
|
-
return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
|
|
7048
|
-
constructorOptions
|
|
7049
|
-
);
|
|
7050
|
-
}
|
|
7051
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7052
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7053
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7054
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7055
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7056
|
-
"The client option cannot be used with SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromPublishableKey"
|
|
7057
|
-
);
|
|
7058
|
-
}
|
|
7059
|
-
const client = createClient(clientOptions);
|
|
7060
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7061
|
-
const { token } = await clientSessions.getOrCreate({
|
|
7062
|
-
user_identifier_key: userIdentifierKey
|
|
7063
|
-
});
|
|
7064
|
-
return _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromClientSessionToken(
|
|
7065
|
-
token,
|
|
7066
|
-
options
|
|
7067
|
-
);
|
|
7068
|
-
}
|
|
7069
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7070
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7071
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7072
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7073
|
-
"Missing consoleSessionToken or workspaceId"
|
|
7074
|
-
);
|
|
7075
|
-
}
|
|
7076
|
-
return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
|
|
7077
|
-
constructorOptions
|
|
7078
|
-
);
|
|
7079
|
-
}
|
|
7080
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7081
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7082
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7083
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7084
|
-
"Missing personalAccessToken or workspaceId"
|
|
7085
|
-
);
|
|
7086
|
-
}
|
|
7087
|
-
return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
|
|
7088
|
-
constructorOptions
|
|
7089
|
-
);
|
|
7090
|
-
}
|
|
7091
|
-
createPaginator(request) {
|
|
7092
|
-
return new SeamPaginator(this, request);
|
|
7093
|
-
}
|
|
7094
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
7095
|
-
const { headers } = this.client.defaults;
|
|
7096
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7097
|
-
clientSessionToken
|
|
7098
|
-
});
|
|
7099
|
-
for (const key of Object.keys(authHeaders)) {
|
|
7100
|
-
if (headers[key] == null) {
|
|
7101
|
-
throw new Error(
|
|
7102
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7103
|
-
);
|
|
7104
|
-
}
|
|
7105
|
-
}
|
|
7106
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7107
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7108
|
-
await clientSessions.get();
|
|
7109
|
-
}
|
|
7110
|
-
connectorId(parameters, options = {}) {
|
|
7111
|
-
return new SeamHttpRequest(this, {
|
|
7112
|
-
pathname: "/seam/customer/v1/webhooks/connectors/[workspace_id]/[connector_id]",
|
|
7113
|
-
method: "POST",
|
|
7114
|
-
body: parameters,
|
|
7115
|
-
responseKey: void 0,
|
|
7116
|
-
options
|
|
7117
|
-
});
|
|
7118
|
-
}
|
|
7119
|
-
};
|
|
7120
|
-
|
|
7121
7032
|
// src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts
|
|
7122
7033
|
var SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1BuildingBlocksSpaces {
|
|
7123
7034
|
client;
|
|
@@ -10659,11 +10570,28 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10659
10570
|
}
|
|
10660
10571
|
get "/seam/customer/v1/connectors/create"() {
|
|
10661
10572
|
const { client, defaults } = this;
|
|
10573
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10574
|
+
throw new Error(
|
|
10575
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10576
|
+
);
|
|
10577
|
+
}
|
|
10662
10578
|
return function seamCustomerV1ConnectorsCreate(...args) {
|
|
10663
10579
|
const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
|
|
10664
10580
|
return seam.create(...args);
|
|
10665
10581
|
};
|
|
10666
10582
|
}
|
|
10583
|
+
get "/seam/customer/v1/connectors/list"() {
|
|
10584
|
+
const { client, defaults } = this;
|
|
10585
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10586
|
+
throw new Error(
|
|
10587
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10588
|
+
);
|
|
10589
|
+
}
|
|
10590
|
+
return function seamCustomerV1ConnectorsList(...args) {
|
|
10591
|
+
const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
|
|
10592
|
+
return seam.list(...args);
|
|
10593
|
+
};
|
|
10594
|
+
}
|
|
10667
10595
|
get "/seam/customer/v1/connectors/sync"() {
|
|
10668
10596
|
const { client, defaults } = this;
|
|
10669
10597
|
return function seamCustomerV1ConnectorsSync(...args) {
|
|
@@ -10778,16 +10706,6 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10778
10706
|
return seam.list(...args);
|
|
10779
10707
|
};
|
|
10780
10708
|
}
|
|
10781
|
-
get "/seam/customer/v1/webhooks/connectors/[workspace_id]/[connector_id]"() {
|
|
10782
|
-
const { client, defaults } = this;
|
|
10783
|
-
return function seamCustomerV1WebhooksConnectorsWorkspaceIdConnectorId(...args) {
|
|
10784
|
-
const seam = SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromClient(
|
|
10785
|
-
client,
|
|
10786
|
-
defaults
|
|
10787
|
-
);
|
|
10788
|
-
return seam.connectorId(...args);
|
|
10789
|
-
};
|
|
10790
|
-
}
|
|
10791
10709
|
get "/seam/partner/v1/building_blocks/spaces/auto_map"() {
|
|
10792
10710
|
const { client, defaults } = this;
|
|
10793
10711
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -11609,7 +11527,6 @@ exports.SeamHttpSeamCustomerV1Reservations = SeamHttpSeamCustomerV1Reservations;
|
|
|
11609
11527
|
exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
|
|
11610
11528
|
exports.SeamHttpSeamCustomerV1Spaces = SeamHttpSeamCustomerV1Spaces;
|
|
11611
11529
|
exports.SeamHttpSeamCustomerV1StaffMembers = SeamHttpSeamCustomerV1StaffMembers;
|
|
11612
|
-
exports.SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId;
|
|
11613
11530
|
exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
|
|
11614
11531
|
exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;
|
|
11615
11532
|
exports.SeamHttpSpaces = SeamHttpSpaces;
|