@seamapi/http 1.105.2 → 1.107.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 (38) hide show
  1. package/dist/connect.cjs +152 -2
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +62 -4
  4. package/dist/index.cjs +154 -2
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/acs/entrances/entrances.d.ts +12 -0
  8. package/lib/seam/connect/routes/acs/entrances/entrances.js +9 -0
  9. package/lib/seam/connect/routes/acs/entrances/entrances.js.map +1 -1
  10. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.d.ts +2 -2
  11. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js +2 -2
  12. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js.map +1 -1
  13. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.d.ts +47 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js +107 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js.map +1 -0
  16. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.js +6 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.js.map +1 -0
  19. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.d.ts +2 -0
  20. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js +4 -0
  21. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js.map +1 -1
  22. package/lib/seam/connect/routes/seam/customer/v1/customers/index.d.ts +1 -0
  23. package/lib/seam/connect/routes/seam/customer/v1/customers/index.js +1 -0
  24. package/lib/seam/connect/routes/seam/customer/v1/customers/index.js.map +1 -1
  25. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -3
  26. package/lib/seam/connect/routes/seam-http-endpoints.js +22 -0
  27. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  28. package/lib/version.d.ts +1 -1
  29. package/lib/version.js +1 -1
  30. package/package.json +3 -3
  31. package/src/lib/seam/connect/routes/acs/entrances/entrances.ts +38 -0
  32. package/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts +4 -8
  33. package/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts +244 -0
  34. package/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts +6 -0
  35. package/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +9 -0
  36. package/src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts +1 -0
  37. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +60 -0
  38. package/src/lib/version.ts +1 -1
package/dist/index.cjs CHANGED
@@ -112,6 +112,7 @@ __export(index_exports, {
112
112
  SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
113
113
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
114
114
  SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
115
+ SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
115
116
  SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
116
117
  SeamHttpSeamCustomerV1Events: () => SeamHttpSeamCustomerV1Events,
117
118
  SeamHttpSeamCustomerV1Portals: () => SeamHttpSeamCustomerV1Portals,
@@ -228,6 +229,7 @@ __export(connect_exports, {
228
229
  SeamHttpSeamCustomerV1ConnectorCustomers: () => SeamHttpSeamCustomerV1ConnectorCustomers,
229
230
  SeamHttpSeamCustomerV1Connectors: () => SeamHttpSeamCustomerV1Connectors,
230
231
  SeamHttpSeamCustomerV1Customers: () => SeamHttpSeamCustomerV1Customers,
232
+ SeamHttpSeamCustomerV1CustomersAutomations: () => SeamHttpSeamCustomerV1CustomersAutomations,
231
233
  SeamHttpSeamCustomerV1Encoders: () => SeamHttpSeamCustomerV1Encoders,
232
234
  SeamHttpSeamCustomerV1Events: () => SeamHttpSeamCustomerV1Events,
233
235
  SeamHttpSeamCustomerV1Portals: () => SeamHttpSeamCustomerV1Portals,
@@ -3330,6 +3332,15 @@ var SeamHttpAcsEntrances = class _SeamHttpAcsEntrances {
3330
3332
  options
3331
3333
  });
3332
3334
  }
3335
+ unlock(parameters, options = {}) {
3336
+ return new SeamHttpRequest(this, {
3337
+ pathname: "/acs/entrances/unlock",
3338
+ method: "POST",
3339
+ body: parameters,
3340
+ responseKey: "action_attempt",
3341
+ options
3342
+ });
3343
+ }
3333
3344
  };
3334
3345
 
3335
3346
  // src/lib/seam/connect/routes/acs/systems/systems.ts
@@ -6818,8 +6829,8 @@ var SeamHttpSeamCustomerV1Automations = class _SeamHttpSeamCustomerV1Automations
6818
6829
  }
6819
6830
  return new SeamHttpRequest(this, {
6820
6831
  pathname: "/seam/customer/v1/automations/get",
6821
- method: "GET",
6822
- params: parameters,
6832
+ method: "POST",
6833
+ body: parameters,
6823
6834
  responseKey: void 0,
6824
6835
  options
6825
6836
  });
@@ -7140,6 +7151,113 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
7140
7151
  }
7141
7152
  };
7142
7153
 
