@seamapi/http 1.111.0 → 1.113.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 +175 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +62 -3
  4. package/dist/index.cjs +177 -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 +7 -3
  20. package/lib/seam/connect/routes/seam-http-endpoints.js +28 -0
  21. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  22. package/lib/seam/connect/routes/user-identities/user-identities.d.ts +13 -0
  23. package/lib/seam/connect/routes/user-identities/user-identities.js +9 -0
  24. package/lib/seam/connect/routes/user-identities/user-identities.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-http-endpoints.ts +74 -0
  33. package/src/lib/seam/connect/routes/user-identities/user-identities.ts +36 -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(
@@ -9959,6 +10087,15 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
9959
10087
  options
9960
10088
  });
9961
10089
  }
10090
+ listAccessibleEntrances(parameters, options = {}) {
10091
+ return new SeamHttpRequest(this, {
10092
+ pathname: "/user_identities/list_accessible_entrances",
10093
+ method: "POST",
10094
+ body: parameters,
10095
+ responseKey: "acs_entrances",
10096
+ options
10097
+ });
10098
+ }
9962
10099
  listAcsSystems(parameters, options = {}) {
9963
10100
  return new SeamHttpRequest(this, {
9964
10101
  pathname: "/user_identities/list_acs_systems",
@@ -12050,6 +12187,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12050
12187
  return seam.update(...args);
12051
12188
  };
12052
12189
  }
12190
+ get "/seam/customer/v1/connectors/ical/generate-config"() {
12191
+ const { client, defaults } = this;
12192
+ if (!this.defaults.isUndocumentedApiEnabled) {
12193
+ throw new Error(
12194
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12195
+ );
12196
+ }
12197
+ return function seamCustomerV1ConnectorsIcalGenerateConfig(...args) {
12198
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12199
+ client,
12200
+ defaults
12201
+ );
12202
+ return seam.generateConfig(...args);
12203
+ };
12204
+ }
12205
+ get "/seam/customer/v1/connectors/ical/validate-config"() {
12206
+ const { client, defaults } = this;
12207
+ if (!this.defaults.isUndocumentedApiEnabled) {
12208
+ throw new Error(
12209
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12210
+ );
12211
+ }
12212
+ return function seamCustomerV1ConnectorsIcalValidateConfig(...args) {
12213
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12214
+ client,
12215
+ defaults
12216
+ );
12217
+ return seam.validateConfig(...args);
12218
+ };
12219
+ }
12053
12220
  get "/seam/customer/v1/customers/automations/get"() {
12054
12221
  const { client, defaults } = this;
12055
12222
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -12707,6 +12874,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12707
12874
  return seam.listAccessibleDevices(...args);
12708
12875
  };
12709
12876
  }
12877
+ get "/user_identities/list_accessible_entrances"() {
12878
+ const { client, defaults } = this;
12879
+ return function userIdentitiesListAccessibleEntrances(...args) {
12880
+ const seam = SeamHttpUserIdentities.fromClient(client, defaults);
12881
+ return seam.listAccessibleEntrances(...args);
12882
+ };
12883
+ }
12710
12884
  get "/user_identities/list_acs_systems"() {
12711
12885
  const { client, defaults } = this;
12712
12886
  return function userIdentitiesListAcsSystems(...args) {
@@ -13158,6 +13332,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
13158
13332
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
13159
13333
  exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
13160
13334
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
13335
+ exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
13161
13336
  exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
13162
13337
  exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
13163
13338
  exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;