@cdot65/prisma-airs-sdk 0.17.0 → 0.18.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.
package/README.md CHANGED
@@ -56,6 +56,28 @@ console.log(result.action); // "allow" | "block"
56
56
 
57
57
  That's the API-key scanning path. The OAuth2 clients (`ManagementClient`, `ModelSecurityClient`, `RedTeamClient`, `AIGatewayClient`), authentication setup, error handling, and runnable examples are all covered in the documentation.
58
58
 
59
+ ## Complete list reads
60
+
61
+ List endpoints still return their native page envelopes through `list()`. For workflows that need
62
+ the complete result set, the OAuth resource clients also provide all-page helpers:
63
+
64
+ ```ts
65
+ const profiles = await management.profiles.listAll({ latest: true });
66
+ const models = await modelSecurity.models.listAllModels({ search_query: 'llama' });
67
+ const targets = await redTeam.targets.listAll({ status: 'READY' });
68
+ const patterns = await management.dlp.dataPatterns.listAll({ status: 'active' });
69
+ ```
70
+
71
+ All-page helpers preserve resource filters and normalize the APIs' different pagination dialects
72
+ (`offset`/`limit`, `skip`/`limit`, and Spring `page`/`size`). They collect at most 10,000 records by
73
+ default as runaway-pagination protection. Pass `{ max: 500 }` for a smaller bound or `{ max: 0 }`
74
+ to remove the bound. Low-level consumers can compose the exported `paginate()` async generator and
75
+ `collectAll()` helper for endpoints without a resource-specific convenience method.
76
+
77
+ Profile and topic reads are revision-aware: `profiles.list({ latest: true })` delegates revision
78
+ selection to the service, while `topics.list({ latestOnly: true })` groups all pages by topic name
79
+ and returns the highest revision. `getByName()` returns the highest revision for both resources.
80
+
59
81
  ## AI Gateway
60
82
 
61
83
  `AIGatewayClient` covers the SCM-managed Prisma AIRS **AI Gateway** — runtime telemetry and configuration across two planes behind one credential set: a data plane (`/ai_gw/v2`, telemetry + workspace-scoped config) and an admin plane (`/ai_gw/admin/v2`, organisation-level config). Twelve sub-clients: `telemetry`, `workspaces`, `configs`, `guardrails`, `providers`, `apiKeys` (data plane) and `integrations`, `mcpIntegrations`, `deployments`, `plugins`, `organisations`, `auditLogs` (admin plane).
package/dist/index.cjs CHANGED
@@ -660,10 +660,15 @@ __export(index_exports, {
660
660
  WebSocketConnectionParamsSchema: () => WebSocketConnectionParamsSchema,
661
661
  WeightedRegexSchema: () => WeightedRegexSchema,
662
662
  aiGwOrganisationsAuthSettingsPath: () => aiGwOrganisationsAuthSettingsPath,
663
+ collectAll: () => collectAll,
664
+ collectSkipPages: () => collectSkipPages,
665
+ collectSpringPages: () => collectSpringPages,
663
666
  globalConfiguration: () => globalConfiguration,
664
667
  init: () => init,
665
668
  jsonNullable: () => jsonNullable,
666
- pageSchema: () => pageSchema
669
+ pageSchema: () => pageSchema,
670
+ paginate: () => paginate,
671
+ serializeListing: () => serializeListing
667
672
  });
668
673
  module.exports = __toCommonJS(index_exports);
669
674
 
@@ -2030,6 +2035,60 @@ var Content = class _Content {
2030
2035
  }
2031
2036
  };
2032
2037
 
