celitech-sdk 1.1.71 → 1.1.72
Sign up to get free protection for your applications and to get access to all the features.
- package/.manifest.json +12 -12
- package/README.md +2 -2
- package/documentation/services/PurchasesService.md +6 -6
- package/examples/package.json +1 -1
- package/package.json +1 -1
- package/src/http/handlers/hook-handler.ts +6 -4
- package/src/http/handlers/response-validation-handler.ts +1 -1
- package/src/http/handlers/retry-handler.ts +8 -5
- package/src/http/hooks/hook.ts +3 -2
- package/src/http/serializer.ts +7 -4
- package/src/http/transport/request-builder.ts +145 -0
- package/src/http/transport/request.ts +45 -36
- package/src/services/destinations/destinations.ts +14 -11
- package/src/services/destinations/models/destinations.ts +3 -3
- package/src/services/destinations/models/list-destinations-ok-response.ts +3 -3
- package/src/services/e-sim/e-sim.ts +57 -45
- package/src/services/e-sim/models/device.ts +3 -3
- package/src/services/e-sim/models/get-esim-device-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-history-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-history-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-mac-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-mac-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-ok-response.ts +3 -3
- package/src/services/e-sim/models/history.ts +3 -3
- package/src/services/packages/models/list-packages-ok-response.ts +3 -3
- package/src/services/packages/models/packages.ts +3 -3
- package/src/services/packages/packages.ts +22 -19
- package/src/services/purchases/models/create-purchase-ok-response-profile.ts +3 -3
- package/src/services/purchases/models/create-purchase-ok-response-purchase.ts +3 -3
- package/src/services/purchases/models/create-purchase-ok-response.ts +3 -3
- package/src/services/purchases/models/create-purchase-request.ts +3 -3
- package/src/services/purchases/models/edit-purchase-ok-response.ts +3 -3
- package/src/services/purchases/models/edit-purchase-request.ts +3 -3
- package/src/services/purchases/models/get-purchase-consumption-ok-response.ts +3 -3
- package/src/services/purchases/models/list-purchases-ok-response.ts +3 -3
- package/src/services/purchases/models/package_.ts +3 -3
- package/src/services/purchases/models/purchases-esim.ts +3 -3
- package/src/services/purchases/models/purchases.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response-profile.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response-purchase.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response.ts +3 -3
- package/src/services/purchases/models/top-up-esim-request.ts +3 -3
- package/src/services/purchases/purchases.ts +81 -66
- package/.github/PROTECTED_BRANCHES.txt +0 -1
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const editPurchaseRequest
|
6
|
+
export const editPurchaseRequest = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
purchaseId: z.string(),
|
9
9
|
startDate: z.string(),
|
@@ -28,7 +28,7 @@ export type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
|
|
28
28
|
* The shape of the model mapping from the api schema into the application shape.
|
29
29
|
* Is equal to application shape if all property names match the api schema
|
30
30
|
*/
|
31
|
-
export const editPurchaseRequestResponse
|
31
|
+
export const editPurchaseRequestResponse = z.lazy(() => {
|
32
32
|
return z
|
33
33
|
.object({
|
34
34
|
purchaseId: z.string(),
|
@@ -50,7 +50,7 @@ export const editPurchaseRequestResponse: any = z.lazy(() => {
|
|
50
50
|
* The shape of the model mapping from the application shape into the api schema.
|
51
51
|
* Is equal to application shape if all property names match the api schema
|
52
52
|
*/
|
53
|
-
export const editPurchaseRequestRequest
|
53
|
+
export const editPurchaseRequestRequest = z.lazy(() => {
|
54
54
|
return z
|
55
55
|
.object({
|
56
56
|
purchaseId: z.string().nullish(),
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const getPurchaseConsumptionOkResponse
|
6
|
+
export const getPurchaseConsumptionOkResponse = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
dataUsageRemainingInBytes: z.number().optional(),
|
9
9
|
status: z.string().optional(),
|
@@ -22,7 +22,7 @@ export type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsump
|
|
22
22
|
* The shape of the model mapping from the api schema into the application shape.
|
23
23
|
* Is equal to application shape if all property names match the api schema
|
24
24
|
*/
|
25
|
-
export const getPurchaseConsumptionOkResponseResponse
|
25
|
+
export const getPurchaseConsumptionOkResponseResponse = z.lazy(() => {
|
26
26
|
return z
|
27
27
|
.object({
|
28
28
|
dataUsageRemainingInBytes: z.number().optional(),
|
@@ -38,7 +38,7 @@ export const getPurchaseConsumptionOkResponseResponse: any = z.lazy(() => {
|
|
38
38
|
* The shape of the model mapping from the application shape into the api schema.
|
39
39
|
* Is equal to application shape if all property names match the api schema
|
40
40
|
*/
|
41
|
-
export const getPurchaseConsumptionOkResponseRequest
|
41
|
+
export const getPurchaseConsumptionOkResponseRequest = z.lazy(() => {
|
42
42
|
return z
|
43
43
|
.object({ dataUsageRemainingInBytes: z.number().nullish(), status: z.string().nullish() })
|
44
44
|
.transform((data) => ({
|
@@ -4,7 +4,7 @@ import { purchases, purchasesRequest, purchasesResponse } from './purchases';
|
|
4
4
|
/**
|
5
5
|
* The shape of the model inside the application code - what the users use
|
6
6
|
*/
|
7
|
-
export const listPurchasesOkResponse
|
7
|
+
export const listPurchasesOkResponse = z.lazy(() => {
|
8
8
|
return z.object({
|
9
9
|
purchases: z.array(purchases).optional(),
|
10
10
|
afterCursor: z.string().optional().nullable(),
|
@@ -23,7 +23,7 @@ export type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
|
|
23
23
|
* The shape of the model mapping from the api schema into the application shape.
|
24
24
|
* Is equal to application shape if all property names match the api schema
|
25
25
|
*/
|
26
|
-
export const listPurchasesOkResponseResponse
|
26
|
+
export const listPurchasesOkResponseResponse = z.lazy(() => {
|
27
27
|
return z
|
28
28
|
.object({
|
29
29
|
purchases: z.array(purchasesResponse).optional(),
|
@@ -39,7 +39,7 @@ export const listPurchasesOkResponseResponse: any = z.lazy(() => {
|
|
39
39
|
* The shape of the model mapping from the application shape into the api schema.
|
40
40
|
* Is equal to application shape if all property names match the api schema
|
41
41
|
*/
|
42
|
-
export const listPurchasesOkResponseRequest
|
42
|
+
export const listPurchasesOkResponseRequest = z.lazy(() => {
|
43
43
|
return z
|
44
44
|
.object({ purchases: z.array(purchasesRequest).nullish(), afterCursor: z.string().nullish() })
|
45
45
|
.transform((data) => ({
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const package_
|
6
|
+
export const package_ = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
id: z.string().optional(),
|
9
9
|
dataLimitInBytes: z.number().optional(),
|
@@ -28,7 +28,7 @@ export type Package_ = z.infer<typeof package_>;
|
|
28
28
|
* The shape of the model mapping from the api schema into the application shape.
|
29
29
|
* Is equal to application shape if all property names match the api schema
|
30
30
|
*/
|
31
|
-
export const packageResponse
|
31
|
+
export const packageResponse = z.lazy(() => {
|
32
32
|
return z
|
33
33
|
.object({
|
34
34
|
id: z.string().optional(),
|
@@ -50,7 +50,7 @@ export const packageResponse: any = z.lazy(() => {
|
|
50
50
|
* The shape of the model mapping from the application shape into the api schema.
|
51
51
|
* Is equal to application shape if all property names match the api schema
|
52
52
|
*/
|
53
|
-
export const packageRequest
|
53
|
+
export const packageRequest = z.lazy(() => {
|
54
54
|
return z
|
55
55
|
.object({
|
56
56
|
id: z.string().nullish(),
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const purchasesEsim
|
6
|
+
export const purchasesEsim = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
iccid: z.string().min(18).max(22).optional(),
|
9
9
|
});
|
@@ -20,7 +20,7 @@ export type PurchasesEsim = z.infer<typeof purchasesEsim>;
|
|
20
20
|
* The shape of the model mapping from the api schema into the application shape.
|
21
21
|
* Is equal to application shape if all property names match the api schema
|
22
22
|
*/
|
23
|
-
export const purchasesEsimResponse
|
23
|
+
export const purchasesEsimResponse = z.lazy(() => {
|
24
24
|
return z
|
25
25
|
.object({
|
26
26
|
iccid: z.string().min(18).max(22).optional(),
|
@@ -34,7 +34,7 @@ export const purchasesEsimResponse: any = z.lazy(() => {
|
|
34
34
|
* The shape of the model mapping from the application shape into the api schema.
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
36
36
|
*/
|
37
|
-
export const purchasesEsimRequest
|
37
|
+
export const purchasesEsimRequest = z.lazy(() => {
|
38
38
|
return z.object({ iccid: z.string().nullish() }).transform((data) => ({
|
39
39
|
iccid: data['iccid'],
|
40
40
|
}));
|
@@ -5,7 +5,7 @@ import { purchasesEsim, purchasesEsimRequest, purchasesEsimResponse } from './pu
|
|
5
5
|
/**
|
6
6
|
* The shape of the model inside the application code - what the users use
|
7
7
|
*/
|
8
|
-
export const purchases
|
8
|
+
export const purchases = z.lazy(() => {
|
9
9
|
return z.object({
|
10
10
|
id: z.string().optional(),
|
11
11
|
startDate: z.string().optional(),
|
@@ -42,7 +42,7 @@ export type Purchases = z.infer<typeof purchases>;
|
|
42
42
|
* The shape of the model mapping from the api schema into the application shape.
|
43
43
|
* Is equal to application shape if all property names match the api schema
|
44
44
|
*/
|
45
|
-
export const purchasesResponse
|
45
|
+
export const purchasesResponse = z.lazy(() => {
|
46
46
|
return z
|
47
47
|
.object({
|
48
48
|
id: z.string().optional(),
|
@@ -76,7 +76,7 @@ export const purchasesResponse: any = z.lazy(() => {
|
|
76
76
|
* The shape of the model mapping from the application shape into the api schema.
|
77
77
|
* Is equal to application shape if all property names match the api schema
|
78
78
|
*/
|
79
|
-
export const purchasesRequest
|
79
|
+
export const purchasesRequest = z.lazy(() => {
|
80
80
|
return z
|
81
81
|
.object({
|
82
82
|
id: z.string().nullish(),
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const topUpEsimOkResponseProfile
|
6
|
+
export const topUpEsimOkResponseProfile = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
iccid: z.string().min(18).max(22).optional(),
|
9
9
|
});
|
@@ -20,7 +20,7 @@ export type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfi
|
|
20
20
|
* The shape of the model mapping from the api schema into the application shape.
|
21
21
|
* Is equal to application shape if all property names match the api schema
|
22
22
|
*/
|
23
|
-
export const topUpEsimOkResponseProfileResponse
|
23
|
+
export const topUpEsimOkResponseProfileResponse = z.lazy(() => {
|
24
24
|
return z
|
25
25
|
.object({
|
26
26
|
iccid: z.string().min(18).max(22).optional(),
|
@@ -34,7 +34,7 @@ export const topUpEsimOkResponseProfileResponse: any = z.lazy(() => {
|
|
34
34
|
* The shape of the model mapping from the application shape into the api schema.
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
36
36
|
*/
|
37
|
-
export const topUpEsimOkResponseProfileRequest
|
37
|
+
export const topUpEsimOkResponseProfileRequest = z.lazy(() => {
|
38
38
|
return z.object({ iccid: z.string().nullish() }).transform((data) => ({
|
39
39
|
iccid: data['iccid'],
|
40
40
|
}));
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const topUpEsimOkResponsePurchase
|
6
|
+
export const topUpEsimOkResponsePurchase = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
id: z.string().optional(),
|
9
9
|
packageId: z.string().optional(),
|
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurc
|
|
32
32
|
* The shape of the model mapping from the api schema into the application shape.
|
33
33
|
* Is equal to application shape if all property names match the api schema
|
34
34
|
*/
|
35
|
-
export const topUpEsimOkResponsePurchaseResponse
|
35
|
+
export const topUpEsimOkResponsePurchaseResponse = z.lazy(() => {
|
36
36
|
return z
|
37
37
|
.object({
|
38
38
|
id: z.string().optional(),
|
@@ -58,7 +58,7 @@ export const topUpEsimOkResponsePurchaseResponse: any = z.lazy(() => {
|
|
58
58
|
* The shape of the model mapping from the application shape into the api schema.
|
59
59
|
* Is equal to application shape if all property names match the api schema
|
60
60
|
*/
|
61
|
-
export const topUpEsimOkResponsePurchaseRequest
|
61
|
+
export const topUpEsimOkResponsePurchaseRequest = z.lazy(() => {
|
62
62
|
return z
|
63
63
|
.object({
|
64
64
|
id: z.string().nullish(),
|
@@ -13,7 +13,7 @@ import {
|
|
13
13
|
/**
|
14
14
|
* The shape of the model inside the application code - what the users use
|
15
15
|
*/
|
16
|
-
export const topUpEsimOkResponse
|
16
|
+
export const topUpEsimOkResponse = z.lazy(() => {
|
17
17
|
return z.object({
|
18
18
|
purchase: topUpEsimOkResponsePurchase.optional(),
|
19
19
|
profile: topUpEsimOkResponseProfile.optional(),
|
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
|
|
32
32
|
* The shape of the model mapping from the api schema into the application shape.
|
33
33
|
* Is equal to application shape if all property names match the api schema
|
34
34
|
*/
|
35
|
-
export const topUpEsimOkResponseResponse
|
35
|
+
export const topUpEsimOkResponseResponse = z.lazy(() => {
|
36
36
|
return z
|
37
37
|
.object({
|
38
38
|
purchase: topUpEsimOkResponsePurchaseResponse.optional(),
|
@@ -48,7 +48,7 @@ export const topUpEsimOkResponseResponse: any = z.lazy(() => {
|
|
48
48
|
* The shape of the model mapping from the application shape into the api schema.
|
49
49
|
* Is equal to application shape if all property names match the api schema
|
50
50
|
*/
|
51
|
-
export const topUpEsimOkResponseRequest
|
51
|
+
export const topUpEsimOkResponseRequest = z.lazy(() => {
|
52
52
|
return z
|
53
53
|
.object({
|
54
54
|
purchase: topUpEsimOkResponsePurchaseRequest.nullish(),
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
/**
|
4
4
|
* The shape of the model inside the application code - what the users use
|
5
5
|
*/
|
6
|
-
export const topUpEsimRequest
|
6
|
+
export const topUpEsimRequest = z.lazy(() => {
|
7
7
|
return z.object({
|
8
8
|
iccid: z.string().min(18).max(22),
|
9
9
|
dataLimitInGb: z.number(),
|
@@ -34,7 +34,7 @@ export type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
|
|
34
34
|
* The shape of the model mapping from the api schema into the application shape.
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
36
36
|
*/
|
37
|
-
export const topUpEsimRequestResponse
|
37
|
+
export const topUpEsimRequestResponse = z.lazy(() => {
|
38
38
|
return z
|
39
39
|
.object({
|
40
40
|
iccid: z.string().min(18).max(22),
|
@@ -62,7 +62,7 @@ export const topUpEsimRequestResponse: any = z.lazy(() => {
|
|
62
62
|
* The shape of the model mapping from the application shape into the api schema.
|
63
63
|
* Is equal to application shape if all property names match the api schema
|
64
64
|
*/
|
65
|
-
export const topUpEsimRequestRequest
|
65
|
+
export const topUpEsimRequestRequest = z.lazy(() => {
|
66
66
|
return z
|
67
67
|
.object({
|
68
68
|
iccid: z.string().nullish(),
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
import { BaseService } from '../base-service';
|
3
3
|
import { ContentType, HttpResponse } from '../../http';
|
4
4
|
import { RequestConfig } from '../../http/types';
|
5
|
-
import {
|
5
|
+
import { RequestBuilder } from '../../http/transport/request-builder';
|
6
6
|
import { ListPurchasesOkResponse, listPurchasesOkResponseResponse } from './models/list-purchases-ok-response';
|
7
7
|
import { ListPurchasesParams } from './request-params';
|
8
8
|
import { CreatePurchaseRequest, createPurchaseRequestRequest } from './models/create-purchase-request';
|
@@ -33,24 +33,27 @@ export class PurchasesService extends BaseService {
|
|
33
33
|
params?: ListPurchasesParams,
|
34
34
|
requestConfig?: RequestConfig,
|
35
35
|
): Promise<HttpResponse<ListPurchasesOkResponse>> {
|
36
|
-
const request = new
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
36
|
+
const request = new RequestBuilder<ListPurchasesOkResponse>()
|
37
|
+
.setConfig(this.config)
|
38
|
+
.setBaseUrl(this.config)
|
39
|
+
.setMethod('GET')
|
40
|
+
.setPath('/purchases')
|
41
|
+
.setRequestSchema(z.any())
|
42
|
+
.setResponseSchema(listPurchasesOkResponseResponse)
|
43
|
+
.setRequestContentType(ContentType.Json)
|
44
|
+
.setResponseContentType(ContentType.Json)
|
45
|
+
.setRetryAttempts(this.config, requestConfig)
|
46
|
+
.setRetryDelayMs(this.config, requestConfig)
|
47
|
+
.setResponseValidation(this.config, requestConfig)
|
48
|
+
.addQueryParam('iccid', params?.iccid)
|
49
|
+
.addQueryParam('afterDate', params?.afterDate)
|
50
|
+
.addQueryParam('beforeDate', params?.beforeDate)
|
51
|
+
.addQueryParam('referenceId', params?.referenceId)
|
52
|
+
.addQueryParam('afterCursor', params?.afterCursor)
|
53
|
+
.addQueryParam('limit', params?.limit)
|
54
|
+
.addQueryParam('after', params?.after)
|
55
|
+
.addQueryParam('before', params?.before)
|
56
|
+
.build();
|
54
57
|
return this.client.call<ListPurchasesOkResponse>(request);
|
55
58
|
}
|
56
59
|
|
@@ -62,18 +65,21 @@ export class PurchasesService extends BaseService {
|
|
62
65
|
body: CreatePurchaseRequest,
|
63
66
|
requestConfig?: RequestConfig,
|
64
67
|
): Promise<HttpResponse<CreatePurchaseOkResponse>> {
|
65
|
-
const request = new
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
requestConfig
|
75
|
-
|
76
|
-
|
68
|
+
const request = new RequestBuilder<CreatePurchaseOkResponse>()
|
69
|
+
.setConfig(this.config)
|
70
|
+
.setBaseUrl(this.config)
|
71
|
+
.setMethod('POST')
|
72
|
+
.setPath('/purchases')
|
73
|
+
.setRequestSchema(createPurchaseRequestRequest)
|
74
|
+
.setResponseSchema(createPurchaseOkResponseResponse)
|
75
|
+
.setRequestContentType(ContentType.Json)
|
76
|
+
.setResponseContentType(ContentType.Json)
|
77
|
+
.setRetryAttempts(this.config, requestConfig)
|
78
|
+
.setRetryDelayMs(this.config, requestConfig)
|
79
|
+
.setResponseValidation(this.config, requestConfig)
|
80
|
+
.addHeaderParam('Content-Type', 'application/json')
|
81
|
+
.addBody(body)
|
82
|
+
.build();
|
77
83
|
return this.client.call<CreatePurchaseOkResponse>(request);
|
78
84
|
}
|
79
85
|
|
@@ -82,18 +88,21 @@ export class PurchasesService extends BaseService {
|
|
82
88
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
|
83
89
|
*/
|
84
90
|
async topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>> {
|
85
|
-
const request = new
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
requestConfig
|
95
|
-
|
96
|
-
|
91
|
+
const request = new RequestBuilder<TopUpEsimOkResponse>()
|
92
|
+
.setConfig(this.config)
|
93
|
+
.setBaseUrl(this.config)
|
94
|
+
.setMethod('POST')
|
95
|
+
.setPath('/purchases/topup')
|
96
|
+
.setRequestSchema(topUpEsimRequestRequest)
|
97
|
+
.setResponseSchema(topUpEsimOkResponseResponse)
|
98
|
+
.setRequestContentType(ContentType.Json)
|
99
|
+
.setResponseContentType(ContentType.Json)
|
100
|
+
.setRetryAttempts(this.config, requestConfig)
|
101
|
+
.setRetryDelayMs(this.config, requestConfig)
|
102
|
+
.setResponseValidation(this.config, requestConfig)
|
103
|
+
.addHeaderParam('Content-Type', 'application/json')
|
104
|
+
.addBody(body)
|
105
|
+
.build();
|
97
106
|
return this.client.call<TopUpEsimOkResponse>(request);
|
98
107
|
}
|
99
108
|
|
@@ -105,18 +114,21 @@ export class PurchasesService extends BaseService {
|
|
105
114
|
body: EditPurchaseRequest,
|
106
115
|
requestConfig?: RequestConfig,
|
107
116
|
): Promise<HttpResponse<EditPurchaseOkResponse>> {
|
108
|
-
const request = new
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
requestConfig
|
118
|
-
|
119
|
-
|
117
|
+
const request = new RequestBuilder<EditPurchaseOkResponse>()
|
118
|
+
.setConfig(this.config)
|
119
|
+
.setBaseUrl(this.config)
|
120
|
+
.setMethod('POST')
|
121
|
+
.setPath('/purchases/edit')
|
122
|
+
.setRequestSchema(editPurchaseRequestRequest)
|
123
|
+
.setResponseSchema(editPurchaseOkResponseResponse)
|
124
|
+
.setRequestContentType(ContentType.Json)
|
125
|
+
.setResponseContentType(ContentType.Json)
|
126
|
+
.setRetryAttempts(this.config, requestConfig)
|
127
|
+
.setRetryDelayMs(this.config, requestConfig)
|
128
|
+
.setResponseValidation(this.config, requestConfig)
|
129
|
+
.addHeaderParam('Content-Type', 'application/json')
|
130
|
+
.addBody(body)
|
131
|
+
.build();
|
120
132
|
return this.client.call<EditPurchaseOkResponse>(request);
|
121
133
|
}
|
122
134
|
|
@@ -129,17 +141,20 @@ export class PurchasesService extends BaseService {
|
|
129
141
|
purchaseId: string,
|
130
142
|
requestConfig?: RequestConfig,
|
131
143
|
): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>> {
|
132
|
-
const request = new
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
144
|
+
const request = new RequestBuilder<GetPurchaseConsumptionOkResponse>()
|
145
|
+
.setConfig(this.config)
|
146
|
+
.setBaseUrl(this.config)
|
147
|
+
.setMethod('GET')
|
148
|
+
.setPath('/purchases/{purchaseId}/consumption')
|
149
|
+
.setRequestSchema(z.any())
|
150
|
+
.setResponseSchema(getPurchaseConsumptionOkResponseResponse)
|
151
|
+
.setRequestContentType(ContentType.Json)
|
152
|
+
.setResponseContentType(ContentType.Json)
|
153
|
+
.setRetryAttempts(this.config, requestConfig)
|
154
|
+
.setRetryDelayMs(this.config, requestConfig)
|
155
|
+
.setResponseValidation(this.config, requestConfig)
|
156
|
+
.addPathParam('purchaseId', purchaseId)
|
157
|
+
.build();
|
143
158
|
return this.client.call<GetPurchaseConsumptionOkResponse>(request);
|
144
159
|
}
|
145
160
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
main
|