@seamapi/http 1.119.0 → 1.120.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 +168 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +49 -4
  4. package/dist/index.cjs +170 -0
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
  8. package/lib/seam/connect/routes/seam/console/v1/index.js +1 -0
  9. package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -1
  10. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.d.ts +47 -0
  11. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.js +116 -0
  12. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.js.map +1 -0
  13. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.d.ts +1 -0
  14. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.js +6 -0
  15. package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.js.map +1 -0
  16. package/lib/seam/connect/routes/seam/console/v1/workspace/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/seam/console/v1/workspace/index.js +6 -0
  18. package/lib/seam/connect/routes/seam/console/v1/workspace/index.js.map +1 -0
  19. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.d.ts +3 -1
  20. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js +11 -0
  21. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js.map +1 -1
  22. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +5 -2
  23. package/lib/seam/connect/routes/seam-http-endpoints.js +21 -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/console/v1/index.ts +1 -0
  29. package/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts +259 -0
  30. package/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts +6 -0
  31. package/src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts +6 -0
  32. package/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts +28 -0
  33. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +53 -0
  34. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -6369,6 +6369,128 @@ var SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
6369
6369
  }
6370
6370
  };
6371
6371
 
6372
+ // src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts
6373
+ var SeamHttpSeamConsoleV1WorkspaceFeatureFlags = class _SeamHttpSeamConsoleV1WorkspaceFeatureFlags {
6374
+ client;
6375
+ defaults;
6376
+ ltsVersion = seamApiLtsVersion;
6377
+ static ltsVersion = seamApiLtsVersion;
6378
+ constructor(apiKeyOrOptions = {}) {
6379
+ const options = parseOptions(apiKeyOrOptions);
6380
+ if (!options.isUndocumentedApiEnabled) {
6381
+ throw new Error(
6382
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6383
+ );
6384
+ }
6385
+ this.client = "client" in options ? options.client : createClient(options);
6386
+ this.defaults = limitToSeamHttpRequestOptions(options);
6387
+ }
6388
+ static fromClient(client, options = {}) {
6389
+ const constructorOptions = { ...options, client };
6390
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
6391
+ throw new SeamHttpInvalidOptionsError("Missing client");
6392
+ }
6393
+ return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
6394
+ }
6395
+ static fromApiKey(apiKey, options = {}) {
6396
+ const constructorOptions = { ...options, apiKey };
6397
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
6398
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
6399
+ }
6400
+ return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
6401
+ }
6402
+ static fromClientSessionToken(clientSessionToken, options = {}) {
6403
+ const constructorOptions = { ...options, clientSessionToken };
6404
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
6405
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
6406
+ }
6407
+ return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
6408
+ }
6409
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
6410
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
6411
+ const clientOptions = parseOptions({ ...options, publishableKey });
6412
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
6413
+ throw new SeamHttpInvalidOptionsError(
6414
+ "The client option cannot be used with SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromPublishableKey"
6415
+ );
6416
+ }
6417
+ const client = createClient(clientOptions);
6418
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
6419
+ const { token } = await clientSessions.getOrCreate({
6420
+ user_identifier_key: userIdentifierKey
6421
+ });
6422
+ return _SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClientSessionToken(
6423
+ token,
6424
+ options
6425
+ );
6426
+ }
6427
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
6428
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
6429
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
6430
+ throw new SeamHttpInvalidOptionsError(
6431
+ "Missing consoleSessionToken or workspaceId"
6432
+ );
6433
+ }
6434
+ return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
6435
+ }
6436
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6437
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
6438
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6439
+ throw new SeamHttpInvalidOptionsError(
6440
+ "Missing personalAccessToken or workspaceId"
6441
+ );
6442
+ }
6443
+ return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
6444
+ }
6445
+ createPaginator(request) {
6446
+ return new SeamPaginator(this, request);
6447
+ }
6448
+ async updateClientSessionToken(clientSessionToken) {
6449
+ const { headers } = this.client.defaults;
6450
+ const authHeaders = getAuthHeadersForClientSessionToken({
6451
+ clientSessionToken
6452
+ });
6453
+ for (const key of Object.keys(authHeaders)) {
6454
+ if (headers[key] == null) {
6455
+ throw new Error(
6456
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6457
+ );
6458
+ }
6459
+ }
6460
+ this.client.defaults.headers = { ...headers, ...authHeaders };
6461
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6462
+ await clientSessions.get();
6463
+ }
6464
+ list(parameters, options = {}) {
6465
+ if (!this.defaults.isUndocumentedApiEnabled) {
6466
+ throw new Error(
6467
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6468
+ );
6469
+ }
6470
+ return new SeamHttpRequest(this, {
6471
+ pathname: "/seam/console/v1/workspace/feature_flags/list",
6472
+ method: "GET",
6473
+ params: parameters,
6474
+ responseKey: "feature_flags",
6475
+ options
6476
+ });
6477
+ }
6478
+ update(parameters, options = {}) {
6479
+ if (!this.defaults.isUndocumentedApiEnabled) {
6480
+ throw new Error(
6481
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6482
+ );
6483
+ }
6484
+ return new SeamHttpRequest(this, {
6485
+ pathname: "/seam/console/v1/workspace/feature_flags/update",
6486
+ method: "POST",
6487
+ body: parameters,
6488
+ responseKey: "feature_flag",
6489
+ options
6490
+ });
6491
+ }
6492
+ };
6493
+
6372
6494
  // src/lib/seam/connect/routes/seam/console/console.ts
