@ayasofyazilim/saas 0.0.13 → 0.0.14

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