@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/index.cjs CHANGED
@@ -111,6 +111,7 @@ __export(index_exports, {
111
111
  SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
112
112
  SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
113
113
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
114
+ SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
114
115
  SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
115
116
  SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
116
117
  SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
@@ -228,6 +229,7 @@ __export(connect_exports, {
228
229
  SeamHttpSeamCustomerV1Automations: () => SeamHttpSeamCustomerV1Automations,
229
230
  SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
230
231
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
232
+ SeamHttpSeamCustomerV1ConnectorsIcal: () => SeamHttpSeamCustomerV1ConnectorsIcal,
231
233
  SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
232
234
  SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
233
235
  SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
@@ -6983,6 +6985,128 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
6983
6985
  }
6984
6986
  };
6985
6987
 
6988
+ // src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
6989
+ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
6990
+ client;
6991
+ defaults;
6992
+ ltsVersion = seamApiLtsVersion;
6993
+ static ltsVersion = seamApiLtsVersion;
6994
+ constructor(apiKeyOrOptions = {}) {
6995
+ const options = parseOptions(apiKeyOrOptions);
6996
+ if (!options.isUndocumentedApiEnabled) {
6997
+ throw new Error(
6998
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6999
+ );
7000
+ }
7001
+ this.client = "client" in options ? options.client : createClient(options);
7002
+ this.defaults = limitToSeamHttpRequestOptions(options);
7003
+ }
7004
+ static fromClient(client, options = {}) {
7005
+ const constructorOptions = { ...options, client };
7006
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7007
+ throw new SeamHttpInvalidOptionsError("Missing client");
7008
+ }
7009
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
7010
+ }
7011
+ static fromApiKey(apiKey, options = {}) {
7012
+ const constructorOptions = { ...options, apiKey };
7013
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7014
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
7015
+ }
7016
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
7017
+ }
7018
+ static fromClientSessionToken(clientSessionToken, options = {}) {
7019
+ const constructorOptions = { ...options, clientSessionToken };
7020
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7021
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7022
+ }
7023
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
7024
+ }
7025
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7026
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
7027
+ const clientOptions = parseOptions({ ...options, publishableKey });
7028
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
7029
+ throw new SeamHttpInvalidOptionsError(
7030
+ "The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey"
7031
+ );
7032
+ }
7033
+ const client = createClient(clientOptions);
7034
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
7035
+ const { token } = await clientSessions.getOrCreate({
7036
+ user_identifier_key: userIdentifierKey
7037
+ });
7038
+ return _SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken(
7039
+ token,
7040
+ options
7041
+ );
7042
+ }
7043
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7044
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
7045
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
7046
+ throw new SeamHttpInvalidOptionsError(
7047
+ "Missing consoleSessionToken or workspaceId"
7048
+ );
7049
+ }
7050
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
7051
+ }
7052
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7053
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
7054
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
7055
+ throw new SeamHttpInvalidOptionsError(
7056
+ "Missing personalAccessToken or workspaceId"
7057
+ );
7058
+ }
7059
+ return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
7060
+ }
7061
+ createPaginator(request) {
7062
+ return new SeamPaginator(this, request);
7063
+ }
7064
+ async updateClientSessionToken(clientSessionToken) {
7065
+ const { headers } = this.client.defaults;
7066
+ const authHeaders = getAuthHeadersForClientSessionToken({
7067
+ clientSessionToken
7068
+ });
7069
+ for (const key of Object.keys(authHeaders)) {
7070
+ if (headers[key] == null) {
7071
+ throw new Error(
7072
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
7073
+ );
7074
+ }
7075
+ }
7076
+ this.client.defaults.headers = { ...headers, ...authHeaders };
7077
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7078
+ await clientSessions.get();
7079
+ }
7080
+ generateConfig(parameters, options = {}) {
7081
+ if (!this.defaults.isUndocumentedApiEnabled) {
7082
+ throw new Error(
7083
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7084
+ );
7085
+ }
7086
+ return new SeamHttpRequest(this, {
7087
+ pathname: "/seam/customer/v1/connectors/ical/generate-config",
7088
+ method: "POST",
7089
+ body: parameters,
7090
+ responseKey: "generated_config",
7091
+ options
7092
+ });
7093
+ }
7094
+ validateConfig(parameters, options = {}) {
7095
+ if (!this.defaults.isUndocumentedApiEnabled) {
7096
+ throw new Error(
7097
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7098
+ );
7099
+ }
7100
+ return new SeamHttpRequest(this, {
7101
+ pathname: "/seam/customer/v1/connectors/ical/validate-config",
7102
+ method: "POST",
7103
+ body: parameters,
7104
+ responseKey: "validation_result",
7105
+ options
7106
+ });
7107
+ }
7108
+ };
7109
+
6986
7110
  // src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts
