celitech-sdk 1.3.60 → 1.3.63

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.ts CHANGED
@@ -1,81 +1,221 @@
1
1
  import { ZodType, z } from 'zod';
2
2
 
3
+ /**
4
+ * Available API environments with their base URLs.
5
+ * Use these constants to configure the SDK for different environments (production, staging, etc.).
6
+ */
3
7
  declare enum Environment {
8
+ /** DEFAULT environment base URL */
4
9
  DEFAULT = "https://api.celitech.net/v1"
5
10
  }
6
11
 
7
- type HttpMethod$1 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
12
+ /**
13
+ * Standard HTTP methods supported by the SDK.
14
+ */
15
+ type HttpMethod$1 = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
16
+ /**
17
+ * Represents an HTTP request with all its components.
18
+ */
8
19
  interface HttpRequest {
20
+ /** Base URL of the API endpoint */
9
21
  baseUrl: string;
22
+ /** HTTP method for the request */
10
23
  method: HttpMethod$1;
24
+ /** Request path (relative to base URL) */
11
25
  path: string;
26
+ /** Request headers as key-value pairs */
12
27
  headers: Map<string, unknown>;
28
+ /** Request body payload (optional) */
13
29
  body?: BodyInit;
30
+ /** Signal to abort the request (optional) */
14
31
  abortSignal?: AbortSignal;
32
+ /** Query string parameters */
15
33
  queryParams: Map<string, unknown>;
34
+ /** Path parameters for URL templating */
16
35
  pathParams: Map<string, unknown>;
17
36
  }
37
+ /**
38
+ * Metadata about an HTTP response.
39
+ */
18
40
  interface HttpMetadata$1 {
41
+ /** HTTP status code */
19
42
  status: number;
43
+ /** HTTP status text message */
20
44
  statusText: string;
45
+ /** Response headers as key-value pairs */
21
46
  headers: Record<string, string>;
22
47
  }
48
+ /**
49
+ * Represents an HTTP response with typed data.
50
+ * @template T - The type of the response data
51
+ */
23
52
  interface HttpResponse$1<T> {
53
+ /** Parsed response data (optional) */
24
54
  data?: T;
55
+ /** Response metadata (status, headers, etc.) */
25
56
  metadata: HttpMetadata$1;
57
+ /** Raw response object from the HTTP client */
26
58
  raw: ArrayBuffer;
27
59
  }
60
+ /**
61
+ * Represents an HTTP error response.
62
+ */
28
63
  interface HttpError$1 {
64
+ /** Error message or description */
29
65
  error: string;
66
+ /** Response metadata (status, headers, etc.) */
30
67
  metadata: HttpMetadata$1;
31
68
  }
69
+ /**
70
+ * Hook interface for intercepting and modifying HTTP requests and responses.
71
+ * Allows custom logic to be executed at different stages of the request lifecycle.
72
+ */
32
73
  interface Hook {
74
+ /**
75
+ * Called before an HTTP request is sent.
76
+ * Allows modification of the request before execution.
77
+ * @param request - The HTTP request to be sent
78
+ * @param params - Additional custom parameters
79
+ * @returns A promise that resolves to the potentially modified request
80
+ */
33
81
  beforeRequest(request: HttpRequest, params: Map<string, string>): Promise<HttpRequest>;
82
+ /**
83
+ * Called after a successful HTTP response is received.
84
+ * Allows processing or modification of the response.
85
+ * @param request - The original HTTP request
86
+ * @param response - The HTTP response received
87
+ * @param params - Additional custom parameters
88
+ * @returns A promise that resolves to the potentially modified response
89
+ */
34
90
  afterResponse(request: HttpRequest, response: HttpResponse$1<any>, params: Map<string, string>): Promise<HttpResponse$1<any>>;
91
+ /**
92
+ * Called when an HTTP request results in an error.
93
+ * Allows custom error handling and transformation.
94
+ * @param request - The original HTTP request
95
+ * @param response - The error response received
96
+ * @param params - Additional custom parameters
97
+ * @returns A promise that resolves to an error object
98
+ */
35
99
  onError(request: HttpRequest, response: HttpResponse$1<any>, params: Map<string, string>): Promise<HttpError$1>;
36
100
  }
37
101
 
102
+ /**
103
+ * OpenAPI parameter serialization styles.
104
+ * Defines how parameters should be formatted in the request.
105
+ */
38
106
  declare enum SerializationStyle {
107
+ /** Simple comma-separated values (e.g., "3,4,5") */
39
108
  SIMPLE = "simple",
109
+ /** Label prefix with dot notation (e.g., ".3.4.5") */
40
110
  LABEL = "label",
111
+ /** Matrix semicolon-prefixed (e.g., ";id=3;id=4") */
41
112
  MATRIX = "matrix",
113
+ /** Form-style ampersand-separated (e.g., "id=3&id=4") */
42
114
  FORM = "form",
115
+ /** Space-delimited values (e.g., "id=3 4 5") */
43
116
  SPACE_DELIMITED = "space_delimited",
117
+ /** Pipe-delimited values (e.g., "id=3|4|5") */
44
118
  PIPE_DELIMITED = "pipe_delimited",
119
+ /** Deep object notation (e.g., "id[role]=admin") */
45
120
  DEEP_OBJECT = "deep_object",
121
+ /** No specific style applied */
46
122
  NONE = "none"
47
123
  }
48
124
 
125
+ /**
126
+ * Represents an OAuth 2.0 access token with its associated metadata.
127
+ * Stores the token, granted scopes, and expiration time.
128
+ */
49
129
  declare class OAuthToken {
50
130
  accessToken: string;
51
131
  scopes: Set<string>;
52
132
  expiresAt: number | null;
133
+ /**
134
+ * Creates a new OAuth token.
135
+ * @param accessToken - The access token string
136
+ * @param scopes - Set of OAuth scopes granted to this token
137
+ * @param expiresAt - Timestamp when the token expires (milliseconds since epoch), or null if no expiration
138
+ */
53
139
  constructor(accessToken: string, scopes: Set<string>, expiresAt: number | null);
140
+ /**
141
+ * Checks if this token has all the required scopes.
142
+ * @param scopes - Set of scopes to check for
143
+ * @returns True if the token has all required scopes, false otherwise
144
+ */
54
145
  hasAllScopes(scopes: Set<string>): boolean;
55
146
  }
147
+ /**
148
+ * Manages OAuth 2.0 access tokens for the SDK.
149
+ * Handles token retrieval, caching, and automatic refresh when tokens expire.
150
+ * Implements a singleton pattern to share tokens across the SDK.
151
+ */
56
152
  declare class OAuthTokenManager {
153
+ /** Singleton instance of the token manager */
57
154
  private static instance;
155
+ /** Currently cached OAuth token */
58
156
  private token?;
157
+ /**
158
+ * Gets a valid access token for the specified scopes.
159
+ * Returns a cached token if available and not expired, otherwise requests a new one.
160
+ * @param scopes - Set of OAuth scopes required for the token
161
+ * @param config - SDK configuration containing client credentials
162
+ * @returns A promise that resolves to a valid OAuth token
163
+ * @throws Error if client credentials are missing or token request fails
164
+ */
59
165
  getToken(scopes: Set<string>, config: SdkConfig): Promise<OAuthToken>;
60
166
  }
61
167
 
168
+ /**
169
+ * Error class that can be thrown explicitly via a throw() method.
170
+ * Extends the built-in Error class with a convenience method for throwing.
171
+ */
62
172
  declare class ThrowableError extends Error {
63
173
  message: string;
64
174
  protected response?: unknown;
175
+ /**
176
+ * Creates a new throwable error.
177
+ * @param message - The error message
178
+ * @param response - Optional response data associated with the error
179
+ */
65
180
  constructor(message: string, response?: unknown);
181
+ /**
182
+ * Throws this error instance.
183
+ * Convenience method for explicitly throwing the error.
184
+ * @throws This error instance
185
+ */
66
186
  throw(): void;
67
187
  }
68
188
 
189
+ /**
190
+ * Defines an expected response format with schema validation.
191
+ * Used to match and validate responses based on content type and status code.
192
+ */
69
193
  interface ResponseDefinition {
194
+ /** Zod schema for validating the response body */
70
195
  schema: ZodType;
196
+ /** The content type of this response (e.g., 'application/json') */
71
197
  contentType: ContentType;
198
+ /** The HTTP status code this definition applies to */
72
199
  status: number;
73
200
  }
201
+ /**
202
+ * Defines an error response format with custom error class.
203
+ * Used to throw typed errors based on content type and status code.
204
+ */
74
205
  interface ErrorDefinition {
206
+ /** Constructor for the error class to instantiate */
75
207
  error: new (...args: any[]) => ThrowableError;
208
+ /** The content type of this error response */
76
209
  contentType: ContentType;
210
+ /** The HTTP status code this error applies to */
77
211
  status: number;
78
212
  }
