@smplkit/sdk 3.0.46 → 3.0.48

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/dist/index.d.cts CHANGED
@@ -63,13 +63,16 @@ interface ResourceType {
63
63
  createdAt: string;
64
64
  }
65
65
  interface ListResourceTypesParams {
66
+ /** 1-based page number to return. Defaults to 1. */
67
+ pageNumber?: number;
68
+ /** Items per page (1–1000). Defaults to 1000. */
66
69
  pageSize?: number;
67
- pageAfter?: string;
70
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
71
+ metaTotal?: boolean;
68
72
  }
69
73
  interface ListResourceTypesPage {
70
74
  resourceTypes: ResourceType[];
71
- /** Opaque cursor for the next page, or null if this is the last page. */
72
- nextCursor: string | null;
75
+ pagination: Pagination;
73
76
  }
74
77
  interface Action {
75
78
  /** The action slug. */
@@ -79,13 +82,16 @@ interface Action {
79
82
  interface ListActionsParams {
80
83
  /** When set, returns only the actions seen with this resource_type. */
81
84
  filterResourceType?: string;
85
+ /** 1-based page number to return. Defaults to 1. */
86
+ pageNumber?: number;
87
+ /** Items per page (1–1000). Defaults to 1000. */
82
88
  pageSize?: number;
83
- pageAfter?: string;
89
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
90
+ metaTotal?: boolean;
84
91
  }
85
92
  interface ActionListPage {
86
93
  actions: Action[];
87
- /** Opaque cursor for the next page, or null if this is the last page. */
88
- nextCursor: string | null;
94
+ pagination: Pagination;
89
95
  }
90
96
  interface HttpHeader {
91
97
  name: string;
@@ -139,12 +145,36 @@ interface UpdateForwarderInput extends CreateForwarderInput {
139
145
  interface ListForwardersParams {
140
146
  forwarderType?: ForwarderType;
141
147
  enabled?: boolean;
148
+ /** 1-based page number to return. Defaults to 1. */
149
+ pageNumber?: number;
150
+ /** Items per page (1–1000). Defaults to 1000. */
142
151
  pageSize?: number;
143
- pageAfter?: string;
152
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
153
+ metaTotal?: boolean;
144
154
  }
145
155
  interface ListForwardersPage {
146
156
  forwarders: Forwarder[];
147
- nextCursor: string | null;
157
+ pagination: Pagination;
158
+ }
159
+ /**
160
+ * Offset-pagination block echoed in `meta.pagination` on every list
161
+ * response (other than the documented cursor-paged endpoints — audit
162
+ * events and forwarder deliveries).
163
+ *
164
+ * `page` and `size` always reflect the parameters that served the
165
+ * response (the defaults when the caller omitted them). `total` and
166
+ * `totalPages` are only populated when the caller passed
167
+ * `metaTotal: true`, since computing them costs an extra `COUNT` query.
168
+ */
169
+ interface Pagination {
170
+ /** 1-based page number returned. */
171
+ page: number;
172
+ /** Number of items per page. */
173
+ size: number;
174
+ /** Total matching items across all pages. Only set when `metaTotal=true`. */
175
+ total?: number;
176
+ /** Total pages at the requested page size. Only set when `metaTotal=true`. */
177
+ totalPages?: number;
148
178
  }
149
179
 
150
180
  /**
@@ -203,7 +233,7 @@ declare class ResourceTypesClient {
203
233
  *
204
234
  * Backed by a maintain-by-write side table (ADR-047 §2.5), so the
205
235
  * response time is independent of event volume. Sorted alphabetically;
206
- * cursor pagination via `pageAfter`.
236
+ * offset pagination via `pageNumber` / `pageSize`.
207
237
  */
208
238
  list(params?: ListResourceTypesParams): Promise<ListResourceTypesPage>;
209
239
  }
@@ -216,7 +246,7 @@ declare class ActionsClient {
216
246
  * Without `filterResourceType`, returns one row per distinct action.
217
247
  * With `filterResourceType`, returns only the actions recorded with
218
248
  * that resource_type, powering cascading-filter UIs (ADR-047 §2.5).
219
- * Sorted alphabetically; cursor pagination via `pageAfter`.
249
+ * Sorted alphabetically; offset pagination via `pageNumber` / `pageSize`.
220
250
  */
221
251
  list(params?: ListActionsParams): Promise<ActionListPage>;
222
252
  }
@@ -1209,6 +1239,7 @@ interface components {
1209
1239
  FlagListResponse: {
1210
1240
  /** Data */
1211
1241
  data: components["schemas"]["FlagResource"][];
1242
+ meta: components["schemas"]["ListMeta"];
1212
1243
  };
1213
1244
  /**
1214
1245
  * FlagRequest
@@ -1369,6 +1400,7 @@ interface components {
1369
1400
  FlagSourceListResponse: {
1370
1401
  /** Data */
1371
1402
  data: components["schemas"]["FlagSourceResource"][];
1403
+ meta: components["schemas"]["ListMeta"];
1372
1404
  };
1373
1405
  /**
1374
1406
  * FlagSourceResource
@@ -1418,6 +1450,13 @@ interface components {
1418
1450
  */
1419
1451
  value: unknown;
1420
1452
  };
1453
+ /**
1454
+ * ListMeta
1455
+ * @description Top-level ``meta`` block included on every JSON:API list response.
1456
+ */
1457
+ ListMeta: {
1458
+ pagination: components["schemas"]["PaginationMeta"];
1459
+ };
1421
1460
  /**
1422
1461
  * ManualReviewItem
1423
1462
  * @description A flag rule that could not be safely modified by the bulk
@@ -1445,6 +1484,37 @@ interface components {
1445
1484
  */
1446
1485
  reason: string;
1447
1486
  };
1487
+ /**
1488
+ * PaginationMeta
1489
+ * @description Pagination block returned inside ``meta`` on every list response.
1490
+ *
1491
+ * ``page`` and ``size`` are always present and echo the parameters that
1492
+ * served the response (their defaults when the client omitted them).
1493
+ * ``total`` and ``total_pages`` are present only when the request included
1494
+ * ``meta[total]=true``.
1495
+ */
1496
+ PaginationMeta: {
1497
+ /**
1498
+ * Page
1499
+ * @description 1-based page number returned.
1500
+ */
1501
+ page: number;
1502
+ /**
1503
+ * Size
1504
+ * @description Number of items per page.
1505
+ */
1506
+ size: number;
1507
+ /**
1508
+ * Total
1509
+ * @description Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
1510
+ */
1511
+ total?: number | null;
1512
+ /**
1513
+ * Total Pages
1514
+ * @description Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
1515
+ */
1516
+ total_pages?: number | null;
1517
+ };
1448
1518
  /**
1449
1519
  * RemoveReferencesAttributes
1450
1520
  * @description Counts and follow-ups returned by the remove-references action.
@@ -1564,6 +1634,7 @@ interface components {
1564
1634
  UsageListResponse: {
1565
1635
  /** Data */
1566
1636
  data: components["schemas"]["UsageResource"][];
1637
+ meta: components["schemas"]["ListMeta"];
1567
1638
  };