6373
6495
  var SeamHttpSeamConsole = class _SeamHttpSeamConsole {
6374
6496
  client;
@@ -12563,6 +12685,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
12563
12685
  return seam.get(...args);
12564
12686
  };
12565
12687
  }
12688
+ get "/seam/console/v1/workspace/feature_flags/list"() {
12689
+ const { client, defaults } = this;
12690
+ if (!this.defaults.isUndocumentedApiEnabled) {
12691
+ throw new Error(
12692
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12693
+ );
12694
+ }
12695
+ return function seamConsoleV1WorkspaceFeatureFlagsList(...args) {
12696
+ const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
12697
+ client,
12698
+ defaults
12699
+ );
12700
+ return seam.list(...args);
12701
+ };
12702
+ }
12703
+ get "/seam/console/v1/workspace/feature_flags/update"() {
12704
+ const { client, defaults } = this;
12705
+ if (!this.defaults.isUndocumentedApiEnabled) {
12706
+ throw new Error(
12707
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
12708
+ );
12709
+ }
12710
+ return function seamConsoleV1WorkspaceFeatureFlagsUpdate(...args) {
12711
+ const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
12712
+ client,
12713
+ defaults
12714
+ );
12715
+ return seam.update(...args);
12716
+ };
12717
+ }
12566
12718
  get "/seam/customer/v1/access_grants/list"() {
12567
12719
  const { client, defaults } = this;
12568
12720
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13790,6 +13942,21 @@ var SeamHttpEndpointsWithoutWorkspace = class _SeamHttpEndpointsWithoutWorkspace
13790
13942
  }
13791
13943
  return new _SeamHttpEndpointsWithoutWorkspace(constructorOptions);
13792
13944
  }
13945
+ get "/seam/console/v1/workspace/feature_flags/list"() {
13946
+ const { client, defaults } = this;
13947
+ if (!this.defaults.isUndocumentedApiEnabled) {
13948
+ throw new Error(
13949
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
13950
+ );
13951
+ }
13952
+ return function seamConsoleV1WorkspaceFeatureFlagsList(...args) {
13953
+ const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
13954
+ client,
13955
+ defaults
13956
+ );
13957
+ return seam.list(...args);
13958
+ };
13959
+ }
13793
13960
  get "/seam/customer/v1/connectors/authorize"() {
13794
13961
  const { client, defaults } = this;
13795
13962
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -13921,6 +14088,7 @@ exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
13921
14088
  exports.SeamHttpSeamConsoleV1LynxMigration = SeamHttpSeamConsoleV1LynxMigration;
13922
14089
  exports.SeamHttpSeamConsoleV1Sites = SeamHttpSeamConsoleV1Sites;
13923
14090
  exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
14091
+ exports.SeamHttpSeamConsoleV1WorkspaceFeatureFlags = SeamHttpSeamConsoleV1WorkspaceFeatureFlags;
13924
14092
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
13925
14093
  exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
13926
14094
  exports.SeamHttpSeamCustomerV1AccessMethods = SeamHttpSeamCustomerV1AccessMethods;