@ayasofyazilim/saas 0.0.10 → 0.0.11

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.
@@ -1,7 +1,14 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export type AbpForDeploy_ProjectService_ProjectSectionRelations_CreateProjectSectionRelationDto = {
3
+ export type AbpForDeploy_ProjectService_ProjectSectionRelations_CreateUpdateProjectSectionRelationDto = {
4
4
  id?: string;
5
+ creationTime?: string;
6
+ creatorId?: string | null;
7
+ lastModificationTime?: string | null;
8
+ lastModifierId?: string | null;
9
+ isDeleted?: boolean;
10
+ deleterId?: string | null;
11
+ deletionTime?: string | null;
5
12
  projectId?: string;
6
13
  projectSectionId?: string;
7
14
  value?: string | null;
@@ -9,45 +16,62 @@ export type AbpForDeploy_ProjectService_ProjectSectionRelations_CreateProjectSec
9
16
 
10
17
  export type AbpForDeploy_ProjectService_ProjectSectionRelations_ProjectSectionRelationDto = {
11
18
  id?: string;
19
+ creationTime?: string;
20
+ creatorId?: string | null;
21
+ lastModificationTime?: string | null;
22
+ lastModifierId?: string | null;
23
+ isDeleted?: boolean;
24
+ deleterId?: string | null;
25
+ deletionTime?: string | null;
12
26
  projectId?: string;
13
27
  projectSectionId?: string;
14
28
  value?: string | null;
15
29
  };
16
30
 
17
- export type AbpForDeploy_ProjectService_ProjectSectionRelations_UpdateProjectSectionRelationDto = {
18
- id?: string;
19
- projectId?: string;
20
- projectSectionId?: string;
21
- value?: string | null;
22
- };
23
-
24
- export type AbpForDeploy_ProjectService_ProjectSections_CreateProjectSectionDto = {
31
+ export type AbpForDeploy_ProjectService_ProjectSections_CreateUpdateProjectSectionDto = {
25
32
  id?: string;
33
+ creationTime?: string;
34
+ creatorId?: string | null;
35
+ lastModificationTime?: string | null;
36
+ lastModifierId?: string | null;
37
+ isDeleted?: boolean;
38
+ deleterId?: string | null;
39
+ deletionTime?: string | null;
26
40
  name?: string | null;
27
41
  isDefault?: boolean;
28
42
  isOptional?: boolean;
29
43
  };
30
44
 
31
- export type AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDetailDto = {
32
- name?: string | null;
33
- value?: string | null;
34
- };
35
-
36
45
  export type AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDto = {
37
46
  id?: string;
47
+ creationTime?: string;
48
+ creatorId?: string | null;
49
+ lastModificationTime?: string | null;
50
+ lastModifierId?: string | null;
51
+ isDeleted?: boolean;
52
+ deleterId?: string | null;
53
+ deletionTime?: string | null;
38
54
  name?: string | null;
39
55
  isDefault?: boolean;
40
56
  isOptional?: boolean;
41
57
  };
42
58
 
43
- export type AbpForDeploy_ProjectService_ProjectSections_UpdateProjectSectionDto = {
59
+ export type AbpForDeploy_ProjectService_ProjectSections_ProjectSectionRelationDetailDto = {
60
+ id?: string;
61
+ sectionId?: string;
44
62
  name?: string | null;
45
- isDefault?: boolean;
46
- isOptional?: boolean;
63
+ value?: string | null;
47
64
  };
48
65
 
49
66
  export type AbpForDeploy_ProjectService_Projects_ProjectDto = {
50
67
  id?: string;
68
+ creationTime?: string;
69
+ creatorId?: string | null;
70
+ lastModificationTime?: string | null;
71
+ lastModifierId?: string | null;
72
+ isDeleted?: boolean;
73
+ deleterId?: string | null;
74
+ deletionTime?: string | null;
51
75
  projectName?: string | null;
52
76
  projectDefinition?: string | null;
53
77
  cashValue?: number;
@@ -60,12 +84,19 @@ export type AbpForDeploy_ProjectService_Projects_ProjectDto = {
60
84
  privilege?: string | null;
61
85
  projectStartDate?: string;
62
86
  projectEndDate?: string;
63
- projectSectionRelations?: Array<AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDetailDto> | null;
64
87
  organizationId?: string;
88
+ projectSectionRelationDetails?: Array<AbpForDeploy_ProjectService_ProjectSections_ProjectSectionRelationDetailDto> | null;
65
89
  };
66
90
 
67
- export type AbpForDeploy_ProjectService_ProjectsDto_CreateProjectDto = {
91
+ export type AbpForDeploy_ProjectService_ProjectsDto_CreateUpdateProjectDto = {
68
92
  id?: string;
93
+ creationTime?: string;
94
+ creatorId?: string | null;
95
+ lastModificationTime?: string | null;
96
+ lastModifierId?: string | null;
97
+ isDeleted?: boolean;
98
+ deleterId?: string | null;
99
+ deletionTime?: string | null;
69
100
  projectName?: string | null;
70
101
  projectDefinition?: string | null;
71
102
  cashValue?: number;
@@ -77,30 +108,8 @@ export type AbpForDeploy_ProjectService_ProjectsDto_CreateProjectDto = {
77
108
  privilege?: string | null;
78
109
  projectStartDate?: string;
79
110
  projectEndDate?: string;
80
- organizationId?: string;
81
111
  fundCollectionType?: string | null;
82
- };
83
-
84
- export type AbpForDeploy_ProjectService_ProjectsDto_UpdateProjectDto = {
85
- id?: string;
86
- projectName?: string | null;
87
- projectDefinition?: string | null;
88
- cashValue?: number;
89
- additionalFundRate?: string | null;
90
- qualifiedFundRate?: string | null;
91
- fundNominalAmount?: number;
92
- fundableAmount?: number;
93
- overFunding?: string;
94
- privilege?: string | null;
95
- projectStartDate?: string;
96
- projectEndDate?: string;
97
112
  organizationId?: string;
98
- projectId?: string;
99
- fundCollectType?: string | null;
100
- };
101
-
102
- export type AbpForDeploy_ProjectService_Samples_SampleDto = {
103
- value?: number;
104
113
  };
105
114
 
106
115
  export type Volo_Abp_Application_Dtos_PagedResultDto_1 = {
@@ -520,15 +529,13 @@ export type GetApiAbpApplicationLocalizationData = {
520
529
  export type GetApiAbpApplicationLocalizationResponse = Volo_Abp_AspNetCore_Mvc_ApplicationConfigurations_ApplicationLocalizationDto;
521
530
 
522
531
  export type PostApiProjectServiceProjectsData = {
523
- requestBody?: AbpForDeploy_ProjectService_ProjectsDto_CreateProjectDto;
532
+ requestBody?: AbpForDeploy_ProjectService_ProjectsDto_CreateUpdateProjectDto;
524
533
  };
525
534
 
526
535
  export type PostApiProjectServiceProjectsResponse = AbpForDeploy_ProjectService_Projects_ProjectDto;
527
536
 
528
537
  export type GetApiProjectServiceProjectsData = {
529
- endDate?: string;
530
538
  maxResultCount?: number;
531
- name?: string;
532
539
  skipCount?: number;
533
540
  sorting?: string;
534
541
  };
@@ -549,13 +556,13 @@ export type GetApiProjectServiceProjectsByIdResponse = AbpForDeploy_ProjectServi
549
556
 
550
557
  export type PutApiProjectServiceProjectsByIdData = {
551
558
  id: string;
552
- requestBody?: AbpForDeploy_ProjectService_ProjectsDto_UpdateProjectDto;
559
+ requestBody?: AbpForDeploy_ProjectService_ProjectsDto_CreateUpdateProjectDto;
553
560
  };
554
561
 
555
562
  export type PutApiProjectServiceProjectsByIdResponse = AbpForDeploy_ProjectService_Projects_ProjectDto;
556
563
 
557
564
  export type PostApiProjectSectionServiceProjectSectionData = {
558
- requestBody?: AbpForDeploy_ProjectService_ProjectSections_CreateProjectSectionDto;
565
+ requestBody?: AbpForDeploy_ProjectService_ProjectSections_CreateUpdateProjectSectionDto;
559
566
  };
560
567
 
561
568
  export type PostApiProjectSectionServiceProjectSectionResponse = AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDto;
@@ -576,7 +583,7 @@ export type GetApiProjectSectionServiceProjectSectionResponse = Volo_Abp_Applica
576
583
 
577
584
  export type PutApiProjectSectionServiceProjectSectionData = {
578
585
  id?: string;
579
- requestBody?: AbpForDeploy_ProjectService_ProjectSections_UpdateProjectSectionDto;
586
+ requestBody?: AbpForDeploy_ProjectService_ProjectSections_CreateUpdateProjectSectionDto;
580
587
  };
581
588
 
582
589
  export type PutApiProjectSectionServiceProjectSectionResponse = AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDto;
@@ -588,7 +595,7 @@ export type GetApiProjectSectionServiceProjectSectionByIdData = {
588
595
  export type GetApiProjectSectionServiceProjectSectionByIdResponse = AbpForDeploy_ProjectService_ProjectSections_ProjectSectionDto;
589
596
 
590
597
  export type PostApiProjectSectionRelationServiceProjectSectionRelationData = {
591
- requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_CreateProjectSectionRelationDto;
598
+ requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_CreateUpdateProjectSectionRelationDto;
592
599
  };
593
600
 
594
601
  export type PostApiProjectSectionRelationServiceProjectSectionRelationResponse = AbpForDeploy_ProjectService_ProjectSectionRelations_ProjectSectionRelationDto;
@@ -615,21 +622,15 @@ export type GetApiProjectSectionRelationServiceProjectSectionRelationByIdRespons
615
622
 
616
623
  export type PutApiProjectSectionRelationServiceProjectSectionRelationByIdData = {
617
624
  id: string;
618
- requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_UpdateProjectSectionRelationDto;
625
+ requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_CreateUpdateProjectSectionRelationDto;
619
626
  };
620
627
 
621
628
  export type PutApiProjectSectionRelationServiceProjectSectionRelationByIdResponse = AbpForDeploy_ProjectService_ProjectSectionRelations_ProjectSectionRelationDto;
622
629
 
623
- export type GetApiProjectServiceSampleResponse = AbpForDeploy_ProjectService_Samples_SampleDto;
624
-
625
- export type GetApiProjectServiceSampleAuthorizedResponse = AbpForDeploy_ProjectService_Samples_SampleDto;
626
-
627
630
  export type $OpenApiTs = {
628
631
  '/api/abp/api-definition': {
629
632
  get: {
630
- req: {
631
- includeTypes?: boolean;
632
- };
633
+ req: GetApiAbpApiDefinitionData;
633
634
  res: {
634
635
  /**
635
636
  * Success
@@ -664,9 +665,7 @@ export type $OpenApiTs = {
664
665
  };
665
666
  '/api/abp/application-configuration': {
666
667
  get: {
667
- req: {
668
- includeLocalizationResources?: boolean;
669
- };
668
+ req: GetApiAbpApplicationConfigurationData;
670
669
  res: {
671
670
  /**
672
671
  * Success
@@ -701,10 +700,7 @@ export type $OpenApiTs = {
701
700
  };
702
701
  '/api/abp/application-localization': {
703
702
  get: {
704
- req: {
705
- cultureName: string;
706
- onlyDynamics?: boolean;
707
- };
703
+ req: GetApiAbpApplicationLocalizationData;
708
704
  res: {
709
705
  /**
710
706
  * Success
@@ -739,9 +735,7 @@ export type $OpenApiTs = {
739
735
  };
740
736
  '/api/project-service/projects': {
741
737
  post: {
742
- req: {
743
- requestBody?: AbpForDeploy_ProjectService_ProjectsDto_CreateProjectDto;
744
- };
738
+ req: PostApiProjectServiceProjectsData;
745
739
  res: {
746
740
  /**
747
741
  * Success
@@ -774,13 +768,7 @@ export type $OpenApiTs = {
774
768
  };
775
769
  };
776
770
  get: {
777
- req: {
778
- endDate?: string;
779
- maxResultCount?: number;
780
- name?: string;
781
- skipCount?: number;
782
- sorting?: string;
783
- };
771
+ req: GetApiProjectServiceProjectsData;
784
772
  res: {
785
773
  /**
786
774
  * Success
@@ -815,9 +803,7 @@ export type $OpenApiTs = {
815
803
  };
816
804
  '/api/project-service/projects/{id}': {
817
805
  delete: {
818
- req: {
819
- id: string;
820
- };
806
+ req: DeleteApiProjectServiceProjectsByIdData;
821
807
  res: {
822
808
  /**
823
809
  * Success
@@ -850,9 +836,7 @@ export type $OpenApiTs = {
850
836
  };
851
837
  };
852
838
  get: {
853
- req: {
854
- id: string;
855
- };
839
+ req: GetApiProjectServiceProjectsByIdData;
856
840
  res: {
857
841
  /**
858
842
  * Success
@@ -885,10 +869,7 @@ export type $OpenApiTs = {
885
869
  };
886
870
  };
887
871
  put: {
888
- req: {
889
- id: string;
890
- requestBody?: AbpForDeploy_ProjectService_ProjectsDto_UpdateProjectDto;
891
- };
872
+ req: PutApiProjectServiceProjectsByIdData;
892
873
  res: {
893
874
  /**
894
875
  * Success
@@ -923,9 +904,7 @@ export type $OpenApiTs = {
923
904
  };
924
905
  '/api/ProjectSectionService/projectSection': {
925
906
  post: {
926
- req: {
927
- requestBody?: AbpForDeploy_ProjectService_ProjectSections_CreateProjectSectionDto;
928
- };
907
+ req: PostApiProjectSectionServiceProjectSectionData;
929
908
  res: {
930
909
  /**
931
910
  * Success
@@ -958,9 +937,7 @@ export type $OpenApiTs = {
958
937
  };
959
938
  };
960
939
  delete: {
961
- req: {
962
- id?: string;
963
- };
940
+ req: DeleteApiProjectSectionServiceProjectSectionData;
964
941
  res: {
965
942
  /**
966
943
  * Success
@@ -993,11 +970,7 @@ export type $OpenApiTs = {
993
970
  };
994
971
  };
995
972
  get: {
996
- req: {
997
- maxResultCount?: number;
998
- skipCount?: number;
999
- sorting?: string;
1000
- };
973
+ req: GetApiProjectSectionServiceProjectSectionData;
1001
974
  res: {
1002
975
  /**
1003
976
  * Success
@@ -1030,10 +1003,7 @@ export type $OpenApiTs = {
1030
1003
  };
1031
1004
  };
1032
1005
  put: {
1033
- req: {
1034
- id?: string;
1035
- requestBody?: AbpForDeploy_ProjectService_ProjectSections_UpdateProjectSectionDto;
1036
- };
1006
+ req: PutApiProjectSectionServiceProjectSectionData;
1037
1007
  res: {
1038
1008
  /**
1039
1009
  * Success
@@ -1068,9 +1038,7 @@ export type $OpenApiTs = {
1068
1038
  };
1069
1039
  '/api/ProjectSectionService/projectSection/{id}': {
1070
1040
  get: {
1071
- req: {
1072
- id: string;
1073
- };
1041
+ req: GetApiProjectSectionServiceProjectSectionByIdData;
1074
1042
  res: {
1075
1043
  /**
1076
1044
  * Success
@@ -1105,9 +1073,7 @@ export type $OpenApiTs = {
1105
1073
  };
1106
1074
  '/api/ProjectSectionRelationService/projectSectionRelation': {
1107
1075
  post: {
1108
- req: {
1109
- requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_CreateProjectSectionRelationDto;
1110
- };
1076
+ req: PostApiProjectSectionRelationServiceProjectSectionRelationData;
1111
1077
  res: {
1112
1078
  /**
1113
1079
  * Success
@@ -1140,9 +1106,7 @@ export type $OpenApiTs = {
1140
1106
  };
1141
1107
  };
1142
1108
  delete: {
1143
- req: {
1144
- id?: string;
1145
- };
1109
+ req: DeleteApiProjectSectionRelationServiceProjectSectionRelationData;
1146
1110
  res: {
1147
1111
  /**
1148
1112
  * Success
@@ -1175,11 +1139,7 @@ export type $OpenApiTs = {
1175
1139
  };
1176
1140
  };
1177
1141
  get: {
1178
- req: {
1179
- maxResultCount?: number;
1180
- skipCount?: number;
1181
- sorting?: string;
1182
- };
1142
+ req: GetApiProjectSectionRelationServiceProjectSectionRelationData;
1183
1143
  res: {
1184
1144
  /**
1185
1145
  * Success
@@ -1214,9 +1174,7 @@ export type $OpenApiTs = {
1214
1174
  };
1215
1175
  '/api/ProjectSectionRelationService/projectSectionRelation/{id}': {
1216
1176
  get: {
1217
- req: {
1218
- id: string;
1219
- };
1177
+ req: GetApiProjectSectionRelationServiceProjectSectionRelationByIdData;
1220
1178
  res: {
1221
1179
  /**
1222
1180
  * Success
@@ -1249,10 +1207,7 @@ export type $OpenApiTs = {
1249
1207
  };
1250
1208
  };
1251
1209
  put: {
1252
- req: {
1253
- id: string;
1254
- requestBody?: AbpForDeploy_ProjectService_ProjectSectionRelations_UpdateProjectSectionRelationDto;
1255
- };
1210
+ req: PutApiProjectSectionRelationServiceProjectSectionRelationByIdData;
1256
1211
  res: {
1257
1212
  /**
1258
1213
  * Success
@@ -1285,72 +1240,4 @@ export type $OpenApiTs = {
1285
1240
  };
1286
1241
  };
1287
1242
  };
1288
- '/api/ProjectService/sample': {
1289
- get: {
1290
- res: {
1291
- /**
1292
- * Success
1293
- */
1294
- 200: AbpForDeploy_ProjectService_Samples_SampleDto;
1295
- /**
1296
- * Bad Request
1297
- */
1298
- 400: Volo_Abp_Http_RemoteServiceErrorResponse;
1299
- /**
1300
- * Unauthorized
1301
- */
1302
- 401: Volo_Abp_Http_RemoteServiceErrorResponse;
1303
- /**
1304
- * Forbidden
1305
- */
1306
- 403: Volo_Abp_Http_RemoteServiceErrorResponse;
1307
- /**
1308
- * Not Found
1309
- */
1310
- 404: Volo_Abp_Http_RemoteServiceErrorResponse;
1311
- /**
1312
- * Server Error
1313
- */
1314
- 500: Volo_Abp_Http_RemoteServiceErrorResponse;
1315
- /**
1316
- * Server Error
1317
- */
1318
- 501: Volo_Abp_Http_RemoteServiceErrorResponse;
1319
- };
1320
- };
1321
- };
1322
- '/api/ProjectService/sample/authorized': {
1323
- get: {
1324
- res: {
1325
- /**
1326
- * Success
1327
- */
1328
- 200: AbpForDeploy_ProjectService_Samples_SampleDto;
1329
- /**
1330
- * Bad Request
1331
- */
1332
- 400: Volo_Abp_Http_RemoteServiceErrorResponse;
1333
- /**
1334
- * Unauthorized
1335
- */
1336
- 401: Volo_Abp_Http_RemoteServiceErrorResponse;
1337
- /**
1338
- * Forbidden
1339
- */
1340
- 403: Volo_Abp_Http_RemoteServiceErrorResponse;
1341
- /**
1342
- * Not Found
1343
- */
1344
- 404: Volo_Abp_Http_RemoteServiceErrorResponse;
1345
- /**
1346
- * Server Error
1347
- */
1348
- 500: Volo_Abp_Http_RemoteServiceErrorResponse;
1349
- /**
1350
- * Server Error
1351
- */
1352
- 501: Volo_Abp_Http_RemoteServiceErrorResponse;
1353
- };
1354
- };
1355
- };
1356
1243
  };
@@ -0,0 +1,65 @@
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 { EditionService } from './services.gen';
10
+ import { FeaturesService } from './services.gen';
11
+ import { GatewayService } from './services.gen';
12
+ import { PaymentRequestService } from './services.gen';
13
+ import { PaymentRequestAdminService } from './services.gen';
14
+ import { PlanService } from './services.gen';
15
+ import { PlanAdminService } from './services.gen';
16
+ import { TenantService } from './services.gen';
17
+
18
+ type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
19
+
20
+ export class SaasServiceClient {
21
+
22
+ public readonly abpApiDefinition: AbpApiDefinitionService;
23
+ public readonly abpApplicationConfiguration: AbpApplicationConfigurationService;
24
+ public readonly abpApplicationLocalization: AbpApplicationLocalizationService;
25
+ public readonly edition: EditionService;
26
+ public readonly features: FeaturesService;
27
+ public readonly gateway: GatewayService;
28
+ public readonly paymentRequest: PaymentRequestService;
29
+ public readonly paymentRequestAdmin: PaymentRequestAdminService;
30
+ public readonly plan: PlanService;
31
+ public readonly planAdmin: PlanAdminService;
32
+ public readonly tenant: TenantService;
33
+
34
+ public readonly request: BaseHttpRequest;
35
+
36
+ constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) {
37
+ this.request = new HttpRequest({
38
+ BASE: config?.BASE ?? '',
39
+ VERSION: config?.VERSION ?? '1',
40
+ WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
41
+ CREDENTIALS: config?.CREDENTIALS ?? 'include',
42
+ TOKEN: config?.TOKEN,
43
+ USERNAME: config?.USERNAME,
44
+ PASSWORD: config?.PASSWORD,
45
+ HEADERS: config?.HEADERS,
46
+ ENCODE_PATH: config?.ENCODE_PATH,
47
+ interceptors: {
48
+ request: config?.interceptors?.request ?? new Interceptors(),
49
+ response: config?.interceptors?.response ?? new Interceptors(),
50
+ },
51
+ });
52
+
53
+ this.abpApiDefinition = new AbpApiDefinitionService(this.request);
54
+ this.abpApplicationConfiguration = new AbpApplicationConfigurationService(this.request);
55
+ this.abpApplicationLocalization = new AbpApplicationLocalizationService(this.request);
56
+ this.edition = new EditionService(this.request);
57
+ this.features = new FeaturesService(this.request);
58
+ this.gateway = new GatewayService(this.request);
59
+ this.paymentRequest = new PaymentRequestService(this.request);
60
+ this.paymentRequestAdmin = new PaymentRequestAdminService(this.request);
61
+ this.plan = new PlanService(this.request);
62
+ this.planAdmin = new PlanAdminService(this.request);
63
+ this.tenant = new TenantService(this.request);
64
+ }
65
+ }
@@ -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
+ }