1568
1639
  /**
1569
1640
  * UsageResource
@@ -3576,4 +3647,4 @@ declare class SmplPaymentRequiredError extends SmplError {
3576
3647
  /** @deprecated Use {@link ApiErrorDetail}. */
3577
3648
  type ApiErrorObject = ApiErrorDetail;
3578
3649
 
3579
- export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, type Action as AuditAction, type ActionListPage as AuditActionListPage, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, ForwardersClient as AuditForwardersClient, type ListActionsParams as AuditListActionsParams, type ListResourceTypesParams as AuditListResourceTypesParams, type ResourceType as AuditResourceType, type ListResourceTypesPage as AuditResourceTypeListPage, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, ManagementAuditClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplPaymentRequiredError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplPaymentRequiredError as SmplkitPaymentRequiredError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
3650
+ export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, type Action as AuditAction, type ActionListPage as AuditActionListPage, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, ForwardersClient as AuditForwardersClient, type ListActionsParams as AuditListActionsParams, type ListResourceTypesParams as AuditListResourceTypesParams, type Pagination as AuditPagination, type ResourceType as AuditResourceType, type ListResourceTypesPage as AuditResourceTypeListPage, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, ManagementAuditClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplPaymentRequiredError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplPaymentRequiredError as SmplkitPaymentRequiredError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
package/dist/index.d.ts CHANGED
@@ -63,13 +63,16 @@ interface ResourceType {
63
63
  createdAt: string;
64
64
  }
