@ayasofyazilim/saas 0.0.37 → 0.0.39
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/AccountService/AccountServiceClient.ts +65 -65
- package/AccountService/core/ApiRequestOptions.ts +12 -12
- package/AccountService/core/BaseHttpRequest.ts +9 -9
- package/AccountService/core/FetchHttpRequest.ts +21 -21
- package/AccountService/core/OpenAPI.ts +55 -55
- package/AccountService/core/request.ts +340 -340
- package/AccountService/index.ts +8 -8
- package/AccountService/schemas.gen.ts +5103 -5103
- package/AccountService/services.gen.ts +1452 -1452
- package/AccountService/types.gen.ts +9896 -9896
- package/AdministrationService/AdministrationServiceClient.ts +74 -74
- package/AdministrationService/core/ApiRequestOptions.ts +12 -12
- package/AdministrationService/core/BaseHttpRequest.ts +9 -9
- package/AdministrationService/core/FetchHttpRequest.ts +21 -21
- package/AdministrationService/core/OpenAPI.ts +55 -55
- package/AdministrationService/core/request.ts +340 -340
- package/AdministrationService/index.ts +8 -8
- package/AdministrationService/schemas.gen.ts +5897 -5897
- package/AdministrationService/services.gen.ts +1332 -1332
- package/AdministrationService/types.gen.ts +9024 -9024
- package/BackerService/core/ApiRequestOptions.ts +12 -12
- package/BackerService/core/BaseHttpRequest.ts +9 -9
- package/BackerService/core/FetchHttpRequest.ts +21 -21
- package/BackerService/core/OpenAPI.ts +55 -55
- package/BackerService/core/request.ts +340 -340
- package/BackerService/index.ts +8 -8
- package/BackerService/schemas.gen.ts +12444 -12444
- package/BackerService/services.gen.ts +866 -866
- package/CRMService/CRMServiceClient.ts +71 -71
- package/CRMService/core/ApiError.ts +20 -20
- package/CRMService/core/ApiRequestOptions.ts +12 -12
- package/CRMService/core/ApiResult.ts +6 -6
- package/CRMService/core/BaseHttpRequest.ts +9 -9
- package/CRMService/core/CancelablePromise.ts +125 -125
- package/CRMService/core/FetchHttpRequest.ts +21 -21
- package/CRMService/core/OpenAPI.ts +55 -55
- package/CRMService/core/request.ts +340 -340
- package/CRMService/index.ts +8 -8
- package/ContractService/ContractServiceClient.ts +53 -53
- package/ContractService/core/ApiError.ts +20 -20
- package/ContractService/core/ApiRequestOptions.ts +12 -12
- package/ContractService/core/ApiResult.ts +6 -6
- package/ContractService/core/BaseHttpRequest.ts +9 -9
- package/ContractService/core/CancelablePromise.ts +125 -125
- package/ContractService/core/FetchHttpRequest.ts +21 -21
- package/ContractService/core/OpenAPI.ts +55 -55
- package/ContractService/core/request.ts +340 -340
- package/ContractService/index.ts +8 -8
- package/ContractService/schemas.gen.ts +11044 -10943
- package/ContractService/services.gen.ts +1720 -1720
- package/ContractService/types.gen.ts +3705 -3691
- package/FundraiserService/FundraiserServiceClient.ts +47 -47
- package/FundraiserService/core/ApiError.ts +20 -20
- package/FundraiserService/core/ApiResult.ts +6 -6
- package/FundraiserService/core/CancelablePromise.ts +125 -125
- package/FundraiserService/schemas.gen.ts +11548 -11548
- package/IdentityService/IdentityServiceClient.ts +77 -77
- package/IdentityService/core/ApiRequestOptions.ts +12 -12
- package/IdentityService/core/BaseHttpRequest.ts +9 -9
- package/IdentityService/core/FetchHttpRequest.ts +21 -21
- package/IdentityService/core/OpenAPI.ts +55 -55
- package/IdentityService/core/request.ts +340 -340
- package/IdentityService/index.ts +8 -8
- package/IdentityService/schemas.gen.ts +6573 -6573
- package/IdentityService/services.gen.ts +2839 -2839
- package/IdentityService/types.gen.ts +17446 -17446
- package/MerchantService/core/ApiRequestOptions.ts +12 -12
- package/MerchantService/core/BaseHttpRequest.ts +9 -9
- package/MerchantService/core/FetchHttpRequest.ts +21 -21
- package/MerchantService/core/OpenAPI.ts +55 -55
- package/MerchantService/core/request.ts +340 -340
- package/MerchantService/schemas.gen.ts +14764 -14764
- package/MerchantService/services.gen.ts +1602 -1602
- package/ProjectService/core/ApiRequestOptions.ts +12 -12
- package/ProjectService/core/BaseHttpRequest.ts +9 -9
- package/ProjectService/core/FetchHttpRequest.ts +21 -21
- package/ProjectService/core/OpenAPI.ts +55 -55
- package/ProjectService/core/request.ts +340 -340
- package/ProjectService/index.ts +8 -8
- package/ProjectService/schemas.gen.ts +5147 -5147
- package/ProjectService.json +2937 -2937
- package/SaasService/core/ApiRequestOptions.ts +12 -12
- package/SaasService/core/BaseHttpRequest.ts +9 -9
- package/SaasService/core/FetchHttpRequest.ts +21 -21
- package/SaasService/core/OpenAPI.ts +55 -55
- package/SaasService/core/request.ts +340 -340
- package/SaasService/index.ts +8 -8
- package/SaasService/schemas.gen.ts +5278 -5278
- package/SaasService/services.gen.ts +1325 -1325
- package/SaasService/types.gen.ts +9052 -9052
- package/SettingService/SettingServiceClient.ts +62 -62
- package/SettingService/index.ts +8 -8
- package/TravellerService/schemas.gen.ts +1141 -2917
- package/TravellerService/services.gen.ts +42 -56
- package/TravellerService/types.gen.ts +141 -183
- package/generator.mjs +9 -6
- package/package.json +1 -1
- package/swagger.json +4794 -4794
package/generator.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
1
|
+
#! /usr/bin/env node
|
|
2
2
|
import { createClient } from "@hey-api/openapi-ts";
|
|
3
3
|
import SwaggerParser from "@apidevtools/swagger-parser";
|
|
4
4
|
import fs from "fs";
|
|
@@ -47,25 +47,21 @@ var initial_api_list = [
|
|
|
47
47
|
{
|
|
48
48
|
input: "swagger-json/Setting",
|
|
49
49
|
output: "Setting",
|
|
50
|
-
port: 44335,
|
|
51
50
|
dereference: true,
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
input: "swagger-json/CRM",
|
|
55
54
|
output: "CRM",
|
|
56
|
-
port: 44335,
|
|
57
55
|
dereference: true,
|
|
58
56
|
},
|
|
59
57
|
{
|
|
60
58
|
input: "swagger-json/Contract",
|
|
61
59
|
output: "Contract",
|
|
62
|
-
port: 44335,
|
|
63
60
|
dereference: true,
|
|
64
61
|
},
|
|
65
62
|
{
|
|
66
63
|
input: "swagger-json/Traveller",
|
|
67
64
|
output: "Traveller",
|
|
68
|
-
port: 44335,
|
|
69
65
|
dereference: true,
|
|
70
66
|
},
|
|
71
67
|
];
|
|
@@ -103,7 +99,6 @@ async function generateApi(api_list) {
|
|
|
103
99
|
const swaggerText = await SwaggerParser.dereference(apiURL);
|
|
104
100
|
let temp_swagger = apiURL;
|
|
105
101
|
if (api.dereference) {
|
|
106
|
-
console.log(typeof swaggerText);
|
|
107
102
|
console.log(`🎁 Dereferencing ${api.output} is from ${apiURL} done.`);
|
|
108
103
|
temp_swagger = `temp_${api.output}_swagger.json`;
|
|
109
104
|
fs.writeFileSync(
|
|
@@ -138,6 +133,14 @@ async function generateApi(api_list) {
|
|
|
138
133
|
`\nexport * from './schemas.gen';`,
|
|
139
134
|
{ flag: "a" },
|
|
140
135
|
);
|
|
136
|
+
|
|
137
|
+
const data = fs.readFileSync(
|
|
138
|
+
`${api.output}Service/schemas.gen.ts`, { encoding: 'utf8', flag: 'r' });
|
|
139
|
+
var result = data.replaceAll('as const ', '');
|
|
140
|
+
fs.writeFile(`${api.output}Service/schemas.gen.ts`, result, 'utf8', function (err) {
|
|
141
|
+
if (err) return console.log(err);
|
|
142
|
+
});
|
|
143
|
+
|
|
141
144
|
} else {
|
|
142
145
|
await createClient({
|
|
143
146
|
input: temp_swagger,
|