@seamapi/http 1.65.0 → 1.67.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 (35) hide show
  1. package/dist/connect.cjs +122 -2
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +47 -16
  4. package/dist/index.cjs +124 -2
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/resolve-action-attempt.d.ts +16 -16
  8. package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
  9. package/lib/seam/connect/routes/seam/console/v1/index.js +1 -0
  10. package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -1
  11. package/lib/seam/connect/routes/seam/console/v1/timelines/index.d.ts +1 -0
  12. package/lib/seam/connect/routes/seam/console/v1/timelines/index.js +6 -0
  13. package/lib/seam/connect/routes/seam/console/v1/timelines/index.js.map +1 -0
  14. package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.d.ts +34 -0
  15. package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.js +102 -0
  16. package/lib/seam/connect/routes/seam/console/v1/timelines/timelines.js.map +1 -0
  17. package/lib/seam/connect/routes/seam/console/v1/v1.d.ts +2 -0
  18. package/lib/seam/connect/routes/seam/console/v1/v1.js +4 -0
  19. package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -1
  20. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +4 -2
  21. package/lib/seam/connect/routes/seam-http-endpoints.js +11 -0
  22. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  23. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.d.ts +2 -2
  24. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js +2 -2
  25. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js.map +1 -1
  26. package/lib/version.d.ts +1 -1
  27. package/lib/version.js +1 -1
  28. package/package.json +3 -3
  29. package/src/lib/seam/connect/routes/seam/console/v1/index.ts +1 -0
  30. package/src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts +6 -0
  31. package/src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts +212 -0
  32. package/src/lib/seam/connect/routes/seam/console/v1/v1.ts +6 -0
  33. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +26 -0
  34. package/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts +4 -8
  35. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -5286,6 +5286,110 @@ var _SeamHttpPhones = class _SeamHttpPhones {
5286
5286
  _SeamHttpPhones.ltsVersion = seamApiLtsVersion;
5287
5287
  var SeamHttpPhones = _SeamHttpPhones;
5288
5288
 
5289
+ // src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts
5290
+ var _SeamHttpSeamConsoleV1Timelines = class _SeamHttpSeamConsoleV1Timelines {
5291
+ constructor(apiKeyOrOptions = {}) {
5292
+ this.ltsVersion = seamApiLtsVersion;
5293
+ const options = parseOptions(apiKeyOrOptions);
5294
+ if (!options.isUndocumentedApiEnabled) {
5295
+ throw new Error(
5296
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5297
+ );
5298
+ }
5299
+ this.client = "client" in options ? options.client : createClient(options);
5300
+ this.defaults = limitToSeamHttpRequestOptions(options);
5301
+ }
5302
+ static fromClient(client, options = {}) {
5303
+ const constructorOptions = { ...options, client };
5304
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5305
+ throw new SeamHttpInvalidOptionsError("Missing client");
5306
+ }
5307
+ return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
5308
+ }
5309
+ static fromApiKey(apiKey, options = {}) {
5310
+ const constructorOptions = { ...options, apiKey };
5311
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5312
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
5313
+ }
5314
+ return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
5315
+ }
5316
+ static fromClientSessionToken(clientSessionToken, options = {}) {
5317
+ const constructorOptions = { ...options, clientSessionToken };
5318
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5319
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5320
+ }
5321
+ return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
5322
+ }
5323
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5324
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
5325
+ const clientOptions = parseOptions({ ...options, publishableKey });
5326
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
5327
+ throw new SeamHttpInvalidOptionsError(
5328
+ "The client option cannot be used with SeamHttpSeamConsoleV1Timelines.fromPublishableKey"
5329
+ );
5330
+ }
5331
+ const client = createClient(clientOptions);
5332
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
5333
+ const { token } = await clientSessions.getOrCreate({
5334
+ user_identifier_key: userIdentifierKey
5335
+ });
5336
+ return _SeamHttpSeamConsoleV1Timelines.fromClientSessionToken(token, options);
5337
+ }
5338
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5339
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5340
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5341
+ throw new SeamHttpInvalidOptionsError(
5342
+ "Missing consoleSessionToken or workspaceId"
5343
+ );
5344
+ }
5345
+ return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
5346
+ }
5347
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5348
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
5349
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5350
+ throw new SeamHttpInvalidOptionsError(
5351
+ "Missing personalAccessToken or workspaceId"
5352
+ );
5353
+ }
5354
+ return new _SeamHttpSeamConsoleV1Timelines(constructorOptions);
5355
+ }
5356
+ createPaginator(request) {
5357
+ return new SeamPaginator(this, request);
5358
+ }
5359
+ async updateClientSessionToken(clientSessionToken) {
5360
+ const { headers } = this.client.defaults;
5361
+ const authHeaders = getAuthHeadersForClientSessionToken({
5362
+ clientSessionToken
5363
+ });
5364
+ for (const key of Object.keys(authHeaders)) {
5365
+ if (headers[key] == null) {
5366
+ throw new Error(
5367
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5368
+ );
5369
+ }
5370
+ }
5371
+ this.client.defaults.headers = { ...headers, ...authHeaders };
5372
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5373
+ await clientSessions.get();
5374
+ }
5375
+ get(parameters, options = {}) {
5376
+ if (!this.defaults.isUndocumentedApiEnabled) {
5377
+ throw new Error(
5378
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5379
+ );
5380
+ }
5381
+ return new SeamHttpRequest(this, {
5382
+ pathname: "/seam/console/v1/timelines/get",
5383
+ method: "POST",
5384
+ body: parameters,
5385
+ responseKey: "timeline",
5386
+ options
5387
+ });
5388
+ }
5389
+ };
5390
+ _SeamHttpSeamConsoleV1Timelines.ltsVersion = seamApiLtsVersion;
5391
+ var SeamHttpSeamConsoleV1Timelines = _SeamHttpSeamConsoleV1Timelines;
5392
+
5289
5393
  // src/lib/seam/connect/routes/seam/console/v1/v1.ts