2038
+ // src/listing.ts
2039
+ async function* paginate(fetchPage, initialCursor) {
2040
+ let cursor = initialCursor;
2041
+ const seen = /* @__PURE__ */ new Set();
2042
+ while (true) {
2043
+ if (seen.has(cursor)) throw new Error("Pagination returned a repeated cursor");
2044
+ seen.add(cursor);
2045
+ const page = await fetchPage(cursor);
2046
+ yield* page.items;
2047
+ if (page.next === void 0) return;
2048
+ cursor = page.next;
2049
+ }
2050
+ }
2051
+ async function collectAll(iterable, opts = {}) {
2052
+ const max = opts.max ?? 1e4;
2053
+ if (!Number.isSafeInteger(max) || max < 0)
2054
+ throw new RangeError("max must be a non-negative integer");
2055
+ const items = [];
2056
+ for await (const item of iterable) {
2057
+ if (max > 0 && items.length >= max) break;
2058
+ items.push(item);
2059
+ }
2060
+ return items;
2061
+ }
2062
+ function collectSkipPages(fetchPage, opts = {}) {
2063
+ const limit = opts.limit ?? 50;
2064
+ return collectAll(
2065
+ paginate(async (skip) => {
2066
+ const page = await fetchPage(skip, limit);
2067
+ const next = skip + page.items.length;
2068
+ const hasMore = page.items.length > 0 && (page.total == null ? page.items.length === limit : next < page.total);
2069
+ return { items: page.items, next: hasMore ? next : void 0 };
2070
+ }, 0),
2071
+ { max: opts.max }
2072
+ );
2073
+ }
2074
+ function collectSpringPages(fetchPage, opts = {}) {
2075
+ const size = opts.size ?? 50;
2076
+ return collectAll(
2077
+ paginate(async (page) => {
2078
+ const result = await fetchPage(page, size);
2079
+ return { items: result.items, next: result.last ? void 0 : page + 1 };
2080
+ }, 0),
2081
+ { max: opts.max }
2082
+ );
2083
+ }
2084
+ function serializeListing(opts) {
2085
+ const params = {};
2086
+ if (opts?.skip !== void 0) params.skip = String(opts.skip);
2087
+ if (opts?.limit !== void 0) params.limit = String(opts.limit);
2088
+ if (opts?.search !== void 0) params.search = opts.search;
2089
+ return params;
2090
+ }
2091
+
2033
2092
  // src/models/enums.ts
