@seamapi/http 1.54.0 → 1.55.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 +146 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +47 -2
  4. package/dist/index.cjs +148 -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/events/events.d.ts +34 -0
  8. package/lib/seam/connect/routes/seam/customer/v1/events/events.js +102 -0
  9. package/lib/seam/connect/routes/seam/customer/v1/events/events.js.map +1 -0
  10. package/lib/seam/connect/routes/seam/customer/v1/events/index.d.ts +1 -0
  11. package/lib/seam/connect/routes/seam/customer/v1/events/index.js +6 -0
  12. package/lib/seam/connect/routes/seam/customer/v1/events/index.js.map +1 -0
  13. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  16. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.d.ts +14 -1
  17. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js +12 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.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/events/events.ts +211 -0
  29. package/src/lib/seam/connect/routes/seam/customer/v1/events/index.ts +6 -0
  30. package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
  31. package/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts +47 -1
  32. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +5 -0
  33. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +47 -0
  34. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -5716,6 +5716,110 @@ var _SeamHttpSeamCustomerV1Automations = class _SeamHttpSeamCustomerV1Automation
5716
5716
  _SeamHttpSeamCustomerV1Automations.ltsVersion = seamApiLtsVersion;
5717
5717
  var SeamHttpSeamCustomerV1Automations = _SeamHttpSeamCustomerV1Automations;
5718
5718
 
5719
+ // src/lib/seam/connect/routes/seam/customer/v1/events/events.ts
5720
+ var _SeamHttpSeamCustomerV1Events = class _SeamHttpSeamCustomerV1Events {
5721
+ constructor(apiKeyOrOptions = {}) {
5722
+ this.ltsVersion = seamApiLtsVersion;
5723
+ const options = parseOptions(apiKeyOrOptions);
5724
+ if (!options.isUndocumentedApiEnabled) {
5725
+ throw new Error(
5726
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5727
+ );
5728
+ }
5729
+ this.client = "client" in options ? options.client : createClient(options);
5730
+ this.defaults = limitToSeamHttpRequestOptions(options);
5731
+ }
5732
+ static fromClient(client, options = {}) {
5733
+ const constructorOptions = { ...options, client };
5734
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5735
+ throw new SeamHttpInvalidOptionsError("Missing client");
5736
+ }
5737
+ return new _SeamHttpSeamCustomerV1Events(constructorOptions);
5738
+ }
5739
+ static fromApiKey(apiKey, options = {}) {
5740
+ const constructorOptions = { ...options, apiKey };
5741
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5742
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
5743
+ }
5744
+ return new _SeamHttpSeamCustomerV1Events(constructorOptions);
5745
+ }
5746
+ static fromClientSessionToken(clientSessionToken, options = {}) {
5747
+ const constructorOptions = { ...options, clientSessionToken };
5748
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5749
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5750
+ }
5751
+ return new _SeamHttpSeamCustomerV1Events(constructorOptions);
5752
+ }
5753
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5754
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
5755
+ const clientOptions = parseOptions({ ...options, publishableKey });
5756
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
5757
+ throw new SeamHttpInvalidOptionsError(
5758
+ "The client option cannot be used with SeamHttpSeamCustomerV1Events.fromPublishableKey"
5759
+ );
5760
+ }
5761
+ const client = createClient(clientOptions);
5762
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
5763
+ const { token } = await clientSessions.getOrCreate({
5764
+ user_identifier_key: userIdentifierKey
5765
+ });
5766
+ return _SeamHttpSeamCustomerV1Events.fromClientSessionToken(token, options);
5767
+ }
5768
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5769
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5770
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5771
+ throw new SeamHttpInvalidOptionsError(
5772
+ "Missing consoleSessionToken or workspaceId"
5773
+ );
5774
+ }
5775
+ return new _SeamHttpSeamCustomerV1Events(constructorOptions);
5776
+ }
5777
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5778
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
5779
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5780
+ throw new SeamHttpInvalidOptionsError(
5781
+ "Missing personalAccessToken or workspaceId"
5782
+ );
5783
+ }
5784
+ return new _SeamHttpSeamCustomerV1Events(constructorOptions);
5785
+ }
5786
+ createPaginator(request) {
5787
+ return new SeamPaginator(this, request);
5788
+ }
5789
+ async updateClientSessionToken(clientSessionToken) {
5790
+ const { headers } = this.client.defaults;
5791
+ const authHeaders = getAuthHeadersForClientSessionToken({
5792
+ clientSessionToken
5793
+ });
5794
+ for (const key of Object.keys(authHeaders)) {
5795
+ if (headers[key] == null) {
5796
+ throw new Error(
5797
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5798
+ );
5799
+ }
5800
+ }
5801
+ this.client.defaults.headers = { ...headers, ...authHeaders };
5802
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5803
+ await clientSessions.get();
5804
+ }
5805
+ list(parameters, options = {}) {
5806
+ if (!this.defaults.isUndocumentedApiEnabled) {
5807
+ throw new Error(
5808
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5809
+ );
5810
+ }
5811
+ return new SeamHttpRequest(this, {
5812
+ pathname: "/seam/customer/v1/events/list",
5813
+ method: "POST",
5814
+ body: parameters,
5815
+ responseKey: "events",
5816
+ options
5817
+ });
5818
+ }
5819
+ };
5820
+ _SeamHttpSeamCustomerV1Events.ltsVersion = seamApiLtsVersion;
5821
+ var SeamHttpSeamCustomerV1Events = _SeamHttpSeamCustomerV1Events;
5822
+
5719
5823
  // src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts
5720
5824
  var _SeamHttpSeamCustomerV1Portals = class _SeamHttpSeamCustomerV1Portals {
5721
5825
  constructor(apiKeyOrOptions = {}) {
@@ -5906,6 +6010,20 @@ var _SeamHttpSeamCustomerV1Settings = class _SeamHttpSeamCustomerV1Settings {
5906
6010
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5907
6011
  await clientSessions.get();
5908
6012
  }
6013
+ get(parameters, options = {}) {
6014
+ if (!this.defaults.isUndocumentedApiEnabled) {
6015
+ throw new Error(
6016
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6017
+ );
6018
+ }
6019
+ return new SeamHttpRequest(this, {
6020
+ pathname: "/seam/customer/v1/settings/get",
6021
+ method: "GET",
6022
+ params: parameters,
6023
+ responseKey: "business_vertical",
6024
+ options
6025
+ });
6026
+ }
5909
6027
  update(parameters, options = {}) {
5910
6028
  if (!this.defaults.isUndocumentedApiEnabled) {
5911
6029
  throw new Error(
@@ -6022,6 +6140,9 @@ var _SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
6022
6140
  this.defaults
6023
6141
  );
6024
6142
  }
6143
+ get events() {
6144
+ return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults);
6145
+ }
6025
6146
  get portals() {
6026
6147
  return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults);
6027
6148
  }
@@ -9715,6 +9836,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9715
9836
  return seam.update(...args);
9716
9837
  };
9717
9838
  }
9839
+ get ["/seam/customer/v1/events/list"]() {
9840
+ const { client, defaults } = this;
9841
+ if (!this.defaults.isUndocumentedApiEnabled) {
9842
+ throw new Error(
9843
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
9844
+ );
9845
+ }
9846
+ return function seamCustomerV1EventsList(...args) {
9847
+ const seam = SeamHttpSeamCustomerV1Events.fromClient(client, defaults);
9848
+ return seam.list(...args);
9849
+ };
9850
+ }
9718
9851
  get ["/seam/customer/v1/portals/get"]() {
9719
9852
  const { client, defaults } = this;
9720
9853
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -9727,6 +9860,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9727
9860
  return seam.get(...args);
9728
9861
  };
9729
9862
  }
9863
+ get ["/seam/customer/v1/settings/get"]() {
9864
+ const { client, defaults } = this;
9865
+ if (!this.defaults.isUndocumentedApiEnabled) {
9866
+ throw new Error(
9867
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
9868
+ );
9869
+ }
9870
+ return function seamCustomerV1SettingsGet(...args) {
9871
+ const seam = SeamHttpSeamCustomerV1Settings.fromClient(client, defaults);
9872
+ return seam.get(...args);
9873
+ };
9874
+ }
9730
9875
  get ["/seam/customer/v1/settings/update"]() {
9731
9876
  const { client, defaults } = this;
9732
9877
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10666,6 +10811,7 @@ exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
10666
10811
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
10667
10812
  exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
10668
10813
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
10814
+ exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
10669
10815
  exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
10670
10816
  exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
10671
10817
  exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;