65
65
  interface ListResourceTypesParams {
66
+ /** 1-based page number to return. Defaults to 1. */
67
+ pageNumber?: number;
68
+ /** Items per page (1–1000). Defaults to 1000. */
66
69
  pageSize?: number;
67
- pageAfter?: string;
70
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
71
+ metaTotal?: boolean;
68
72
  }
69
73
  interface ListResourceTypesPage {
70
74
  resourceTypes: ResourceType[];
71
- /** Opaque cursor for the next page, or null if this is the last page. */
72
- nextCursor: string | null;
75
+ pagination: Pagination;
73
76
  }
74
77
  interface Action {
75
78
  /** The action slug. */
@@ -79,13 +82,16 @@ interface Action {
79
82
  interface ListActionsParams {
80
83
  /** When set, returns only the actions seen with this resource_type. */
81
84
  filterResourceType?: string;
85
+ /** 1-based page number to return. Defaults to 1. */
86
+ pageNumber?: number;
87
+ /** Items per page (1–1000). Defaults to 1000. */
82
88
  pageSize?: number;
83
- pageAfter?: string;
89
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
90
+ metaTotal?: boolean;
84
91
  }
85
92
  interface ActionListPage {
86
93
  actions: Action[];
87
- /** Opaque cursor for the next page, or null if this is the last page. */
88
- nextCursor: string | null;
94
+ pagination: Pagination;
89
95
  }
90
96
  interface HttpHeader {
91
97
  name: string;
@@ -139,12 +145,36 @@ interface UpdateForwarderInput extends CreateForwarderInput {
139
145
  interface ListForwardersParams {
140
146
  forwarderType?: ForwarderType;
141
147
  enabled?: boolean;
148
+ /** 1-based page number to return. Defaults to 1. */
149
+ pageNumber?: number;
150
+ /** Items per page (1–1000). Defaults to 1000. */
142
151
  pageSize?: number;
143
- pageAfter?: string;
152
+ /** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
153
+ metaTotal?: boolean;
144
154
  }
145
155
  interface ListForwardersPage {
146
156
  forwarders: Forwarder[];
147
- nextCursor: string | null;
157
+ pagination: Pagination;
158
+ }
159
+ /**
160
+ * Offset-pagination block echoed in `meta.pagination` on every list
161
+ * response (other than the documented cursor-paged endpoints — audit
162
+ * events and forwarder deliveries).
163
+ *
164
+ * `page` and `size` always reflect the parameters that served the
165
+ * response (the defaults when the caller omitted them). `total` and
166
+ * `totalPages` are only populated when the caller passed
167
+ * `metaTotal: true`, since computing them costs an extra `COUNT` query.
168
+ */
169
+ interface Pagination {
170
+ /** 1-based page number returned. */
171
+ page: number;
172
+ /** Number of items per page. */
173
+ size: number;
174
+ /** Total matching items across all pages. Only set when `metaTotal=true`. */
175
+ total?: number;
176
+ /** Total pages at the requested page size. Only set when `metaTotal=true`. */
177
+ totalPages?: number;
148
178
  }
149
179
 
150
180
  /**
@@ -203,7 +233,7 @@ declare class ResourceTypesClient {
203
233
  *
204
234
  * Backed by a maintain-by-write side table (ADR-047 §2.5), so the
205
235
  * response time is independent of event volume. Sorted alphabetically;
206
- * cursor pagination via `pageAfter`.
236
+ * offset pagination via `pageNumber` / `pageSize`.
207
237
  */
208
238
  list(params?: ListResourceTypesParams): Promise<ListResourceTypesPage>;
209
239
  }
@@ -216,7 +246,7 @@ declare class ActionsClient {
216
246
  * Without `filterResourceType`, returns one row per distinct action.
217
247
  * With `filterResourceType`, returns only the actions recorded with
218
248
  * that resource_type, powering cascading-filter UIs (ADR-047 §2.5).
219
- * Sorted alphabetically; cursor pagination via `pageAfter`.
249
+ * Sorted alphabetically; offset pagination via `pageNumber` / `pageSize`.
220
250
  */
221
251
  list(params?: ListActionsParams): Promise<ActionListPage>;
222
252
  }
@@ -1209,6 +1239,7 @@ interface components {
1209
1239
  FlagListResponse: {
1210
1240
  /** Data */
1211
1241
  data: components["schemas"]["FlagResource"][];
1242
+ meta: components["schemas"]["ListMeta"];
1212
1243
  };
1213
1244
  /**
1214
1245
  * FlagRequest
@@ -1369,6 +1400,7 @@ interface components {
1369
1400
  FlagSourceListResponse: {
1370
1401
  /** Data */
1371
1402
  data: components["schemas"]["FlagSourceResource"][];
1403
+ meta: components["schemas"]["ListMeta"];
1372
1404
  };
1373
1405
  /**
1374
1406
  * FlagSourceResource
@@ -1418,6 +1450,13 @@ interface components {
1418
1450
  */
1419
1451
  value: unknown;
1420
1452
  };
1453
+ /**
1454
+ * ListMeta
1455
+ * @description Top-level ``meta`` block included on every JSON:API list response.
1456
+ */
1457
+ ListMeta: {
1458
+ pagination: components["schemas"]["PaginationMeta"];
1459
+ };
1421
1460
  /**
1422
1461
  * ManualReviewItem
1423
1462
  * @description A flag rule that could not be safely modified by the bulk
@@ -1445,6 +1484,37 @@ interface components {
1445
1484
  */
1446
1485
  reason: string;
1447
1486
  };
1487
+ /**
1488
+ * PaginationMeta
1489
+ * @description Pagination block returned inside ``meta`` on every list response.
1490
+ *
1491
+ * ``page`` and ``size`` are always present and echo the parameters that
1492
+ * served the response (their defaults when the client omitted them).
1493
+ * ``total`` and ``total_pages`` are present only when the request included
1494
+ * ``meta[total]=true``.
1495
+ */
1496
+ PaginationMeta: {
1497
+ /**
1498
+ * Page
1499
+ * @description 1-based page number returned.
1500
+ */
1501
+ page: number;
1502
+ /**
1503
+ * Size
1504
+ * @description Number of items per page.
1505
+ */
1506
+ size: number;
1507
+ /**
1508
+ * Total
1509
+ * @description Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
1510
+ */
1511
+ total?: number | null;
1512
+ /**
1513
+ * Total Pages
1514
+ * @description Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
1515
+ */
1516
+ total_pages?: number | null;
1517
+ };
1448
1518
  /**
1449
1519
  * RemoveReferencesAttributes
1450
1520
  * @description Counts and follow-ups returned by the remove-references action.
@@ -1564,6 +1634,7 @@ interface components {
1564
1634
  UsageListResponse: {
1565
1635
  /** Data */
1566
1636
  data: components["schemas"]["UsageResource"][];
1637
+ meta: components["schemas"]["ListMeta"];
1567
1638
  };
1568
1639
  /**
1569
1640
  * UsageResource
@@ -3576,4 +3647,4 @@ declare class SmplPaymentRequiredError extends SmplError {
3576
3647
  /** @deprecated Use {@link ApiErrorDetail}. */
3577
3648
  type ApiErrorObject = ApiErrorDetail;
3578
3649
 
3579
- export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, type Action as AuditAction, type ActionListPage as AuditActionListPage, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, ForwardersClient as AuditForwardersClient, type ListActionsParams as AuditListActionsParams, type ListResourceTypesParams as AuditListResourceTypesParams, type ResourceType as AuditResourceType, type ListResourceTypesPage as AuditResourceTypeListPage, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, ManagementAuditClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplPaymentRequiredError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplPaymentRequiredError as SmplkitPaymentRequiredError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
3650
+ export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, type Action as AuditAction, type ActionListPage as AuditActionListPage, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, ForwardersClient as AuditForwardersClient, type ListActionsParams as AuditListActionsParams, type ListResourceTypesParams as AuditListResourceTypesParams, type Pagination as AuditPagination, type ResourceType as AuditResourceType, type ListResourceTypesPage as AuditResourceTypeListPage, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, ManagementAuditClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplPaymentRequiredError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplPaymentRequiredError as SmplkitPaymentRequiredError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
package/dist/index.js CHANGED
@@ -16883,6 +16883,18 @@ function _nextCursorFromLinks(body) {
16883
16883
  if (typeof next !== "string" || !next.includes("page[after]=")) return null;
16884
16884
  return next.split("page[after]=")[1].split("&")[0];
16885
16885
  }
16886
+ function _paginationFromBody(body) {
16887
+ const raw = body.meta?.pagination ?? {};
16888
+ const out = {
16889
+ page: Number(raw.page ?? 0),
16890
+ size: Number(raw.size ?? 0)
16891
+ };
16892
+ if (raw.total !== void 0 && raw.total !== null) out.total = Number(raw.total);
16893
+ if (raw.total_pages !== void 0 && raw.total_pages !== null) {
16894
+ out.totalPages = Number(raw.total_pages);
16895
+ }
16896
+ return out;
16897
+ }
16886
16898
  async function _throwForResponse(response) {
16887
16899
  const body = await response.text().catch(() => "");
16888
16900
  throwForStatus(response.status, body);
@@ -16981,12 +16993,13 @@ var ResourceTypesClient = class {
16981
16993
  *
16982
16994
  * Backed by a maintain-by-write side table (ADR-047 §2.5), so the
16983
16995
  * response time is independent of event volume. Sorted alphabetically;
16984
- * cursor pagination via `pageAfter`.
16996
+ * offset pagination via `pageNumber` / `pageSize`.
16985
16997
  */
16986
16998
  async list(params = {}) {
16987
16999
  const query = {};
17000
+ if (params.pageNumber !== void 0) query["page[number]"] = params.pageNumber;
16988
17001
  if (params.pageSize !== void 0) query["page[size]"] = params.pageSize;
16989
- if (params.pageAfter !== void 0) query["page[after]"] = params.pageAfter;
17002
+ if (params.metaTotal !== void 0) query["meta[total]"] = params.metaTotal;
16990
17003
  const result = await this._http.GET("/api/v1/resource_types", {
16991
17004
  params: { query }
16992
17005
  });
@@ -16999,7 +17012,7 @@ var ResourceTypesClient = class {
16999
17012
  createdAt: String(r.attributes.created_at ?? "")
17000
17013
  })
17001
17014
  );
17002
- return { resourceTypes, nextCursor: _nextCursorFromLinks(body) };
17015
+ return { resourceTypes, pagination: _paginationFromBody(body) };
17003
17016
  }
17004
17017
  };
