@ayasofyazilim/saas 0.0.13 → 0.0.15

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.
Files changed (52) hide show
  1. package/AccountService/schemas.gen.ts +4 -17
  2. package/AccountService/types.gen.ts +0 -9
  3. package/AdministrationService/schemas.gen.ts +7 -7
  4. package/BackerService/BackerServiceClient.ts +44 -0
  5. package/BackerService/core/ApiError.ts +21 -0
  6. package/BackerService/core/ApiRequestOptions.ts +13 -0
  7. package/BackerService/core/ApiResult.ts +7 -0
  8. package/BackerService/core/BaseHttpRequest.ts +10 -0
  9. package/BackerService/core/CancelablePromise.ts +126 -0
  10. package/BackerService/core/FetchHttpRequest.ts +22 -0
  11. package/BackerService/core/OpenAPI.ts +56 -0
  12. package/BackerService/core/request.ts +341 -0
  13. package/BackerService/index.ts +9 -0
  14. package/BackerService/schemas.gen.ts +8991 -0
  15. package/BackerService/services.gen.ts +270 -0
  16. package/BackerService/types.gen.ts +6611 -0
  17. package/IdentityService/schemas.gen.ts +10 -36
  18. package/IdentityService/services.gen.ts +1 -25
  19. package/IdentityService/types.gen.ts +0 -241
  20. package/MerchantService/MerchantServiceClient.ts +44 -0
  21. package/MerchantService/core/ApiError.ts +21 -0
  22. package/MerchantService/core/ApiRequestOptions.ts +13 -0
  23. package/MerchantService/core/ApiResult.ts +7 -0
  24. package/MerchantService/core/BaseHttpRequest.ts +10 -0
  25. package/MerchantService/core/CancelablePromise.ts +126 -0
  26. package/MerchantService/core/FetchHttpRequest.ts +22 -0
  27. package/MerchantService/core/OpenAPI.ts +56 -0
  28. package/MerchantService/core/request.ts +341 -0
  29. package/MerchantService/index.ts +9 -0
  30. package/MerchantService/schemas.gen.ts +6782 -0
  31. package/MerchantService/services.gen.ts +334 -0
  32. package/MerchantService/types.gen.ts +5088 -0
  33. package/ProjectService/ProjectServiceClient.ts +3 -9
  34. package/ProjectService/schemas.gen.ts +26 -723
  35. package/ProjectService/services.gen.ts +8 -348
  36. package/ProjectService/types.gen.ts +36 -2252
  37. package/SaasService/schemas.gen.ts +5 -5
  38. package/SettingService/SettingServiceClient.ts +53 -53
  39. package/SettingService/core/ApiError.ts +20 -20
  40. package/SettingService/core/ApiRequestOptions.ts +12 -12
  41. package/SettingService/core/ApiResult.ts +6 -6
  42. package/SettingService/core/BaseHttpRequest.ts +9 -9
  43. package/SettingService/core/CancelablePromise.ts +125 -125
  44. package/SettingService/core/FetchHttpRequest.ts +21 -21
  45. package/SettingService/core/OpenAPI.ts +55 -55
  46. package/SettingService/core/request.ts +340 -340
  47. package/SettingService/index.ts +8 -8
  48. package/SettingService/schemas.gen.ts +1521 -1524
  49. package/SettingService/services.gen.ts +316 -316
  50. package/SettingService/types.gen.ts +980 -981
  51. package/generator.mjs +34 -3
  52. package/package.json +4 -2
package/generator.mjs CHANGED
@@ -3,7 +3,7 @@ import SwaggerParser from "@apidevtools/swagger-parser";
3
3
  import fs from 'fs';
4
4
 
5
5
  const BASE_URL = "http://192.168.1.105:";
6
- const WEBGATEWAY_PORT = 44325;
6
+ const WEBGATEWAY_PORT = 44336;
7
7
  const api_list = [
8
8
  {
9
9
  input: 'swagger-json/AuthServer',
@@ -13,7 +13,13 @@ const api_list = [
13
13
  {
14
14
  input: "",
15
15
  output: 'Project',
16
- port: 45185,
16
+ port: 44325,
17
+ dereference: true
18
+ },
19
+ {
20
+ input: "swagger-json/Backer",
21
+ output: 'Backer',
22
+ port: 44325,
17
23
  dereference: true
18
24
  },
19
25
  {
@@ -36,6 +42,12 @@ const api_list = [
36
42
  output: 'Setting',
37
43
  port: 44515,
38
44
  dereference: false
45
+ },
46
+ {
47
+ input: "swagger-json/Merchant",
48
+ output: 'Merchant',
49
+ port: 44335,
50
+ dereference: true
39
51
  }
40
52
  ]
41
53
 
@@ -43,6 +55,25 @@ function clean_URL(url) {
43
55
  return url.replace(/\/\//g, '/').replace(/:\//g, '://');
44
56
  }
45
57
 
58
+ function getCircularReplacer() {
59
+ const ancestors = [];
60
+ return function (key, value) {
61
+ if (typeof value !== "object" || value === null) {
62
+ return value;
63
+ }
64
+ // `this` is the object that value is contained in,
65
+ // i.e., its direct parent.
66
+ while (ancestors.length > 0 && ancestors.at(-1) !== this) {
67
+ ancestors.pop();
68
+ }
69
+ if (ancestors.includes(value)) {
70
+ return "[Circular]";
71
+ }
72
+ ancestors.push(value);
73
+ return value;
74
+ };
75
+ }
76
+
46
77
  for (const api of api_list) {
47
78
  console.log(`✨ Processing ${api.output}...`);
48
79
  const port = api?.port ? api.port : WEBGATEWAY_PORT;
@@ -53,7 +84,7 @@ for (const api of api_list) {
53
84
  console.log(typeof swaggerText)
54
85
  console.log(`🎁 Dereferencing ${api.output} is from ${apiURL} done.`);
55
86
  temp_swagger = `temp_${api.output}_swagger.json`;
56
- fs.writeFileSync(temp_swagger, JSON.stringify(swaggerText));
87
+ fs.writeFileSync(temp_swagger, JSON.stringify(swaggerText, getCircularReplacer()));
57
88
  }
58
89
  await createClient({
59
90
  input: temp_swagger,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayasofyazilim/saas",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Ayasofyazılım SAAS",
5
5
  "exports": {
6
6
  "./AccountService": "./AccountService/index.ts",
@@ -8,7 +8,9 @@
8
8
  "./AdministrationService": "./AdministrationService/index.ts",
9
9
  "./IdentityService": "./IdentityService/index.ts",
10
10
  "./SaasService": "./SaasService/index.ts",
11
- "./SettingService": "./SettingService/index.ts"
11
+ "./SettingService": "./SettingService/index.ts",
12
+ "./BackerService": "./BackerService/index.ts",
13
+ "./MerchantService": "./MerchantService/index.ts"
12
14
  },
13
15
  "scripts": {
14
16
  "gen:all": "node generator.mjs",