@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.
Files changed (34) hide show
  1. package/dist/connect.cjs +182 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +62 -3
  4. package/dist/index.cjs +184 -0
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.d.ts +34 -0
  8. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js +104 -0
  9. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js.map +1 -0
  10. package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.d.ts +1 -0
  11. package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.js +6 -0
  12. package/lib/seam/connect/routes/seam/customer/v1/access-grants/index.js.map +1 -0
  13. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.d.ts +26 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +24 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js.map +1 -1
  16. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  19. package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
  20. package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -0
  21. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  22. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -3
  23. package/lib/seam/connect/routes/seam-http-endpoints.js +31 -0
  24. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  25. package/lib/version.d.ts +1 -1
  26. package/lib/version.js +1 -1
  27. package/package.json +3 -3
  28. package/src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts +214 -0
  29. package/src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts +6 -0
  30. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +82 -0
  31. package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
  32. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +8 -0
  33. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +72 -0
  34. package/src/lib/version.ts +1 -1
package/dist/index.cjs CHANGED
@@ -103,6 +103,7 @@ __export(index_exports, {
103
103
  SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
104
104
  SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
105
105
  SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
106
+ SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
106
107
  SeamHttpSeamCustomerV1AutomationRuns: () => SeamHttpSeamCustomerV1AutomationRuns,
107
108
  SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
108
109
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
@@ -211,6 +212,7 @@ __export(connect_exports, {
211
212
  SeamHttpSeamConsoleV1: () => SeamHttpSeamConsoleV1,
212
213
  SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
213
214
  SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
215
+ SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
214
216
  SeamHttpSeamCustomerV1AutomationRuns: () => SeamHttpSeamCustomerV1AutomationRuns,
215
217
  SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
216
218
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
@@ -6121,6 +6123,114 @@ var SeamHttpSeamConsole = class _SeamHttpSeamConsole {
6121
6123
  }
6122
6124
  };
6123
6125
 
6126
+ // src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts
6127
+ var SeamHttpSeamCustomerV1AccessGrants = class _SeamHttpSeamCustomerV1AccessGrants {
6128
+ client;
6129
+ defaults;
6130
+ ltsVersion = seamApiLtsVersion;
6131
+ static ltsVersion = seamApiLtsVersion;
6132
+ constructor(apiKeyOrOptions = {}) {
6133
+ const options = parseOptions(apiKeyOrOptions);
6134
+ if (!options.isUndocumentedApiEnabled) {
6135
+ throw new Error(
6136
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6137
+ );
6138
+ }
6139
+ this.client = "client" in options ? options.client : createClient(options);
6140
+ this.defaults = limitToSeamHttpRequestOptions(options);
6141
+ }
6142
+ static fromClient(client, options = {}) {
6143
+ const constructorOptions = { ...options, client };
6144
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
6145
+ throw new SeamHttpInvalidOptionsError("Missing client");
6146
+ }
6147
+ return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
6148
+ }
6149
+ static fromApiKey(apiKey, options = {}) {
6150
+ const constructorOptions = { ...options, apiKey };
6151
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
6152
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
6153
+ }
6154
+ return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
6155
+ }
6156
+ static fromClientSessionToken(clientSessionToken, options = {}) {
6157
+ const constructorOptions = { ...options, clientSessionToken };
6158
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
6159
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
6160
+ }
6161
+ return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
6162
+ }
6163
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
6164
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
6165
+ const clientOptions = parseOptions({ ...options, publishableKey });
6166
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
6167
+ throw new SeamHttpInvalidOptionsError(
6168
+ "The client option cannot be used with SeamHttpSeamCustomerV1AccessGrants.fromPublishableKey"
6169
+ );
6170
+ }
6171
+ const client = createClient(clientOptions);
6172
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
6173
+ const { token } = await clientSessions.getOrCreate({
6174
+ user_identifier_key: userIdentifierKey
6175
+ });
6176
+ return _SeamHttpSeamCustomerV1AccessGrants.fromClientSessionToken(
6177
+ token,
6178
+ options
6179
+ );
6180
+ }
6181
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
6182
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
6183
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
6184
+ throw new SeamHttpInvalidOptionsError(
6185
+ "Missing consoleSessionToken or workspaceId"
6186
+ );
6187
+ }
6188
+ return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
6189
+ }
6190
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6191
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
6192
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6193
+ throw new SeamHttpInvalidOptionsError(
6194
+ "Missing personalAccessToken or workspaceId"
6195
+ );
6196
+ }
6197
+ return new _SeamHttpSeamCustomerV1AccessGrants(constructorOptions);
6198
+ }
6199
+ createPaginator(request) {
6200
+ return new SeamPaginator(this, request);
6201
+ }
6202
+ async updateClientSessionToken(clientSessionToken) {
6203
+ const { headers } = this.client.defaults;
6204
+ const authHeaders = getAuthHeadersForClientSessionToken({
6205
+ clientSessionToken
6206
+ });
6207
+ for (const key of Object.keys(authHeaders)) {
6208
+ if (headers[key] == null) {
6209
+ throw new Error(
6210
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6211
+ );
6212
+ }
6213
+ }
6214
+ this.client.defaults.headers = { ...headers, ...authHeaders };
6215
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6216
+ await clientSessions.get();
6217
+ }
6218
+ list(parameters, options = {}) {
6219
+ if (!this.defaults.isUndocumentedApiEnabled) {
6220
+ throw new Error(
6221
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6222
+ );
6223
+ }
6224
+ return new SeamHttpRequest(this, {
6225
+ pathname: "/seam/customer/v1/access_grants/list",
6226
+ method: "POST",
6227
+ body: parameters,
6228
+ responseKey: "access_grants",
6229
+ options
6230
+ });
6231
+ }
6232
+ };
6233
+
6124
6234
  // src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts
