@seamapi/http 1.87.0 → 1.89.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 +182 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +62 -3
- package/dist/index.cjs +184 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.d.ts +26 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +24 -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 +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 -3
- package/lib/seam/connect/routes/seam-http-endpoints.js +31 -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/access-grants/access-grants.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +82 -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 +72 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -5868,6 +5868,114 @@ var SeamHttpSeamConsole = class _SeamHttpSeamConsole {
|
|
|
5868
5868
|
}
|
|
5869
5869
|
};
|
|
5870
5870
|
|
|
5871
|
+
// src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts
|
|
5872
|
+
var SeamHttpSeamCustomerV1AccessGrants = class _SeamHttpSeamCustomerV1AccessGrants {
|
|
5873
|
+
client;
|
|
5874
|
+
defaults;
|
|
5875
|
+
ltsVersion = seamApiLtsVersion;
|
|
5876
|
+
static ltsVersion = seamApiLtsVersion;
|
|
5877
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5878
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5879
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5880
|
+
throw new Error(
|
|
5881
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5882
|
+
);
|
|
5883
|
+
}
|
|
5884
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5885
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5886
|
+
}
|
|
5887
|
+
static fromClient(client, options = {}) {
|
|
5888
|
+
const constructorOptions = { ...options, client };
|
|
5889
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5890
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5891
|
+
}
|
|
5892
|
+
return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
|
|
5893
|
+
}
|
|
5894
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5895
|
+
const constructorOptions = { ...options, apiKey };
|
|
5896
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5897
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5898
|
+
}
|
|
5899
|
+
return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
|
|
5900
|
+
}
|
|
5901
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5902
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5903
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5904
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5905
|
+
}
|
|
5906
|
+
return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
|
|
5907
|
+
}
|
|
5908
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5909
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5910
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5911
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5912
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5913
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1AccessGrants.fromPublishableKey"
|
|
5914
|
+
);
|
|
5915
|
+
}
|
|
5916
|
+
const client = createClient(clientOptions);
|
|
5917
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5918
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5919
|
+
user_identifier_key: userIdentifierKey
|
|
5920
|
+
});
|
|
5921
|
+
return _SeamHttpSeamCustomerV1AccessGrants.fromClientSessionToken(
|
|
5922
|
+
token,
|
|
5923
|
+
options
|
|
5924
|
+
);
|
|
5925
|
+
}
|
|
5926
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5927
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5928
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5929
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5930
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5931
|
+
);
|
|
5932
|
+
}
|
|
5933
|
+
return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
|
|
5934
|
+
}
|
|
5935
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5936
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5937
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5938
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5939
|
+
"Missing personalAccessToken or workspaceId"
|
|
5940
|
+
);
|
|
5941
|
+
}
|
|
5942
|
+
return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
|
|
5943
|
+
}
|
|
5944
|
+
createPaginator(request) {
|
|
5945
|
+
return new SeamPaginator(this, request);
|
|
5946
|
+
}
|
|
5947
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5948
|
+
const { headers } = this.client.defaults;
|
|
5949
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5950
|
+
clientSessionToken
|
|
5951
|
+
});
|
|
5952
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5953
|
+
if (headers[key] == null) {
|
|
5954
|
+
throw new Error(
|
|
5955
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5956
|
+
);
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5960
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5961
|
+
await clientSessions.get();
|
|
5962
|
+
}
|
|
5963
|
+
list(parameters, options = {}) {
|
|
5964
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5965
|
+
throw new Error(
|
|
5966
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5967
|
+
);
|
|
5968
|
+
}
|
|
5969
|
+
return new SeamHttpRequest(this, {
|
|
5970
|
+
pathname: "/seam/customer/v1/access_grants/list",
|
|
5971
|
+
method: "POST",
|
|
5972
|
+
body: parameters,
|
|
5973
|
+
responseKey: "access_grants",
|
|
5974
|
+
options
|
|
5975
|
+
});
|
|
5976
|
+
}
|
|
5977
|
+
};
|
|
5978
|
+
|
|
5871
5979
|
// src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts
|
|
5872
5980
|
var SeamHttpSeamCustomerV1AutomationRuns = class _SeamHttpSeamCustomerV1AutomationRuns {
|
|
5873
5981
|
client;
|
|
@@ -6218,6 +6326,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6218
6326
|
options
|
|
6219
6327
|
});
|
|
6220
6328
|
}
|
|
6329
|
+
delete(parameters, options = {}) {
|
|
6330
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6331
|
+
throw new Error(
|
|
6332
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6333
|
+
);
|
|
6334
|
+
}
|
|
6335
|
+
return new SeamHttpRequest(this, {
|
|
6336
|
+
pathname: "/seam/customer/v1/connectors/delete",
|
|
6337
|
+
method: "POST",
|
|
6338
|
+
body: parameters,
|
|
6339
|
+
responseKey: "connector",
|
|
6340
|
+
options
|
|
6341
|
+
});
|
|
6342
|
+
}
|
|
6221
6343
|
list(parameters, options = {}) {
|
|
6222
6344
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6223
6345
|
throw new Error(
|
|
@@ -6246,6 +6368,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6246
6368
|
options
|
|
6247
6369
|
});
|
|
6248
6370
|
}
|
|
6371
|
+
update(parameters, options = {}) {
|
|
6372
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6373
|
+
throw new Error(
|
|
6374
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6375
|
+
);
|
|
6376
|
+
}
|
|
6377
|
+
return new SeamHttpRequest(this, {
|
|
6378
|
+
pathname: "/seam/customer/v1/connectors/update",
|
|
6379
|
+
method: "POST",
|
|
6380
|
+
body: parameters,
|
|
6381
|
+
responseKey: "connector",
|
|
6382
|
+
options
|
|
6383
|
+
});
|
|
6384
|
+
}
|
|
6249
6385
|
};
|
|
6250
6386
|
|
|
6251
6387
|
// src/lib/seam/connect/routes/seam/customer/v1/events/events.ts
|
|
@@ -7029,6 +7165,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
|
7029
7165
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7030
7166
|
await clientSessions.get();
|
|
7031
7167
|
}
|
|
7168
|
+
get accessGrants() {
|
|
7169
|
+
return SeamHttpSeamCustomerV1AccessGrants.fromClient(
|
|
7170
|
+
this.client,
|
|
7171
|
+
this.defaults
|
|
7172
|
+
);
|
|
7173
|
+
}
|
|
7032
7174
|
get automationRuns() {
|
|
7033
7175
|
return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
|
|
7034
7176
|
this.client,
|
|
@@ -10552,6 +10694,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10552
10694
|
return seam.get(...args);
|
|
10553
10695
|
};
|
|
10554
10696
|
}
|
|
10697
|
+
get "/seam/customer/v1/access_grants/list"() {
|
|
10698
|
+
const { client, defaults } = this;
|
|
10699
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10700
|
+
throw new Error(
|
|
10701
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10702
|
+
);
|
|
10703
|
+
}
|
|
10704
|
+
return function seamCustomerV1AccessGrantsList(...args) {
|
|
10705
|
+
const seam = SeamHttpSeamCustomerV1AccessGrants.fromClient(
|
|
10706
|
+
client,
|
|
10707
|
+
defaults
|
|
10708
|
+
);
|
|
10709
|
+
return seam.list(...args);
|
|
10710
|
+
};
|
|
10711
|
+
}
|
|
10555
10712
|
get "/seam/customer/v1/automation_runs/list"() {
|
|
10556
10713
|
const { client, defaults } = this;
|
|
10557
10714
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -10624,6 +10781,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10624
10781
|
return seam.create(...args);
|
|
10625
10782
|
};
|
|
10626
10783
|
}
|
|
10784
|
+
get "/seam/customer/v1/connectors/delete"() {
|
|
10785
|
+
const { client, defaults } = this;
|
|
10786
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10787
|
+
throw new Error(
|
|
10788
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10789
|
+
);
|
|
10790
|
+
}
|
|
10791
|
+
return function seamCustomerV1ConnectorsDelete(...args) {
|
|
10792
|
+
const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
|
|
10793
|
+
return seam.delete(...args);
|
|
10794
|
+
};
|
|
10795
|
+
}
|
|
10627
10796
|
get "/seam/customer/v1/connectors/list"() {
|
|
10628
10797
|
const { client, defaults } = this;
|
|
10629
10798
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -10648,6 +10817,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10648
10817
|
return seam.sync(...args);
|
|
10649
10818
|
};
|
|
10650
10819
|
}
|
|
10820
|
+
get "/seam/customer/v1/connectors/update"() {
|
|
10821
|
+
const { client, defaults } = this;
|
|
10822
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10823
|
+
throw new Error(
|
|
10824
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10825
|
+
);
|
|
10826
|
+
}
|
|
10827
|
+
return function seamCustomerV1ConnectorsUpdate(...args) {
|
|
10828
|
+
const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
|
|
10829
|
+
return seam.update(...args);
|
|
10830
|
+
};
|
|
10831
|
+
}
|
|
10651
10832
|
get "/seam/customer/v1/events/list"() {
|
|
10652
10833
|
const { client, defaults } = this;
|
|
10653
10834
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -11592,6 +11773,7 @@ exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
|
11592
11773
|
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
11593
11774
|
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
11594
11775
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
11776
|
+
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
11595
11777
|
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
11596
11778
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
11597
11779
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|