6987
7111
  var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
6988
7112
  client;
@@ -7075,6 +7199,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
7075
7199
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7076
7200
  await clientSessions.get();
7077
7201
  }
7202
+ get ical() {
7203
+ return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
7204
+ this.client,
7205
+ this.defaults
7206
+ );
7207
+ }
7078
7208
  authorize(parameters, options = {}) {
7079
7209
  if (!this.defaults.isUndocumentedApiEnabled) {
7080
7210
  throw new Error(
@@ -7752,6 +7882,20 @@ var SeamHttpSeamCustomerV1Portals = class _SeamHttpSeamCustomerV1Portals {
7752
7882
  options
7753
7883
  });
7754
7884
  }
7885
+ update(parameters, options = {}) {
7886
+ if (!this.defaults.isUndocumentedApiEnabled) {
7887
+ throw new Error(
7888
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7889
+ );
7890
+ }
7891
+ return new SeamHttpRequest(this, {
7892
+ pathname: "/seam/customer/v1/portals/update",
7893
+ method: "PATCH",
7894
+ body: parameters,
7895
+ responseKey: void 0,
7896
+ options
7897
+ });
7898
+ }
7755
7899
  };
7756
7900
 
7757
7901
  // src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts
@@ -12307,6 +12451,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12307
12451
  return seam.update(...args);
12308
12452
  };
12309
12453
  }
12454
+ get "/seam/customer/v1/connectors/ical/generate-config"() {
12455
+ const { client, defaults } = this;
12456
+ if (!this.defaults.isUndocumentedApiEnabled) {
12457
+ throw new Error(
12458
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12459
+ );
12460
+ }
12461
+ return function seamCustomerV1ConnectorsIcalGenerateConfig(...args) {
12462
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12463
+ client,
12464
+ defaults
12465
+ );
12466
+ return seam.generateConfig(...args);
12467
+ };
12468
+ }
12469
+ get "/seam/customer/v1/connectors/ical/validate-config"() {
12470
+ const { client, defaults } = this;
12471
+ if (!this.defaults.isUndocumentedApiEnabled) {
12472
+ throw new Error(
12473
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12474
+ );
12475
+ }
12476
+ return function seamCustomerV1ConnectorsIcalValidateConfig(...args) {
12477
+ const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
12478
+ client,
12479
+ defaults
12480
+ );
12481
+ return seam.validateConfig(...args);
12482
+ };
12483
+ }
12310
12484
  get "/seam/customer/v1/customers/automations/get"() {
12311
12485
  const { client, defaults } = this;
12312
12486
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -12409,6 +12583,18 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12409
12583
  return seam.get(...args);
12410
12584
  };
12411
12585
  }
12586
+ get "/seam/customer/v1/portals/update"() {
12587
+ const { client, defaults } = this;
12588
+ if (!this.defaults.isUndocumentedApiEnabled) {
12589
+ throw new Error(
12590
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12591
+ );
12592
+ }
12593
+ return function seamCustomerV1PortalsUpdate(...args) {
12594
+ const seam = SeamHttpSeamCustomerV1Portals.fromClient(client, defaults);
12595
+ return seam.update(...args);
12596
+ };
12597
+ }
12412
12598
  get "/seam/customer/v1/reservations/get"() {
12413
12599
  const { client, defaults } = this;
12414
12600
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13409,6 +13595,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
13409
13595
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
13410
13596
  exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
13411
13597
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
13598
+ exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
13412
13599
  exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
13413
13600
  exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
13414
13601
  exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;