tuix-subscription-service-client 0.0.1
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/.openapi-generator/FILES +19 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +48 -0
- package/apis/ClientApi.js +167 -0
- package/apis/ClientApi.js.map +1 -0
- package/apis/ClientApi.ts +205 -0
- package/apis/index.js +20 -0
- package/apis/index.js.map +1 -0
- package/apis/index.ts +3 -0
- package/docs/ClientApi.md +286 -0
- package/docs/CreateSubscriptionDTO.md +36 -0
- package/docs/ErrorDTO.md +34 -0
- package/docs/SendNewsletterDTO.md +34 -0
- package/docs/SubscriptionDTO.md +42 -0
- package/docs/SubscriptionSentDTO.md +36 -0
- package/docs/SubscriptionsSentResponseDTO.md +34 -0
- package/index.js +22 -0
- package/index.js.map +1 -0
- package/index.ts +5 -0
- package/models/CreateSubscriptionDTO.js +51 -0
- package/models/CreateSubscriptionDTO.js.map +1 -0
- package/models/CreateSubscriptionDTO.ts +73 -0
- package/models/ErrorDTO.js +49 -0
- package/models/ErrorDTO.js.map +1 -0
- package/models/ErrorDTO.ts +65 -0
- package/models/SendNewsletterDTO.js +49 -0
- package/models/SendNewsletterDTO.js.map +1 -0
- package/models/SendNewsletterDTO.ts +65 -0
- package/models/SubscriptionDTO.js +57 -0
- package/models/SubscriptionDTO.js.map +1 -0
- package/models/SubscriptionDTO.ts +97 -0
- package/models/SubscriptionSentDTO.js +52 -0
- package/models/SubscriptionSentDTO.js.map +1 -0
- package/models/SubscriptionSentDTO.ts +81 -0
- package/models/SubscriptionsSentResponseDTO.js +50 -0
- package/models/SubscriptionsSentResponseDTO.js.map +1 -0
- package/models/SubscriptionsSentResponseDTO.ts +73 -0
- package/models/index.js +25 -0
- package/models/index.js.map +1 -0
- package/models/index.ts +8 -0
- package/package.json +17 -0
- package/runtime.js +330 -0
- package/runtime.js.map +1 -0
- package/runtime.ts +432 -0
- package/tsconfig.build.tsbuildinfo +1 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# ClientApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://0.0.0.0:3000/local*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createSubscription**](ClientApi.md#createsubscription) | **POST** /subscriptions | Create a new subscription |
|
|
8
|
+
| [**deleteSubscription**](ClientApi.md#deletesubscription) | **DELETE** /subscriptions/{id} | Delete a subscription |
|
|
9
|
+
| [**getSubscriptions**](ClientApi.md#getsubscriptions) | **GET** /subscriptions | Get all subscriptions |
|
|
10
|
+
| [**sendNewsletter**](ClientApi.md#sendnewsletter) | **POST** /subscriptions/newsletter | Send newsletter to all subscribers |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## createSubscription
|
|
15
|
+
|
|
16
|
+
> SubscriptionDTO createSubscription(createSubscriptionDTO)
|
|
17
|
+
|
|
18
|
+
Create a new subscription
|
|
19
|
+
|
|
20
|
+
Create a new subscription
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import {
|
|
26
|
+
Configuration,
|
|
27
|
+
ClientApi,
|
|
28
|
+
} from '';
|
|
29
|
+
import type { CreateSubscriptionRequest } from '';
|
|
30
|
+
|
|
31
|
+
async function example() {
|
|
32
|
+
console.log("🚀 Testing SDK...");
|
|
33
|
+
const api = new ClientApi();
|
|
34
|
+
|
|
35
|
+
const body = {
|
|
36
|
+
// CreateSubscriptionDTO | Subscription data
|
|
37
|
+
createSubscriptionDTO: ...,
|
|
38
|
+
} satisfies CreateSubscriptionRequest;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const data = await api.createSubscription(body);
|
|
42
|
+
console.log(data);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error(error);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Run the test
|
|
49
|
+
example().catch(console.error);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
| Name | Type | Description | Notes |
|
|
56
|
+
|------------- | ------------- | ------------- | -------------|
|
|
57
|
+
| **createSubscriptionDTO** | [CreateSubscriptionDTO](CreateSubscriptionDTO.md) | Subscription data | |
|
|
58
|
+
|
|
59
|
+
### Return type
|
|
60
|
+
|
|
61
|
+
[**SubscriptionDTO**](SubscriptionDTO.md)
|
|
62
|
+
|
|
63
|
+
### Authorization
|
|
64
|
+
|
|
65
|
+
No authorization required
|
|
66
|
+
|
|
67
|
+
### HTTP request headers
|
|
68
|
+
|
|
69
|
+
- **Content-Type**: `application/json`
|
|
70
|
+
- **Accept**: `application/json`
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### HTTP response details
|
|
74
|
+
| Status code | Description | Response headers |
|
|
75
|
+
|-------------|-------------|------------------|
|
|
76
|
+
| **201** | Created subscription | - |
|
|
77
|
+
| **400** | Return an error if there is a missing or invalid field | - |
|
|
78
|
+
| **401** | Return an error if the user is not authorized | - |
|
|
79
|
+
| **409** | Return an error if subscription already exists | - |
|
|
80
|
+
| **500** | Return an error if an internal error occurs | - |
|
|
81
|
+
|
|
82
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## deleteSubscription
|
|
86
|
+
|
|
87
|
+
> deleteSubscription(id)
|
|
88
|
+
|
|
89
|
+
Delete a subscription
|
|
90
|
+
|
|
91
|
+
Delete a subscription
|
|
92
|
+
|
|
93
|
+
### Example
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import {
|
|
97
|
+
Configuration,
|
|
98
|
+
ClientApi,
|
|
99
|
+
} from '';
|
|
100
|
+
import type { DeleteSubscriptionRequest } from '';
|
|
101
|
+
|
|
102
|
+
async function example() {
|
|
103
|
+
console.log("🚀 Testing SDK...");
|
|
104
|
+
const api = new ClientApi();
|
|
105
|
+
|
|
106
|
+
const body = {
|
|
107
|
+
// string | Subscription ID
|
|
108
|
+
id: id_example,
|
|
109
|
+
} satisfies DeleteSubscriptionRequest;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const data = await api.deleteSubscription(body);
|
|
113
|
+
console.log(data);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.error(error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Run the test
|
|
120
|
+
example().catch(console.error);
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Parameters
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
| Name | Type | Description | Notes |
|
|
127
|
+
|------------- | ------------- | ------------- | -------------|
|
|
128
|
+
| **id** | `string` | Subscription ID | [Defaults to `undefined`] |
|
|
129
|
+
|
|
130
|
+
### Return type
|
|
131
|
+
|
|
132
|
+
`void` (Empty response body)
|
|
133
|
+
|
|
134
|
+
### Authorization
|
|
135
|
+
|
|
136
|
+
No authorization required
|
|
137
|
+
|
|
138
|
+
### HTTP request headers
|
|
139
|
+
|
|
140
|
+
- **Content-Type**: Not defined
|
|
141
|
+
- **Accept**: `application/json`
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### HTTP response details
|
|
145
|
+
| Status code | Description | Response headers |
|
|
146
|
+
|-------------|-------------|------------------|
|
|
147
|
+
| **204** | Subscription deleted successfully | - |
|
|
148
|
+
| **400** | Return an error if there is a missing or invalid field | - |
|
|
149
|
+
| **401** | Return an error if the user is not authorized | - |
|
|
150
|
+
| **404** | Return an error if subscription not found | - |
|
|
151
|
+
| **500** | Return an error if an internal error occurs | - |
|
|
152
|
+
|
|
153
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## getSubscriptions
|
|
157
|
+
|
|
158
|
+
> Array<SubscriptionDTO> getSubscriptions()
|
|
159
|
+
|
|
160
|
+
Get all subscriptions
|
|
161
|
+
|
|
162
|
+
Get all subscriptions
|
|
163
|
+
|
|
164
|
+
### Example
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import {
|
|
168
|
+
Configuration,
|
|
169
|
+
ClientApi,
|
|
170
|
+
} from '';
|
|
171
|
+
import type { GetSubscriptionsRequest } from '';
|
|
172
|
+
|
|
173
|
+
async function example() {
|
|
174
|
+
console.log("🚀 Testing SDK...");
|
|
175
|
+
const api = new ClientApi();
|
|
176
|
+
|
|
177
|
+
try {
|
|
178
|
+
const data = await api.getSubscriptions();
|
|
179
|
+
console.log(data);
|
|
180
|
+
} catch (error) {
|
|
181
|
+
console.error(error);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Run the test
|
|
186
|
+
example().catch(console.error);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Parameters
|
|
190
|
+
|
|
191
|
+
This endpoint does not need any parameter.
|
|
192
|
+
|
|
193
|
+
### Return type
|
|
194
|
+
|
|
195
|
+
[**Array<SubscriptionDTO>**](SubscriptionDTO.md)
|
|
196
|
+
|
|
197
|
+
### Authorization
|
|
198
|
+
|
|
199
|
+
No authorization required
|
|
200
|
+
|
|
201
|
+
### HTTP request headers
|
|
202
|
+
|
|
203
|
+
- **Content-Type**: Not defined
|
|
204
|
+
- **Accept**: `application/json`
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### HTTP response details
|
|
208
|
+
| Status code | Description | Response headers |
|
|
209
|
+
|-------------|-------------|------------------|
|
|
210
|
+
| **200** | List of subscriptions | - |
|
|
211
|
+
| **400** | Return an error if there is a missing or invalid field | - |
|
|
212
|
+
| **401** | Return an error if the user is not authorized | - |
|
|
213
|
+
| **500** | Return an error if an internal error occurs | - |
|
|
214
|
+
|
|
215
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## sendNewsletter
|
|
219
|
+
|
|
220
|
+
> SubscriptionsSentResponseDTO sendNewsletter(sendNewsletterDTO)
|
|
221
|
+
|
|
222
|
+
Send newsletter to all subscribers
|
|
223
|
+
|
|
224
|
+
Send newsletter to all subscribers
|
|
225
|
+
|
|
226
|
+
### Example
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
import {
|
|
230
|
+
Configuration,
|
|
231
|
+
ClientApi,
|
|
232
|
+
} from '';
|
|
233
|
+
import type { SendNewsletterRequest } from '';
|
|
234
|
+
|
|
235
|
+
async function example() {
|
|
236
|
+
console.log("🚀 Testing SDK...");
|
|
237
|
+
const api = new ClientApi();
|
|
238
|
+
|
|
239
|
+
const body = {
|
|
240
|
+
// SendNewsletterDTO | Newsletter data
|
|
241
|
+
sendNewsletterDTO: ...,
|
|
242
|
+
} satisfies SendNewsletterRequest;
|
|
243
|
+
|
|
244
|
+
try {
|
|
245
|
+
const data = await api.sendNewsletter(body);
|
|
246
|
+
console.log(data);
|
|
247
|
+
} catch (error) {
|
|
248
|
+
console.error(error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Run the test
|
|
253
|
+
example().catch(console.error);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Parameters
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
| Name | Type | Description | Notes |
|
|
260
|
+
|------------- | ------------- | ------------- | -------------|
|
|
261
|
+
| **sendNewsletterDTO** | [SendNewsletterDTO](SendNewsletterDTO.md) | Newsletter data | |
|
|
262
|
+
|
|
263
|
+
### Return type
|
|
264
|
+
|
|
265
|
+
[**SubscriptionsSentResponseDTO**](SubscriptionsSentResponseDTO.md)
|
|
266
|
+
|
|
267
|
+
### Authorization
|
|
268
|
+
|
|
269
|
+
No authorization required
|
|
270
|
+
|
|
271
|
+
### HTTP request headers
|
|
272
|
+
|
|
273
|
+
- **Content-Type**: `application/json`
|
|
274
|
+
- **Accept**: `application/json`
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
### HTTP response details
|
|
278
|
+
| Status code | Description | Response headers |
|
|
279
|
+
|-------------|-------------|------------------|
|
|
280
|
+
| **201** | Newsletter sent response | - |
|
|
281
|
+
| **400** | Return an error if there is a missing or invalid field | - |
|
|
282
|
+
| **401** | Return an error if the user is not authorized | - |
|
|
283
|
+
| **500** | Return an error if an internal error occurs | - |
|
|
284
|
+
|
|
285
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
286
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateSubscriptionDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`email` | string
|
|
10
|
+
`language` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { CreateSubscriptionDTO } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"email": null,
|
|
20
|
+
"language": null,
|
|
21
|
+
} satisfies CreateSubscriptionDTO
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateSubscriptionDTO
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/docs/ErrorDTO.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ErrorDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`message` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ErrorDTO } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"message": null,
|
|
19
|
+
} satisfies ErrorDTO
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as ErrorDTO
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# SendNewsletterDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`templateId` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SendNewsletterDTO } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"templateId": null,
|
|
19
|
+
} satisfies SendNewsletterDTO
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as SendNewsletterDTO
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# SubscriptionDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`createdAt` | string
|
|
10
|
+
`email` | string
|
|
11
|
+
`id` | string
|
|
12
|
+
`language` | string
|
|
13
|
+
`updatedAt` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { SubscriptionDTO } from ''
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"createdAt": null,
|
|
23
|
+
"email": null,
|
|
24
|
+
"id": null,
|
|
25
|
+
"language": null,
|
|
26
|
+
"updatedAt": null,
|
|
27
|
+
} satisfies SubscriptionDTO
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubscriptionDTO
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# SubscriptionSentDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`emailSent` | boolean
|
|
10
|
+
`subscription` | [SubscriptionDTO](SubscriptionDTO.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { SubscriptionSentDTO } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"emailSent": null,
|
|
20
|
+
"subscription": null,
|
|
21
|
+
} satisfies SubscriptionSentDTO
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubscriptionSentDTO
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# SubscriptionsSentResponseDTO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`subscriptionsProcessed` | [Array<SubscriptionSentDTO>](SubscriptionSentDTO.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SubscriptionsSentResponseDTO } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"subscriptionsProcessed": null,
|
|
19
|
+
} satisfies SubscriptionsSentResponseDTO
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubscriptionsSentResponseDTO
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./runtime"), exports);
|
|
20
|
+
__exportStar(require("./apis/index"), exports);
|
|
21
|
+
__exportStar(require("./models/index"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,oBAAoB;AACpB,4CAA0B;AAC1B,+CAA6B;AAC7B,iDAA+B"}
|
package/index.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tuix Subscriptions Service
|
|
6
|
+
* Service to manage Tuix Subscriptions
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCreateSubscriptionDTO = instanceOfCreateSubscriptionDTO;
|
|
17
|
+
exports.CreateSubscriptionDTOFromJSON = CreateSubscriptionDTOFromJSON;
|
|
18
|
+
exports.CreateSubscriptionDTOFromJSONTyped = CreateSubscriptionDTOFromJSONTyped;
|
|
19
|
+
exports.CreateSubscriptionDTOToJSON = CreateSubscriptionDTOToJSON;
|
|
20
|
+
exports.CreateSubscriptionDTOToJSONTyped = CreateSubscriptionDTOToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateSubscriptionDTO interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCreateSubscriptionDTO(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function CreateSubscriptionDTOFromJSON(json) {
|
|
28
|
+
return CreateSubscriptionDTOFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function CreateSubscriptionDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
36
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function CreateSubscriptionDTOToJSON(json) {
|
|
40
|
+
return CreateSubscriptionDTOToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function CreateSubscriptionDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'email': value['email'],
|
|
48
|
+
'language': value['language'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=CreateSubscriptionDTO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSubscriptionDTO.js","sourceRoot":"","sources":["CreateSubscriptionDTO.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;AA0BH,0EAEC;AAED,sEAEC;AAED,gFASC;AAED,kEAEC;AAED,4EAUC;AApCD;;GAEG;AACH,SAAgB,+BAA+B,CAAC,KAAa;IACzD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAgB,6BAA6B,CAAC,IAAS;IACnD,OAAO,kCAAkC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,SAAgB,kCAAkC,CAAC,IAAS,EAAE,mBAA4B;IACtF,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QAEH,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC1D,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;KACtE,CAAC;AACN,CAAC;AAED,SAAgB,2BAA2B,CAAC,IAAS;IACjD,OAAO,gCAAgC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,SAAgB,gCAAgC,CAAC,KAAoC,EAAE,sBAA+B,KAAK;IACvH,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO;QAEH,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;QACvB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;KAChC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tuix Subscriptions Service
|
|
5
|
+
* Service to manage Tuix Subscriptions
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateSubscriptionDTO
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateSubscriptionDTO {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateSubscriptionDTO
|
|
26
|
+
*/
|
|
27
|
+
email?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateSubscriptionDTO
|
|
32
|
+
*/
|
|
33
|
+
language?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the CreateSubscriptionDTO interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfCreateSubscriptionDTO(value: object): value is CreateSubscriptionDTO {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function CreateSubscriptionDTOFromJSON(json: any): CreateSubscriptionDTO {
|
|
44
|
+
return CreateSubscriptionDTOFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function CreateSubscriptionDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSubscriptionDTO {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
54
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function CreateSubscriptionDTOToJSON(json: any): CreateSubscriptionDTO {
|
|
59
|
+
return CreateSubscriptionDTOToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CreateSubscriptionDTOToJSONTyped(value?: CreateSubscriptionDTO | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'email': value['email'],
|
|
70
|
+
'language': value['language'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|