@smplkit/sdk 3.0.48 → 3.0.50

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
@@ -2134,8 +2134,18 @@ declare class ManagementConfigClient {
2134
2134
  description?: string;
2135
2135
  parent?: string | Config | null;
2136
2136
  }): Config;
2137
- /** List all configs. */
2138
- list(): Promise<Config[]>;
2137
+ /**
2138
+ * List configs.
2139
+ *
2140
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2141
+ * Omit both to fetch the first page; pass them through to walk further
2142
+ * pages. The wrapper does not loop on the customer's behalf — the
2143
+ * customer chooses how to paginate.
2144
+ */
2145
+ list(params?: {
2146
+ pageNumber?: number;
2147
+ pageSize?: number;
2148
+ }): Promise<Config[]>;
2139
2149
  /** Fetch a config by id. */
2140
2150
  get(id: string): Promise<Config>;
2141
2151
  /** Delete a config by id. */
@@ -2571,8 +2581,18 @@ declare class ManagementFlagsClient {
2571
2581
  }): JsonFlag;
2572
2582
  /** Fetch a flag by id. */
2573
2583
  get(id: string): Promise<Flag>;
2574
- /** List all flags. */
2575
- list(): Promise<Flag[]>;
2584
+ /**
2585
+ * List flags.
2586
+ *
2587
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2588
+ * Omit both to fetch the first page; pass them through to walk further
2589
+ * pages. The wrapper does not loop on the customer's behalf — the
2590
+ * customer chooses how to paginate.
2591
+ */
2592
+ list(params?: {
2593
+ pageNumber?: number;
2594
+ pageSize?: number;
2595
+ }): Promise<Flag[]>;
2576
2596
  /** Delete a flag by id. */
2577
2597
  delete(id: string): Promise<void>;
2578
2598
  /** @internal — called by `Flag.delete()`. */
@@ -2839,7 +2859,18 @@ declare class LoggersClient {
2839
2859
  new(id: string, options?: {
2840
2860
  managed?: boolean;
2841
2861
  }): Logger;
2842
- list(): Promise<Logger[]>;
2862
+ /**
2863
+ * List loggers.
2864
+ *
2865
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2866
+ * Omit both to fetch the first page; pass them through to walk further
2867
+ * pages. The wrapper does not loop on the customer's behalf — the
2868
+ * customer chooses how to paginate.
2869
+ */
2870
+ list(params?: {
2871
+ pageNumber?: number;
2872
+ pageSize?: number;
2873
+ }): Promise<Logger[]>;
2843
2874
  get(id: string): Promise<Logger>;
2844
2875
  delete(id: string): Promise<void>;
2845
2876
  /** @internal — called by `Logger.delete()`. */
@@ -2867,7 +2898,18 @@ declare class LogGroupsClient {
2867
2898
  name?: string;
2868
2899
  group?: string;
2869
2900
  }): LogGroup;
2870
- list(): Promise<LogGroup[]>;
2901
+ /**
2902
+ * List log groups.
2903
+ *
2904
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2905
+ * Omit both to fetch the first page; pass them through to walk further
2906
+ * pages. The wrapper does not loop on the customer's behalf — the
2907
+ * customer chooses how to paginate.
2908
+ */
2909
+ list(params?: {
2910
+ pageNumber?: number;
2911
+ pageSize?: number;
2912
+ }): Promise<LogGroup[]>;
2871
2913
  get(id: string): Promise<LogGroup>;
2872
2914
  delete(id: string): Promise<void>;
2873
2915
  /** @internal — called by `LogGroup.delete()`. */
@@ -2938,7 +2980,18 @@ declare class EnvironmentsClient {
2938
2980
  color?: Color | string | null;
2939
2981
  classification?: EnvironmentClassification;
2940
2982
  }): Environment;
