celitech-sdk 1.3.18 → 1.3.33

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024
3
+ Copyright (c) 2025
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,11 +1,13 @@
1
- # Celitech TypeScript SDK 1.3.18
1
+ # Celitech TypeScript SDK 1.3.33
2
2
 
3
3
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
4
4
 
5
+ [![This SDK was generated by liblab](https://public-liblab-readme-assets.s3.us-east-1.amazonaws.com/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme)
6
+
5
7
  ## Versions
6
8
 
7
9
  - API version: `1.1.0`
8
- - SDK version: `1.3.18`
10
+ - SDK version: `1.3.33`
9
11
 
10
12
  ## About the API
11
13
 
package/dist/index.d.ts CHANGED
@@ -59,7 +59,12 @@ declare class OAuthTokenManager {
59
59
  getToken(scopes: Set<string>, config: SdkConfig): Promise<OAuthToken>;
60
60
  }
61
61
 
62
- interface CreateRequestParameters<FullResponse, Page = unknown[]> {
62
+ interface ResponseDefinition {
63
+ schema: ZodType;
64
+ contentType: ContentType;
65
+ status: number;
66
+ }
67
+ interface CreateRequestParameters<Page = unknown[]> {
63
68
  baseUrl: string;
64
69
  method: HttpMethod;
65
70
  body?: any;
@@ -68,10 +73,9 @@ interface CreateRequestParameters<FullResponse, Page = unknown[]> {
68
73
  pathParams: Map<string, RequestParameter>;
69
74
  path: string;
70
75
  config: SdkConfig;
71
- responseSchema: ZodType<FullResponse, any, any>;
76
+ responses: ResponseDefinition[];
72
77
  requestSchema: ZodType;
73
78
  requestContentType: ContentType;
74
- responseContentType: ContentType;
75
79
  validation: ValidationOptions;
76
80
  retry: RetryOptions;
77
81
  pagination?: RequestPagination<Page>;
@@ -92,7 +96,7 @@ interface RequestPagination<Page> {
92
96
  pagePath: string[];
93
97
  pageSchema?: ZodType<Page, any, any>;
94
98
  }
95
- declare class Request<T = unknown, PageSchema = unknown[]> {
99
+ declare class Request<PageSchema = unknown[]> {
96
100
  baseUrl: string;
97
101
  headers: Map<string, RequestParameter>;
98
102
  queryParams: Map<string, RequestParameter>;
@@ -101,24 +105,23 @@ declare class Request<T = unknown, PageSchema = unknown[]> {
101
105
  method: HttpMethod;
102
106
  path: string;
103
107
  config: SdkConfig;
104
- responseSchema: ZodType<T, any, any>;
108
+ responses: ResponseDefinition[];
105
109
  requestSchema: ZodType;
106
110
  requestContentType: ContentType;
107
- responseContentType: ContentType;
108
111
  validation: ValidationOptions;
109
112
  retry: RetryOptions;
110
113
  pagination?: RequestPagination<PageSchema>;
111
114
  scopes?: Set<string>;
112
115
  tokenManager: OAuthTokenManager;
113
116
  private readonly pathPattern;
114
- constructor(params: CreateRequestParameters<T, PageSchema>);
117
+ constructor(params: CreateRequestParameters<PageSchema>);
115
118
  addHeaderParam(key: string, param: RequestParameter): void;
116
119
  addQueryParam(key: string, param: RequestParameter): void;
117
120
  addPathParam(key: string, param: RequestParameter): void;
118
121
  addBody(body: any): void;
119
122
  updateFromHookRequest(hookRequest: HttpRequest): void;
120
123
  constructFullUrl(): string;
121
- copy(overrides?: Partial<CreateRequestParameters<T>>): Request<T, unknown[]>;
124
+ copy(overrides?: Partial<CreateRequestParameters>): Request<unknown[]>;
122
125
  getHeaders(): HeadersInit | undefined;
123
126
  nextPage(): void;
124
127
  private constructPath;
@@ -133,6 +136,7 @@ interface SdkConfig {
133
136
  timeoutMs?: number;
134
137
  clientId: string;
135
138
  clientSecret: string;
139
+ oAuthBaseUrl?: string;
136
140
  retry?: RetryOptions;
137
141
  validation?: ValidationOptions;
138
142
  }
@@ -155,7 +159,9 @@ declare enum ContentType {
155
159
  Binary = "binary",
156
160
  FormUrlEncoded = "form",
157
161
  Text = "text",
158
- MultipartFormData = "multipartFormData"
162
+ MultipartFormData = "multipartFormData",
163
+ EventStream = "eventStream",
164
+ NoContent = "noContent"
159
165
  }
160
166
  interface RequestConfig {
161
167
  retry?: RetryOptions;
@@ -186,8 +192,9 @@ declare class HttpClient {
186
192
  private config;
187
193
  private readonly requestHandlerChain;
188
194
  constructor(config: SdkConfig, hook?: CustomHook);
189
- call<T>(request: Request<T>): Promise<HttpResponse<T>>;
190
- callPaginated<FullResponse, Page>(request: Request<FullResponse, Page>): Promise<HttpResponse<Page>>;
195
+ call<T>(request: Request): Promise<HttpResponse<T>>;
196
+ stream<T>(request: Request): AsyncGenerator<HttpResponse<T>>;
197
+ callPaginated<FullResponse, Page>(request: Request<Page>): Promise<HttpResponse<Page>>;
191
198
  setBaseUrl(url: string): void;
192
199
  setConfig(config: SdkConfig): void;
193
200
  private getPage;
@@ -203,6 +210,7 @@ declare class BaseService {
203
210
  set timeoutMs(timeoutMs: number);
204
211
  set clientId(clientId: string);
205
212
  set clientSecret(clientSecret: string);
213
+ set oAuthBaseUrl(oAuthBaseUrl: string);
206
214
  }
207
215
 
208
216
  /**
@@ -1621,6 +1629,7 @@ declare class Celitech {
1621
1629
  set timeoutMs(timeoutMs: number);
1622
1630
  set clientId(clientId: string);
1623
1631
  set clientSecret(clientSecret: string);
1632
+ set oAuthBaseUrl(oAuthBaseUrl: string);
1624
1633
  }
1625
1634
 
1626
1635
  export { Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment, GetAccessTokenOkResponse, GetAccessTokenRequest, GetEsimDeviceOkResponse, GetEsimHistoryOkResponse, GetEsimHistoryOkResponseEsim, GetEsimMacOkResponse, GetEsimMacOkResponseEsim, GetEsimOkResponse, GetEsimOkResponseEsim, GetPurchaseConsumptionOkResponse, GrantType, History, HttpError, HttpMetadata, HttpMethod, HttpResponse, ListDestinationsOkResponse, ListPackagesOkResponse, ListPurchasesOkResponse, OAuthService, Package_, Packages, PackagesService, Purchases, PurchasesEsim, PurchasesService, RequestConfig, RetryOptions, SdkConfig, TopUpEsimOkResponse, TopUpEsimOkResponseProfile, TopUpEsimOkResponsePurchase, TopUpEsimRequest, ValidationOptions };