2034
2093
  var Verdict = {
2035
2094
  BENIGN: "benign",
@@ -5591,6 +5650,7 @@ var ProfilesClient = class {
5591
5650
  offset: String(opts?.offset ?? 0),
5592
5651
  limit: String(opts?.limit ?? 100)
5593
5652
  };
5653
+ if (opts?.latest !== void 0) params.latest = String(opts.latest);
5594
5654
  return request({
5595
5655
  method: "GET",
5596
5656
  baseUrl: this.baseUrl,
@@ -5601,6 +5661,23 @@ var ProfilesClient = class {
5601
5661
  numRetries: this.numRetries
5602
5662
  });
5603
5663
  }
5664
+ /**
5665
+ * List security profiles across every response page.
5666
+ * @example
5667
+ * ```ts
5668
+ * const profiles = await mgmt.profiles.listAll({ latest: true });
5669
+ * ```
5670
+ */
5671
+ async listAll(opts = {}) {
5672
+ const limit = opts.limit ?? 100;
5673
+ return collectAll(
5674
+ paginate(async (offset) => {
5675
+ const page = await this.list({ offset, limit, latest: opts.latest });
5676
+ return { items: page.ai_profiles, next: page.next_offset || void 0 };
5677
+ }, 0),
5678
+ { max: opts.max }
5679
+ );
5680
+ }
5604
5681
  /**
5605
5682
  * Get a security profile by UUID.
5606
5683
  * Fetches all profiles and filters — no dedicated API endpoint exists.
@@ -5618,7 +5695,7 @@ var ProfilesClient = class {
5618
5695
  * ```
5619
5696
  */
5620
5697
  async get(profileId) {
5621
- const { ai_profiles } = await this.list();
5698
+ const ai_profiles = await this.listAll();
5622
5699
  const profile = ai_profiles.find((p) => p.profile_id === profileId);
5623
5700
  if (!profile) {
5624
5701
  throw new AISecSDKException(
@@ -5644,7 +5721,7 @@ var ProfilesClient = class {
5644
5721
  * ```
5645
5722
  */
5646
5723
  async getByName(profileName) {
5647
- const { ai_profiles } = await this.list();
5724
+ const ai_profiles = await this.listAll();
5648
5725
  const matches = ai_profiles.filter((p) => p.profile_name === profileName);
5649
5726
  if (matches.length === 0) {
5650
5727
  throw new AISecSDKException(
@@ -5799,6 +5876,22 @@ var TopicsClient = class {
5799
5876
  * ```
5800
5877
  */
5801
5878
  async list(opts) {
5879
+ if (opts?.latestOnly) {
5880
+ const all = await this.listAll({ limit: 200 });
5881
+ const latest = /* @__PURE__ */ new Map();
5882
+ for (const topic of all) {
5883
+ const current = latest.get(topic.topic_name);
5884
+ if (!current || topic.revision > current.revision) latest.set(topic.topic_name, topic);
5885
+ }
5886
+ const custom_topics = [...latest.values()];
5887
+ const offset = opts.offset ?? 0;
5888
+ const limit = opts.limit ?? 100;
5889
+ const nextOffset = offset + limit;
5890
+ return {
5891
+ custom_topics: custom_topics.slice(offset, nextOffset),
5892
+ next_offset: nextOffset < custom_topics.length ? nextOffset : void 0
5893
+ };
5894
+ }
5802
5895
  const params = {
5803
5896
  offset: String(opts?.offset ?? 0),
5804
5897
  limit: String(opts?.limit ?? 100)
@@ -5813,6 +5906,55 @@ var TopicsClient = class {
5813
5906
  numRetries: this.numRetries
5814
5907
  });
5815
5908
  }
5909
+ /**
5910
+ * List custom topics across every response page.
5911
+ * @example
5912
+ * ```ts
5913
+ * const topics = await mgmt.topics.listAll({ limit: 200 });
5914
+ * ```
5915
+ */
5916
+ async listAll(opts = {}) {
5917
+ const limit = opts.limit ?? 100;
5918
+ return collectAll(
5919
+ paginate(async (offset) => {
5920
+ const page = await this.list({ offset, limit });
5921
+ return { items: page.custom_topics, next: page.next_offset || void 0 };
5922
+ }, 0),
5923
+ { max: opts.max }
5924
+ );
5925
+ }
5926
+ /**
5927
+ * Get an exact custom-topic revision by UUID.
5928
+ * @example
5929
+ * ```ts
5930
+ * const topic = await mgmt.topics.get('550e8400-e29b-41d4-a716-446655440000');
5931
+ * ```
5932
+ */
5933
+ async get(topicId) {
5934
+ const topic = (await this.listAll()).find((item) => item.topic_id === topicId);
5935
+ if (!topic)
5936
+ throw new AISecSDKException(
5937
+ `Topic not found: ${topicId}`,
5938
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
5939
+ );
5940
+ return topic;
5941
+ }
5942
+ /**
5943
+ * Get the highest revision of a custom topic by name.
5944
+ * @example
5945
+ * ```ts
5946
+ * const topic = await mgmt.topics.getByName('credit-cards');
5947
+ * ```
5948
+ */
5949
+ async getByName(topicName) {
5950
+ const matches = (await this.listAll()).filter((item) => item.topic_name === topicName);
5951
+ if (matches.length === 0)
5952
+ throw new AISecSDKException(
5953
+ `Topic not found: ${topicName}`,
5954
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
5955
+ );
5956
+ return matches.reduce((best, topic) => topic.revision > best.revision ? topic : best);
5957
+ }
5816
5958
  /**
5817
5959
  * Update an existing custom topic.
5818
5960
  * @param topicId - UUID of the topic to update.
@@ -5976,6 +6118,17 @@ var ApiKeysClient = class {
5976
6118
  numRetries: this.numRetries
5977
6119
  });
5978
6120
  }
6121
+ /** List all API keys. @example `const keys = await mgmt.apiKeys.listAll();` */
6122
+ async listAll(opts = {}) {
6123
+ const limit = opts.limit ?? 100;
6124
+ return collectAll(
6125
+ paginate(async (offset) => {
6126
+ const page = await this.list({ offset, limit });
6127
+ return { items: page.api_keys ?? [], next: page.next_offset || void 0 };
6128
+ }, 0),
6129
+ { max: opts.max }
6130
+ );
6131
+ }
5979
6132
  /**
5980
6133
  * Delete an API key by name.
5981
6134
  * @param apiKeyName - Name of the API key to delete.
@@ -6100,6 +6253,17 @@ var CustomerAppsClient = class {
6100
6253
  numRetries: this.numRetries
6101
6254
  });
6102
6255
  }
6256
+ /** List all customer applications. @example `const apps = await mgmt.customerApps.listAll();` */
6257
+ async listAll(opts = {}) {
6258
+ const limit = opts.limit ?? 100;
6259
+ return collectAll(
6260
+ paginate(async (offset) => {
6261
+ const page = await this.list({ offset, limit });
6262
+ return { items: page.customer_apps ?? [], next: page.next_offset || void 0 };
6263
+ }, 0),
6264
+ { max: opts.max }
6265
+ );
6266
+ }
6103
6267
  /**
6104
6268
  * Update a customer app.
6105
6269
  * @param customerAppId - UUID of the customer app to update.
@@ -6547,6 +6711,17 @@ var DataFilteringProfilesClient = class {
6547
6711
  numRetries: this.numRetries
6548
6712
  });
6549
6713
  }
6714
+ /** List all filtering profiles. @example `const profiles = await mgmt.dlp.dataFilteringProfiles.listAll();` */
6715
+ async listAll(params = {}) {
6716
+ return collectSpringPages(
6717
+ async (page, size) => {
6718
+ const result = await this.list({ ...params, page, size });
6719
+ const last = result.last ?? (result.totalPages !== void 0 ? page + 1 >= result.totalPages : result.content.length < size);
6720
+ return { items: result.content, last };
6721
+ },
6722
+ { size: params.size, max: params.max }
6723
+ );
6724
+ }
6550
6725
  /**
6551
6726
  * Get a single data filtering profile by resource ID.
6552
6727
  * @example
@@ -6640,6 +6815,17 @@ var DataPatternsClient = class {
6640
6815
  numRetries: this.numRetries
6641
6816
  });
6642
6817
  }
6818
+ /** List all data patterns. @example `const patterns = await mgmt.dlp.dataPatterns.listAll();` */
6819
+ async listAll(params = {}) {
6820
+ return collectSpringPages(
6821
+ async (page, size) => {
6822
+ const result = await this.list({ ...params, page, size });
6823
+ const last = result.last ?? (result.totalPages !== void 0 ? page + 1 >= result.totalPages : result.content.length < size);
6824
+ return { items: result.content, last };
6825
+ },
6826
+ { size: params.size, max: params.max }
6827
+ );
6828
+ }
6643
6829
  /**
6644
6830
  * Create a new custom data pattern.
6645
6831
  * @example
@@ -6813,6 +6999,17 @@ var DataProfilesClient = class {
6813
6999
  numRetries: this.numRetries
6814
7000
  });
6815
7001
  }
7002
+ /** List all data profiles. @example `const profiles = await mgmt.dlp.dataProfiles.listAll();` */
7003
+ async listAll(params = {}) {
7004
+ return collectSpringPages(
7005
+ async (page, size) => {
7006
+ const result = await this.list({ ...params, page, size });
7007
+ const last = result.last ?? (result.totalPages !== void 0 ? page + 1 >= result.totalPages : result.content.length < size);
7008
+ return { items: result.content, last };
7009
+ },
7010
+ { size: params.size, max: params.max }
7011
+ );
7012
+ }
6816
7013
  /**
6817
7014
  * Create a new data profile.
6818
7015
  * @example
@@ -6993,6 +7190,17 @@ var DictionariesClient = class {
6993
7190
  numRetries: this.numRetries
6994
7191
  });
6995
7192
  }
7193
+ /** List all dictionaries. @example `const dictionaries = await mgmt.dlp.dictionaries.listAll();` */
7194
+ async listAll(params = {}) {
7195
+ return collectSpringPages(
7196
+ async (page, size) => {
7197
+ const result = await this.list({ ...params, page, size });
7198
+ const last = result.last ?? (result.totalPages !== void 0 ? page + 1 >= result.totalPages : result.content.length < size);
7199
+ return { items: result.content, last };
7200
+ },
7201
+ { size: params.size, max: params.max }
7202
+ );
7203
+ }
6996
7204
  /**
6997
7205
  * Create a dictionary by uploading a keyword file. Sends a multipart body — the SDK does
6998
7206
  * not set Content-Type so the runtime can write the correct boundary.
@@ -7225,15 +7433,6 @@ var ManagementClient = class {
7225
7433
  }
7226
7434
  };
7227
7435
 
7228
- // src/listing.ts
7229
- function serializeListing(opts) {
7230
- const params = {};
7231
- if (opts?.skip !== void 0) params.skip = String(opts.skip);
7232
- if (opts?.limit !== void 0) params.limit = String(opts.limit);
7233
- if (opts?.search !== void 0) params.search = opts.search;
7234
- return params;
7235
- }
7236
-
7237
7436
  // src/model-security/scans-client.ts
7238
7437
  function buildScanListParams(opts) {
7239
7438
  const params = serializeListing(opts);
@@ -7329,6 +7528,13 @@ var ModelSecurityScansClient = class {
7329
7528
  numRetries: this.numRetries
7330
7529
  });
7331
7530
  }
7531
+ /** List every model-security scan page. @example `const scans = await ms.scans.listAll();` */
7532
+ async listAll(opts = {}) {
7533
+ return collectSkipPages(async (skip, limit) => {
7534
+ const page = await this.list({ ...opts, skip, limit });
7535
+ return { items: page.scans, total: page.pagination.total_items };
7536
+ }, opts);
7537
+ }
7332
7538
  /**
7333
7539
  * Get a single scan by UUID.
7334
7540
  * @param uuid - Scan UUID.
@@ -7707,6 +7913,13 @@ var ModelSecurityGroupsClient = class {
7707
7913
  numRetries: this.numRetries
7708
7914
  });
7709
7915
  }
7916
+ /** List every security-group page. @example `const groups = await ms.securityGroups.listAll();` */
7917
+ async listAll(opts = {}) {
7918
+ return collectSkipPages(async (skip, limit) => {
7919
+ const page = await this.list({ ...opts, skip, limit });
7920
+ return { items: page.security_groups, total: page.pagination.total_items };
7921
+ }, opts);
7922
+ }
7710
7923
  /**
7711
7924
  * Get a single security group by UUID.
7712
7925
  * @param uuid - Security group UUID.
@@ -7922,6 +8135,13 @@ var ModelSecurityRulesClient = class {
7922
8135
  numRetries: this.numRetries
7923
8136
  });
7924
8137
  }
8138
+ /** List every security-rule page. @example `const rules = await ms.securityRules.listAll();` */
8139
+ async listAll(opts = {}) {
8140
+ return collectSkipPages(async (skip, limit) => {
8141
+ const page = await this.list({ ...opts, skip, limit });
8142
+ return { items: page.rules, total: page.pagination.total_items };
8143
+ }, opts);
8144
+ }
7925
8145
  /**
7926
8146
  * Get a single security rule by UUID.
7927
8147
  * @param uuid - Security rule UUID.
@@ -8001,6 +8221,13 @@ var ModelSecurityModelsClient = class {
8001
8221
  numRetries: this.numRetries
8002
8222
  });
8003
8223
  }
8224
+ /** List every model page. @example `const models = await ms.models.listAllModels();` */
8225
+ async listAllModels(opts = {}) {
8226
+ return collectSkipPages(async (skip, limit) => {
8227
+ const page = await this.listModels({ ...opts, skip, limit });
8228
+ return { items: page.models, total: page.pagination.total_items };
8229
+ }, opts);
8230
+ }
8004
8231
  /**
8005
8232
  * Get a single model by UUID.
8006
8233
  * @param uuid - Model UUID.
@@ -8057,6 +8284,13 @@ var ModelSecurityModelsClient = class {
8057
8284
  numRetries: this.numRetries
8058
8285
  });
8059
8286
  }
8287
+ /** List every version of a model. @example `const versions = await ms.models.listAllModelVersions(modelUuid);` */
8288
+ async listAllModelVersions(modelUuid, opts = {}) {
8289
+ return collectSkipPages(async (skip, limit) => {
8290
+ const page = await this.listModelVersions(modelUuid, { ...opts, skip, limit });
8291
+ return { items: page.model_versions, total: page.pagination.total_items };
8292
+ }, opts);
8293
+ }
8060
8294
  /**
8061
8295
  * Get a single model version by UUID.
8062
8296
  * @param uuid - Model version UUID.
@@ -8111,6 +8345,13 @@ var ModelSecurityModelsClient = class {
8111
8345
  numRetries: this.numRetries
8112
8346
  });
8113
8347
  }
8348
+ /** List every file in a model version. @example `const files = await ms.models.listAllModelVersionFiles(versionUuid);` */
8349
+ async listAllModelVersionFiles(modelVersionUuid, opts = {}) {
8350
+ return collectSkipPages(async (skip, limit) => {
8351
+ const page = await this.listModelVersionFiles(modelVersionUuid, { ...opts, skip, limit });
8352
+ return { items: page.files, total: page.pagination.total_items };
8353
+ }, opts);
8354
+ }
8114
8355
  };
8115
8356
 
8116
8357
  // src/model-security/client.ts
@@ -8251,6 +8492,13 @@ var RedTeamScansClient = class {
8251
8492
  numRetries: this.numRetries
8252
8493
  });
8253
8494
  }
8495
+ /** List every scan page. @example `const scans = await rt.scans.listAll({ status: 'COMPLETED' });` */
8496
+ async listAll(opts = {}) {
8497
+ return collectSkipPages(async (skip, limit) => {
8498
+ const page = await this.list({ ...opts, skip, limit });
8499
+ return { items: page.data, total: page.pagination.total_items };
8500
+ }, opts);
8501
+ }
8254
8502
  /**
8255
8503
  * Get a single scan job by ID.
8256
8504
  * @param jobId - The job UUID.
@@ -9028,6 +9276,29 @@ var RedTeamTargetsClient = class {
9028
9276
  numRetries: this.numRetries
9029
9277
  });
9030
9278
  }
9279
+ /**
9280
+ * List targets across every page while preserving the supplied filters.
9281
+ * @example
9282
+ * ```ts
9283
+ * const targets = await rt.targets.listAll({ limit: 100, status: 'READY' });
9284
+ * ```
9285
+ */
9286
+ async listAll(opts = {}) {
9287
+ const limit = opts.limit ?? 50;
9288
+ return collectAll(
9289
+ paginate(async (skip) => {
9290
+ const page = await this.list({ ...opts, skip, limit });
9291
+ const items = page.data ?? [];
9292
+ const next = skip + items.length;
9293
+ const total = page.pagination.total_items;
9294
+ return {
9295
+ items,
9296
+ next: items.length > 0 && (total == null ? items.length === limit : next < total) ? next : void 0
9297
+ };
9298
+ }, 0),
9299
+ { max: opts.max }
9300
+ );
9301
+ }
9031
9302
  /**
9032
9303
  * Get a target by UUID.
9033
9304
  * @param uuid - The target UUID.
@@ -9344,6 +9615,13 @@ var RedTeamCustomAttacksClient = class {
9344
9615
  numRetries: this.numRetries
9345
9616
  });
9346
9617
  }
9618
+ /** List every custom prompt-set page. @example `const sets = await rt.customAttacks.listAllPromptSets();` */
9619
+ async listAllPromptSets(opts = {}) {
9620
+ return collectSkipPages(async (skip, limit) => {
9621
+ const page = await this.listPromptSets({ ...opts, skip, limit });
9622
+ return { items: page.data ?? [], total: page.pagination.total_items };
9623
+ }, opts);
9624
+ }
9347
9625
  /**
9348
9626
  * Get a prompt set by UUID.
9349
9627
  * @param uuid - The prompt set UUID.
@@ -9656,6 +9934,13 @@ var RedTeamCustomAttacksClient = class {
9656
9934
  numRetries: this.numRetries
9657
9935
  });
9658
9936
  }
9937
+ /** List every prompt page for a set. @example `const prompts = await rt.customAttacks.listAllPrompts(promptSetUuid);` */
9938
+ async listAllPrompts(promptSetUuid, opts = {}) {
9939
+ return collectSkipPages(async (skip, limit) => {
9940
+ const page = await this.listPrompts(promptSetUuid, { ...opts, skip, limit });
9941
+ return { items: page.data ?? [], total: page.pagination.total_items };
9942
+ }, opts);
9943
+ }
9659
9944
  /**
9660
9945
  * Get a prompt by UUID.
9661
9946
  * @param promptSetUuid - The prompt set UUID.
@@ -10402,6 +10687,13 @@ var RedTeamAdaptersClient = class {
10402
10687
  numRetries: this.numRetries
10403
10688
  });
10404
10689
  }
10690
+ /** List every adapter page. @example `const adapters = await rt.adapters.listAll();` */
10691
+ async listAll(opts = {}) {
10692
+ return collectSkipPages(async (skip, limit) => {
10693
+ const page = await this.list({ ...opts, skip, limit });
10694
+ return { items: page.data ?? [], total: page.pagination.total_items };
10695
+ }, opts);
10696
+ }
10405
10697
  /**
10406
10698
  * Get a single adapter by UUID.
10407
10699
  * @param uuid - Adapter UUID.
@@ -13439,9 +13731,14 @@ var AIGatewayClient = class {
13439
13731
  WebSocketConnectionParamsSchema,
13440
13732
  WeightedRegexSchema,
13441
13733
  aiGwOrganisationsAuthSettingsPath,
13734
+ collectAll,
13735
+ collectSkipPages,
13736
+ collectSpringPages,
13442
13737
  globalConfiguration,
13443
13738
  init,
13444
13739
  jsonNullable,
13445
- pageSchema
13740
+ pageSchema,
13741
+ paginate,
13742
+ serializeListing
13446
13743
  });
13447
13744
  //# sourceMappingURL=index.cjs.map