5290
5394
  var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
5291
5395
  constructor(apiKeyOrOptions = {}) {
@@ -5372,6 +5476,9 @@ var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
5372
5476
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5373
5477
  await clientSessions.get();
5374
5478
  }
5479
+ get timelines() {
5480
+ return SeamHttpSeamConsoleV1Timelines.fromClient(this.client, this.defaults);
5481
+ }
5375
5482
  getResourceLocator(parameters, options = {}) {
5376
5483
  if (!this.defaults.isUndocumentedApiEnabled) {
5377
5484
  throw new Error(
@@ -7985,8 +8092,8 @@ var _SeamHttpWorkspacesCustomizationProfiles = class _SeamHttpWorkspacesCustomiz
7985
8092
  }
7986
8093
  return new SeamHttpRequest(this, {
7987
8094
  pathname: "/workspaces/customization_profiles/list",
7988
- method: "GET",
7989
- params: parameters,
8095
+ method: "POST",
8096
+ body: parameters,
7990
8097
  responseKey: "customization_profiles",
7991
8098
  options
7992
8099
  });
@@ -9433,6 +9540,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9433
9540
  return seam.getResourceLocator(...args);
9434
9541
  };
9435
9542
  }
9543
+ get ["/seam/console/v1/timelines/get"]() {
9544
+ const { client, defaults } = this;
9545
+ if (!this.defaults.isUndocumentedApiEnabled) {
9546
+ throw new Error(
9547
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
9548
+ );
9549
+ }
9550
+ return function seamConsoleV1TimelinesGet(...args) {
9551
+ const seam = SeamHttpSeamConsoleV1Timelines.fromClient(client, defaults);
9552
+ return seam.get(...args);
9553
+ };
9554
+ }
9436
9555
  get ["/seam/customer/v1/automation_runs/list"]() {
9437
9556
  const { client, defaults } = this;
9438
9557
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10328,6 +10447,7 @@ exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
10328
10447
  exports.SeamHttpRequest = SeamHttpRequest;
10329
10448
  exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
10330
10449
  exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
10450
+ exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
10331
10451
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
10332
10452
  exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
10333
10453
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;