@seamapi/http 1.101.0 → 1.102.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 +130 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +33 -2
- package/dist/index.cjs +132 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +3 -1
- package/lib/seam/connect/routes/seam-http-endpoints.js +11 -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/seam/customer/v1/connector-customers/connector-customers.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +8 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +28 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -6342,6 +6342,114 @@ var SeamHttpSeamCustomerV1Automations = class _SeamHttpSeamCustomerV1Automations
|
|
|
6342
6342
|
}
|
|
6343
6343
|
};
|
|
6344
6344
|
|
|
6345
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.ts
|
|
6346
|
+
var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1ConnectorCustomers {
|
|
6347
|
+
client;
|
|
6348
|
+
defaults;
|
|
6349
|
+
ltsVersion = seamApiLtsVersion;
|
|
6350
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6351
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6352
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6353
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6354
|
+
throw new Error(
|
|
6355
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6356
|
+
);
|
|
6357
|
+
}
|
|
6358
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6359
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6360
|
+
}
|
|
6361
|
+
static fromClient(client, options = {}) {
|
|
6362
|
+
const constructorOptions = { ...options, client };
|
|
6363
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6364
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6365
|
+
}
|
|
6366
|
+
return new _SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions);
|
|
6367
|
+
}
|
|
6368
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6369
|
+
const constructorOptions = { ...options, apiKey };
|
|
6370
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6371
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6372
|
+
}
|
|
6373
|
+
return new _SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions);
|
|
6374
|
+
}
|
|
6375
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6376
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6377
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6378
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6379
|
+
}
|
|
6380
|
+
return new _SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions);
|
|
6381
|
+
}
|
|
6382
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6383
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6384
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6385
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6386
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6387
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorCustomers.fromPublishableKey"
|
|
6388
|
+
);
|
|
6389
|
+
}
|
|
6390
|
+
const client = createClient(clientOptions);
|
|
6391
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6392
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6393
|
+
user_identifier_key: userIdentifierKey
|
|
6394
|
+
});
|
|
6395
|
+
return _SeamHttpSeamCustomerV1ConnectorCustomers.fromClientSessionToken(
|
|
6396
|
+
token,
|
|
6397
|
+
options
|
|
6398
|
+
);
|
|
6399
|
+
}
|
|
6400
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6401
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6402
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6403
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6404
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6405
|
+
);
|
|
6406
|
+
}
|
|
6407
|
+
return new _SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions);
|
|
6408
|
+
}
|
|
6409
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6410
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6411
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6412
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6413
|
+
"Missing personalAccessToken or workspaceId"
|
|
6414
|
+
);
|
|
6415
|
+
}
|
|
6416
|
+
return new _SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions);
|
|
6417
|
+
}
|
|
6418
|
+
createPaginator(request) {
|
|
6419
|
+
return new SeamPaginator(this, request);
|
|
6420
|
+
}
|
|
6421
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6422
|
+
const { headers } = this.client.defaults;
|
|
6423
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6424
|
+
clientSessionToken
|
|
6425
|
+
});
|
|
6426
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6427
|
+
if (headers[key] == null) {
|
|
6428
|
+
throw new Error(
|
|
6429
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6430
|
+
);
|
|
6431
|
+
}
|
|
6432
|
+
}
|
|
6433
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6434
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6435
|
+
await clientSessions.get();
|
|
6436
|
+
}
|
|
6437
|
+
list(parameters, options = {}) {
|
|
6438
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6439
|
+
throw new Error(
|
|
6440
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6441
|
+
);
|
|
6442
|
+
}
|
|
6443
|
+
return new SeamHttpRequest(this, {
|
|
6444
|
+
pathname: "/seam/customer/v1/connector_customers/list",
|
|
6445
|
+
method: "POST",
|
|
6446
|
+
body: parameters,
|
|
6447
|
+
responseKey: "connector_customers",
|
|
6448
|
+
options
|
|
6449
|
+
});
|
|
6450
|
+
}
|
|
6451
|
+
};
|
|
6452
|
+
|
|
6345
6453
|
// src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts
|
|
6346
6454
|
var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
6347
6455
|
client;
|
|
@@ -7469,6 +7577,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
|
7469
7577
|
this.defaults
|
|
7470
7578
|
);
|
|
7471
7579
|
}
|
|
7580
|
+
get connectorCustomers() {
|
|
7581
|
+
return SeamHttpSeamCustomerV1ConnectorCustomers.fromClient(
|
|
7582
|
+
this.client,
|
|
7583
|
+
this.defaults
|
|
7584
|
+
);
|
|
7585
|
+
}
|
|
7472
7586
|
get connectors() {
|
|
7473
7587
|
return SeamHttpSeamCustomerV1Connectors.fromClient(
|
|
7474
7588
|
this.client,
|
|
@@ -11269,6 +11383,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11269
11383
|
return seam.update(...args);
|
|
11270
11384
|
};
|
|
11271
11385
|
}
|
|
11386
|
+
get "/seam/customer/v1/connector_customers/list"() {
|
|
11387
|
+
const { client, defaults } = this;
|
|
11388
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
11389
|
+
throw new Error(
|
|
11390
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
11391
|
+
);
|
|
11392
|
+
}
|
|
11393
|
+
return function seamCustomerV1ConnectorCustomersList(...args) {
|
|
11394
|
+
const seam = SeamHttpSeamCustomerV1ConnectorCustomers.fromClient(
|
|
11395
|
+
client,
|
|
11396
|
+
defaults
|
|
11397
|
+
);
|
|
11398
|
+
return seam.list(...args);
|
|
11399
|
+
};
|
|
11400
|
+
}
|
|
11272
11401
|
get "/seam/customer/v1/connectors/authorize"() {
|
|
11273
11402
|
const { client, defaults } = this;
|
|
11274
11403
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12356,6 +12485,7 @@ exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
|
12356
12485
|
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
12357
12486
|
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
12358
12487
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
12488
|
+
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
12359
12489
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
12360
12490
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
12361
12491
|
exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
|