@ayasofyazilim/saas 0.0.28 → 0.0.29
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/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/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/BackerService/BackerServiceClient.ts +50 -50
- 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/schemas.gen.ts +12444 -12444
- package/BackerService/services.gen.ts +866 -866
- 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/index.ts +8 -8
- package/FundraiserService/schemas.gen.ts +11548 -11548
- package/FundraiserService/services.gen.ts +627 -627
- 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/MerchantService/MerchantServiceClient.ts +77 -77
- 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/ProjectServiceClient.ts +47 -47
- 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/schemas.gen.ts +5147 -5147
- package/ProjectService/services.gen.ts +492 -492
- 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/SettingService/index.ts +2 -2
- package/SettingService/schemas.gen.ts +5779 -5779
- package/SettingService/services.gen.ts +787 -787
- package/SettingService/types.gen.ts +1862 -6827
- package/generator.mjs +33 -7
- package/package.json +1 -1
package/generator.mjs
CHANGED
|
@@ -80,6 +80,7 @@ function getCircularReplacer() {
|
|
|
80
80
|
return value;
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
+
|
|
83
84
|
async function generateApi(api_list) {
|
|
84
85
|
for (const api of api_list) {
|
|
85
86
|
console.log(`✨ Processing ${api.output}...`);
|
|
@@ -97,14 +98,39 @@ async function generateApi(api_list) {
|
|
|
97
98
|
temp_swagger,
|
|
98
99
|
JSON.stringify(swaggerText, getCircularReplacer()),
|
|
99
100
|
);
|
|
101
|
+
|
|
102
|
+
await createClient({
|
|
103
|
+
input: temp_swagger,
|
|
104
|
+
output: api.output + "Service",
|
|
105
|
+
name: api.output + "ServiceClient",
|
|
106
|
+
client: "fetch",
|
|
107
|
+
types: false,
|
|
108
|
+
services: false,
|
|
109
|
+
});
|
|
110
|
+
//types
|
|
111
|
+
await createClient({
|
|
112
|
+
input: apiURL,
|
|
113
|
+
output: api.output + "Service",
|
|
114
|
+
name: api.output + "ServiceClient",
|
|
115
|
+
client: "fetch",
|
|
116
|
+
schemas: false,
|
|
117
|
+
types: {
|
|
118
|
+
// dates: "types+transform" TODO implement this
|
|
119
|
+
// name: "PascalCase" TODO implement this
|
|
120
|
+
tree: true
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
fs.unlinkSync(temp_swagger);
|
|
124
|
+
fs.writeFileSync(`${api.output}Service/index.ts`, `\nexport * from './schemas.gen';`, { flag: 'a' });
|
|
125
|
+
} else {
|
|
126
|
+
|
|
127
|
+
await createClient({
|
|
128
|
+
input: temp_swagger,
|
|
129
|
+
output: api.output + "Service",
|
|
130
|
+
name: api.output + "ServiceClient",
|
|
131
|
+
client: "fetch",
|
|
132
|
+
});
|
|
100
133
|
}
|
|
101
|
-
await createClient({
|
|
102
|
-
input: temp_swagger,
|
|
103
|
-
output: api.output + "Service",
|
|
104
|
-
name: api.output + "ServiceClient",
|
|
105
|
-
client: "fetch",
|
|
106
|
-
});
|
|
107
|
-
if (api.dereference) fs.unlinkSync(temp_swagger);
|
|
108
134
|
console.log(`✅ Generating ${api.output} is done.`);
|
|
109
135
|
}
|
|
110
136
|
}
|