7154
+ // src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts
7155
+ var SeamHttpSeamCustomerV1CustomersAutomations = class _SeamHttpSeamCustomerV1CustomersAutomations {
7156
+ client;
7157
+ defaults;
7158
+ ltsVersion = seamApiLtsVersion;
7159
+ static ltsVersion = seamApiLtsVersion;
7160
+ constructor(apiKeyOrOptions = {}) {
7161
+ const options = parseOptions(apiKeyOrOptions);
7162
+ this.client = "client" in options ? options.client : createClient(options);
7163
+ this.defaults = limitToSeamHttpRequestOptions(options);
7164
+ }
7165
+ static fromClient(client, options = {}) {
7166
+ const constructorOptions = { ...options, client };
7167
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7168
+ throw new SeamHttpInvalidOptionsError("Missing client");
7169
+ }
7170
+ return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
7171
+ }
7172
+ static fromApiKey(apiKey, options = {}) {
7173
+ const constructorOptions = { ...options, apiKey };
7174
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7175
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
7176
+ }
7177
+ return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
7178
+ }
7179
+ static fromClientSessionToken(clientSessionToken, options = {}) {
7180
+ const constructorOptions = { ...options, clientSessionToken };
7181
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7182
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7183
+ }
7184
+ return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
7185
+ }
7186
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7187
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
7188
+ const clientOptions = parseOptions({ ...options, publishableKey });
7189
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
7190
+ throw new SeamHttpInvalidOptionsError(
7191
+ "The client option cannot be used with SeamHttpSeamCustomerV1CustomersAutomations.fromPublishableKey"
7192
+ );
7193
+ }
7194
+ const client = createClient(clientOptions);
7195
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
7196
+ const { token } = await clientSessions.getOrCreate({
7197
+ user_identifier_key: userIdentifierKey
7198
+ });
7199
+ return _SeamHttpSeamCustomerV1CustomersAutomations.fromClientSessionToken(
7200
+ token,
7201
+ options
7202
+ );
7203
+ }
7204
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7205
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
7206
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
7207
+ throw new SeamHttpInvalidOptionsError(
7208
+ "Missing consoleSessionToken or workspaceId"
7209
+ );
7210
+ }
7211
+ return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
7212
+ }
7213
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7214
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
7215
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
7216
+ throw new SeamHttpInvalidOptionsError(
7217
+ "Missing personalAccessToken or workspaceId"
7218
+ );
7219
+ }
7220
+ return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
7221
+ }
7222
+ createPaginator(request) {
7223
+ return new SeamPaginator(this, request);
7224
+ }
7225
+ async updateClientSessionToken(clientSessionToken) {
7226
+ const { headers } = this.client.defaults;
7227
+ const authHeaders = getAuthHeadersForClientSessionToken({
7228
+ clientSessionToken
7229
+ });
7230
+ for (const key of Object.keys(authHeaders)) {
7231
+ if (headers[key] == null) {
7232
+ throw new Error(
7233
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
7234
+ );
7235
+ }
7236
+ }
7237
+ this.client.defaults.headers = { ...headers, ...authHeaders };
7238
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7239
+ await clientSessions.get();
7240
+ }
7241
+ get(parameters, options = {}) {
7242
+ return new SeamHttpRequest(this, {
7243
+ pathname: "/seam/customer/v1/customers/automations/get",
7244
+ method: "GET",
7245
+ params: parameters,
7246
+ responseKey: "automation",
7247
+ options
7248
+ });
7249
+ }
7250
+ update(parameters, options = {}) {
7251
+ return new SeamHttpRequest(this, {
7252
+ pathname: "/seam/customer/v1/customers/automations/update",
7253
+ method: "PATCH",
7254
+ body: parameters,
7255
+ responseKey: void 0,
7256
+ options
7257
+ });
7258
+ }
7259
+ };
7260
+
7143
7261
  // src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts
7144
7262
  var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
7145
7263
  client;
@@ -7227,6 +7345,12 @@ var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
7227
7345
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7228
7346
  await clientSessions.get();
7229
7347
  }
7348
+ get automations() {
7349
+ return SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
7350
+ this.client,
7351
+ this.defaults
7352
+ );
7353
+ }
7230
7354
  list(parameters, options = {}) {
7231
7355
  if (!this.defaults.isUndocumentedApiEnabled) {
7232
7356
  throw new Error(
@@ -11257,6 +11381,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
11257
11381
  return seam.listCredentialsWithAccess(...args);
11258
11382
  };
11259
11383
  }
11384
+ get "/acs/entrances/unlock"() {
11385
+ const { client, defaults } = this;
11386
+ return function acsEntrancesUnlock(...args) {
11387
+ const seam = SeamHttpAcsEntrances.fromClient(client, defaults);
11388
+ return seam.unlock(...args);
11389
+ };
11390
+ }
11260
11391
  get "/acs/systems/get"() {
11261
11392
  const { client, defaults } = this;
11262
11393
  return function acsSystemsGet(...args) {
@@ -12081,6 +12212,26 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12081
12212
  return seam.update(...args);
12082
12213
  };
12083
12214
  }
12215
+ get "/seam/customer/v1/customers/automations/get"() {
12216
+ const { client, defaults } = this;
12217
+ return function seamCustomerV1CustomersAutomationsGet(...args) {
12218
+ const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
12219
+ client,
12220
+ defaults
12221
+ );
12222
+ return seam.get(...args);
12223
+ };
12224
+ }
12225
+ get "/seam/customer/v1/customers/automations/update"() {
12226
+ const { client, defaults } = this;
12227
+ return function seamCustomerV1CustomersAutomationsUpdate(...args) {
12228
+ const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
12229
+ client,
12230
+ defaults
12231
+ );
12232
+ return seam.update(...args);
12233
+ };
12234
+ }
12084
12235
  get "/seam/customer/v1/customers/list"() {
12085
12236
  const { client, defaults } = this;
12086
12237
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13129,6 +13280,7 @@ exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
13129
13280
  exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
13130
13281
  exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
13131
13282
  exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
13283
+ exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
13132
13284
  exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;
13133
13285
  exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
13134
13286
  exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;