@seamapi/http 1.96.0 → 1.98.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 +143 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +49 -4
- package/dist/index.cjs +145 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/acs/access-groups/access-groups.d.ts +13 -0
- package/lib/seam/connect/routes/acs/access-groups/access-groups.js +9 -0
- package/lib/seam/connect/routes/acs/access-groups/access-groups.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/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 +7 -4
- package/lib/seam/connect/routes/seam-http-endpoints.js +18 -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/acs/access-groups/access-groups.ts +32 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/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 +43 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -2116,6 +2116,15 @@ var SeamHttpAcsAccessGroups = class _SeamHttpAcsAccessGroups {
|
|
|
2116
2116
|
options
|
|
2117
2117
|
});
|
|
2118
2118
|
}
|
|
2119
|
+
delete(parameters, options = {}) {
|
|
2120
|
+
return new SeamHttpRequest(this, {
|
|
2121
|
+
pathname: "/acs/access_groups/delete",
|
|
2122
|
+
method: "POST",
|
|
2123
|
+
body: parameters,
|
|
2124
|
+
responseKey: void 0,
|
|
2125
|
+
options
|
|
2126
|
+
});
|
|
2127
|
+
}
|
|
2119
2128
|
get(parameters, options = {}) {
|
|
2120
2129
|
return new SeamHttpRequest(this, {
|
|
2121
2130
|
pathname: "/acs/access_groups/get",
|
|
@@ -6525,6 +6534,114 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6525
6534
|
}
|
|
6526
6535
|
};
|
|
6527
6536
|
|
|
6537
|
+
// src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts
|
|
6538
|
+
var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
|
|
6539
|
+
client;
|
|
6540
|
+
defaults;
|
|
6541
|
+
ltsVersion = seamApiLtsVersion;
|
|
6542
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6543
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6544
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6545
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6546
|
+
throw new Error(
|
|
6547
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6548
|
+
);
|
|
6549
|
+
}
|
|
6550
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6551
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6552
|
+
}
|
|
6553
|
+
static fromClient(client, options = {}) {
|
|
6554
|
+
const constructorOptions = { ...options, client };
|
|
6555
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6556
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6557
|
+
}
|
|
6558
|
+
return new _SeamHttpSeamCustomerV1Customers(constructorOptions);
|
|
6559
|
+
}
|
|
6560
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6561
|
+
const constructorOptions = { ...options, apiKey };
|
|
6562
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6563
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6564
|
+
}
|
|
6565
|
+
return new _SeamHttpSeamCustomerV1Customers(constructorOptions);
|
|
6566
|
+
}
|
|
6567
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6568
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6569
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6570
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6571
|
+
}
|
|
6572
|
+
return new _SeamHttpSeamCustomerV1Customers(constructorOptions);
|
|
6573
|
+
}
|
|
6574
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6575
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6576
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6577
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6578
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6579
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1Customers.fromPublishableKey"
|
|
6580
|
+
);
|
|
6581
|
+
}
|
|
6582
|
+
const client = createClient(clientOptions);
|
|
6583
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6584
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6585
|
+
user_identifier_key: userIdentifierKey
|
|
6586
|
+
});
|
|
6587
|
+
return _SeamHttpSeamCustomerV1Customers.fromClientSessionToken(
|
|
6588
|
+
token,
|
|
6589
|
+
options
|
|
6590
|
+
);
|
|
6591
|
+
}
|
|
6592
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6593
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6594
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6595
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6596
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6597
|
+
);
|
|
6598
|
+
}
|
|
6599
|
+
return new _SeamHttpSeamCustomerV1Customers(constructorOptions);
|
|
6600
|
+
}
|
|
6601
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6602
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6603
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6604
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6605
|
+
"Missing personalAccessToken or workspaceId"
|
|
6606
|
+
);
|
|
6607
|
+
}
|
|
6608
|
+
return new _SeamHttpSeamCustomerV1Customers(constructorOptions);
|
|
6609
|
+
}
|
|
6610
|
+
createPaginator(request) {
|
|
6611
|
+
return new SeamPaginator(this, request);
|
|
6612
|
+
}
|
|
6613
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6614
|
+
const { headers } = this.client.defaults;
|
|
6615
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6616
|
+
clientSessionToken
|
|
6617
|
+
});
|
|
6618
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6619
|
+
if (headers[key] == null) {
|
|
6620
|
+
throw new Error(
|
|
6621
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6622
|
+
);
|
|
6623
|
+
}
|
|
6624
|
+
}
|
|
6625
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6626
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6627
|
+
await clientSessions.get();
|
|
6628
|
+
}
|
|
6629
|
+
list(parameters, options = {}) {
|
|
6630
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6631
|
+
throw new Error(
|
|
6632
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6633
|
+
);
|
|
6634
|
+
}
|
|
6635
|
+
return new SeamHttpRequest(this, {
|
|
6636
|
+
pathname: "/seam/customer/v1/customers/list",
|
|
6637
|
+
method: "POST",
|
|
6638
|
+
body: parameters,
|
|
6639
|
+
responseKey: "customers",
|
|
6640
|
+
options
|
|
6641
|
+
});
|
|
6642
|
+
}
|
|
6643
|
+
};
|
|
6644
|
+
|
|
6528
6645
|
// src/lib/seam/connect/routes/seam/customer/v1/events/events.ts
|
|
6529
6646
|
var SeamHttpSeamCustomerV1Events = class _SeamHttpSeamCustomerV1Events {
|
|
6530
6647
|
client;
|
|
@@ -7344,6 +7461,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
|
7344
7461
|
this.defaults
|
|
7345
7462
|
);
|
|
7346
7463
|
}
|
|
7464
|
+
get customers() {
|
|
7465
|
+
return SeamHttpSeamCustomerV1Customers.fromClient(
|
|
7466
|
+
this.client,
|
|
7467
|
+
this.defaults
|
|
7468
|
+
);
|
|
7469
|
+
}
|
|
7347
7470
|
get events() {
|
|
7348
7471
|
return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults);
|
|
7349
7472
|
}
|
|
@@ -9991,6 +10114,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9991
10114
|
return seam.addUser(...args);
|
|
9992
10115
|
};
|
|
9993
10116
|
}
|
|
10117
|
+
get "/acs/access_groups/delete"() {
|
|
10118
|
+
const { client, defaults } = this;
|
|
10119
|
+
return function acsAccessGroupsDelete(...args) {
|
|
10120
|
+
const seam = SeamHttpAcsAccessGroups.fromClient(client, defaults);
|
|
10121
|
+
return seam.delete(...args);
|
|
10122
|
+
};
|
|
10123
|
+
}
|
|
9994
10124
|
get "/acs/access_groups/get"() {
|
|
9995
10125
|
const { client, defaults } = this;
|
|
9996
10126
|
return function acsAccessGroupsGet(...args) {
|
|
@@ -11025,6 +11155,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11025
11155
|
return seam.update(...args);
|
|
11026
11156
|
};
|
|
11027
11157
|
}
|
|
11158
|
+
get "/seam/customer/v1/customers/list"() {
|
|
11159
|
+
const { client, defaults } = this;
|
|
11160
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
11161
|
+
throw new Error(
|
|
11162
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
11163
|
+
);
|
|
11164
|
+
}
|
|
11165
|
+
return function seamCustomerV1CustomersList(...args) {
|
|
11166
|
+
const seam = SeamHttpSeamCustomerV1Customers.fromClient(client, defaults);
|
|
11167
|
+
return seam.list(...args);
|
|
11168
|
+
};
|
|
11169
|
+
}
|
|
11028
11170
|
get "/seam/customer/v1/events/list"() {
|
|
11029
11171
|
const { client, defaults } = this;
|
|
11030
11172
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -11998,6 +12140,7 @@ exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
|
11998
12140
|
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
11999
12141
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
12000
12142
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
12143
|
+
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
12001
12144
|
exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
|
|
12002
12145
|
exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
|
|
12003
12146
|
exports.SeamHttpSeamCustomerV1Reservations = SeamHttpSeamCustomerV1Reservations;
|