2941
- list(): Promise<Environment[]>;
2983
+ /**
2984
+ * List environments.
2985
+ *
2986
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2987
+ * Omit both to fetch the first page; pass them through to walk further
2988
+ * pages. The wrapper does not loop on the customer's behalf — the
2989
+ * customer chooses how to paginate.
2990
+ */
2991
+ list(params?: {
2992
+ pageNumber?: number;
2993
+ pageSize?: number;
2994
+ }): Promise<Environment[]>;
2942
2995
  get(id: string): Promise<Environment>;
2943
2996
  delete(id: string): Promise<void>;
2944
2997
  /** @internal */
@@ -2960,7 +3013,18 @@ declare class ContextTypesClient {
2960
3013
  name?: string;
2961
3014
  attributes?: Record<string, Record<string, any>>;
2962
3015
  }): ContextType;
2963
- list(): Promise<ContextType[]>;
3016
+ /**
3017
+ * List context types.
3018
+ *
3019
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
3020
+ * Omit both to fetch the first page; pass them through to walk further
3021
+ * pages. The wrapper does not loop on the customer's behalf — the
3022
+ * customer chooses how to paginate.
3023
+ */
3024
+ list(params?: {
3025
+ pageNumber?: number;
3026
+ pageSize?: number;
3027
+ }): Promise<ContextType[]>;
2964
3028
  get(id: string): Promise<ContextType>;
2965
3029
  delete(id: string): Promise<void>;
2966
3030
  /** @internal */