6125
6235
  var SeamHttpSeamCustomerV1AutomationRuns = class _SeamHttpSeamCustomerV1AutomationRuns {
6126
6236
  client;
@@ -6471,6 +6581,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6471
6581
  options
6472
6582
  });
6473
6583
  }
6584
+ delete(parameters, options = {}) {
6585
+ if (!this.defaults.isUndocumentedApiEnabled) {
6586
+ throw new Error(
6587
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6588
+ );
6589
+ }
6590
+ return new SeamHttpRequest(this, {
6591
+ pathname: "/seam/customer/v1/connectors/delete",
6592
+ method: "POST",
6593
+ body: parameters,
6594
+ responseKey: "connector",
6595
+ options
6596
+ });
6597
+ }
6474
6598
  list(parameters, options = {}) {
6475
6599
  if (!this.defaults.isUndocumentedApiEnabled) {
6476
6600
  throw new Error(
@@ -6499,6 +6623,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6499
6623
  options
6500
6624
  });
6501
6625
  }
6626
+ update(parameters, options = {}) {
6627
+ if (!this.defaults.isUndocumentedApiEnabled) {
6628
+ throw new Error(
6629
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6630
+ );
6631
+ }
6632
+ return new SeamHttpRequest(this, {
6633
+ pathname: "/seam/customer/v1/connectors/update",
6634
+ method: "POST",
6635
+ body: parameters,
6636
+ responseKey: "connector",
6637
+ options
6638
+ });
6639
+ }
6502
6640
  };
6503
6641
 
6504
6642
  // src/lib/seam/connect/routes/seam/customer/v1/events/events.ts
@@ -7282,6 +7420,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7282
7420
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7283
7421
  await clientSessions.get();
7284
7422
  }
7423
+ get accessGrants() {
7424
+ return SeamHttpSeamCustomerV1AccessGrants.fromClient(
7425
+ this.client,
7426
+ this.defaults
7427
+ );
7428
+ }
7285
7429
  get automationRuns() {
7286
7430
  return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
7287
7431
  this.client,
@@ -10805,6 +10949,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10805
10949
  return seam.get(...args);
10806
10950
  };
10807
10951
  }
10952
+ get "/seam/customer/v1/access_grants/list"() {
10953
+ const { client, defaults } = this;
10954
+ if (!this.defaults.isUndocumentedApiEnabled) {
10955
+ throw new Error(
10956
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10957
+ );
10958
+ }
10959
+ return function seamCustomerV1AccessGrantsList(...args) {
10960
+ const seam = SeamHttpSeamCustomerV1AccessGrants.fromClient(
10961
+ client,
10962
+ defaults
10963
+ );
10964
+ return seam.list(...args);
10965
+ };
10966
+ }
10808
10967
  get "/seam/customer/v1/automation_runs/list"() {
10809
10968
  const { client, defaults } = this;
10810
10969
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10877,6 +11036,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10877
11036
  return seam.create(...args);
10878
11037
  };
10879
11038
  }
11039
+ get "/seam/customer/v1/connectors/delete"() {
11040
+ const { client, defaults } = this;
11041
+ if (!this.defaults.isUndocumentedApiEnabled) {
11042
+ throw new Error(
11043
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
11044
+ );
11045
+ }
11046
+ return function seamCustomerV1ConnectorsDelete(...args) {
11047
+ const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
11048
+ return seam.delete(...args);
11049
+ };
11050
+ }
10880
11051
  get "/seam/customer/v1/connectors/list"() {
10881
11052
  const { client, defaults } = this;
10882
11053
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10901,6 +11072,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10901
11072
  return seam.sync(...args);
10902
11073
  };
10903
11074
  }
11075
+ get "/seam/customer/v1/connectors/update"() {
11076
+ const { client, defaults } = this;
11077
+ if (!this.defaults.isUndocumentedApiEnabled) {
11078
+ throw new Error(
11079
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
11080
+ );
11081
+ }
11082
+ return function seamCustomerV1ConnectorsUpdate(...args) {
11083
+ const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
11084
+ return seam.update(...args);
11085
+ };
11086
+ }
10904
11087
  get "/seam/customer/v1/events/list"() {
10905
11088
  const { client, defaults } = this;
10906
11089
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -11851,6 +12034,7 @@ exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
11851
12034
  exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
11852
12035
  exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
11853
12036
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
12037
+ exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
11854
12038
  exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
11855
12039
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
11856
12040
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;