@seamapi/http 1.111.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 (30) hide show
  1. package/dist/connect.cjs +159 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +47 -2
  4. package/dist/index.cjs +161 -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-http-endpoints.d.ts +4 -1
  20. package/lib/seam/connect/routes/seam-http-endpoints.js +21 -0
  21. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  22. package/lib/version.d.ts +1 -1
  23. package/lib/version.js +1 -1
  24. package/package.json +3 -3
  25. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +9 -0
  26. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts +255 -0
  27. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts +6 -0
  28. package/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +1 -0
  29. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +57 -0
  30. 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(
@@ -12050,6 +12178,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12050
12178
  return seam.update(...args);
12051
12179
  };
12052
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
+ }
12053
12211
  get "/seam/customer/v1/customers/automations/get"() {
12054
12212
  const { client, defaults } = this;
12055
12213
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13158,6 +13316,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
13158
13316
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
13159
13317
  exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
13160
13318
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
13319
+ exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
13161
13320
  exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
13162
13321
  exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
13163
13322
  exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;