@@ -3006,8 +3070,18 @@ declare class ContextsClient {
3006
3070
  flush(): Promise<void>;
3007
3071
  /** Number of contexts awaiting flush. */
3008
3072
  get pendingCount(): number;
3009
- /** List all contexts of a given type. */
3010
- list(type: string): Promise<Context[]>;
3073
+ /**
3074
+ * List contexts of a given type.
3075
+ *
3076
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
3077
+ * Omit both to fetch the first page; pass them through to walk further
3078
+ * pages. The wrapper does not loop on the customer's behalf — the
3079
+ * customer chooses how to paginate.
3080
+ */
3081
+ list(type: string, params?: {
3082
+ pageNumber?: number;
3083
+ pageSize?: number;
3084
+ }): Promise<Context[]>;
3011
3085
  /** Fetch a context by composite id (`"type:key"`) or by separate type and key. */
3012
3086
  get(idOrType: string, key?: string): Promise<Context>;
3013
3087
  /** Delete a context by composite id (`"type:key"`) or by separate type and key. */
@@ -3200,6 +3274,10 @@ declare class ConfigClient {
3200
3274
  * (set via `_resolveManagement`) so runtime + management share one HTTP
3201
3275
  * client; falls back to a direct GET when running without `SmplClient`
3202
3276
  * bootstrap (e.g. unit tests that construct `ConfigClient` directly).
3277
+ *
3278
+ * Pages through the server until a short page (less than the requested
3279
+ * size) is returned — accounts with more than 1000 configs would
3280
+ * otherwise silently lose everything past page one.
3203
3281
  */
3204
3282
  private _listConfigs;
3205
3283
  /**
@@ -3285,8 +3363,10 @@ declare class LoggingClient {
3285
3363
  private _explicitAdapters;
3286
3364
  private _loggerBuffer;
3287
3365
  private _loggerFlushTimer;
3288
- private _loggerStore;
3289
- private _groupStore;
3366
+ private _loggersCache;
3367
+ private _groupsCache;
3368
+ private _resolvedLevelStore;
3369
+ private _knownLoggerNames;
3290
3370
  /** @internal */
3291
3371
  constructor(apiKey: string, ensureWs: () => SharedWebSocket, timeout?: number, baseUrl?: string, extraHeaders?: Record<string, string>);
3292
3372
  /**
@@ -3301,6 +3381,10 @@ declare class LoggingClient {
3301
3381
  * (set via `_resolveManagement`); falls back to a direct GET when running
3302
3382
  * without `SmplClient` bootstrap (e.g. unit tests that construct
3303
3383
  * `LoggingClient` directly).
3384
+ *
3385
+ * Pages through the server until a short page (less than the requested
3386
+ * size) is returned — accounts with more than 1000 loggers would
3387
+ * otherwise silently lose everything past page one.
3304
3388
  */
3305
3389
  private _listLoggers;
3306
3390
  /** @internal — see {@link _listLoggers}. */
@@ -3359,8 +3443,29 @@ declare class LoggingClient {
3359
3443
  _close(): void;
3360
3444
  /** Auto-load built-in adapters by attempting to require each framework. */
3361
3445
  private _autoLoadAdapters;
3362
- /** Apply resolved levels from server loggers to all adapters. */
3446
+ /**
3447
+ * Refresh resolved levels and apply them to adapter-known loggers.
3448
+ *
3449
+ * Computes a resolved level (via {@link resolveLevel}) for every entry
3450
+ * currently in `_loggersCache` *and* every adapter-known logger name —
3451
+ * even loggers whose own `level` is `null`, because they may inherit
3452
+ * via group chain or dot-notation ancestry.
3453
+ *
3454
+ * The full resolved-level snapshot is stored in `_resolvedLevelStore`
3455
+ * so callers can diff pre-vs-post and fire change listeners on actual
3456
+ * effective-level deltas (group-driven changes included). Adapter pushes
3457
+ * only happen for adapter-known names where `managed !== false`.
3458
+ * @internal
3459
+ */
3363
3460
  private _applyLevels;
3461
+ /** @internal Convert a server Logger list into the resolution cache. */
3462
+ private _buildLoggersCache;
3463
+ /** @internal Convert a server LogGroup list into the resolution cache. */
3464
+ private _buildGroupsCache;
3465
+ /** @internal */
3466
+ private _loggerToCacheEntry;
3467
+ /** @internal */
3468
+ private _groupToCacheEntry;
3364
3469
  /** Called by adapter hooks when a new logger is created in the framework. */
3365
3470
  private _onAdapterNewLogger;
3366
3471
  /** Flush buffered loggers to the bulk-register endpoint. */
@@ -3369,12 +3474,26 @@ declare class LoggingClient {
3369
3474
  private _handleLoggerDeleted;
3370
3475
  private _handleGroupChanged;
3371
3476
  private _handleGroupDeleted;
3477
+ /**
3478
+ * @internal Fire change listeners for every logger whose resolved level
3479
+ * changed between `pre` and `post`. Stores resolved levels, not raw
3480
+ * `logger.level`, so a group-driven change actually fires. Keys that
3481
+ * disappeared from `post` are emitted with `deleted: true`.
3482
+ */
3483
+ private _fireDeltas;
3484
+ /**
3485
+ * @internal Always emit a deleted event for `id` on global and per-key
3486
+ * listeners. Used by `logger_deleted` / `group_deleted` handlers to
3487
+ * preserve the explicit notification contract even when nothing in the
3488
+ * resolved-level store changed (e.g. server removed an unknown logger).
3489
+ */
3490
+ private _emitDeletedEvent;
3372
3491
  private _handleLoggersChanged;
3373
3492
  /**
3374
- * Full refetch of loggers + log_groups, apply resolved levels to
3375
- * adapters, diff against local stores and fire change listeners
3376
- * (global once, per-key for each changed id). Shared between the
3377
- * `loggers_changed` WS handler and the public `refresh()` method.
3493
+ * Full refetch of loggers + log_groups, rebuild the caches, re-resolve
3494
+ * every adapter-known logger, and fire change listeners on resolved-level
3495
+ * deltas. Shared between the `loggers_changed` WS handler and the
3496
+ * public `refresh()` method.
3378
3497
  * @internal
3379
3498
  */
3380
3499
  private _resolveAndFire;
package/dist/index.d.ts CHANGED
@@ -2134,8 +2134,18 @@ declare class ManagementConfigClient {
2134
2134
  description?: string;
2135
2135
  parent?: string | Config | null;
2136
2136
  }): Config;
2137
- /** List all configs. */
2138
- list(): Promise<Config[]>;
2137
+ /**
2138
+ * List configs.
2139
+ *
2140
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2141
+ * Omit both to fetch the first page; pass them through to walk further
2142
+ * pages. The wrapper does not loop on the customer's behalf — the
2143
+ * customer chooses how to paginate.
2144
+ */
2145
+ list(params?: {
2146
+ pageNumber?: number;
2147
+ pageSize?: number;
2148
+ }): Promise<Config[]>;
2139
2149
  /** Fetch a config by id. */
2140
2150
  get(id: string): Promise<Config>;
2141
2151
  /** Delete a config by id. */
@@ -2571,8 +2581,18 @@ declare class ManagementFlagsClient {
2571
2581
  }): JsonFlag;
2572
2582
  /** Fetch a flag by id. */
2573
2583
  get(id: string): Promise<Flag>;
2574
- /** List all flags. */
2575
- list(): Promise<Flag[]>;
2584
+ /**
2585
+ * List flags.
2586
+ *
2587
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2588
+ * Omit both to fetch the first page; pass them through to walk further
2589
+ * pages. The wrapper does not loop on the customer's behalf — the
2590
+ * customer chooses how to paginate.
2591
+ */
2592
+ list(params?: {
2593
+ pageNumber?: number;
2594
+ pageSize?: number;
2595
+ }): Promise<Flag[]>;
2576
2596
  /** Delete a flag by id. */
2577
2597
  delete(id: string): Promise<void>;
2578
2598
  /** @internal — called by `Flag.delete()`. */
@@ -2839,7 +2859,18 @@ declare class LoggersClient {
2839
2859
  new(id: string, options?: {
2840
2860
  managed?: boolean;
2841
2861
  }): Logger;
2842
- list(): Promise<Logger[]>;
2862
+ /**
2863
+ * List loggers.
2864
+ *
2865
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2866
+ * Omit both to fetch the first page; pass them through to walk further
2867
+ * pages. The wrapper does not loop on the customer's behalf — the
2868
+ * customer chooses how to paginate.
2869
+ */
2870
+ list(params?: {
2871
+ pageNumber?: number;
2872
+ pageSize?: number;
2873
+ }): Promise<Logger[]>;
2843
2874
  get(id: string): Promise<Logger>;
2844
2875
  delete(id: string): Promise<void>;
2845
2876
  /** @internal — called by `Logger.delete()`. */
@@ -2867,7 +2898,18 @@ declare class LogGroupsClient {
2867
2898
  name?: string;
2868
2899
  group?: string;
2869
2900
  }): LogGroup;
2870
- list(): Promise<LogGroup[]>;
2901
+ /**
2902
+ * List log groups.
2903
+ *
2904
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2905
+ * Omit both to fetch the first page; pass them through to walk further
2906
+ * pages. The wrapper does not loop on the customer's behalf — the
2907
+ * customer chooses how to paginate.
2908
+ */
2909
+ list(params?: {
2910
+ pageNumber?: number;
2911
+ pageSize?: number;
2912
+ }): Promise<LogGroup[]>;
2871
2913
  get(id: string): Promise<LogGroup>;
2872
2914
  delete(id: string): Promise<void>;
2873
2915
  /** @internal — called by `LogGroup.delete()`. */
@@ -2938,7 +2980,18 @@ declare class EnvironmentsClient {
2938
2980
  color?: Color | string | null;
2939
2981
  classification?: EnvironmentClassification;
2940
2982
  }): Environment;
2941
- list(): Promise<Environment[]>;
2983
+ /**
2984
+ * List environments.
2985
+ *
2986
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
2987
+ * Omit both to fetch the first page; pass them through to walk further
2988
+ * pages. The wrapper does not loop on the customer's behalf — the
2989
+ * customer chooses how to paginate.
2990
+ */
2991
+ list(params?: {
2992
+ pageNumber?: number;
2993
+ pageSize?: number;
2994
+ }): Promise<Environment[]>;
2942
2995
  get(id: string): Promise<Environment>;
2943
2996
  delete(id: string): Promise<void>;
2944
2997
  /** @internal */
@@ -2960,7 +3013,18 @@ declare class ContextTypesClient {
2960
3013
  name?: string;
2961
3014
  attributes?: Record<string, Record<string, any>>;
2962
3015
  }): ContextType;