213
+ /**
214
+ * Parameters required to create a Request instance.
215
+ * Contains all configuration needed for HTTP execution, validation, and error handling.
216
+ *
217
+ * @template Page - The type of paginated data items
218
+ */
79
219
  interface CreateRequestParameters<Page = unknown[]> {
80
220
  baseUrl: string;
81
221
  method: HttpMethod;
@@ -83,6 +223,7 @@ interface CreateRequestParameters<Page = unknown[]> {
83
223
  headers: Map<string, RequestParameter>;
84
224
  queryParams: Map<string, RequestParameter>;
85
225
  pathParams: Map<string, RequestParameter>;
226
+ cookies: Map<string, RequestParameter>;
86
227
  path: string;
87
228
  config: SdkConfig;
88
229
  responses: ResponseDefinition[];
@@ -91,32 +232,78 @@ interface CreateRequestParameters<Page = unknown[]> {
91
232
  requestContentType: ContentType;
92
233
  validation: ValidationOptions;
93
234
  retry: RetryOptions;
94
- pagination?: RequestPagination<Page>;
235
+ pagination?: RequestPagination<Page> | RequestCursorPagination<Page>;
95
236
  filename?: string;
96
237
  filenames?: string[];
97
238
  scopes?: Set<string>;
98
239
  tokenManager: OAuthTokenManager;
99
240
  }
241
+ /**
242
+ * Represents a request parameter with serialization metadata.
243
+ * Wraps a value with OpenAPI serialization instructions for proper encoding.
244
+ */
100
245
  interface RequestParameter {
246
+ /** The parameter name (may be undefined for path substitution) */
101
247
  key: string | undefined;
248
+ /** The actual parameter value */
102
249
  value: unknown;
250
+ /** Whether to explode arrays/objects into multiple parameters */
103
251
  explode: boolean;
252
+ /** Whether to URL-encode the value */
104
253
  encode: boolean;
254
+ /** The OpenAPI serialization style (e.g., SIMPLE, FORM, MATRIX) */
105
255
  style: SerializationStyle;
256
+ /** Whether this parameter is a pagination limit */
106
257
  isLimit: boolean;
258
+ /** Whether this parameter is a pagination offset */
107
259
  isOffset: boolean;
260
+ /** Whether this parameter is a pagination cursor */
261
+ isCursor: boolean;
108
262
  }
263
+ /**
264
+ * Configuration for limit-offset pagination.
265
+ * Used for traditional page-based pagination with size and offset.
266
+ *
267
+ * @template Page - The type of page data
268
+ */
109
269
  interface RequestPagination<Page> {
110
- pageSize: number;
270
+ /** The number of items per page */
271
+ pageSize?: number;
272
+ /** JSON path to extract page data from response */
111
273
  pagePath: string[];
274
+ /** Zod schema for validating page data */
112
275
  pageSchema?: ZodType<Page, any, any>;
113
276
  }
277
+ /**
278
+ * Configuration for cursor-based pagination.
279
+ * Used for stateless pagination with cursor tokens.
280
+ *
281
+ * @template Page - The type of page data
282
+ */
283
+ interface RequestCursorPagination<Page> {
284
+ /** JSON path to extract page data from response */
285
+ pagePath: string[];
286
+ /** Zod schema for validating page data */
287
+ pageSchema?: ZodType<Page, any, any>;
288
+ /** JSON path to extract next cursor from response */
289
+ cursorPath: string[];
290
+ /** Zod schema for validating cursor value */
291
+ cursorSchema?: ZodType<string | null | undefined>;
292
+ }
114
293
 
294
+ /**
295
+ * Represents an HTTP request with all necessary configuration and parameters.
296
+ * Handles path/query/header/cookie serialization, pagination, validation, and retry logic.
297
+ * This is the core request object passed through the handler chain for execution.
298
+ *
299
+ * @template PageSchema - The type of paginated data returned by this request
300
+ */
115
301
  declare class Request<PageSchema = unknown[]> {
116
302
  baseUrl: string;
117
303
  headers: Map<string, RequestParameter>;
118
304
  queryParams: Map<string, RequestParameter>;
119
305
  pathParams: Map<string, RequestParameter>;
306
+ cookies: Map<string, RequestParameter>;
120
307
  body?: any;
121
308
  method: HttpMethod;
122
309
  path: string;
@@ -127,28 +314,95 @@ declare class Request<PageSchema = unknown[]> {
127
314
  requestContentType: ContentType;
128
315
  validation: ValidationOptions;
129
316
  retry: RetryOptions;
130
- pagination?: RequestPagination<PageSchema>;
317
+ pagination?: RequestPagination<PageSchema> | RequestCursorPagination<PageSchema>;
131
318
  filename?: string;
132
319
  filenames?: string[];
133
320
  scopes?: Set<string>;
134
321
  tokenManager: OAuthTokenManager;
135
322
  private readonly pathPattern;
136
323
  constructor(params: CreateRequestParameters<PageSchema>);
324
+ /**
325
+ * Adds a header parameter to the request with OpenAPI serialization rules.
326
+ *
327
+ * @param key - The header name
328
+ * @param param - The parameter configuration including value, style, and encoding options
329
+ */
137
330
  addHeaderParam(key: string, param: RequestParameter): void;
331
+ /**
332
+ * Adds a query parameter to the request with OpenAPI serialization rules.
333
+ *
334
+ * @param key - The query parameter name
335
+ * @param param - The parameter configuration including value, style, and encoding options
336
+ */
138
337
  addQueryParam(key: string, param: RequestParameter): void;
338
+ /**
339
+ * Adds a path parameter to the request with OpenAPI serialization rules.
340
+ *
341
+ * @param key - The path parameter name (matches template variable in path pattern)
342
+ * @param param - The parameter configuration including value, style, and encoding options
343
+ */
139
344
  addPathParam(key: string, param: RequestParameter): void;
345
+ /**
346
+ * Sets the request body if the value is defined.
347
+ *
348
+ * @param body - The request body to send
349
+ */
140
350
  addBody(body: any): void;
351
+ /**
352
+ * Updates this request from a modified hook request.
353
+ * Used after hooks modify the request to sync changes back to the internal Request object.
354
+ *
355
+ * @param hookRequest - The modified request from hook processing
356
+ */
141
357
  updateFromHookRequest(hookRequest: HttpRequest): void;
358
+ /**
359
+ * Constructs the complete URL by combining base URL, path with substituted parameters,
360
+ * and serialized query string.
361
+ *
362
+ * @returns The fully constructed URL ready for HTTP execution
363
+ */
142
364
  constructFullUrl(): string;
365
+ /**
366
+ * Creates a copy of this request with optional parameter overrides.
367
+ * Useful for pagination where you need to modify parameters while keeping the rest intact.
368
+ *
369
+ * @param overrides - Optional parameters to override in the copied request
370
+ * @returns A new Request instance with the specified overrides
371
+ */
143
372
  copy(overrides?: Partial<CreateRequestParameters>): Request<unknown[]>;
373
+ /**
374
+ * Serializes headers to a format suitable for HTTP execution.
375
+ *
376
+ * @returns Serialized headers as HeadersInit, or undefined if no headers
377
+ */
144
378
  getHeaders(): HeadersInit | undefined;
145
- nextPage(): void;
379
+ /**
380
+ * Serializes cookies to a format suitable for HTTP execution.
381
+ *
382
+ * @returns Serialized cookies as a record, or undefined if no cookies
383
+ */
384
+ getCookies(): Record<string, string> | undefined;
385
+ /**
386
+ * Advances pagination parameters to fetch the next page.
387
+ * Handles both cursor-based and limit-offset pagination strategies.
388
+ *
389
+ * @param cursor - The cursor value for cursor-based pagination (optional for limit-offset)
390
+ */
391
+ nextPage(cursor?: string): void;
146
392
  private constructPath;
147
393
  private getOffsetParam;
394
+ private getCursorParam;
148
395
  private getAllParams;
149
396
  }
150
397
 
151
- type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
398
+ /**
399
+ * Standard HTTP methods supported by the SDK.
400
+ */
401
+ type HttpMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
402
+ /**
403
+ * SDK configuration interface.
404
+ * Contains all settings required to initialize and configure the SDK.
405
+ */
152
406
  interface BaseConfig {
153
407
  retry?: RetryOptions;
154
408
  validation?: ValidationOptions;
@@ -168,27 +422,72 @@ interface TokenAuthConfig extends BaseConfig {
168
422
  accessToken: string;
169
423
  }
170
424
  type SdkConfig = ClientCredentialAuthConfig | TokenAuthConfig;
425
+ /**
426
+ * Metadata about an HTTP response.
427
+ * Contains status information and headers from the server response.
428
+ */
171
429
  interface HttpMetadata {
430
+ /** HTTP status code (e.g., 200, 404, 500) */
172
431
  status: number;
432
+ /** HTTP status text message (e.g., "OK", "Not Found") */
173
433
  statusText: string;
434
+ /** Response headers as key-value pairs */
174
435
  headers: Record<string, string>;
175
436
  }
437
+ /**
438
+ * Standard HTTP response with typed data.
439
+ * @template T - The type of the response data
440
+ */
176
441
  interface HttpResponse<T = unknown> {
442
+ /** Parsed response data (optional) */
177
443
  data?: T;
444
+ /** Response metadata (status, headers, etc.) */
178
445
  metadata: HttpMetadata;
446
+ /** Raw response object from the HTTP client */
179
447
  raw: ArrayBuffer;
180
448
  }
449
+ /**
450
+ * HTTP response for paginated API endpoints.
451
+ * Marker interface extending HttpResponse for type safety with pagination.
452
+ * @template T - The type of a single page of data
453
+ */
454
+ interface PaginatedHttpResponse<T = unknown> extends HttpResponse<T> {
455
+ }
456
+ /**
457
+ * HTTP response for cursor-paginated API endpoints.
458
+ * Includes a cursor for fetching the next page of results.
459
+ * @template T - The type of a single page of data
460
+ */
461
+ interface CursorPaginatedHttpResponse<T = unknown> extends HttpResponse<T> {
462
+ /** Cursor string for fetching the next page, null if no more pages, undefined if not applicable */
463
+ nextCursor?: string | null;
464
+ }
465
+ /**
466
+ * Supported content types for HTTP requests and responses.
467
+ * Determines how the SDK serializes requests and parses responses.
468
+ */
181
469
  declare enum ContentType {
470
+ /** JSON format (application/json) */
182
471
  Json = "json",
472
+ /** XML format (application/xml, text/xml) */
183
473
  Xml = "xml",
474
+ /** PDF document (application/pdf) */
184
475
  Pdf = "pdf",
476
+ /** Image file (image/*) */
185
477
  Image = "image",
478
+ /** Generic file */
186
479
  File = "file",
480
+ /** Binary data (application/octet-stream) */
187
481
  Binary = "binary",
482
+ /** URL-encoded form data (application/x-www-form-urlencoded) */
188
483
  FormUrlEncoded = "form",
484
+ /** Plain text (text/plain) */
189
485
  Text = "text",
486
+ /** Multipart form data for file uploads (multipart/form-data) */
190
487
  MultipartFormData = "multipartFormData",
488
+ /** Server-sent events stream (text/event-stream) */
191
489
  EventStream = "eventStream",
490
+ /** No content (HTTP 204) */
192
491
  NoContent = "noContent"
193
492
  }
194
493
  interface RequestConfig {
@@ -204,34 +503,144 @@ interface ValidationOptions {
204
503
  responseValidation?: boolean;
205
504
  }
206
505
 
506
+ /**
507
+ * Error class for HTTP request failures.
508
+ * Captures error details including status, metadata, and the raw response.
509
+ */
207
510
  declare class HttpError extends Error {
511
+ /** Error message or status text */
208
512
  readonly error: string;
513
+ /** HTTP response metadata (status, headers, etc.) */
209
514
  readonly metadata: HttpMetadata;
515
+ /** Raw response object from the HTTP client */
210
516
  readonly raw?: ArrayBuffer;
517
+ /**
518
+ * Creates a new HTTP error.
519
+ * @param metadata - HTTP response metadata
520
+ * @param raw - Raw response object (optional)
521
+ * @param error - Custom error message (optional, defaults to status text)
522
+ */
211
523
  constructor(metadata: HttpMetadata, raw?: ArrayBuffer, error?: string);
212
524
  }
213
525
 
526
+ /**
527
+ * Default implementation of the Hook interface that provides pass-through behavior.
528
+ * This hook can be extended to add custom logic for request/response interception.
529
+ */
214
530
  declare class CustomHook implements Hook {
531
+ /**
532
+ * Called before an HTTP request is sent.
533
+ * Default implementation returns the request unchanged.
534
+ * @param request - The HTTP request to be sent
535
+ * @param params - Additional custom parameters
536
+ * @returns A promise that resolves to the unmodified request
537
+ */
215
538
  beforeRequest(request: HttpRequest, params: Map<string, string>): Promise<HttpRequest>;
539
+ /**
540
+ * Called after a successful HTTP response is received.
541
+ * Default implementation returns the response unchanged.
542
+ * @param request - The original HTTP request
543
+ * @param response - The HTTP response received
544
+ * @param params - Additional custom parameters
545
+ * @returns A promise that resolves to the unmodified response
546
+ */
216
547
  afterResponse(request: HttpRequest, response: HttpResponse$1<any>, params: Map<string, string>): Promise<HttpResponse$1<any>>;
548
+ /**
549
+ * Called when an HTTP request results in an error.
550
+ * Default implementation wraps the error response in an HttpError object.
551
+ * @param request - The original HTTP request
552
+ * @param response - The error response received
553
+ * @param params - Additional custom parameters
554
+ * @returns A promise that resolves to an HttpError object
555
+ */
217
556
  onError(request: HttpRequest, response: HttpResponse$1<any>, params: Map<string, string>): Promise<HttpError>;
218
557
  }
219
558
 
559
+ /**
560
+ * Core HTTP client for making API requests.
561
+ * Manages request/response handling through a chain of handlers for validation, retry, hooks, and more.
562
+ */
220
563
  declare class HttpClient {
221
564
  private config;
565
+ /** Chain of request handlers that process requests in sequence */
222
566
  private readonly requestHandlerChain;
567
+ /**
568
+ * Creates a new HTTP client with configured request handlers.
569
+ * @param config - SDK configuration including base URL and authentication
570
+ * @param hook - Optional custom hook for request/response interception
571
+ */
223
572
  constructor(config: SdkConfig, hook?: CustomHook);
573
+ /**
574
+ * Executes a standard HTTP request.
575
+ * @template T - The expected response data type
576
+ * @param request - The HTTP request to execute
577
+ * @returns A promise that resolves to the HTTP response
578
+ */
224
579
  call<T>(request: Request): Promise<HttpResponse<T>>;
580
+ /**
581
+ * Executes a streaming HTTP request that yields responses incrementally.
582
+ * @template T - The expected response data type for each chunk
583
+ * @param request - The HTTP request to execute
584
+ * @returns An async generator that yields HTTP responses
585
+ */
225
586
  stream<T>(request: Request): AsyncGenerator<HttpResponse<T>>;
226
- callPaginated<FullResponse, Page>(request: Request<Page>): Promise<HttpResponse<Page>>;
587
+ /**
588
+ * Executes a paginated HTTP request and extracts the page data from the response.
589
+ * @template FullResponse - The complete response type from the API
590
+ * @template Page - The type of a single page of data
591
+ * @param request - The paginated HTTP request to execute
592
+ * @returns A promise that resolves to the paginated HTTP response
593
+ * @throws Error if the response contains no data to paginate through
594
+ */
595
+ callPaginated<FullResponse, Page>(request: Request<Page>): Promise<PaginatedHttpResponse<Page>>;
596
+ /**
597
+ * Executes a cursor-paginated HTTP request and extracts both page data and the next cursor.
598
+ * @template FullResponse - The complete response type from the API
599
+ * @template Page - The type of a single page of data
600
+ * @param request - The cursor-paginated HTTP request to execute
601
+ * @returns A promise that resolves to the cursor-paginated HTTP response with next cursor
602
+ * @throws Error if the response contains no data to paginate through
603
+ */
604
+ callCursorPaginated<FullResponse, Page>(request: Request<Page>): Promise<CursorPaginatedHttpResponse<Page>>;
605
+ /**
606
+ * Updates the base URL for all subsequent requests.
607
+ * @param url - The new base URL to use
608
+ */
227
609
  setBaseUrl(url: string): void;
610
+ /**
611
+ * Updates the SDK configuration.
612
+ * @param config - The new SDK configuration
613
+ */
228
614
  setConfig(config: SdkConfig): void;
615
+ /**
616
+ * Extracts page data from a full API response using the configured pagination path.
617
+ * @template FullResponse - The complete response type from the API
618
+ * @template Page - The type of a single page of data
619
+ * @param request - The request containing pagination configuration
620
+ * @param data - The full response data to extract the page from
621
+ * @returns The extracted and parsed page data
622
+ * @throws Error if pagination is not configured or page extraction fails
623
+ */
229
624
  private getPage;
625
+ /**
626
+ * Extracts the next cursor from a full API response for cursor-based pagination.
627
+ * @template FullResponse - The complete response type from the API
628
+ * @template Page - The type of a single page of data
629
+ * @param request - The request containing cursor pagination configuration
630
+ * @param data - The full response data to extract the cursor from
631
+ * @returns The next cursor string, null if no more pages, or undefined if not cursor pagination
632
+ */
633
+ private getNextCursor;
230
634
  }
231
635
 
636
+ /**
637
+ * Base service class that all API service classes extend.
638
+ * Provides common functionality including HTTP client management and configuration.
639
+ */
232
640
  declare class BaseService {
233
641
  config: SdkConfig;
234
642
  protected tokenManager: OAuthTokenManager;
643
+ /** The HTTP client instance used to make API requests */
235
644
  client: HttpClient;
236
645
  constructor(config: SdkConfig, tokenManager: OAuthTokenManager);
237
646
  set baseUrl(baseUrl: string);
@@ -244,7 +653,9 @@ declare class BaseService {
244
653
  }
245
654
 
246
655
  /**
247
- * The shape of the model inside the application code - what the users use
656
+ * Zod schema for the ListDestinationsOkResponse model.
657
+ * Defines the structure and validation rules for this data type.
658
+ * This is the shape used in application code - what developers interact with.
248
659
  */
249
660
  declare const listDestinationsOkResponse: z.ZodLazy<z.ZodObject<{
250
661
  destinations: z.ZodArray<z.ZodLazy<z.ZodObject<{
@@ -285,17 +696,24 @@ declare const listDestinationsOkResponse: z.ZodLazy<z.ZodObject<{
285
696
  */
286
697
  type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
287
698
 
699
+ /**
700
+ * Service class for DestinationsService operations.
701
+ * Provides methods to interact with DestinationsService-related API endpoints.
702
+ * All methods return promises and handle request/response serialization automatically.
703
+ */
288
704
  declare class DestinationsService extends BaseService {
289
705
  /**
290
706
  * List Destinations
291
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
292
- * @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} Successful Response
707
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
708
+ * @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} - Successful Response
293
709
  */
294
710
  listDestinations(requestConfig?: RequestConfig): Promise<HttpResponse<ListDestinationsOkResponse>>;
295
711
  }
296
712
 
297
713
  /**
298
- * The shape of the model inside the application code - what the users use
714
+ * Zod schema for the Destinations model.
715
+ * Defines the structure and validation rules for this data type.
716
+ * This is the shape used in application code - what developers interact with.
299
717
  */
300
718
  declare const destinations: z.ZodLazy<z.ZodObject<{
301
719
  name: z.ZodString;
@@ -324,7 +742,9 @@ declare const destinations: z.ZodLazy<z.ZodObject<{
324
742
  type Destinations = z.infer<typeof destinations>;
325
743
 
326
744
  /**
327
- * The shape of the model inside the application code - what the users use
745
+ * Zod schema for the ListPackagesOkResponse model.
746
+ * Defines the structure and validation rules for this data type.
747
+ * This is the shape used in application code - what developers interact with.
328
748
  */
329
749
  declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
330
750
  packages: z.ZodArray<z.ZodLazy<z.ZodObject<{
@@ -332,6 +752,7 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
332
752
  destination: z.ZodString;
333
753
  destinationIso2: z.ZodString;
334
754
  dataLimitInBytes: z.ZodNumber;
755
+ dataLimitInGb: z.ZodNumber;
335
756
  minDays: z.ZodNumber;
336
757
  maxDays: z.ZodNumber;
337
758
  priceInCents: z.ZodNumber;
@@ -340,6 +761,7 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
340
761
  destinationIso2: string;
341
762
  id: string;
342
763
  dataLimitInBytes: number;
764
+ dataLimitInGb: number;
343
765
  minDays: number;
344
766
  maxDays: number;
345
767
  priceInCents: number;
@@ -348,6 +770,7 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
348
770
  destinationIso2: string;
349
771
  id: string;
350
772
  dataLimitInBytes: number;
773
+ dataLimitInGb: number;
351
774
  minDays: number;
352
775
  maxDays: number;
353
776
  priceInCents: number;
@@ -359,6 +782,7 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
359
782
  destinationIso2: string;
360
783
  id: string;
361
784
  dataLimitInBytes: number;
785
+ dataLimitInGb: number;
362
786
  minDays: number;
363
787
  maxDays: number;
364
788
  priceInCents: number;
@@ -370,6 +794,7 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
370
794
  destinationIso2: string;
371
795
  id: string;
372
796
  dataLimitInBytes: number;
797
+ dataLimitInGb: number;
373
798
  minDays: number;
374
799
  maxDays: number;
375
800
  priceInCents: number;
@@ -392,9 +817,13 @@ interface ListPackagesParams {
392
817
  limit?: number;
393
818
  startTime?: number;
394
819
  endTime?: number;
395
- duration?: number;
396
820
  }
397
821
 
822
+ /**
823
+ * Service class for PackagesService operations.
824
+ * Provides methods to interact with PackagesService-related API endpoints.
825
+ * All methods return promises and handle request/response serialization automatically.
826
+ */
398
827
  declare class PackagesService extends BaseService {
399
828
  /**
400
829
  * List Packages
@@ -405,21 +834,23 @@ declare class PackagesService extends BaseService {
405
834
  * @param {number} [params.limit] - Maximum number of packages to be returned in the response. The value must be greater than 0 and less than or equal to 160. If not provided, the default value is 20
406
835
  * @param {number} [params.startTime] - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months
407
836
  * @param {number} [params.endTime] - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time
408
- * @param {number} [params.duration] - Duration in seconds for the package's validity. If this parameter is present, it will override the startTime and endTime parameters. The maximum duration for a package's validity period is 90 days
409
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
410
- * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
837
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
838
+ * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
411
839
  */
412
840
  listPackages(params?: ListPackagesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListPackagesOkResponse>>;
413
841
  }
414
842
 
415
843
  /**
416
- * The shape of the model inside the application code - what the users use
844
+ * Zod schema for the Packages model.
845
+ * Defines the structure and validation rules for this data type.
846
+ * This is the shape used in application code - what developers interact with.
417
847
  */
418
848
  declare const packages: z.ZodLazy<z.ZodObject<{
419
849
  id: z.ZodString;
420
850
  destination: z.ZodString;
421
851
  destinationIso2: z.ZodString;
422
852
  dataLimitInBytes: z.ZodNumber;
853
+ dataLimitInGb: z.ZodNumber;
423
854
  minDays: z.ZodNumber;
424
855
  maxDays: z.ZodNumber;
425
856
  priceInCents: z.ZodNumber;
@@ -428,6 +859,7 @@ declare const packages: z.ZodLazy<z.ZodObject<{
428
859
  destinationIso2: string;
429
860
  id: string;
430
861
  dataLimitInBytes: number;
862
+ dataLimitInGb: number;
431
863
  minDays: number;
432
864
  maxDays: number;
433
865
  priceInCents: number;
@@ -436,6 +868,7 @@ declare const packages: z.ZodLazy<z.ZodObject<{
436
868
  destinationIso2: string;
437
869
  id: string;
438
870
  dataLimitInBytes: number;
871
+ dataLimitInGb: number;
439
872
  minDays: number;
440
873
  maxDays: number;
441
874
  priceInCents: number;
@@ -447,6 +880,7 @@ declare const packages: z.ZodLazy<z.ZodObject<{
447
880
  * @property {string} - ISO3 representation of the package's destination.
448
881
  * @property {string} - ISO2 representation of the package's destination.
449
882
  * @property {number} - Size of the package in Bytes
883
+ * @property {number} - Size of the package in GB
450
884
  * @property {number} - Min number of days for the package
451
885
  * @property {number} - Max number of days for the package
452
886
  * @property {number} - Price of the package in cents
@@ -454,13 +888,16 @@ declare const packages: z.ZodLazy<z.ZodObject<{
454
888
  type Packages = z.infer<typeof packages>;
455
889
 
456
890
  /**
457
- * The shape of the model inside the application code - what the users use
891
+ * Zod schema for the CreatePurchaseV2Request model.
892
+ * Defines the structure and validation rules for this data type.
893
+ * This is the shape used in application code - what developers interact with.
458
894
  */
459
895
  declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
460
896
  destination: z.ZodString;
461
897
  dataLimitInGb: z.ZodNumber;
462
- startDate: z.ZodString;
463
- endDate: z.ZodString;
898
+ startDate: z.ZodOptional<z.ZodString>;
899
+ endDate: z.ZodOptional<z.ZodString>;
900
+ duration: z.ZodOptional<z.ZodNumber>;
464
901
  quantity: z.ZodNumber;
465
902
  email: z.ZodOptional<z.ZodString>;
466
903
  referenceId: z.ZodOptional<z.ZodString>;
@@ -468,20 +905,22 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
468
905
  emailBrand: z.ZodOptional<z.ZodString>;
469
906
  }, "strip", z.ZodTypeAny, {
470
907
  destination: string;
471
- startDate: string;
472
- endDate: string;
473
908
  dataLimitInGb: number;
474
909
  quantity: number;
910
+ startDate?: string | undefined;
911
+ endDate?: string | undefined;
912
+ duration?: number | undefined;
475
913
  email?: string | undefined;
476
914
  referenceId?: string | undefined;
477
915
  networkBrand?: string | undefined;
478
916
  emailBrand?: string | undefined;
479
917
  }, {
480
918
  destination: string;
481
- startDate: string;
482
- endDate: string;
483
919
  dataLimitInGb: number;
484
920
  quantity: number;
921
+ startDate?: string | undefined;
922
+ endDate?: string | undefined;
923
+ duration?: number | undefined;
485
924
  email?: string | undefined;
486
925
  referenceId?: string | undefined;
487
926
  networkBrand?: string | undefined;
@@ -491,19 +930,22 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
491
930
  *
492
931
  * @typedef {CreatePurchaseV2Request} createPurchaseV2Request
493
932
  * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
494
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
933
+ * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
495
934
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
496
935
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
936
+ * @property {number} - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.
497
937
  * @property {number} - Number of eSIMs to purchase.
498
938
  * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
499
939
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
500
- * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters and numbers. This feature is available to platforms with Diamond tier only.
940
+ * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only.
501
941
  * @property {string} - Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.
502
942
  */
503
943
  type CreatePurchaseV2Request = z.infer<typeof createPurchaseV2Request>;
504
944
 
505
945
  /**
506
- * The shape of the model inside the application code - what the users use
946
+ * Zod schema for the CreatePurchaseV2OkResponse model.
947
+ * Defines the structure and validation rules for this data type.
948
+ * This is the shape used in application code - what developers interact with.
507
949
  */
508
950
  declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
509
951
  purchase: z.ZodLazy<z.ZodObject<{
@@ -523,14 +965,20 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
523
965
  iccid: z.ZodString;
524
966
  activationCode: z.ZodString;
525
967
  manualActivationCode: z.ZodString;
968
+ iosActivationLink: z.ZodString;
969
+ androidActivationLink: z.ZodString;
526
970
  }, "strip", z.ZodTypeAny, {
527
971
  iccid: string;
528
972
  activationCode: string;
529
973
  manualActivationCode: string;
974
+ iosActivationLink: string;
975
+ androidActivationLink: string;
530
976
  }, {
531
977
  iccid: string;
532
978
  activationCode: string;
533
979
  manualActivationCode: string;
980
+ iosActivationLink: string;
981
+ androidActivationLink: string;
534
982
  }>>;
535
983
  }, "strip", z.ZodTypeAny, {
536
984
  purchase: {
@@ -542,6 +990,8 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
542
990
  iccid: string;
543
991
  activationCode: string;
544
992
  manualActivationCode: string;
993
+ iosActivationLink: string;
994
+ androidActivationLink: string;
545
995
  };
546
996
  }, {
547
997
  purchase: {
@@ -553,6 +1003,8 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
553
1003
  iccid: string;
554
1004
  activationCode: string;
555
1005
  manualActivationCode: string;
1006
+ iosActivationLink: string;
1007
+ androidActivationLink: string;
556
1008
  };
557
1009
  }>>;
558
1010
  /**
@@ -564,13 +1016,16 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
564
1016
  type CreatePurchaseV2OkResponse = z.infer<typeof createPurchaseV2OkResponse>;
565
1017
 
566
1018
  /**
567
- * The shape of the model inside the application code - what the users use
1019
+ * Zod schema for the ListPurchasesOkResponse model.
1020
+ * Defines the structure and validation rules for this data type.
1021
+ * This is the shape used in application code - what developers interact with.
568
1022
  */
569
1023
  declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
570
1024
  purchases: z.ZodArray<z.ZodLazy<z.ZodObject<{
571
1025
  id: z.ZodString;
572
1026
  startDate: z.ZodNullable<z.ZodString>;
573
1027
  endDate: z.ZodNullable<z.ZodString>;
1028
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
574
1029
  createdDate: z.ZodString;
575
1030
  startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
576
1031
  endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -578,6 +1033,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
578
1033
  package: z.ZodLazy<z.ZodObject<{
579
1034
  id: z.ZodString;
580
1035
  dataLimitInBytes: z.ZodNumber;
1036
+ dataLimitInGb: z.ZodNumber;
581
1037
  destination: z.ZodString;
582
1038
  destinationIso2: z.ZodString;
583
1039
  destinationName: z.ZodString;
@@ -587,6 +1043,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
587
1043
  destinationIso2: string;
588
1044
  id: string;
589
1045
  dataLimitInBytes: number;
1046
+ dataLimitInGb: number;
590
1047
  priceInCents: number;
591
1048
  destinationName: string;
592
1049
  }, {
@@ -594,6 +1051,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
594
1051
  destinationIso2: string;
595
1052
  id: string;
596
1053
  dataLimitInBytes: number;
1054
+ dataLimitInGb: number;
597
1055
  priceInCents: number;
598
1056
  destinationName: string;
599
1057
  }>>;
@@ -617,6 +1075,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
617
1075
  destinationIso2: string;
618
1076
  id: string;
619
1077
  dataLimitInBytes: number;
1078
+ dataLimitInGb: number;
620
1079
  priceInCents: number;
621
1080
  destinationName: string;
622
1081
  };
@@ -625,6 +1084,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
625
1084
  };
626
1085
  source: string;
627
1086
  purchaseType: string;
1087
+ duration?: number | null | undefined;
628
1088
  startTime?: number | null | undefined;
629
1089
  endTime?: number | null | undefined;
630
1090
  createdAt?: number | undefined;
@@ -639,6 +1099,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
639
1099
  destinationIso2: string;
640
1100
  id: string;
641
1101
  dataLimitInBytes: number;
1102
+ dataLimitInGb: number;
642
1103
  priceInCents: number;
643
1104
  destinationName: string;
644
1105
  };
@@ -647,6 +1108,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
647
1108
  };
648
1109
  source: string;
649
1110
  purchaseType: string;
1111
+ duration?: number | null | undefined;
650
1112
  startTime?: number | null | undefined;
651
1113
  endTime?: number | null | undefined;
652
1114
  createdAt?: number | undefined;
@@ -665,6 +1127,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
665
1127
  destinationIso2: string;
666
1128
  id: string;
667
1129
  dataLimitInBytes: number;
1130
+ dataLimitInGb: number;
668
1131
  priceInCents: number;
669
1132
  destinationName: string;
670
1133
  };
@@ -673,6 +1136,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
673
1136
  };
674
1137
  source: string;
675
1138
  purchaseType: string;
1139
+ duration?: number | null | undefined;
676
1140
  startTime?: number | null | undefined;
677
1141
  endTime?: number | null | undefined;
678
1142
  createdAt?: number | undefined;
@@ -690,6 +1154,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
690
1154
  destinationIso2: string;
691
1155
  id: string;
692
1156
  dataLimitInBytes: number;
1157
+ dataLimitInGb: number;
693
1158
  priceInCents: number;
694
1159
  destinationName: string;
695
1160
  };
@@ -698,6 +1163,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
698
1163
  };
699
1164
  source: string;
700
1165
  purchaseType: string;
1166
+ duration?: number | null | undefined;
701
1167
  startTime?: number | null | undefined;
702
1168
  endTime?: number | null | undefined;
703
1169
  createdAt?: number | undefined;
@@ -713,6 +1179,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
713
1179
  type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
714
1180
 
715
1181
  interface ListPurchasesParams {
1182
+ purchaseId?: string;
716
1183
  iccid?: string;
717
1184
  afterDate?: string;
718
1185
  beforeDate?: string;
@@ -722,11 +1189,12 @@ interface ListPurchasesParams {
722
1189
  limit?: number;
723
1190
  after?: number;
724
1191
  before?: number;
725
- purchaseId?: string;
726
1192
  }
727
1193
 
728
1194
  /**
729
- * The shape of the model inside the application code - what the users use
1195
+ * Zod schema for the CreatePurchaseRequest model.
1196
+ * Defines the structure and validation rules for this data type.
1197
+ * This is the shape used in application code - what developers interact with.
730
1198
  */
731
1199
  declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
732
1200
  destination: z.ZodString;
@@ -741,9 +1209,9 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
741
1209
  endTime: z.ZodOptional<z.ZodNumber>;
742
1210
  }, "strip", z.ZodTypeAny, {
743
1211
  destination: string;
1212
+ dataLimitInGb: number;
744
1213
  startDate: string;
745
1214
  endDate: string;
746
- dataLimitInGb: number;
747
1215
  email?: string | undefined;
748
1216
  referenceId?: string | undefined;
749
1217
  networkBrand?: string | undefined;
@@ -752,9 +1220,9 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
752
1220
  endTime?: number | undefined;
753
1221
  }, {
754
1222
  destination: string;
1223
+ dataLimitInGb: number;
755
1224
  startDate: string;
756
1225
  endDate: string;
757
- dataLimitInGb: number;
758
1226
  email?: string | undefined;
759
1227
  referenceId?: string | undefined;
760
1228
  networkBrand?: string | undefined;
@@ -766,12 +1234,12 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
766
1234
  *
767
1235
  * @typedef {CreatePurchaseRequest} createPurchaseRequest
768
1236
  * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
769
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
1237
+ * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
770
1238
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
771
1239
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
772
1240
  * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
773
1241
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
774
- * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters and numbers. This feature is available to platforms with Diamond tier only.
1242
+ * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only.
775
1243
  * @property {string} - Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.
776
1244
  * @property {number} - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
777
1245
  * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
@@ -779,7 +1247,9 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
779
1247
  type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
780
1248
 
781
1249
  /**
782
- * The shape of the model inside the application code - what the users use
1250
+ * Zod schema for the CreatePurchaseOkResponse model.
1251
+ * Defines the structure and validation rules for this data type.
1252
+ * This is the shape used in application code - what developers interact with.
783
1253
  */
784
1254
  declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
785
1255
  purchase: z.ZodLazy<z.ZodObject<{
@@ -860,33 +1330,38 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
860
1330
  type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
861
1331
 
862
1332
  /**
863
- * The shape of the model inside the application code - what the users use
1333
+ * Zod schema for the TopUpEsimRequest model.
1334
+ * Defines the structure and validation rules for this data type.
1335
+ * This is the shape used in application code - what developers interact with.
864
1336
  */
865
1337
  declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
866
1338
  iccid: z.ZodString;
867
1339
  dataLimitInGb: z.ZodNumber;
868
- startDate: z.ZodString;
869
- endDate: z.ZodString;
1340
+ startDate: z.ZodOptional<z.ZodString>;
1341
+ endDate: z.ZodOptional<z.ZodString>;
1342
+ duration: z.ZodOptional<z.ZodNumber>;
870
1343
  email: z.ZodOptional<z.ZodString>;
871
1344
  referenceId: z.ZodOptional<z.ZodString>;
872
1345
  emailBrand: z.ZodOptional<z.ZodString>;
873
1346
  startTime: z.ZodOptional<z.ZodNumber>;
874
1347
  endTime: z.ZodOptional<z.ZodNumber>;
875
1348
  }, "strip", z.ZodTypeAny, {
876
- startDate: string;
877
- endDate: string;
878
1349
  dataLimitInGb: number;
879
1350
  iccid: string;
1351
+ startDate?: string | undefined;
1352
+ endDate?: string | undefined;
1353
+ duration?: number | undefined;
880
1354
  email?: string | undefined;
881
1355
  referenceId?: string | undefined;
882
1356
  emailBrand?: string | undefined;
883
1357
  startTime?: number | undefined;
884
1358
  endTime?: number | undefined;
885
1359
  }, {
886
- startDate: string;
887
- endDate: string;
888
1360
  dataLimitInGb: number;
889
1361
  iccid: string;
1362
+ startDate?: string | undefined;
1363
+ endDate?: string | undefined;
1364
+ duration?: number | undefined;
890
1365
  email?: string | undefined;
891
1366
  referenceId?: string | undefined;
892
1367
  emailBrand?: string | undefined;
@@ -897,9 +1372,10 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
897
1372
  *
898
1373
  * @typedef {TopUpEsimRequest} topUpEsimRequest
899
1374
  * @property {string} - ID of the eSIM
900
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
1375
+ * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
901
1376
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
902
1377
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
1378
+ * @property {number} - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.
903
1379
  * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
904
1380
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
905
1381
  * @property {string} - Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.
@@ -909,7 +1385,9 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
909
1385
  type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
910
1386
 
911
1387
  /**
912
- * The shape of the model inside the application code - what the users use
1388
+ * Zod schema for the TopUpEsimOkResponse model.
1389
+ * Defines the structure and validation rules for this data type.
1390
+ * This is the shape used in application code - what developers interact with.
913
1391
  */
914
1392
  declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
915
1393
  purchase: z.ZodLazy<z.ZodObject<{
@@ -980,7 +1458,9 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
980
1458
  type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
981
1459
 
982
1460
  /**
983
- * The shape of the model inside the application code - what the users use
1461
+ * Zod schema for the EditPurchaseRequest model.
1462
+ * Defines the structure and validation rules for this data type.
1463
+ * This is the shape used in application code - what developers interact with.
984
1464
  */
985
1465
  declare const editPurchaseRequest: z.ZodLazy<z.ZodObject<{
986
1466
  purchaseId: z.ZodString;
@@ -1013,7 +1493,9 @@ declare const editPurchaseRequest: z.ZodLazy<z.ZodObject<{
1013
1493
  type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
1014
1494
 
1015
1495
  /**
1016
- * The shape of the model inside the application code - what the users use
1496
+ * Zod schema for the EditPurchaseOkResponse model.
1497
+ * Defines the structure and validation rules for this data type.
1498
+ * This is the shape used in application code - what developers interact with.
1017
1499
  */
1018
1500
  declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
1019
1501
  purchaseId: z.ZodString;
@@ -1046,35 +1528,47 @@ declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
1046
1528
  type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
1047
1529
 
1048
1530
  /**
1049
- * The shape of the model inside the application code - what the users use
1531
+ * Zod schema for the GetPurchaseConsumptionOkResponse model.
1532
+ * Defines the structure and validation rules for this data type.
1533
+ * This is the shape used in application code - what developers interact with.
1050
1534
  */
1051
1535
  declare const getPurchaseConsumptionOkResponse: z.ZodLazy<z.ZodObject<{
1052
1536
  dataUsageRemainingInBytes: z.ZodNumber;
1537
+ dataUsageRemainingInGb: z.ZodNumber;
1053
1538
  status: z.ZodString;
1054
1539
  }, "strip", z.ZodTypeAny, {
1055
1540
  status: string;
1056
1541
  dataUsageRemainingInBytes: number;
1542
+ dataUsageRemainingInGb: number;
1057
1543
  }, {
1058
1544
  status: string;
1059
1545
  dataUsageRemainingInBytes: number;
1546
+ dataUsageRemainingInGb: number;
1060
1547
  }>>;
1061
1548
  /**
1062
1549
  *
1063
1550
  * @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
1064
1551
  * @property {number} - Remaining balance of the package in bytes
1552
+ * @property {number} - Remaining balance of the package in GB
1065
1553
  * @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
1066
1554
  */
1067
1555
  type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
1068
1556
 
1557
+ /**
1558
+ * Service class for PurchasesService operations.
1559
+ * Provides methods to interact with PurchasesService-related API endpoints.
1560
+ * All methods return promises and handle request/response serialization automatically.
1561
+ */
1069
1562
  declare class PurchasesService extends BaseService {
1070
1563
  /**
1071
1564
  * This endpoint is used to purchase a new eSIM by providing the package details.
1072
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1073
- * @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} Successful Response
1565
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1566
+ * @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} - Successful Response
1074
1567
  */
1075
1568
  createPurchaseV2(body: CreatePurchaseV2Request, requestConfig?: RequestConfig): Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>;
1076
1569
  /**
1077
1570
  * This endpoint can be used to list all the successful purchases made between a given interval.
1571
+ * @param {string} [params.purchaseId] - ID of the purchase
1078
1572
  * @param {string} [params.iccid] - ID of the eSIM
1079
1573
  * @param {string} [params.afterDate] - Start date of the interval for filtering purchases in the format 'yyyy-MM-dd'
1080
1574
  * @param {string} [params.beforeDate] - End date of the interval for filtering purchases in the format 'yyyy-MM-dd'
@@ -1084,21 +1578,20 @@ declare class PurchasesService extends BaseService {
1084
1578
  * @param {number} [params.limit] - Maximum number of purchases to be returned in the response. The value must be greater than 0 and less than or equal to 100. If not provided, the default value is 20
1085
1579
  * @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
1086
1580
  * @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
1087
- * @param {string} [params.purchaseId] - The id of a specific purchase.
1088
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1089
- * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
1581
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1582
+ * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} - Successful Response
1090
1583
  */
1091
1584
  listPurchases(params?: ListPurchasesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListPurchasesOkResponse>>;
1092
1585
  /**
1093
1586
  * This endpoint is used to purchase a new eSIM by providing the package details.
1094
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1095
- * @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} Successful Response
1587
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1588
+ * @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} - Successful Response
1096
1589
  */
1097
1590
  createPurchase(body: CreatePurchaseRequest, requestConfig?: RequestConfig): Promise<HttpResponse<CreatePurchaseOkResponse>>;
1098
1591
  /**
1099
- * This endpoint is used to top-up an existing eSIM with the previously associated destination by providing its ICCID and package details. To determine if an eSIM can be topped up, use the Get eSIM Status endpoint, which returns the `isTopUpAllowed` flag.
1100
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1101
- * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
1592
+ * This endpoint is used to top-up an existing eSIM with the previously associated destination by providing its ICCID and package details. To determine if an eSIM can be topped up, use the Get eSIM endpoint, which returns the `isTopUpAllowed` flag.
1593
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1594
+ * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} - Successful Response
1102
1595
  */
1103
1596
  topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>>;
1104
1597
  /**
@@ -1110,21 +1603,23 @@ declare class PurchasesService extends BaseService {
1110
1603
 
1111
1604
  The end date can be extended or shortened as long as it adheres to the same pricing category and does not exceed the allowed duration limits.
1112
1605
 
1113
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1114
- * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
1606
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1607
+ * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} - Successful Response
1115
1608
  */
1116
1609
  editPurchase(body: EditPurchaseRequest, requestConfig?: RequestConfig): Promise<HttpResponse<EditPurchaseOkResponse>>;
1117
1610
  /**
1118
1611
  * This endpoint can be called for consumption notifications (e.g. every 1 hour or when the user clicks a button). It returns the data balance (consumption) of purchased packages.
1119
1612
  * @param {string} purchaseId - ID of the purchase
1120
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1121
- * @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} Successful Response
1613
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
1614
+ * @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} - Successful Response
1122
1615
  */
1123
1616
  getPurchaseConsumption(purchaseId: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>;
1124
1617
  }
1125
1618
 
1126
1619
  /**
1127
- * The shape of the model inside the application code - what the users use
1620
+ * Zod schema for the CreatePurchaseV2OkResponsePurchase model.
1621
+ * Defines the structure and validation rules for this data type.
1622
+ * This is the shape used in application code - what developers interact with.
1128
1623
  */
1129
1624
  declare const createPurchaseV2OkResponsePurchase: z.ZodLazy<z.ZodObject<{
1130
1625
  id: z.ZodString;
@@ -1149,20 +1644,28 @@ declare const createPurchaseV2OkResponsePurchase: z.ZodLazy<z.ZodObject<{
1149
1644
  type CreatePurchaseV2OkResponsePurchase = z.infer<typeof createPurchaseV2OkResponsePurchase>;
1150
1645
 
1151
1646
  /**
1152
- * The shape of the model inside the application code - what the users use
1647
+ * Zod schema for the CreatePurchaseV2OkResponseProfile model.
1648
+ * Defines the structure and validation rules for this data type.
1649
+ * This is the shape used in application code - what developers interact with.
1153
1650
  */
1154
1651
  declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
1155
1652
  iccid: z.ZodString;
1156
1653
  activationCode: z.ZodString;
1157
1654
  manualActivationCode: z.ZodString;
1655
+ iosActivationLink: z.ZodString;
1656
+ androidActivationLink: z.ZodString;
1158
1657
  }, "strip", z.ZodTypeAny, {
1159
1658
  iccid: string;
1160
1659
  activationCode: string;
1161
1660
  manualActivationCode: string;
1661
+ iosActivationLink: string;
1662
+ androidActivationLink: string;
1162
1663
  }, {
1163
1664
  iccid: string;
1164
1665
  activationCode: string;
1165
1666
  manualActivationCode: string;
1667
+ iosActivationLink: string;
1668
+ androidActivationLink: string;
1166
1669
  }>>;
1167
1670
  /**
1168
1671
  *
@@ -1170,16 +1673,21 @@ declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
1170
1673
  * @property {string} - ID of the eSIM
1171
1674
  * @property {string} - QR Code of the eSIM as base64
1172
1675
  * @property {string} - Manual Activation Code of the eSIM
1676
+ * @property {string} - iOS Activation Link of the eSIM
1677
+ * @property {string} - Android Activation Link of the eSIM
1173
1678
  */
1174
1679
  type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkResponseProfile>;
1175
1680
 
1176
1681
  /**
1177
- * The shape of the model inside the application code - what the users use
1682
+ * Zod schema for the Purchases model.
1683
+ * Defines the structure and validation rules for this data type.
1684
+ * This is the shape used in application code - what developers interact with.
1178
1685
  */
1179
1686
  declare const purchases: z.ZodLazy<z.ZodObject<{
1180
1687
  id: z.ZodString;
1181
1688
  startDate: z.ZodNullable<z.ZodString>;
1182
1689
  endDate: z.ZodNullable<z.ZodString>;
1690
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1183
1691
  createdDate: z.ZodString;
1184
1692
  startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1185
1693
  endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -1187,6 +1695,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1187
1695
  package: z.ZodLazy<z.ZodObject<{
1188
1696
  id: z.ZodString;
1189
1697
  dataLimitInBytes: z.ZodNumber;
1698
+ dataLimitInGb: z.ZodNumber;
1190
1699
  destination: z.ZodString;
1191
1700
  destinationIso2: z.ZodString;
1192
1701
  destinationName: z.ZodString;
@@ -1196,6 +1705,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1196
1705
  destinationIso2: string;
1197
1706
  id: string;
1198
1707
  dataLimitInBytes: number;
1708
+ dataLimitInGb: number;
1199
1709
  priceInCents: number;
1200
1710
  destinationName: string;
1201
1711
  }, {
@@ -1203,6 +1713,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1203
1713
  destinationIso2: string;
1204
1714
  id: string;
1205
1715
  dataLimitInBytes: number;
1716
+ dataLimitInGb: number;
1206
1717
  priceInCents: number;
1207
1718
  destinationName: string;
1208
1719
  }>>;
@@ -1226,6 +1737,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1226
1737
  destinationIso2: string;
1227
1738
  id: string;
1228
1739
  dataLimitInBytes: number;
1740
+ dataLimitInGb: number;
1229
1741
  priceInCents: number;
1230
1742
  destinationName: string;
1231
1743
  };
@@ -1234,6 +1746,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1234
1746
  };
1235
1747
  source: string;
1236
1748
  purchaseType: string;
1749
+ duration?: number | null | undefined;
1237
1750
  startTime?: number | null | undefined;
1238
1751
  endTime?: number | null | undefined;
1239
1752
  createdAt?: number | undefined;
@@ -1248,6 +1761,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1248
1761
  destinationIso2: string;
1249
1762
  id: string;
1250
1763
  dataLimitInBytes: number;
1764
+ dataLimitInGb: number;
1251
1765
  priceInCents: number;
1252
1766
  destinationName: string;
1253
1767
  };
@@ -1256,6 +1770,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1256
1770
  };
1257
1771
  source: string;
1258
1772
  purchaseType: string;
1773
+ duration?: number | null | undefined;
1259
1774
  startTime?: number | null | undefined;
1260
1775
  endTime?: number | null | undefined;
1261
1776
  createdAt?: number | undefined;
@@ -1267,6 +1782,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1267
1782
  * @property {string} - ID of the purchase
1268
1783
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1269
1784
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1785
+ * @property {number} - Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90.
1270
1786
  * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1271
1787
  * @property {number} - Epoch value representing the start time of the package's validity
1272
1788
  * @property {number} - Epoch value representing the end time of the package's validity
@@ -1280,11 +1796,14 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1280
1796
  type Purchases = z.infer<typeof purchases>;
1281
1797
 
1282
1798
  /**
1283
- * The shape of the model inside the application code - what the users use
1799
+ * Zod schema for the Package_ model.
1800
+ * Defines the structure and validation rules for this data type.
1801
+ * This is the shape used in application code - what developers interact with.
1284
1802
  */
1285
1803
  declare const package_: z.ZodLazy<z.ZodObject<{
1286
1804
  id: z.ZodString;
1287
1805
  dataLimitInBytes: z.ZodNumber;
1806
+ dataLimitInGb: z.ZodNumber;
1288
1807
  destination: z.ZodString;
1289
1808
  destinationIso2: z.ZodString;
1290
1809
  destinationName: z.ZodString;
@@ -1294,6 +1813,7 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1294
1813
  destinationIso2: string;
1295
1814
  id: string;
1296
1815
  dataLimitInBytes: number;
1816
+ dataLimitInGb: number;
1297
1817
  priceInCents: number;
1298
1818
  destinationName: string;
1299
1819
  }, {
@@ -1301,6 +1821,7 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1301
1821
  destinationIso2: string;
1302
1822
  id: string;
1303
1823
  dataLimitInBytes: number;
1824
+ dataLimitInGb: number;
1304
1825
  priceInCents: number;
1305
1826
  destinationName: string;
1306
1827
  }>>;
@@ -1309,6 +1830,7 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1309
1830
  * @typedef {Package_} package_
1310
1831
  * @property {string} - ID of the package
1311
1832
  * @property {number} - Size of the package in Bytes
1833
+ * @property {number} - Size of the package in GB
1312
1834
  * @property {string} - ISO3 representation of the package's destination.
1313
1835
  * @property {string} - ISO2 representation of the package's destination.
1314
1836
  * @property {string} - Name of the package's destination
@@ -1317,7 +1839,9 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1317
1839
  type Package_ = z.infer<typeof package_>;
1318
1840
 
1319
1841
  /**
1320
- * The shape of the model inside the application code - what the users use
1842
+ * Zod schema for the PurchasesEsim model.
1843
+ * Defines the structure and validation rules for this data type.
1844
+ * This is the shape used in application code - what developers interact with.
1321
1845
  */
1322
1846
  declare const purchasesEsim: z.ZodLazy<z.ZodObject<{
1323
1847
  iccid: z.ZodString;
@@ -1334,7 +1858,9 @@ declare const purchasesEsim: z.ZodLazy<z.ZodObject<{
1334
1858
  type PurchasesEsim = z.infer<typeof purchasesEsim>;
1335
1859
 
1336
1860
  /**
1337
- * The shape of the model inside the application code - what the users use
1861
+ * Zod schema for the CreatePurchaseOkResponsePurchase model.
1862
+ * Defines the structure and validation rules for this data type.
1863
+ * This is the shape used in application code - what developers interact with.
1338
1864
  */
1339
1865
  declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1340
1866
  id: z.ZodString;
@@ -1375,7 +1901,9 @@ declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1375
1901
  type CreatePurchaseOkResponsePurchase = z.infer<typeof createPurchaseOkResponsePurchase>;
1376
1902
 
1377
1903
  /**
1378
- * The shape of the model inside the application code - what the users use
1904
+ * Zod schema for the CreatePurchaseOkResponseProfile model.
1905
+ * Defines the structure and validation rules for this data type.
1906
+ * This is the shape used in application code - what developers interact with.
1379
1907
  */
1380
1908
  declare const createPurchaseOkResponseProfile: z.ZodLazy<z.ZodObject<{
1381
1909
  iccid: z.ZodString;
@@ -1400,7 +1928,9 @@ declare const createPurchaseOkResponseProfile: z.ZodLazy<z.ZodObject<{
1400
1928
  type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponseProfile>;
1401
1929
 
1402
1930
  /**
1403
- * The shape of the model inside the application code - what the users use
1931
+ * Zod schema for the TopUpEsimOkResponsePurchase model.
1932
+ * Defines the structure and validation rules for this data type.
1933
+ * This is the shape used in application code - what developers interact with.
1404
1934
  */
1405
1935
  declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1406
1936
  id: z.ZodString;
@@ -1441,7 +1971,9 @@ declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1441
1971
  type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurchase>;
1442
1972
 
1443
1973
  /**
1444
- * The shape of the model inside the application code - what the users use
1974
+ * Zod schema for the TopUpEsimOkResponseProfile model.
1975
+ * Defines the structure and validation rules for this data type.
1976
+ * This is the shape used in application code - what developers interact with.
1445
1977
  */
1446
1978
  declare const topUpEsimOkResponseProfile: z.ZodLazy<z.ZodObject<{
1447
1979
  iccid: z.ZodString;
@@ -1458,7 +1990,9 @@ declare const topUpEsimOkResponseProfile: z.ZodLazy<z.ZodObject<{
1458
1990
  type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfile>;
1459
1991
 
1460
1992
  /**
1461
- * The shape of the model inside the application code - what the users use
1993
+ * Zod schema for the GetEsimOkResponse model.
1994
+ * Defines the structure and validation rules for this data type.
1995
+ * This is the shape used in application code - what developers interact with.
1462
1996
  */
1463
1997
  declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1464
1998
  esim: z.ZodLazy<z.ZodObject<{
@@ -1467,6 +2001,7 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1467
2001
  activationCode: z.ZodString;
1468
2002
  manualActivationCode: z.ZodString;
1469
2003
  status: z.ZodString;
2004
+ connectivityStatus: z.ZodString;
1470
2005
  isTopUpAllowed: z.ZodBoolean;
1471
2006
  }, "strip", z.ZodTypeAny, {
1472
2007
  status: string;
@@ -1474,6 +2009,7 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1474
2009
  activationCode: string;
1475
2010
  manualActivationCode: string;
1476
2011
  smdpAddress: string;
2012
+ connectivityStatus: string;
1477
2013
  isTopUpAllowed: boolean;
1478
2014
  }, {
1479
2015
  status: string;
@@ -1481,6 +2017,7 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1481
2017
  activationCode: string;
1482
2018
  manualActivationCode: string;
1483
2019
  smdpAddress: string;
2020
+ connectivityStatus: string;
1484
2021
  isTopUpAllowed: boolean;
1485
2022
  }>>;
1486
2023
  }, "strip", z.ZodTypeAny, {
@@ -1490,6 +2027,7 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1490
2027
  activationCode: string;
1491
2028
  manualActivationCode: string;
1492
2029
  smdpAddress: string;
2030
+ connectivityStatus: string;
1493
2031
  isTopUpAllowed: boolean;
1494
2032
  };
1495
2033
  }, {
@@ -1499,6 +2037,7 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
1499
2037
  activationCode: string;
1500
2038
  manualActivationCode: string;
1501
2039
  smdpAddress: string;
2040
+ connectivityStatus: string;
1502
2041
  isTopUpAllowed: boolean;
1503
2042
  };
1504
2043
  }>>;
@@ -1514,7 +2053,9 @@ interface GetEsimParams {
1514
2053
  }
1515
2054
 
1516
2055
  /**
1517
- * The shape of the model inside the application code - what the users use
2056
+ * Zod schema for the GetEsimDeviceOkResponse model.
2057
+ * Defines the structure and validation rules for this data type.
2058
+ * This is the shape used in application code - what developers interact with.
1518
2059
  */
1519
2060
  declare const getEsimDeviceOkResponse: z.ZodLazy<z.ZodObject<{
1520
2061
  device: z.ZodLazy<z.ZodObject<{
@@ -1556,7 +2097,9 @@ declare const getEsimDeviceOkResponse: z.ZodLazy<z.ZodObject<{
1556
2097
  type GetEsimDeviceOkResponse = z.infer<typeof getEsimDeviceOkResponse>;
1557
2098
 
1558
2099
  /**
1559
- * The shape of the model inside the application code - what the users use
2100
+ * Zod schema for the GetEsimHistoryOkResponse model.
2101
+ * Defines the structure and validation rules for this data type.
2102
+ * This is the shape used in application code - what developers interact with.
1560
2103
  */
1561
2104
  declare const getEsimHistoryOkResponse: z.ZodLazy<z.ZodObject<{
1562
2105
  esim: z.ZodLazy<z.ZodObject<{
@@ -1615,32 +2158,39 @@ declare const getEsimHistoryOkResponse: z.ZodLazy<z.ZodObject<{
1615
2158
  */
1616
2159
  type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
1617
2160
 
2161
+ /**
2162
+ * Service class for ESimService operations.
2163
+ * Provides methods to interact with ESimService-related API endpoints.
2164
+ * All methods return promises and handle request/response serialization automatically.
2165
+ */
1618
2166
  declare class ESimService extends BaseService {
1619
2167
  /**
1620
2168
  * Get eSIM
1621
- * @param {string} iccid - ID of the eSIM
1622
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1623
- * @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
2169
+ * @param {string} params.iccid - ID of the eSIM
2170
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
2171
+ * @returns {Promise<HttpResponse<GetEsimOkResponse>>} - Successful Response
1624
2172
  */
1625
2173
  getEsim(params: GetEsimParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimOkResponse>>;
1626
2174
  /**
1627
2175
  * Get eSIM Device
1628
2176
  * @param {string} iccid - ID of the eSIM
1629
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1630
- * @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
2177
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
2178
+ * @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} - Successful Response
1631
2179
  */
1632
2180
  getEsimDevice(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimDeviceOkResponse>>;
1633
2181
  /**
1634
2182
  * Get eSIM History
1635
2183
  * @param {string} iccid - ID of the eSIM
1636
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1637
- * @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
2184
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
2185
+ * @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} - Successful Response
1638
2186
  */
1639
2187
  getEsimHistory(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimHistoryOkResponse>>;
1640
2188
  }
1641
2189
 
1642
2190
  /**
1643
- * The shape of the model inside the application code - what the users use
2191
+ * Zod schema for the GetEsimOkResponseEsim model.
2192
+ * Defines the structure and validation rules for this data type.
2193
+ * This is the shape used in application code - what developers interact with.
1644
2194
  */
1645
2195
  declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
1646
2196
  iccid: z.ZodString;
@@ -1648,6 +2198,7 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
1648
2198
  activationCode: z.ZodString;
1649
2199
  manualActivationCode: z.ZodString;
1650
2200
  status: z.ZodString;
2201
+ connectivityStatus: z.ZodString;
1651
2202
  isTopUpAllowed: z.ZodBoolean;
1652
2203
  }, "strip", z.ZodTypeAny, {
1653
2204
  status: string;
@@ -1655,6 +2206,7 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
1655
2206
  activationCode: string;
1656
2207
  manualActivationCode: string;
1657
2208
  smdpAddress: string;
2209
+ connectivityStatus: string;
1658
2210
  isTopUpAllowed: boolean;
1659
2211
  }, {
1660
2212
  status: string;
@@ -1662,6 +2214,7 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
1662
2214
  activationCode: string;
1663
2215
  manualActivationCode: string;
1664
2216
  smdpAddress: string;
2217
+ connectivityStatus: string;
1665
2218
  isTopUpAllowed: boolean;
1666
2219
  }>>;
1667
2220
  /**
@@ -1672,12 +2225,15 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
1672
2225
  * @property {string} - QR Code of the eSIM as base64
1673
2226
  * @property {string} - The manual activation code
1674
2227
  * @property {string} - Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
2228
+ * @property {string} - Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
1675
2229
  * @property {boolean} - Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
1676
2230
  */
1677
2231
  type GetEsimOkResponseEsim = z.infer<typeof getEsimOkResponseEsim>;
1678
2232
 
1679
2233
  /**
1680
- * The shape of the model inside the application code - what the users use
2234
+ * Zod schema for the Device model.
2235
+ * Defines the structure and validation rules for this data type.
2236
+ * This is the shape used in application code - what developers interact with.
1681
2237
  */
1682
2238
  declare const device: z.ZodLazy<z.ZodObject<{
1683
2239
  oem: z.ZodString;
@@ -1706,7 +2262,9 @@ declare const device: z.ZodLazy<z.ZodObject<{
1706
2262
  type Device = z.infer<typeof device>;
1707
2263
 
1708
2264
  /**
1709
- * The shape of the model inside the application code - what the users use
2265
+ * Zod schema for the GetEsimHistoryOkResponseEsim model.
2266
+ * Defines the structure and validation rules for this data type.
2267
+ * This is the shape used in application code - what developers interact with.
1710
2268
  */
1711
2269
  declare const getEsimHistoryOkResponseEsim: z.ZodLazy<z.ZodObject<{
1712
2270
  iccid: z.ZodString;
@@ -1747,7 +2305,9 @@ declare const getEsimHistoryOkResponseEsim: z.ZodLazy<z.ZodObject<{
1747
2305
  type GetEsimHistoryOkResponseEsim = z.infer<typeof getEsimHistoryOkResponseEsim>;
1748
2306
 
1749
2307
  /**
1750
- * The shape of the model inside the application code - what the users use
2308
+ * Zod schema for the History model.
2309
+ * Defines the structure and validation rules for this data type.
2310
+ * This is the shape used in application code - what developers interact with.
1751
2311
  */
1752
2312
  declare const history: z.ZodLazy<z.ZodObject<{
1753
2313
  status: z.ZodString;
@@ -1772,7 +2332,9 @@ declare const history: z.ZodLazy<z.ZodObject<{
1772
2332
  type History = z.infer<typeof history>;
1773
2333
 
1774
2334
  /**
1775
- * The shape of the model inside the application code - what the users use
2335
+ * Zod schema for the TokenOkResponse model.
2336
+ * Defines the structure and validation rules for this data type.
2337
+ * This is the shape used in application code - what developers interact with.
1776
2338
  */
1777
2339
  declare const tokenOkResponse: z.ZodLazy<z.ZodObject<{
1778
2340
  token: z.ZodString;
@@ -1788,17 +2350,24 @@ declare const tokenOkResponse: z.ZodLazy<z.ZodObject<{
1788
2350
  */
1789
2351
  type TokenOkResponse = z.infer<typeof tokenOkResponse>;
1790
2352
 
2353
+ /**
2354
+ * Service class for IFrameService operations.
2355
+ * Provides methods to interact with IFrameService-related API endpoints.
2356
+ * All methods return promises and handle request/response serialization automatically.
2357
+ */
1791
2358
  declare class IFrameService extends BaseService {
1792
2359
  /**
1793
2360
  * Generate a new token to be used in the iFrame
1794
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1795
- * @returns {Promise<HttpResponse<TokenOkResponse>>} Successful Response
2361
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
2362
+ * @returns {Promise<HttpResponse<TokenOkResponse>>} - Successful Response
1796
2363
  */
1797
2364
  token(requestConfig?: RequestConfig): Promise<HttpResponse<TokenOkResponse>>;
1798
2365
  }
1799
2366
 
1800
2367
  /**
1801
- * The shape of the model inside the application code - what the users use
2368
+ * Zod schema for the GetAccessTokenRequest model.
2369
+ * Defines the structure and validation rules for this data type.
2370
+ * This is the shape used in application code - what developers interact with.
1802
2371
  */
1803
2372
  declare const getAccessTokenRequest: z.ZodLazy<z.ZodObject<{
1804
2373
  grantType: z.ZodOptional<z.ZodString>;
@@ -1823,7 +2392,9 @@ declare const getAccessTokenRequest: z.ZodLazy<z.ZodObject<{
1823
2392
  type GetAccessTokenRequest = z.infer<typeof getAccessTokenRequest>;
1824
2393
 
1825
2394
  /**
1826
- * The shape of the model inside the application code - what the users use
2395
+ * Zod schema for the GetAccessTokenOkResponse model.
2396
+ * Defines the structure and validation rules for this data type.
2397
+ * This is the shape used in application code - what developers interact with.
1827
2398
  */
1828
2399
  declare const getAccessTokenOkResponse: z.ZodLazy<z.ZodObject<{
1829
2400
  accessToken: z.ZodOptional<z.ZodString>;
@@ -1847,11 +2418,16 @@ declare const getAccessTokenOkResponse: z.ZodLazy<z.ZodObject<{
1847
2418
  */
1848
2419
  type GetAccessTokenOkResponse = z.infer<typeof getAccessTokenOkResponse>;
1849
2420
 
2421
+ /**
2422
+ * Service class for OAuthService operations.
2423
+ * Provides methods to interact with OAuthService-related API endpoints.
2424
+ * All methods return promises and handle request/response serialization automatically.
2425
+ */
1850
2426
  declare class OAuthService extends BaseService {
1851
2427
  /**
1852
2428
  * This endpoint was added by liblab
1853
- * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1854
- * @returns {Promise<HttpResponse<GetAccessTokenOkResponse>>} Successful Response
2429
+ * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation.
2430
+ * @returns {Promise<HttpResponse<GetAccessTokenOkResponse>>} - Successful Response
1855
2431
  */
1856
2432
  getAccessToken(body: GetAccessTokenRequest, requestConfig?: RequestConfig): Promise<HttpResponse<GetAccessTokenOkResponse>>;
1857
2433
  }