celitech-sdk 2.0.6 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -15
- package/dist/index.d.mts +2664 -0
- package/dist/index.d.ts +281 -243
- package/dist/index.js +1117 -716
- package/dist/index.mjs +1117 -716
- package/package.json +18 -7
package/README.md
CHANGED
|
@@ -1,23 +1,49 @@
|
|
|
1
|
-
# Celitech TypeScript SDK 2.0.
|
|
1
|
+
# Celitech TypeScript SDK 2.0.10
|
|
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
5
|
## Versions
|
|
6
6
|
|
|
7
|
-
- API version: `2.0.
|
|
8
|
-
- SDK version: `2.0.
|
|
7
|
+
- API version: `2.0.10`
|
|
8
|
+
- SDK version: `2.0.10`
|
|
9
9
|
|
|
10
10
|
## About the API
|
|
11
11
|
|
|
12
12
|
Welcome to the CELITECH API documentation!
|
|
13
13
|
|
|
14
|
-
Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:
|
|
14
|
+
Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:devops@celitech.com) | [Blog](https://www.celitech.com/blog/)
|
|
15
|
+
|
|
16
|
+
# Introduction
|
|
17
|
+
|
|
18
|
+
This is the reference documentation and schemas for the CELITECH API and webhooks. For tutorials and other documentation please refer to the [CELITECH Documentation](https://docs.celitech.com).
|
|
19
|
+
|
|
20
|
+
"Partners" refers to online service providers that use our eSIM API. Access levels include Gold, Platinum, and Diamond.
|
|
21
|
+
|
|
22
|
+
## API
|
|
23
|
+
|
|
24
|
+
The CELITECH API is designed for use by partner platforms, including both web and mobile applications. It's assumed all endpoint calls are initiated from the backend of an integrated platform.
|
|
25
|
+
|
|
26
|
+
API URL: `https://api.celitech.net/v1`
|
|
27
|
+
|
|
28
|
+
## Authentication & Authorization
|
|
29
|
+
|
|
30
|
+
CELITECH API uses the OAuth 2.0 protocol for authentication and authorization.
|
|
31
|
+
The endpoints are protected using client credentials flow which is based on a token exchange. The token has a defined life span (typically 1 hour), after which a new token must be obtained.
|
|
32
|
+
|
|
33
|
+
To begin, obtain OAuth 2.0 client credentials ( **CLIENT_ID** & **CLIENT_SECRET** ) from the [CELITECH Dashboard](https://www.dashboard.celitech.com/). Then your client application requests an access token from the CELITECH Authorization Server, extracts a token from the response, and sends the token to the CELITECH API that you want to access.
|
|
34
|
+
|
|
35
|
+
Security Scheme Type: `OAuth2`
|
|
36
|
+
|
|
37
|
+
Flow type: `clientCredentials`
|
|
38
|
+
|
|
39
|
+
Token URL: `https://auth.celitech.net/oauth2/token`
|
|
15
40
|
|
|
16
41
|
## Table of Contents
|
|
17
42
|
|
|
18
43
|
- [Setup & Configuration](#setup--configuration)
|
|
19
44
|
- [Supported Language Versions](#supported-language-versions)
|
|
20
45
|
- [Installation](#installation)
|
|
46
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
21
47
|
- [Authentication](#authentication)
|
|
22
48
|
- [OAuth Authentication](#oauth-authentication)
|
|
23
49
|
- [Environment Variables](#environment-variables)
|
|
@@ -47,6 +73,17 @@ or
|
|
|
47
73
|
yarn add celitech-sdk
|
|
48
74
|
```
|
|
49
75
|
|
|
76
|
+
## Runtime Compatibility
|
|
77
|
+
|
|
78
|
+
The SDK works in the following runtimes:
|
|
79
|
+
|
|
80
|
+
- Node.js 18+
|
|
81
|
+
- Vercel
|
|
82
|
+
- Cloudflare Workers
|
|
83
|
+
- Deno v1.25+
|
|
84
|
+
- Bun 1.0+
|
|
85
|
+
- React Native
|
|
86
|
+
|
|
50
87
|
## Authentication
|
|
51
88
|
|
|
52
89
|
### OAuth Authentication
|
|
@@ -85,7 +122,7 @@ If you are using a `.env` file, a template with the variable names is provided i
|
|
|
85
122
|
You can set a custom timeout for the SDK's HTTP requests as follows:
|
|
86
123
|
|
|
87
124
|
```ts
|
|
88
|
-
const celitech = new Celitech({
|
|
125
|
+
const celitech = new Celitech({ timeoutMs: 10000 });
|
|
89
126
|
```
|
|
90
127
|
|
|
91
128
|
# Sample Usage
|
|
@@ -134,15 +171,12 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
134
171
|
| Name | Description |
|
|
135
172
|
| :------------------------------------------------------------------------------------------- | :---------- |
|
|
136
173
|
| ListDestinationsOkResponse | |
|
|
137
|
-
|
|
|
138
|
-
| Unauthorized | |
|
|
174
|
+
| ErrorResponse | |
|
|
139
175
|
| ListPackagesOkResponse | |
|
|
140
|
-
|
|
|
141
|
-
| Unauthorized | |
|
|
176
|
+
| ErrorResponse | |
|
|
142
177
|
| CreatePurchaseV2OkResponse | |
|
|
143
178
|
| CreatePurchaseV2Request | |
|
|
144
|
-
|
|
|
145
|
-
| Unauthorized | |
|
|
179
|
+
| ErrorResponse | |
|
|
146
180
|
| ListPurchasesOkResponse | |
|
|
147
181
|
| CreatePurchaseOkResponse | |
|
|
148
182
|
| CreatePurchaseRequest | |
|
|
@@ -152,13 +186,12 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
152
186
|
| EditPurchaseRequest | |
|
|
153
187
|
| GetPurchaseConsumptionOkResponse | |
|
|
154
188
|
| GetEsimOkResponse | |
|
|
155
|
-
|
|
|
156
|
-
| Unauthorized | |
|
|
189
|
+
| ErrorResponse | |
|
|
157
190
|
| GetEsimDeviceOkResponse | |
|
|
158
191
|
| GetEsimHistoryOkResponse | |
|
|
192
|
+
| SuspendEsimOkResponse | |
|
|
159
193
|
| TokenOkResponse | |
|
|
160
|
-
|
|
|
161
|
-
| Unauthorized | |
|
|
194
|
+
| ErrorResponse | |
|
|
162
195
|
| GrantType | |
|
|
163
196
|
|
|
164
197
|
</details>
|