@seamapi/http 1.64.0 → 1.66.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 +136 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +61 -16
- package/dist/index.cjs +138 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +16 -16
- package/lib/seam/connect/routes/customers/customers.d.ts +13 -0
- package/lib/seam/connect/routes/customers/customers.js +9 -0
- package/lib/seam/connect/routes/customers/customers.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/timelines/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/timelines/index.js +6 -0
- package/lib/seam/connect/routes/seam/console/v1/timelines/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.d.ts +34 -0
- package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.js +102 -0
- package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.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-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/customers/customers.ts +33 -0
- package/src/lib/seam/connect/routes/seam/console/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts +212 -0
- package/src/lib/seam/connect/routes/seam/console/v1/v1.ts +6 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +43 -0
- package/src/lib/version.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -107,6 +107,7 @@ __export(index_exports, {
|
|
|
107
107
|
SeamHttpRequest: () => SeamHttpRequest,
|
|
108
108
|
SeamHttpSeamConsole: () => SeamHttpSeamConsole,
|
|
109
109
|
SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
|
|
110
|
+
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
110
111
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
111
112
|
SeamHttpSeamCustomerV1AutomationRuns: () => SeamHttpSeamCustomerV1AutomationRuns,
|
|
112
113
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
@@ -207,6 +208,7 @@ __export(connect_exports, {
|
|
|
207
208
|
SeamHttpRequest: () => SeamHttpRequest,
|
|
208
209
|
SeamHttpSeamConsole: () => SeamHttpSeamConsole,
|
|
209
210
|
SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
|
|
211
|
+
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
210
212
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
211
213
|
SeamHttpSeamCustomerV1AutomationRuns: () => SeamHttpSeamCustomerV1AutomationRuns,
|
|
212
214
|
SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
|
|
@@ -4136,6 +4138,15 @@ var _SeamHttpCustomers = class _SeamHttpCustomers {
|
|
|
4136
4138
|
options
|
|
4137
4139
|
});
|
|
4138
4140
|
}
|
|
4141
|
+
deleteData(parameters, options = {}) {
|
|
4142
|
+
return new SeamHttpRequest(this, {
|
|
4143
|
+
pathname: "/customers/delete_data",
|
|
4144
|
+
method: "POST",
|
|
4145
|
+
body: parameters,
|
|
4146
|
+
responseKey: void 0,
|
|
4147
|
+
options
|
|
4148
|
+
});
|
|
4149
|
+
}
|
|
4139
4150
|
pushData(parameters, options = {}) {
|
|
4140
4151
|
return new SeamHttpRequest(this, {
|
|
4141
4152
|
pathname: "/customers/push_data",
|
|
@@ -5513,6 +5524,110 @@ var _SeamHttpPhones = class _SeamHttpPhones {
|
|
|
5513
5524
|
_SeamHttpPhones.ltsVersion = seamApiLtsVersion;
|
|
5514
5525
|
var SeamHttpPhones = _SeamHttpPhones;
|
|
5515
5526
|
|
|
5527
|
+
// src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts
|
|
5528
|
+
var _SeamHttpSeamConsoleV1Timelines = class _SeamHttpSeamConsoleV1Timelines {
|
|
5529
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5530
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5531
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5532
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5533
|
+
throw new Error(
|
|
5534
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5535
|
+
);
|
|
5536
|
+
}
|
|
5537
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5538
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5539
|
+
}
|
|
5540
|
+
static fromClient(client, options = {}) {
|
|
5541
|
+
const constructorOptions = { ...options, client };
|
|
5542
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5543
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5544
|
+
}
|
|
5545
|
+
return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
|
|
5546
|
+
}
|
|
5547
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5548
|
+
const constructorOptions = { ...options, apiKey };
|
|
5549
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5550
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5551
|
+
}
|
|
5552
|
+
return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
|
|
5553
|
+
}
|
|
5554
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5555
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5556
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5557
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5558
|
+
}
|
|
5559
|
+
return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
|
|
5560
|
+
}
|
|
5561
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5562
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5563
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5564
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5565
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5566
|
+
"The client option cannot be used with SeamHttpSeamConsoleV1Timelines.fromPublishableKey"
|
|
5567
|
+
);
|
|
5568
|
+
}
|
|
5569
|
+
const client = createClient(clientOptions);
|
|
5570
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5571
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5572
|
+
user_identifier_key: userIdentifierKey
|
|
5573
|
+
});
|
|
5574
|
+
return _SeamHttpSeamConsoleV1Timelines.fromClientSessionToken(token, options);
|
|
5575
|
+
}
|
|
5576
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5577
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5578
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5579
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5580
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5581
|
+
);
|
|
5582
|
+
}
|
|
5583
|
+
return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
|
|
5584
|
+
}
|
|
5585
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5586
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5587
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5588
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5589
|
+
"Missing personalAccessToken or workspaceId"
|
|
5590
|
+
);
|
|
5591
|
+
}
|
|
5592
|
+
return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
|
|
5593
|
+
}
|
|
5594
|
+
createPaginator(request) {
|
|
5595
|
+
return new SeamPaginator(this, request);
|
|
5596
|
+
}
|
|
5597
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5598
|
+
const { headers } = this.client.defaults;
|
|
5599
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5600
|
+
clientSessionToken
|
|
5601
|
+
});
|
|
5602
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5603
|
+
if (headers[key] == null) {
|
|
5604
|
+
throw new Error(
|
|
5605
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5606
|
+
);
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5610
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5611
|
+
await clientSessions.get();
|
|
5612
|
+
}
|
|
5613
|
+
get(parameters, options = {}) {
|
|
5614
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5615
|
+
throw new Error(
|
|
5616
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5617
|
+
);
|
|
5618
|
+
}
|
|
5619
|
+
return new SeamHttpRequest(this, {
|
|
5620
|
+
pathname: "/seam/console/v1/timelines/get",
|
|
5621
|
+
method: "POST",
|
|
5622
|
+
body: parameters,
|
|
5623
|
+
responseKey: "timeline",
|
|
5624
|
+
options
|
|
5625
|
+
});
|
|
5626
|
+
}
|
|
5627
|
+
};
|
|
5628
|
+
_SeamHttpSeamConsoleV1Timelines.ltsVersion = seamApiLtsVersion;
|
|
5629
|
+
var SeamHttpSeamConsoleV1Timelines = _SeamHttpSeamConsoleV1Timelines;
|
|
5630
|
+
|
|
5516
5631
|
// src/lib/seam/connect/routes/seam/console/v1/v1.ts
|
|
5517
5632
|
var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
5518
5633
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -5599,6 +5714,9 @@ var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
|
5599
5714
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5600
5715
|
await clientSessions.get();
|
|
5601
5716
|
}
|
|
5717
|
+
get timelines() {
|
|
5718
|
+
return SeamHttpSeamConsoleV1Timelines.fromClient(this.client, this.defaults);
|
|
5719
|
+
}
|
|
5602
5720
|
getResourceLocator(parameters, options = {}) {
|
|
5603
5721
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5604
5722
|
throw new Error(
|
|
@@ -9369,6 +9487,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9369
9487
|
return seam.createPortal(...args);
|
|
9370
9488
|
};
|
|
9371
9489
|
}
|
|
9490
|
+
get ["/customers/delete_data"]() {
|
|
9491
|
+
const { client, defaults } = this;
|
|
9492
|
+
return function customersDeleteData(...args) {
|
|
9493
|
+
const seam = SeamHttpCustomers.fromClient(client, defaults);
|
|
9494
|
+
return seam.deleteData(...args);
|
|
9495
|
+
};
|
|
9496
|
+
}
|
|
9372
9497
|
get ["/customers/push_data"]() {
|
|
9373
9498
|
const { client, defaults } = this;
|
|
9374
9499
|
return function customersPushData(...args) {
|
|
@@ -9653,6 +9778,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9653
9778
|
return seam.getResourceLocator(...args);
|
|
9654
9779
|
};
|
|
9655
9780
|
}
|
|
9781
|
+
get ["/seam/console/v1/timelines/get"]() {
|
|
9782
|
+
const { client, defaults } = this;
|
|
9783
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9784
|
+
throw new Error(
|
|
9785
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9786
|
+
);
|
|
9787
|
+
}
|
|
9788
|
+
return function seamConsoleV1TimelinesGet(...args) {
|
|
9789
|
+
const seam = SeamHttpSeamConsoleV1Timelines.fromClient(client, defaults);
|
|
9790
|
+
return seam.get(...args);
|
|
9791
|
+
};
|
|
9792
|
+
}
|
|
9656
9793
|
get ["/seam/customer/v1/automation_runs/list"]() {
|
|
9657
9794
|
const { client, defaults } = this;
|
|
9658
9795
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -10554,6 +10691,7 @@ exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
|
10554
10691
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
10555
10692
|
exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
10556
10693
|
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
10694
|
+
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
10557
10695
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
10558
10696
|
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
10559
10697
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|