2963
- list(): Promise<ContextType[]>;
3016
+ /**
3017
+ * List context types.
3018
+ *
3019
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
3020
+ * Omit both to fetch the first page; pass them through to walk further
3021
+ * pages. The wrapper does not loop on the customer's behalf — the
3022
+ * customer chooses how to paginate.
3023
+ */
3024
+ list(params?: {
3025
+ pageNumber?: number;
3026
+ pageSize?: number;
3027
+ }): Promise<ContextType[]>;
2964
3028
  get(id: string): Promise<ContextType>;
2965
3029
  delete(id: string): Promise<void>;
2966
3030
  /** @internal */
@@ -3006,8 +3070,18 @@ declare class ContextsClient {
3006
3070
  flush(): Promise<void>;
3007
3071
  /** Number of contexts awaiting flush. */
3008
3072
  get pendingCount(): number;
3009
- /** List all contexts of a given type. */
3010
- list(type: string): Promise<Context[]>;
3073
+ /**
3074
+ * List contexts of a given type.
3075
+ *
3076
+ * Server defaults are `pageNumber=1`, `pageSize=1000` (capped at 1000).
3077
+ * Omit both to fetch the first page; pass them through to walk further
3078
+ * pages. The wrapper does not loop on the customer's behalf — the
3079
+ * customer chooses how to paginate.
3080
+ */
3081
+ list(type: string, params?: {
3082
+ pageNumber?: number;
3083
+ pageSize?: number;
3084
+ }): Promise<Context[]>;
3011
3085
  /** Fetch a context by composite id (`"type:key"`) or by separate type and key. */
3012
3086
  get(idOrType: string, key?: string): Promise<Context>;
3013
3087
  /** Delete a context by composite id (`"type:key"`) or by separate type and key. */
@@ -3200,6 +3274,10 @@ declare class ConfigClient {
3200
3274
  * (set via `_resolveManagement`) so runtime + management share one HTTP
3201
3275
  * client; falls back to a direct GET when running without `SmplClient`
3202
3276
  * bootstrap (e.g. unit tests that construct `ConfigClient` directly).
3277
+ *
3278
+ * Pages through the server until a short page (less than the requested
3279
+ * size) is returned — accounts with more than 1000 configs would
3280
+ * otherwise silently lose everything past page one.
3203
3281
  */
3204
3282
  private _listConfigs;
3205
3283
  /**
@@ -3285,8 +3363,10 @@ declare class LoggingClient {
3285
3363
  private _explicitAdapters;
3286
3364
  private _loggerBuffer;
3287
3365
  private _loggerFlushTimer;
3288
- private _loggerStore;
3289
- private _groupStore;
3366
+ private _loggersCache;
3367
+ private _groupsCache;
3368
+ private _resolvedLevelStore;
3369
+ private _knownLoggerNames;
3290
3370
  /** @internal */
3291
3371
  constructor(apiKey: string, ensureWs: () => SharedWebSocket, timeout?: number, baseUrl?: string, extraHeaders?: Record<string, string>);
3292
3372
  /**
@@ -3301,6 +3381,10 @@ declare class LoggingClient {
3301
3381
  * (set via `_resolveManagement`); falls back to a direct GET when running
3302
3382
  * without `SmplClient` bootstrap (e.g. unit tests that construct
3303
3383
  * `LoggingClient` directly).
3384
+ *
3385
+ * Pages through the server until a short page (less than the requested
3386
+ * size) is returned — accounts with more than 1000 loggers would
3387
+ * otherwise silently lose everything past page one.
3304
3388
  */
3305
3389
  private _listLoggers;
3306
3390
  /** @internal — see {@link _listLoggers}. */
@@ -3359,8 +3443,29 @@ declare class LoggingClient {
3359
3443
  _close(): void;
3360
3444
  /** Auto-load built-in adapters by attempting to require each framework. */
3361
3445
  private _autoLoadAdapters;
3362
- /** Apply resolved levels from server loggers to all adapters. */
3446
+ /**
3447
+ * Refresh resolved levels and apply them to adapter-known loggers.
3448
+ *
3449
+ * Computes a resolved level (via {@link resolveLevel}) for every entry
3450
+ * currently in `_loggersCache` *and* every adapter-known logger name —
3451
+ * even loggers whose own `level` is `null`, because they may inherit
3452
+ * via group chain or dot-notation ancestry.
3453
+ *
3454
+ * The full resolved-level snapshot is stored in `_resolvedLevelStore`
3455
+ * so callers can diff pre-vs-post and fire change listeners on actual
3456
+ * effective-level deltas (group-driven changes included). Adapter pushes
3457
+ * only happen for adapter-known names where `managed !== false`.
3458
+ * @internal
3459
+ */
3363
3460
  private _applyLevels;
3461
+ /** @internal Convert a server Logger list into the resolution cache. */
3462
+ private _buildLoggersCache;
3463
+ /** @internal Convert a server LogGroup list into the resolution cache. */
3464
+ private _buildGroupsCache;
3465
+ /** @internal */
3466
+ private _loggerToCacheEntry;
3467
+ /** @internal */
3468
+ private _groupToCacheEntry;
3364
3469
  /** Called by adapter hooks when a new logger is created in the framework. */
3365
3470
  private _onAdapterNewLogger;
3366
3471
  /** Flush buffered loggers to the bulk-register endpoint. */
@@ -3369,12 +3474,26 @@ declare class LoggingClient {
3369
3474
  private _handleLoggerDeleted;
3370
3475
  private _handleGroupChanged;
3371
3476
  private _handleGroupDeleted;
3477
+ /**
3478
+ * @internal Fire change listeners for every logger whose resolved level
3479
+ * changed between `pre` and `post`. Stores resolved levels, not raw
3480
+ * `logger.level`, so a group-driven change actually fires. Keys that
3481
+ * disappeared from `post` are emitted with `deleted: true`.
3482
+ */
3483
+ private _fireDeltas;
3484
+ /**
3485
+ * @internal Always emit a deleted event for `id` on global and per-key
3486
+ * listeners. Used by `logger_deleted` / `group_deleted` handlers to
3487
+ * preserve the explicit notification contract even when nothing in the
3488
+ * resolved-level store changed (e.g. server removed an unknown logger).
3489
+ */
3490
+ private _emitDeletedEvent;
3372
3491
  private _handleLoggersChanged;
3373
3492
  /**
3374
- * Full refetch of loggers + log_groups, apply resolved levels to
3375
- * adapters, diff against local stores and fire change listeners
3376
- * (global once, per-key for each changed id). Shared between the
3377
- * `loggers_changed` WS handler and the public `refresh()` method.
3493
+ * Full refetch of loggers + log_groups, rebuild the caches, re-resolve
3494
+ * every adapter-known logger, and fire change listeners on resolved-level
3495
+ * deltas. Shared between the `loggers_changed` WS handler and the
3496
+ * public `refresh()` method.
3378
3497
  * @internal
3379
3498
  */
3380
3499
  private _resolveAndFire;