17005
17018
  var ActionsClient = class {
@@ -17012,14 +17025,15 @@ var ActionsClient = class {
17012
17025
  * Without `filterResourceType`, returns one row per distinct action.
17013
17026
  * With `filterResourceType`, returns only the actions recorded with
17014
17027
  * that resource_type, powering cascading-filter UIs (ADR-047 §2.5).
17015
- * Sorted alphabetically; cursor pagination via `pageAfter`.
17028
+ * Sorted alphabetically; offset pagination via `pageNumber` / `pageSize`.
17016
17029
  */
17017
17030
  async list(params = {}) {
17018
17031
  const query = {};
17019
17032
  if (params.filterResourceType !== void 0)
17020
17033
  query["filter[resource_type]"] = params.filterResourceType;
17034
+ if (params.pageNumber !== void 0) query["page[number]"] = params.pageNumber;
17021
17035
  if (params.pageSize !== void 0) query["page[size]"] = params.pageSize;
17022
- if (params.pageAfter !== void 0) query["page[after]"] = params.pageAfter;
17036
+ if (params.metaTotal !== void 0) query["meta[total]"] = params.metaTotal;
17023
17037
  const result = await this._http.GET("/api/v1/actions", {
17024
17038
  params: { query }
17025
17039
  });
@@ -17032,7 +17046,7 @@ var ActionsClient = class {
17032
17046
  createdAt: String(r.attributes.created_at ?? "")
17033
17047
  })
17034
17048
  );
17035
- return { actions, nextCursor: _nextCursorFromLinks(body) };
17049
+ return { actions, pagination: _paginationFromBody(body) };
17036
17050
  }
