@ayasofyazilim/saas 0.0.72 → 0.0.74

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.
@@ -199,6 +199,11 @@ export type UniRefund_CRMService_Customss_CustomsDto = {
199
199
  entityInformations?: Array<UniRefund_CRMService_EntityInformationTypes_EntityInformationTypeDto> | null;
200
200
  };
201
201
 
202
+ export type UniRefund_CRMService_Customss_CustomsNameDto = {
203
+ id: string;
204
+ name: string;
205
+ };
206
+
202
207
  export type UniRefund_CRMService_Customss_CustomsProfileDto = {
203
208
  id?: string;
204
209
  name?: string | null;
@@ -282,6 +287,15 @@ export type UniRefund_CRMService_Individuals_CreateIndividualDto = {
282
287
  name?: UniRefund_CRMService_NameCommonDatas_CreateNameCommonDataDto;
283
288
  personalSummaries?: Array<UniRefund_CRMService_PersonalSummaries_CreatePersonalSummaryDto> | null;
284
289
  contactInformations?: Array<UniRefund_CRMService_ContactInformationTypes_CreateContactInformationTypeDto> | null;
290
+ createAbpUserAccount?: boolean;
291
+ };
292
+
293
+ export type UniRefund_CRMService_Individuals_IndividualAffiliationsDto = {
294
+ merchants?: Array<UniRefund_CRMService_Merchants_MerchantNameDto> | null;
295
+ customs?: Array<UniRefund_CRMService_Customss_CustomsNameDto> | null;
296
+ taxFrees?: Array<UniRefund_CRMService_TaxFrees_TaxFreeNameDto> | null;
297
+ taxOffices?: Array<UniRefund_CRMService_TaxOffices_TaxOfficeNameDto> | null;
298
+ refundPoints?: Array<UniRefund_CRMService_RefundPoints_RefundPointNameDto> | null;
285
299
  };
286
300
 
287
301
  export type UniRefund_CRMService_Individuals_IndividualDto = {
@@ -345,6 +359,7 @@ export type UniRefund_CRMService_Merchants_CreateMerchantIndividualDto = {
345
359
  name?: UniRefund_CRMService_NameCommonDatas_CreateNameCommonDataDto;
346
360
  personalSummaries?: Array<UniRefund_CRMService_PersonalSummaries_CreatePersonalSummaryDto> | null;
347
361
  contactInformations?: Array<UniRefund_CRMService_ContactInformationTypes_CreateContactInformationTypeDto> | null;
362
+ createAbpUserAccount?: boolean;
348
363
  affiliationCodeId: number;
349
364
  };
350
365
 
@@ -370,7 +385,7 @@ export type UniRefund_CRMService_Merchants_MerchantBaseDto = {
370
385
  export type UniRefund_CRMService_Merchants_MerchantBasicInformationDto = {
371
386
  id?: string;
372
387
  name?: string | null;
373
- taxOffice?: UniRefund_CRMService_TaxOffices_TaxOfficeIdNameDto;
388
+ taxOffice?: UniRefund_CRMService_TaxOffices_TaxOfficeNameDto;
374
389
  numberOfStores?: number;
375
390
  accountManagers?: Array<UniRefund_CRMService_Individuals_IndividualIdNameDto> | null;
376
391
  };
@@ -404,11 +419,17 @@ export type UniRefund_CRMService_Merchants_MerchantInfoDto = {
404
419
  branchId?: string | null;
405
420
  };
406
421
 
422
+ export type UniRefund_CRMService_Merchants_MerchantNameDto = {
423
+ id: string;
424
+ name: string;
425
+ };
426
+
407
427
  export type UniRefund_CRMService_Merchants_MerchantProfileDto = {
408
428
  id: string;
409
429
  typeCode?: UniRefund_CRMService_Merchants_MerchantTypeCode;
410
430
  name: string;
411
431
  parentId?: string | null;
432
+ parentName?: string | null;
412
433
  entityInformationTypeCode: UniRefund_CRMService_Enums_EntityInformationTypeCode;
413
434
  organizationId?: string | null;
414
435
  individualId?: string | null;
@@ -609,7 +630,7 @@ export type UniRefund_CRMService_RefundPoints_CreateRefundPointOrganizationDto =
609
630
  export type UniRefund_CRMService_RefundPoints_RefundPointBasicInformationDto = {
610
631
  id?: string;
611
632
  name?: string | null;
612
- taxOffice?: UniRefund_CRMService_TaxOffices_TaxOfficeIdNameDto;
633
+ taxOffice?: UniRefund_CRMService_TaxOffices_TaxOfficeNameDto;
613
634
  numberOfStores?: number;
614
635
  accountManagers?: Array<UniRefund_CRMService_Individuals_IndividualIdNameDto> | null;
615
636
  };
@@ -686,6 +707,11 @@ export type UniRefund_CRMService_TaxFrees_TaxFreeDto = {
686
707
  entityInformations?: Array<UniRefund_CRMService_EntityInformationTypes_EntityInformationTypeDto> | null;
687
708
  };
688
709
 
710
+ export type UniRefund_CRMService_TaxFrees_TaxFreeNameDto = {
711
+ id: string;
712
+ name: string;
713
+ };
714
+
689
715
  export type UniRefund_CRMService_TaxFrees_TaxFreeProfileDto = {
690
716
  id?: string;
691
717
  name?: string | null;
@@ -732,9 +758,9 @@ export type UniRefund_CRMService_TaxOffices_TaxOfficeDto = {
732
758
  entityInformations?: Array<UniRefund_CRMService_EntityInformationTypes_EntityInformationTypeDto> | null;
733
759
  };
734
760
 
735
- export type UniRefund_CRMService_TaxOffices_TaxOfficeIdNameDto = {
736
- id?: string;
737
- name?: string | null;
761
+ export type UniRefund_CRMService_TaxOffices_TaxOfficeNameDto = {
762
+ id: string;
763
+ name: string;
738
764
  };
739
765
 
740
766
  export type UniRefund_CRMService_TaxOffices_TaxOfficeProfileDto = {
@@ -1440,6 +1466,17 @@ export type GetApiCrmServiceIndividualsAllUserDevicesNamesData = {
1440
1466
 
1441
1467
  export type GetApiCrmServiceIndividualsAllUserDevicesNamesResponse = Array<UniRefund_CRMService_RefundPoints_UserDeviceNameDto>;
1442
1468
 
1469
+ export type GetApiCrmServiceIndividualsByIdAffiliationsData = {
1470
+ id: string;
1471
+ showCustoms?: boolean;
1472
+ showMerchant?: boolean;
1473
+ showRefundPoint?: boolean;
1474
+ showTaxFree?: boolean;
1475
+ showTaxOffice?: boolean;
1476
+ };
1477
+
1478
+ export type GetApiCrmServiceIndividualsByIdAffiliationsResponse = UniRefund_CRMService_Individuals_IndividualAffiliationsDto;
1479
+
1443
1480
  export type GetApiCrmServiceMerchantsData = {
1444
1481
  ids?: Array<(string)>;
1445
1482
  maxResultCount?: number;
@@ -2905,6 +2942,41 @@ export type $OpenApiTs = {
2905
2942
  };
2906
2943
  };
2907
2944
  };
2945
+ '/api/crm-service/individuals/{id}/affiliations': {
2946
+ get: {
2947
+ req: GetApiCrmServiceIndividualsByIdAffiliationsData;
2948
+ res: {
2949
+ /**
2950
+ * Success
2951
+ */
2952
+ 200: UniRefund_CRMService_Individuals_IndividualAffiliationsDto;
2953
+ /**
2954
+ * Bad Request
2955
+ */
2956
+ 400: Volo_Abp_Http_RemoteServiceErrorResponse;
2957
+ /**
2958
+ * Unauthorized
2959
+ */
2960
+ 401: Volo_Abp_Http_RemoteServiceErrorResponse;
2961
+ /**
2962
+ * Forbidden
2963
+ */
2964
+ 403: Volo_Abp_Http_RemoteServiceErrorResponse;
2965
+ /**
2966
+ * Not Found
2967
+ */
2968
+ 404: Volo_Abp_Http_RemoteServiceErrorResponse;
2969
+ /**
2970
+ * Server Error
2971
+ */
2972
+ 500: Volo_Abp_Http_RemoteServiceErrorResponse;
2973
+ /**
2974
+ * Server Error
2975
+ */
2976
+ 501: Volo_Abp_Http_RemoteServiceErrorResponse;
2977
+ };
2978
+ };
2979
+ };
2908
2980
  '/api/crm-service/merchants': {
2909
2981
  get: {
2910
2982
  req: GetApiCrmServiceMerchantsData;
@@ -6,15 +6,63 @@ export const $PagedResultDto_BillingDto = {
6
6
  items: {
7
7
  type: 'array',
8
8
  items: {
9
+ required: ['date', 'dueDate', 'number', 'paymentStatus', 'period', 'status', 'total', 'unpaid'],
9
10
  type: 'object',
10
11
  properties: {
11
12
  id: {
12
13
  type: 'string',
13
14
  format: 'uuid'
14
15
  },
15
- merchantId: {
16
- type: 'string',
17
- format: 'uuid'
16
+ merchantBasicInformation: {
17
+ type: 'object',
18
+ properties: {
19
+ id: {
20
+ type: 'string',
21
+ format: 'uuid'
22
+ },
23
+ name: {
24
+ type: 'string',
25
+ nullable: true
26
+ },
27
+ taxOffice: {
28
+ required: ['id', 'name'],
29
+ type: 'object',
30
+ properties: {
31
+ id: {
32
+ type: 'string',
33
+ format: 'uuid'
34
+ },
35
+ name: {
36
+ minLength: 1,
37
+ type: 'string'
38
+ }
39
+ },
40
+ additionalProperties: false
41
+ },
42
+ numberOfStores: {
43
+ type: 'integer',
44
+ format: 'int32'
45
+ },
46
+ accountManagers: {
47
+ type: 'array',
48
+ items: {
49
+ type: 'object',
50
+ properties: {
51
+ id: {
52
+ type: 'string',
53
+ format: 'uuid'
54
+ },
55
+ name: {
56
+ type: 'string',
57
+ nullable: true
58
+ }
59
+ },
60
+ additionalProperties: false
61
+ },
62
+ nullable: true
63
+ }
64
+ },
65
+ additionalProperties: false
18
66
  },
19
67
  date: {
20
68
  type: 'string',
@@ -37,19 +85,16 @@ export const $PagedResultDto_BillingDto = {
37
85
  format: 'float'
38
86
  },
39
87
  status: {
40
- enum: [0, 1, 2, 3, 4],
41
- type: 'integer',
42
- format: 'int32'
88
+ enum: ['PAID', 'CREDITNOTE', 'CANCELLED', 'UNFINISHED', 'SENT'],
89
+ type: 'string'
43
90
  },
44
91
  period: {
45
- enum: [0, 1, 2],
46
- type: 'integer',
47
- format: 'int32'
92
+ enum: ['ONETIMEPERMONTH', 'TWOTIMEPERMONTH', 'ONETIMEPERWEEK'],
93
+ type: 'string'
48
94
  },
49
95
  paymentStatus: {
50
- enum: [0, 1, 2],
51
- type: 'integer',
52
- format: 'int32'
96
+ enum: ['PAID', 'NOTPAID', 'PARTYLYPAID'],
97
+ type: 'string'
53
98
  }
54
99
  },
55
100
  additionalProperties: false
@@ -64,17 +109,148 @@ export const $PagedResultDto_BillingDto = {
64
109
  additionalProperties: false
65
110
  } as const;
66
111
 
67
- export const $UniRefund_FinanceService_Billings_BillingDto = {
112
+ export const $UniRefund_CRMService_Individuals_IndividualIdNameDto = {
68
113
  type: 'object',
69
114
  properties: {
70
115
  id: {
71
116
  type: 'string',
72
117
  format: 'uuid'
73
118
  },
74
- merchantId: {
119
+ name: {
120
+ type: 'string',
121
+ nullable: true
122
+ }
123
+ },
124
+ additionalProperties: false
125
+ } as const;
126
+
127
+ export const $UniRefund_CRMService_Merchants_MerchantBasicInformationDto = {
128
+ type: 'object',
129
+ properties: {
130
+ id: {
75
131
  type: 'string',
76
132
  format: 'uuid'
77
133
  },
134
+ name: {
135
+ type: 'string',
136
+ nullable: true
137
+ },
138
+ taxOffice: {
139
+ required: ['id', 'name'],
140
+ type: 'object',
141
+ properties: {
142
+ id: {
143
+ type: 'string',
144
+ format: 'uuid'
145
+ },
146
+ name: {
147
+ minLength: 1,
148
+ type: 'string'
149
+ }
150
+ },
151
+ additionalProperties: false
152
+ },
153
+ numberOfStores: {
154
+ type: 'integer',
155
+ format: 'int32'
156
+ },
157
+ accountManagers: {
158
+ type: 'array',
159
+ items: {
160
+ type: 'object',
161
+ properties: {
162
+ id: {
163
+ type: 'string',
164
+ format: 'uuid'
165
+ },
166
+ name: {
167
+ type: 'string',
168
+ nullable: true
169
+ }
170
+ },
171
+ additionalProperties: false
172
+ },
173
+ nullable: true
174
+ }
175
+ },
176
+ additionalProperties: false
177
+ } as const;
178
+
179
+ export const $UniRefund_CRMService_TaxOffices_TaxOfficeNameDto = {
180
+ required: ['id', 'name'],
181
+ type: 'object',
182
+ properties: {
183
+ id: {
184
+ type: 'string',
185
+ format: 'uuid'
186
+ },
187
+ name: {
188
+ minLength: 1,
189
+ type: 'string'
190
+ }
191
+ },
192
+ additionalProperties: false
193
+ } as const;
194
+
195
+ export const $UniRefund_FinanceService_Billings_BillingDto = {
196
+ required: ['date', 'dueDate', 'number', 'paymentStatus', 'period', 'status', 'total', 'unpaid'],
197
+ type: 'object',
198
+ properties: {
199
+ id: {
200
+ type: 'string',
201
+ format: 'uuid'
202
+ },
203
+ merchantBasicInformation: {
204
+ type: 'object',
205
+ properties: {
206
+ id: {
207
+ type: 'string',
208
+ format: 'uuid'
209
+ },
210
+ name: {
211
+ type: 'string',
212
+ nullable: true
213
+ },
214
+ taxOffice: {
215
+ required: ['id', 'name'],
216
+ type: 'object',
217
+ properties: {
218
+ id: {
219
+ type: 'string',
220
+ format: 'uuid'
221
+ },
222
+ name: {
223
+ minLength: 1,
224
+ type: 'string'
225
+ }
226
+ },
227
+ additionalProperties: false
228
+ },
229
+ numberOfStores: {
230
+ type: 'integer',
231
+ format: 'int32'
232
+ },
233
+ accountManagers: {
234
+ type: 'array',
235
+ items: {
236
+ type: 'object',
237
+ properties: {
238
+ id: {
239
+ type: 'string',
240
+ format: 'uuid'
241
+ },
242
+ name: {
243
+ type: 'string',
244
+ nullable: true
245
+ }
246
+ },
247
+ additionalProperties: false
248
+ },
249
+ nullable: true
250
+ }
251
+ },
252
+ additionalProperties: false
253
+ },
78
254
  date: {
79
255
  type: 'string',
80
256
  format: 'date-time'
@@ -96,19 +272,16 @@ export const $UniRefund_FinanceService_Billings_BillingDto = {
96
272
  format: 'float'
97
273
  },
98
274
  status: {
99
- enum: [0, 1, 2, 3, 4],
100
- type: 'integer',
101
- format: 'int32'
275
+ enum: ['PAID', 'CREDITNOTE', 'CANCELLED', 'UNFINISHED', 'SENT'],
276
+ type: 'string'
102
277
  },
103
278
  period: {
104
- enum: [0, 1, 2],
105
- type: 'integer',
106
- format: 'int32'
279
+ enum: ['ONETIMEPERMONTH', 'TWOTIMEPERMONTH', 'ONETIMEPERWEEK'],
280
+ type: 'string'
107
281
  },
108
282
  paymentStatus: {
109
- enum: [0, 1, 2],
110
- type: 'integer',
111
- format: 'int32'
283
+ enum: ['PAID', 'NOTPAID', 'PARTYLYPAID'],
284
+ type: 'string'
112
285
  }
113
286
  },
114
287
  additionalProperties: false
@@ -143,28 +316,29 @@ export const $UniRefund_FinanceService_Billings_CreateBillingDto = {
143
316
  format: 'float'
144
317
  },
145
318
  status: {
146
- enum: [0, 1, 2, 3, 4],
147
- type: 'integer',
148
- format: 'int32'
319
+ enum: ['PAID', 'CREDITNOTE', 'CANCELLED', 'UNFINISHED', 'SENT'],
320
+ type: 'string'
149
321
  },
150
322
  period: {
151
- enum: [0, 1, 2],
152
- type: 'integer',
153
- format: 'int32'
323
+ enum: ['ONETIMEPERMONTH', 'TWOTIMEPERMONTH', 'ONETIMEPERWEEK'],
324
+ type: 'string'
154
325
  },
155
326
  paymentStatus: {
156
- enum: [0, 1, 2],
157
- type: 'integer',
158
- format: 'int32'
327
+ enum: ['PAID', 'NOTPAID', 'PARTYLYPAID'],
328
+ type: 'string'
159
329
  }
160
330
  },
161
331
  additionalProperties: false
162
332
  } as const;
163
333
 
164
334
  export const $UniRefund_FinanceService_Billings_UpdateBillingDto = {
165
- required: ['date', 'dueDate', 'number', 'paymentStatus', 'period', 'total', 'unpaid'],
335
+ required: ['date', 'dueDate', 'merchantId', 'number', 'paymentStatus', 'period', 'total', 'unpaid'],
166
336
  type: 'object',
167
337
  properties: {
338
+ merchantId: {
339
+ type: 'string',
340
+ format: 'uuid'
341
+ },
168
342
  date: {
169
343
  type: 'string',
170
344
  format: 'date-time'
@@ -186,40 +360,34 @@ export const $UniRefund_FinanceService_Billings_UpdateBillingDto = {
186
360
  format: 'float'
187
361
  },
188
362
  status: {
189
- enum: [0, 1, 2, 3, 4],
190
- type: 'integer',
191
- format: 'int32'
363
+ enum: ['PAID', 'CREDITNOTE', 'CANCELLED', 'UNFINISHED', 'SENT'],
364
+ type: 'string'
192
365
  },
193
366
  period: {
194
- enum: [0, 1, 2],
195
- type: 'integer',
196
- format: 'int32'
367
+ enum: ['ONETIMEPERMONTH', 'TWOTIMEPERMONTH', 'ONETIMEPERWEEK'],
368
+ type: 'string'
197
369
  },
198
370
  paymentStatus: {
199
- enum: [0, 1, 2],
200
- type: 'integer',
201
- format: 'int32'
371
+ enum: ['PAID', 'NOTPAID', 'PARTYLYPAID'],
372
+ type: 'string'
202
373
  }
203
374
  },
204
375
  additionalProperties: false
205
376
  } as const;
206
377
 
207
378
  export const $UniRefund_FinanceService_Enums_BillingPaymentStatusCode = {
208
- enum: [0, 1, 2],
209
- type: 'integer',
210
- format: 'int32'
379
+ enum: ['PAID', 'NOTPAID', 'PARTYLYPAID'],
380
+ type: 'string'
211
381
  } as const;
212
382
 
213
383
  export const $UniRefund_FinanceService_Enums_BillingPeriodCode = {
214
- enum: [0, 1, 2],
215
- type: 'integer',
216
- format: 'int32'
384
+ enum: ['ONETIMEPERMONTH', 'TWOTIMEPERMONTH', 'ONETIMEPERWEEK'],
385
+ type: 'string'
217
386
  } as const;
218
387
 
219
388
  export const $UniRefund_FinanceService_Enums_BillingStatusCode = {
220
- enum: [0, 1, 2, 3, 4],
221
- type: 'integer',
222
- format: 'int32'
389
+ enum: ['PAID', 'CREDITNOTE', 'CANCELLED', 'UNFINISHED', 'SENT'],
390
+ type: 'string'
223
391
  } as const;
224
392
 
225
393
  export const $Volo_Abp_AspNetCore_Mvc_ApplicationConfigurations_ApplicationAuthConfigurationDto = {
@@ -5,17 +5,35 @@ export type PagedResultDto_BillingDto = {
5
5
  totalCount?: number;
6
6
  };
7
7
 
8
+ export type UniRefund_CRMService_Individuals_IndividualIdNameDto = {
9
+ id?: string;
10
+ name?: string | null;
11
+ };
12
+
13
+ export type UniRefund_CRMService_Merchants_MerchantBasicInformationDto = {
14
+ id?: string;
15
+ name?: string | null;
16
+ taxOffice?: UniRefund_CRMService_TaxOffices_TaxOfficeNameDto;
17
+ numberOfStores?: number;
18
+ accountManagers?: Array<UniRefund_CRMService_Individuals_IndividualIdNameDto> | null;
19
+ };
20
+
21
+ export type UniRefund_CRMService_TaxOffices_TaxOfficeNameDto = {
22
+ id: string;
23
+ name: string;
24
+ };
25
+
8
26
  export type UniRefund_FinanceService_Billings_BillingDto = {
9
27
  id?: string;
10
- merchantId?: string;
11
- date?: string;
12
- number?: number;
13
- dueDate?: string;
14
- total?: number;
15
- unpaid?: number;
16
- status?: UniRefund_FinanceService_Enums_BillingStatusCode;
17
- period?: UniRefund_FinanceService_Enums_BillingPeriodCode;
18
- paymentStatus?: UniRefund_FinanceService_Enums_BillingPaymentStatusCode;
28
+ merchantBasicInformation?: UniRefund_CRMService_Merchants_MerchantBasicInformationDto;
29
+ date: string;
30
+ number: number;
31
+ dueDate: string;
32
+ total: number;
33
+ unpaid: number;
34
+ status: UniRefund_FinanceService_Enums_BillingStatusCode;
35
+ period: UniRefund_FinanceService_Enums_BillingPeriodCode;
36
+ paymentStatus: UniRefund_FinanceService_Enums_BillingPaymentStatusCode;
19
37
  };
20
38
 
21
39
  export type UniRefund_FinanceService_Billings_CreateBillingDto = {
@@ -31,6 +49,7 @@ export type UniRefund_FinanceService_Billings_CreateBillingDto = {
31
49
  };
32
50
 
33
51
  export type UniRefund_FinanceService_Billings_UpdateBillingDto = {
52
+ merchantId: string;
34
53
  date: string;
35
54
  number: number;
36
55
  dueDate: string;
@@ -41,11 +60,11 @@ export type UniRefund_FinanceService_Billings_UpdateBillingDto = {
41
60
  paymentStatus: UniRefund_FinanceService_Enums_BillingPaymentStatusCode;
42
61
  };
43
62
 
44
- export type UniRefund_FinanceService_Enums_BillingPaymentStatusCode = 0 | 1 | 2;
63
+ export type UniRefund_FinanceService_Enums_BillingPaymentStatusCode = 'PAID' | 'NOTPAID' | 'PARTYLYPAID';
45
64
 
46
- export type UniRefund_FinanceService_Enums_BillingPeriodCode = 0 | 1 | 2;
65
+ export type UniRefund_FinanceService_Enums_BillingPeriodCode = 'ONETIMEPERMONTH' | 'TWOTIMEPERMONTH' | 'ONETIMEPERWEEK';
47
66
 
48
- export type UniRefund_FinanceService_Enums_BillingStatusCode = 0 | 1 | 2 | 3 | 4;
67
+ export type UniRefund_FinanceService_Enums_BillingStatusCode = 'PAID' | 'CREDITNOTE' | 'CANCELLED' | 'UNFINISHED' | 'SENT';
49
68
 
50
69
  export type Volo_Abp_AspNetCore_Mvc_ApplicationConfigurations_ApplicationAuthConfigurationDto = {
51
70
  grantedPolicies?: {
@@ -0,0 +1,44 @@
1
+ import type { BaseHttpRequest } from './core/BaseHttpRequest';
2
+ import type { OpenAPIConfig } from './core/OpenAPI';
3
+ import { Interceptors } from './core/OpenAPI';
4
+ import { FetchHttpRequest } from './core/FetchHttpRequest';
5
+
6
+ import { AbpApiDefinitionService } from './services.gen';
7
+ import { AbpApplicationConfigurationService } from './services.gen';
8
+ import { AbpApplicationLocalizationService } from './services.gen';
9
+ import { RefundService } from './services.gen';
10
+
11
+ type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
12
+
13
+ export class RefundServiceClient {
14
+
15
+ public readonly abpApiDefinition: AbpApiDefinitionService;
16
+ public readonly abpApplicationConfiguration: AbpApplicationConfigurationService;
17
+ public readonly abpApplicationLocalization: AbpApplicationLocalizationService;
18
+ public readonly refund: RefundService;
19
+
20
+ public readonly request: BaseHttpRequest;
21
+
22
+ constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) {
23
+ this.request = new HttpRequest({
24
+ BASE: config?.BASE ?? '',
25
+ VERSION: config?.VERSION ?? '1',
26
+ WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
27
+ CREDENTIALS: config?.CREDENTIALS ?? 'include',
28
+ TOKEN: config?.TOKEN,
29
+ USERNAME: config?.USERNAME,
30
+ PASSWORD: config?.PASSWORD,
31
+ HEADERS: config?.HEADERS,
32
+ ENCODE_PATH: config?.ENCODE_PATH,
33
+ interceptors: {
34
+ request: config?.interceptors?.request ?? new Interceptors(),
35
+ response: config?.interceptors?.response ?? new Interceptors(),
36
+ },
37
+ });
38
+
39
+ this.abpApiDefinition = new AbpApiDefinitionService(this.request);
40
+ this.abpApplicationConfiguration = new AbpApplicationConfigurationService(this.request);
41
+ this.abpApplicationLocalization = new AbpApplicationLocalizationService(this.request);
42
+ this.refund = new RefundService(this.request);
43
+ }
44
+ }
@@ -0,0 +1,21 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import type { ApiResult } from './ApiResult';
3
+
4
+ export class ApiError extends Error {
5
+ public readonly url: string;
6
+ public readonly status: number;
7
+ public readonly statusText: string;
8
+ public readonly body: unknown;
9
+ public readonly request: ApiRequestOptions;
10
+
11
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
12
+ super(message);
13
+
14
+ this.name = 'ApiError';
15
+ this.url = response.url;
16
+ this.status = response.status;
17
+ this.statusText = response.statusText;
18
+ this.body = response.body;
19
+ this.request = request;
20
+ }
21
+ }
@@ -0,0 +1,13 @@
1
+ export type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, unknown>;
5
+ readonly cookies?: Record<string, unknown>;
6
+ readonly headers?: Record<string, unknown>;
7
+ readonly query?: Record<string, unknown>;
8
+ readonly formData?: Record<string, unknown>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
@@ -0,0 +1,7 @@
1
+ export type ApiResult<TData = any> = {
2
+ readonly body: TData;
3
+ readonly ok: boolean;
4
+ readonly status: number;
5
+ readonly statusText: string;
6
+ readonly url: string;
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import type { CancelablePromise } from './CancelablePromise';
3
+ import type { OpenAPIConfig } from './OpenAPI';
4
+
5
+ export abstract class BaseHttpRequest {
6
+
7
+ constructor(public readonly config: OpenAPIConfig) {}
8
+
9
+ public abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
10
+ }