@ayasofyazilim/saas 0.0.38 → 0.0.39

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 (65) 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/BackerService/core/ApiRequestOptions.ts +12 -12
  12. package/BackerService/core/BaseHttpRequest.ts +9 -9
  13. package/BackerService/core/FetchHttpRequest.ts +21 -21
  14. package/BackerService/core/OpenAPI.ts +55 -55
  15. package/BackerService/core/request.ts +340 -340
  16. package/CRMService/schemas.gen.ts +15920 -15920
  17. package/CRMService/services.gen.ts +2052 -2052
  18. package/CRMService/types.gen.ts +4106 -4106
  19. package/ContractService/schemas.gen.ts +258 -157
  20. package/ContractService/services.gen.ts +139 -139
  21. package/ContractService/types.gen.ts +231 -217
  22. package/FundraiserService/core/ApiRequestOptions.ts +12 -12
  23. package/FundraiserService/core/BaseHttpRequest.ts +9 -9
  24. package/FundraiserService/core/FetchHttpRequest.ts +21 -21
  25. package/FundraiserService/core/OpenAPI.ts +55 -55
  26. package/FundraiserService/core/request.ts +340 -340
  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/core/ApiRequestOptions.ts +12 -12
  33. package/MerchantService/core/BaseHttpRequest.ts +9 -9
  34. package/MerchantService/core/FetchHttpRequest.ts +21 -21
  35. package/MerchantService/core/OpenAPI.ts +55 -55
  36. package/MerchantService/core/request.ts +340 -340
  37. package/MerchantService/schemas.gen.ts +14764 -14764
  38. package/MerchantService/services.gen.ts +1602 -1602
  39. package/ProjectService/core/ApiRequestOptions.ts +12 -12
  40. package/ProjectService/core/BaseHttpRequest.ts +9 -9
  41. package/ProjectService/core/FetchHttpRequest.ts +21 -21
  42. package/ProjectService/core/OpenAPI.ts +55 -55
  43. package/ProjectService/core/request.ts +340 -340
  44. package/ProjectService.json +2937 -2937
  45. package/SaasService/core/ApiRequestOptions.ts +12 -12
  46. package/SaasService/core/BaseHttpRequest.ts +9 -9
  47. package/SaasService/core/FetchHttpRequest.ts +21 -21
  48. package/SaasService/core/OpenAPI.ts +55 -55
  49. package/SaasService/core/request.ts +340 -340
  50. package/TravellerService/TravellerServiceClient.ts +56 -56
  51. package/TravellerService/core/ApiError.ts +20 -20
  52. package/TravellerService/core/ApiRequestOptions.ts +12 -12
  53. package/TravellerService/core/ApiResult.ts +6 -6
  54. package/TravellerService/core/BaseHttpRequest.ts +9 -9
  55. package/TravellerService/core/CancelablePromise.ts +125 -125
  56. package/TravellerService/core/FetchHttpRequest.ts +21 -21
  57. package/TravellerService/core/OpenAPI.ts +55 -55
  58. package/TravellerService/core/request.ts +340 -340
  59. package/TravellerService/index.ts +8 -8
  60. package/TravellerService/schemas.gen.ts +6204 -6204
  61. package/TravellerService/services.gen.ts +695 -695
  62. package/TravellerService/types.gen.ts +1808 -1808
  63. package/generator.mjs +13 -6
  64. package/package.json +1 -1
  65. package/swagger.json +4794 -4794
package/generator.mjs CHANGED
@@ -1,4 +1,4 @@
1
- #! /usr/bin/env node
1
+ #! /usr/bin/env node
2
2
  import { createClient } from "@hey-api/openapi-ts";
3
3
  import SwaggerParser from "@apidevtools/swagger-parser";
4
4
  import fs from "fs";
@@ -67,12 +67,12 @@ var initial_api_list = [
67
67
  ];
68
68
 
69
69
  function clean_URL(url) {
70
- return url.replace(/\/\//g,"/").replace(/:\//g,"://");
70
+ return url.replace(/\/\//g, "/").replace(/:\//g, "://");
71
71
  }
72
72
 
73
73
  function getCircularReplacer() {
74
74
  const ancestors = [];
75
- return function (key,value) {
75
+ return function (key, value) {
76
76
  if (typeof value !== "object" || value === null) {
77
77
  return value;
78
78
  }
@@ -99,12 +99,11 @@ async function generateApi(api_list) {
99
99
  const swaggerText = await SwaggerParser.dereference(apiURL);
100
100
  let temp_swagger = apiURL;
101
101
  if (api.dereference) {
102
- console.log(typeof swaggerText);
103
102
  console.log(`🎁 Dereferencing ${api.output} is from ${apiURL} done.`);
104
103
  temp_swagger = `temp_${api.output}_swagger.json`;
105
104
  fs.writeFileSync(
106
105
  temp_swagger,
107
- JSON.stringify(swaggerText,getCircularReplacer()),
106
+ JSON.stringify(swaggerText, getCircularReplacer()),
108
107
  );
109
108
 
110
109
  await createClient({
@@ -134,6 +133,14 @@ async function generateApi(api_list) {
134
133
  `\nexport * from './schemas.gen';`,
135
134
  { flag: "a" },
136
135
  );
136
+
137
+ const data = fs.readFileSync(
138
+ `${api.output}Service/schemas.gen.ts`, { encoding: 'utf8', flag: 'r' });
139
+ var result = data.replaceAll('as const ', '');
140
+ fs.writeFile(`${api.output}Service/schemas.gen.ts`, result, 'utf8', function (err) {
141
+ if (err) return console.log(err);
142
+ });
143
+
137
144
  } else {
138
145
  await createClient({
139
146
  input: temp_swagger,
@@ -149,7 +156,7 @@ async function generateApi(api_list) {
149
156
  const args = process.argv.filter((val) => val.startsWith("--"));
150
157
  const isAll = args.filter((val) => val === "--all").length > 0;
151
158
  const hasFilter = args.filter((val) => val.startsWith("--filter")).length > 0;
152
- const knownArgs = ["--all","--filter"];
159
+ const knownArgs = ["--all", "--filter"];
153
160
  const unknownArgs = args.filter(
154
161
  (val) =>
155
162
  !knownArgs.includes(val) && !knownArgs.includes(val.split("=").at(0)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayasofyazilim/saas",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "description": "Ayasofyazılım SAAS",
5
5
  "main": "generator.mjs",
6
6
  "bin": {