@seamapi/http 1.88.0 → 1.90.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 +156 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +47 -2
  4. package/dist/index.cjs +158 -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 +13 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +12 -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 +5 -2
  23. package/lib/seam/connect/routes/seam-http-endpoints.js +21 -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 +41 -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 +50 -0
  34. 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;
@@ -6204,6 +6312,20 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6204
6312
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6205
6313
  await clientSessions.get();
6206
6314
  }
6315
+ connectorTypes(parameters, options = {}) {
6316
+ if (!this.defaults.isUndocumentedApiEnabled) {
6317
+ throw new Error(
6318
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6319
+ );
6320
+ }
6321
+ return new SeamHttpRequest(this, {
6322
+ pathname: "/seam/customer/v1/connectors/connector_types",
6323
+ method: "GET",
6324
+ params: parameters,
6325
+ responseKey: "connector_types",
6326
+ options
6327
+ });
6328
+ }
6207
6329
  create(parameters, options = {}) {
6208
6330
  if (!this.defaults.isUndocumentedApiEnabled) {
6209
6331
  throw new Error(
@@ -7057,6 +7179,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7057
7179
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7058
7180
  await clientSessions.get();
7059
7181
  }
7182
+ get accessGrants() {
7183
+ return SeamHttpSeamCustomerV1AccessGrants.fromClient(
7184
+ this.client,
7185
+ this.defaults
7186
+ );
7187
+ }
7060
7188
  get automationRuns() {
7061
7189
  return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
7062
7190
  this.client,
@@ -10580,6 +10708,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10580
10708
  return seam.get(...args);
10581
10709
  };
10582
10710
  }
10711
+ get "/seam/customer/v1/access_grants/list"() {
10712
+ const { client, defaults } = this;
10713
+ if (!this.defaults.isUndocumentedApiEnabled) {
10714
+ throw new Error(
10715
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10716
+ );
10717
+ }
10718
+ return function seamCustomerV1AccessGrantsList(...args) {
10719
+ const seam = SeamHttpSeamCustomerV1AccessGrants.fromClient(
10720
+ client,
10721
+ defaults
10722
+ );
10723
+ return seam.list(...args);
10724
+ };
10725
+ }
10583
10726
  get "/seam/customer/v1/automation_runs/list"() {
10584
10727
  const { client, defaults } = this;
10585
10728
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10640,6 +10783,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10640
10783
  return seam.update(...args);
10641
10784
  };
10642
10785
  }
10786
+ get "/seam/customer/v1/connectors/connector_types"() {
10787
+ const { client, defaults } = this;
10788
+ if (!this.defaults.isUndocumentedApiEnabled) {
10789
+ throw new Error(
10790
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10791
+ );
10792
+ }
10793
+ return function seamCustomerV1ConnectorsConnectorTypes(...args) {
10794
+ const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults);
10795
+ return seam.connectorTypes(...args);
10796
+ };
10797
+ }
10643
10798
  get "/seam/customer/v1/connectors/create"() {
10644
10799
  const { client, defaults } = this;
10645
10800
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -11644,6 +11799,7 @@ exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
11644
11799
  exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
11645
11800
  exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
11646
11801
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
11802
+ exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
11647
11803
  exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
11648
11804
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
11649
11805
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;