@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.
Files changed (58) hide show
  1. package/AccountService/core/ApiRequestOptions.ts +12 -12
  2. package/AccountService/core/BaseHttpRequest.ts +9 -9
  3. package/AccountService/core/FetchHttpRequest.ts +21 -21
  4. package/AccountService/core/OpenAPI.ts +55 -55
  5. package/AccountService/core/request.ts +340 -340
  6. package/AdministrationService/core/ApiRequestOptions.ts +12 -12
  7. package/AdministrationService/core/BaseHttpRequest.ts +9 -9
  8. package/AdministrationService/core/FetchHttpRequest.ts +21 -21
  9. package/AdministrationService/core/OpenAPI.ts +55 -55
  10. package/AdministrationService/core/request.ts +340 -340
  11. package/AdministrationService/index.ts +8 -8
  12. package/BackerService/BackerServiceClient.ts +50 -50
  13. package/BackerService/core/ApiRequestOptions.ts +12 -12
  14. package/BackerService/core/BaseHttpRequest.ts +9 -9
  15. package/BackerService/core/FetchHttpRequest.ts +21 -21
  16. package/BackerService/core/OpenAPI.ts +55 -55
  17. package/BackerService/core/request.ts +340 -340
  18. package/BackerService/schemas.gen.ts +12444 -12444
  19. package/BackerService/services.gen.ts +866 -866
  20. package/FundraiserService/FundraiserServiceClient.ts +47 -47
  21. package/FundraiserService/core/ApiError.ts +20 -20
  22. package/FundraiserService/core/ApiResult.ts +6 -6
  23. package/FundraiserService/core/CancelablePromise.ts +125 -125
  24. package/FundraiserService/index.ts +8 -8
  25. package/FundraiserService/schemas.gen.ts +11548 -11548
  26. package/FundraiserService/services.gen.ts +627 -627
  27. package/IdentityService/core/ApiRequestOptions.ts +12 -12
  28. package/IdentityService/core/BaseHttpRequest.ts +9 -9
  29. package/IdentityService/core/FetchHttpRequest.ts +21 -21
  30. package/IdentityService/core/OpenAPI.ts +55 -55
  31. package/IdentityService/core/request.ts +340 -340
  32. package/MerchantService/MerchantServiceClient.ts +77 -77
  33. package/MerchantService/core/ApiRequestOptions.ts +12 -12
  34. package/MerchantService/core/BaseHttpRequest.ts +9 -9
  35. package/MerchantService/core/FetchHttpRequest.ts +21 -21
  36. package/MerchantService/core/OpenAPI.ts +55 -55
  37. package/MerchantService/core/request.ts +340 -340
  38. package/MerchantService/schemas.gen.ts +14764 -14764
  39. package/MerchantService/services.gen.ts +1602 -1602
  40. package/ProjectService/ProjectServiceClient.ts +47 -47
  41. package/ProjectService/core/ApiRequestOptions.ts +12 -12
  42. package/ProjectService/core/BaseHttpRequest.ts +9 -9
  43. package/ProjectService/core/FetchHttpRequest.ts +21 -21
  44. package/ProjectService/core/OpenAPI.ts +55 -55
  45. package/ProjectService/core/request.ts +340 -340
  46. package/ProjectService/schemas.gen.ts +5147 -5147
  47. package/ProjectService/services.gen.ts +492 -492
  48. package/SaasService/core/ApiRequestOptions.ts +12 -12
  49. package/SaasService/core/BaseHttpRequest.ts +9 -9
  50. package/SaasService/core/FetchHttpRequest.ts +21 -21
  51. package/SaasService/core/OpenAPI.ts +55 -55
  52. package/SaasService/core/request.ts +340 -340
  53. package/SettingService/index.ts +2 -2
  54. package/SettingService/schemas.gen.ts +5779 -5779
  55. package/SettingService/services.gen.ts +787 -787
  56. package/SettingService/types.gen.ts +1862 -6827
  57. package/generator.mjs +33 -7
  58. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayasofyazilim/saas",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "Ayasofyazılım SAAS",
5
5
  "main": "generator.mjs",
6
6
  "bin": {