@ayasofyazilim/saas 0.0.12 → 0.0.13
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/SettingService/SettingServiceClient.ts +53 -0
- package/SettingService/core/ApiError.ts +21 -0
- package/SettingService/core/ApiRequestOptions.ts +13 -0
- package/SettingService/core/ApiResult.ts +7 -0
- package/SettingService/core/BaseHttpRequest.ts +10 -0
- package/SettingService/core/CancelablePromise.ts +126 -0
- package/SettingService/core/FetchHttpRequest.ts +22 -0
- package/SettingService/core/OpenAPI.ts +56 -0
- package/SettingService/core/request.ts +341 -0
- package/SettingService/index.ts +9 -0
- package/SettingService/schemas.gen.ts +1525 -0
- package/SettingService/services.gen.ts +317 -0
- package/SettingService/types.gen.ts +982 -0
- package/generator.mjs +31 -25
- package/package.json +3 -2
package/generator.mjs
CHANGED
|
@@ -7,34 +7,35 @@ const WEBGATEWAY_PORT = 44325;
|
|
|
7
7
|
const api_list = [
|
|
8
8
|
{
|
|
9
9
|
input: 'swagger-json/AuthServer',
|
|
10
|
-
output: '
|
|
11
|
-
|
|
12
|
-
client: 'fetch'
|
|
10
|
+
output: 'Account',
|
|
11
|
+
dereference: true
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
14
|
input: "",
|
|
16
|
-
output: '
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
port: 45185
|
|
15
|
+
output: 'Project',
|
|
16
|
+
port: 45185,
|
|
17
|
+
dereference: true
|
|
20
18
|
},
|
|
21
19
|
{
|
|
22
20
|
input: "swagger-json/Administration",
|
|
23
|
-
output: '
|
|
24
|
-
|
|
25
|
-
client: 'fetch'
|
|
21
|
+
output: 'Administration',
|
|
22
|
+
dereference: true
|
|
26
23
|
},
|
|
27
24
|
{
|
|
28
25
|
input: "swagger-json/Identity",
|
|
29
|
-
output: '
|
|
30
|
-
|
|
31
|
-
client: 'fetch'
|
|
26
|
+
output: 'Identity',
|
|
27
|
+
dereference: true
|
|
32
28
|
},
|
|
33
29
|
{
|
|
34
30
|
input: "swagger-json/Saas",
|
|
35
|
-
output: '
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
output: 'Saas',
|
|
32
|
+
dereference: true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
input: "",
|
|
36
|
+
output: 'Setting',
|
|
37
|
+
port: 44515,
|
|
38
|
+
dereference: false
|
|
38
39
|
}
|
|
39
40
|
]
|
|
40
41
|
|
|
@@ -43,19 +44,24 @@ function clean_URL(url) {
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
for (const api of api_list) {
|
|
46
|
-
console.log(`✨ Processing ${api.
|
|
47
|
+
console.log(`✨ Processing ${api.output}...`);
|
|
47
48
|
const port = api?.port ? api.port : WEBGATEWAY_PORT;
|
|
48
49
|
const apiURL = clean_URL(`${BASE_URL + port}/${api.input}` + "/swagger/v1/swagger.json");
|
|
49
50
|
const swaggerText = await SwaggerParser.dereference(apiURL);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
let temp_swagger = apiURL;
|
|
52
|
+
if (api.dereference) {
|
|
53
|
+
console.log(typeof swaggerText)
|
|
54
|
+
console.log(`🎁 Dereferencing ${api.output} is from ${apiURL} done.`);
|
|
55
|
+
temp_swagger = `temp_${api.output}_swagger.json`;
|
|
56
|
+
fs.writeFileSync(temp_swagger, JSON.stringify(swaggerText));
|
|
57
|
+
}
|
|
53
58
|
await createClient({
|
|
54
59
|
input: temp_swagger,
|
|
55
|
-
output: api.output,
|
|
56
|
-
name: api.
|
|
57
|
-
client:
|
|
60
|
+
output: api.output + "Service",
|
|
61
|
+
name: api.output + "ServiceClient",
|
|
62
|
+
client: "fetch"
|
|
58
63
|
});
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
if (api.dereference)
|
|
65
|
+
fs.unlinkSync(temp_swagger);
|
|
66
|
+
console.log(`✅ Generating ${api.output} is done.`);
|
|
61
67
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayasofyazilim/saas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Ayasofyazılım SAAS",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./AccountService": "./AccountService/index.ts",
|
|
7
7
|
"./ProjectService": "./ProjectService/index.ts",
|
|
8
8
|
"./AdministrationService": "./AdministrationService/index.ts",
|
|
9
9
|
"./IdentityService": "./IdentityService/index.ts",
|
|
10
|
-
"./SaasService": "./SaasService/index.ts"
|
|
10
|
+
"./SaasService": "./SaasService/index.ts",
|
|
11
|
+
"./SettingService": "./SettingService/index.ts"
|
|
11
12
|
},
|
|
12
13
|
"scripts": {
|
|
13
14
|
"gen:all": "node generator.mjs",
|