17037
17051
  };
17038
17052
  var AuditClient = class {
@@ -19764,10 +19778,17 @@ function wrapFetchError4(err) {
19764
19778
  `Request failed: ${err instanceof Error ? err.message : String(err)}`
19765
19779
  );
19766
19780
  }
19767
- function _nextCursorFromLinks2(body) {
19768
- const next = body.links?.next;
19769
- if (typeof next !== "string" || !next.includes("page[after]=")) return null;
19770
- return next.split("page[after]=")[1].split("&")[0];
19781
+ function _paginationFromBody2(body) {
19782
+ const raw = body.meta?.pagination ?? {};
19783
+ const out = {
19784
+ page: Number(raw.page ?? 0),
19785
+ size: Number(raw.size ?? 0)
19786
+ };
19787
+ if (raw.total !== void 0 && raw.total !== null) out.total = Number(raw.total);
19788
+ if (raw.total_pages !== void 0 && raw.total_pages !== null) {
19789
+ out.totalPages = Number(raw.total_pages);
19790
+ }
19791
+ return out;
19771
19792
  }
19772
19793
  function _httpToWire(http) {
19773
19794
  return {
@@ -19846,8 +19867,9 @@ var ForwardersClient = class {
19846
19867
  const query = {};
19847
19868
  if (params.forwarderType !== void 0) query["filter[forwarder_type]"] = params.forwarderType;
19848
19869
  if (params.enabled !== void 0) query["filter[enabled]"] = params.enabled;
19870
+ if (params.pageNumber !== void 0) query["page[number]"] = params.pageNumber;
19849
19871
  if (params.pageSize !== void 0) query["page[size]"] = params.pageSize;
19850
- if (params.pageAfter !== void 0) query["page[after]"] = params.pageAfter;
19872
+ if (params.metaTotal !== void 0) query["meta[total]"] = params.metaTotal;
19851
19873
  let data;
19852
19874
  try {
19853
19875
  const result = await this._http.GET("/api/v1/forwarders", {
@@ -19860,7 +19882,7 @@ var ForwardersClient = class {
19860
19882
  }
19861
19883
  return {
19862
19884
  forwarders: (data?.data ?? []).map(_forwarderFromResource),
19863
- nextCursor: _nextCursorFromLinks2(data ?? {})
19885
+ pagination: _paginationFromBody2(data ?? {})
19864
19886
  };
19865
19887
  }
19866
19888
  async get(forwarderId) {