@seamapi/http 1.110.0 → 1.112.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 +185 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +61 -2
  4. package/dist/index.cjs +187 -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/connectors/connectors.d.ts +2 -0
  8. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +4 -0
  9. package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js.map +1 -1
  10. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.d.ts +47 -0
  11. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js +116 -0
  12. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js.map +1 -0
  13. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.d.ts +1 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.js +6 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.js.map +1 -0
  16. package/lib/seam/connect/routes/seam/customer/v1/connectors/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js +1 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js.map +1 -1
  19. package/lib/seam/connect/routes/seam/customer/v1/portals/portals.d.ts +13 -0
  20. package/lib/seam/connect/routes/seam/customer/v1/portals/portals.js +12 -0
  21. package/lib/seam/connect/routes/seam/customer/v1/portals/portals.js.map +1 -1
  22. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +6 -2
  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/connectors/connectors.ts +9 -0
  29. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts +255 -0
  30. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts +6 -0
  31. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +1 -0
  32. package/src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts +41 -0
  33. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +79 -0
  34. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -6712,6 +6712,128 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
6712
6712
  }
6713
6713
  };
6714
6714
 
6715
+ // src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
6716
+ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
6717
+ client;
6718
+ defaults;
6719
+ ltsVersion = seamApiLtsVersion;
6720
+ static ltsVersion = seamApiLtsVersion;
6721
+ constructor(apiKeyOrOptions = {}) {
6722
+ const options = parseOptions(apiKeyOrOptions);
6723
+ if (!options.isUndocumentedApiEnabled) {
6724
+ throw new Error(
6725
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6726
+ );
6727
+ }
6728
+ this.client = "client" in options ? options.client : createClient(options);
6729
+ this.defaults = limitToSeamHttpRequestOptions(options);
6730
+ }
6731
+ static fromClient(client, options = {}) {
6732
+ const constructorOptions = { ...options, client };
6733
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
6734
+ throw new SeamHttpInvalidOptionsError("Missing client");
6735
+ }
6736
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
6737
+ }
6738
+ static fromApiKey(apiKey, options = {}) {
6739
+ const constructorOptions = { ...options, apiKey };
6740
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
6741
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
6742
+ }
6743
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
6744
+ }
6745
+ static fromClientSessionToken(clientSessionToken, options = {}) {
6746
+ const constructorOptions = { ...options, clientSessionToken };
6747
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
6748
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
6749
+ }
6750
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
6751
+ }
6752
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
6753
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
6754
+ const clientOptions = parseOptions({ ...options, publishableKey });
6755
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
6756
+ throw new SeamHttpInvalidOptionsError(
6757
+ "The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey"
6758
+ );
6759
+ }
6760
+ const client = createClient(clientOptions);
6761
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
6762
+ const { token } = await clientSessions.getOrCreate({
6763
+ user_identifier_key: userIdentifierKey
6764
+ });
6765
+ return _SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken(
6766
+ token,
6767
+ options
6768
+ );
6769
+ }
6770
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
6771
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
6772
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
6773
+ throw new SeamHttpInvalidOptionsError(
6774
+ "Missing consoleSessionToken or workspaceId"
6775
+ );
6776
+ }
6777
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
6778
+ }
6779
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6780
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
6781
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6782
+ throw new SeamHttpInvalidOptionsError(
6783
+ "Missing personalAccessToken or workspaceId"
6784
+ );
6785
+ }
6786
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
6787
+ }
6788
+ createPaginator(request) {
6789
+ return new SeamPaginator(this, request);
6790
+ }
6791
+ async updateClientSessionToken(clientSessionToken) {
6792
+ const { headers } = this.client.defaults;
6793
+ const authHeaders = getAuthHeadersForClientSessionToken({
6794
+ clientSessionToken
6795
+ });
6796
+ for (const key of Object.keys(authHeaders)) {
6797
+ if (headers[key] == null) {
6798
+ throw new Error(
6799
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6800
+ );
6801
+ }
6802
+ }
6803
+ this.client.defaults.headers = { ...headers, ...authHeaders };
6804
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6805
+ await clientSessions.get();
6806
+ }
6807
+ generateConfig(parameters, options = {}) {
6808
+ if (!this.defaults.isUndocumentedApiEnabled) {
6809
+ throw new Error(
6810
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6811
+ );
6812
+ }
6813
+ return new SeamHttpRequest(this, {
6814
+ pathname: "/seam/customer/v1/connectors/ical/generate-config",
6815
+ method: "POST",
6816
+ body: parameters,
6817
+ responseKey: "generated_config",
6818
+ options
6819
+ });
6820
+ }
6821
+ validateConfig(parameters, options = {}) {
6822
+ if (!this.defaults.isUndocumentedApiEnabled) {
6823
+ throw new Error(
6824
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6825
+ );
6826
+ }
6827
+ return new SeamHttpRequest(this, {
6828
+ pathname: "/seam/customer/v1/connectors/ical/validate-config",
6829
+ method: "POST",
6830
+ body: parameters,
6831
+ responseKey: "validation_result",
6832
+ options
6833
+ });
6834
+ }
6835
+ };
6836
+
6715
6837
  // src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts
6716
6838
  var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6717
6839
  client;
@@ -6804,6 +6926,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6804
6926
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6805
6927
  await clientSessions.get();
6806
6928
  }
6929
+ get ical() {
6930
+ return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
6931
+ this.client,
6932
+ this.defaults
6933
+ );
6934
+ }
6807
6935
  authorize(parameters, options = {}) {
6808
6936
  if (!this.defaults.isUndocumentedApiEnabled) {
6809
6937
  throw new Error(
@@ -7481,6 +7609,20 @@ var SeamHttpSeamCustomerV1Portals = class _SeamHttpSeamCustomerV1Portals {
7481
7609
  options
7482
7610
  });
7483
7611
  }
7612
+ update(parameters, options = {}) {
7613
+ if (!this.defaults.isUndocumentedApiEnabled) {
7614
+ throw new Error(
7615
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7616
+ );
7617
+ }
7618
+ return new SeamHttpRequest(this, {
7619
+ pathname: "/seam/customer/v1/portals/update",
7620
+ method: "PATCH",
7621
+ body: parameters,
7622
+ responseKey: void 0,
7623
+ options
7624
+ });
7625
+ }
7484
7626
  };
7485
7627
 
7486
7628
  // src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts
@@ -12036,6 +12178,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12036
12178
  return seam.update(...args);
12037
12179
  };
12038
12180
  }
12181
+ get "/seam/customer/v1/connectors/ical/generate-config"() {
12182
+ const { client, defaults } = this;
12183
+ if (!this.defaults.isUndocumentedApiEnabled) {
12184
+ throw new Error(
12185
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12186
+ );
12187
+ }
12188
+ return function seamCustomerV1ConnectorsIcalGenerateConfig(...args) {
12189
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12190
+ client,
12191
+ defaults
12192
+ );
12193
+ return seam.generateConfig(...args);
12194
+ };
12195
+ }
12196
+ get "/seam/customer/v1/connectors/ical/validate-config"() {
12197
+ const { client, defaults } = this;
12198
+ if (!this.defaults.isUndocumentedApiEnabled) {
12199
+ throw new Error(
12200
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12201
+ );
12202
+ }
12203
+ return function seamCustomerV1ConnectorsIcalValidateConfig(...args) {
12204
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12205
+ client,
12206
+ defaults
12207
+ );
12208
+ return seam.validateConfig(...args);
12209
+ };
12210
+ }
12039
12211
  get "/seam/customer/v1/customers/automations/get"() {
12040
12212
  const { client, defaults } = this;
12041
12213
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -12138,6 +12310,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12138
12310
  return seam.get(...args);
12139
12311
  };
12140
12312
  }
12313
+ get "/seam/customer/v1/portals/update"() {
12314
+ const { client, defaults } = this;
12315
+ if (!this.defaults.isUndocumentedApiEnabled) {
12316
+ throw new Error(
12317
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12318
+ );
12319
+ }
12320
+ return function seamCustomerV1PortalsUpdate(...args) {
12321
+ const seam = SeamHttpSeamCustomerV1Portals.fromClient(client, defaults);
12322
+ return seam.update(...args);
12323
+ };
12324
+ }
12141
12325
  get "/seam/customer/v1/reservations/get"() {
12142
12326
  const { client, defaults } = this;
12143
12327
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13132,6 +13316,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
13132
13316
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
13133
13317
  exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
13134
13318
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
13319
+ exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
13135
13320
  exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
13136
13321
  exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
13137
13322
  exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;