@apimatic/cli 1.1.0-alpha.2 → 1.1.0-alpha.21

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 (269) hide show
  1. package/README.md +257 -101
  2. package/bin/run.js +5 -0
  3. package/lib/actions/action-result.d.ts +8 -0
  4. package/lib/actions/action-result.js +25 -0
  5. package/lib/actions/action-result.js.map +1 -0
  6. package/lib/actions/auth/login.d.ts +12 -0
  7. package/lib/actions/auth/login.js +63 -0
  8. package/lib/actions/auth/login.js.map +1 -0
  9. package/lib/actions/portal/copilot.d.ts +14 -0
  10. package/lib/actions/portal/copilot.js +79 -0
  11. package/lib/actions/portal/copilot.js.map +1 -0
  12. package/lib/actions/portal/generate.d.ts +14 -0
  13. package/lib/actions/portal/generate.js +66 -0
  14. package/lib/actions/portal/generate.js.map +1 -0
  15. package/lib/actions/portal/recipe/new-recipe.d.ts +24 -0
  16. package/lib/actions/portal/recipe/new-recipe.js +250 -0
  17. package/lib/actions/portal/recipe/new-recipe.js.map +1 -0
  18. package/lib/actions/portal/serve.d.ts +14 -0
  19. package/lib/actions/portal/serve.js +24 -0
  20. package/lib/actions/portal/serve.js.map +1 -0
  21. package/lib/actions/portal/toc/new-toc.d.ts +20 -0
  22. package/lib/actions/portal/toc/new-toc.js +133 -0
  23. package/lib/actions/portal/toc/new-toc.js.map +1 -0
  24. package/lib/actions/sdk/generate.d.ts +14 -0
  25. package/lib/actions/sdk/generate.js +72 -0
  26. package/lib/actions/sdk/generate.js.map +1 -0
  27. package/lib/application/portal/recipe/portal-recipe.d.ts +8 -0
  28. package/lib/application/portal/recipe/portal-recipe.js +33 -0
  29. package/lib/application/portal/recipe/portal-recipe.js.map +1 -0
  30. package/lib/application/portal/recipe/recipe-generator.d.ts +16 -0
  31. package/lib/application/portal/recipe/recipe-generator.js +147 -0
  32. package/lib/application/portal/recipe/recipe-generator.js.map +1 -0
  33. package/lib/application/portal/serve/portal-watcher.d.ts +11 -0
  34. package/lib/application/portal/serve/portal-watcher.js +64 -0
  35. package/lib/application/portal/serve/portal-watcher.js.map +1 -0
  36. package/lib/application/portal/serve/serve-handler.d.ts +16 -0
  37. package/lib/application/portal/serve/serve-handler.js +91 -0
  38. package/lib/application/portal/serve/serve-handler.js.map +1 -0
  39. package/lib/application/portal/serve/watcher-handler.d.ts +10 -0
  40. package/lib/application/portal/serve/watcher-handler.js +51 -0
  41. package/lib/application/portal/serve/watcher-handler.js.map +1 -0
  42. package/lib/application/portal/toc/sdl-parser.d.ts +19 -0
  43. package/lib/application/portal/toc/sdl-parser.js +90 -0
  44. package/lib/application/portal/toc/sdl-parser.js.map +1 -0
  45. package/lib/application/portal/toc/toc-content-parser.d.ts +5 -0
  46. package/lib/application/portal/toc/toc-content-parser.js +44 -0
  47. package/lib/application/portal/toc/toc-content-parser.js.map +1 -0
  48. package/lib/application/portal/toc/toc-structure-generator.d.ts +6 -0
  49. package/lib/application/portal/toc/toc-structure-generator.js +84 -0
  50. package/lib/application/portal/toc/toc-structure-generator.js.map +1 -0
  51. package/lib/client-utils/auth-manager.d.ts +8 -3
  52. package/lib/client-utils/auth-manager.js +23 -10
  53. package/lib/client-utils/auth-manager.js.map +1 -0
  54. package/lib/client-utils/sdk-client.d.ts +4 -9
  55. package/lib/client-utils/sdk-client.js +9 -87
  56. package/lib/client-utils/sdk-client.js.map +1 -0
  57. package/lib/commands/api/transform.d.ts +7 -7
  58. package/lib/commands/api/transform.js +46 -51
  59. package/lib/commands/api/transform.js.map +1 -0
  60. package/lib/commands/api/validate.d.ts +4 -4
  61. package/lib/commands/api/validate.js +35 -36
  62. package/lib/commands/api/validate.js.map +1 -0
  63. package/lib/commands/auth/login.d.ts +3 -2
  64. package/lib/commands/auth/login.js +22 -53
  65. package/lib/commands/auth/login.js.map +1 -0
  66. package/lib/commands/auth/logout.d.ts +1 -1
  67. package/lib/commands/auth/logout.js +8 -13
  68. package/lib/commands/auth/logout.js.map +1 -0
  69. package/lib/commands/auth/status.d.ts +1 -1
  70. package/lib/commands/auth/status.js +9 -13
  71. package/lib/commands/auth/status.js.map +1 -0
  72. package/lib/commands/portal/copilot.d.ts +13 -0
  73. package/lib/commands/portal/copilot.js +32 -0
  74. package/lib/commands/portal/copilot.js.map +1 -0
  75. package/lib/commands/portal/generate.d.ts +10 -8
  76. package/lib/commands/portal/generate.js +28 -107
  77. package/lib/commands/portal/generate.js.map +1 -0
  78. package/lib/commands/portal/quickstart.d.ts +10 -0
  79. package/lib/commands/portal/quickstart.js +114 -0
  80. package/lib/commands/portal/quickstart.js.map +1 -0
  81. package/lib/commands/portal/recipe/new.d.ts +10 -0
  82. package/lib/commands/portal/recipe/new.js +38 -0
  83. package/lib/commands/portal/recipe/new.js.map +1 -0
  84. package/lib/commands/portal/serve.d.ts +16 -0
  85. package/lib/commands/portal/serve.js +80 -0
  86. package/lib/commands/portal/serve.js.map +1 -0
  87. package/lib/commands/portal/toc/new.d.ts +14 -0
  88. package/lib/commands/portal/toc/new.js +52 -0
  89. package/lib/commands/portal/toc/new.js.map +1 -0
  90. package/lib/commands/sdk/generate.d.ts +9 -8
  91. package/lib/commands/sdk/generate.js +39 -128
  92. package/lib/commands/sdk/generate.js.map +1 -0
  93. package/lib/config/axios-config.d.ts +2 -0
  94. package/lib/config/axios-config.js +10 -0
  95. package/lib/config/axios-config.js.map +1 -0
  96. package/lib/config/env.d.ts +26 -1
  97. package/lib/config/env.js +27 -4
  98. package/lib/config/env.js.map +1 -0
  99. package/lib/controllers/api/transform.d.ts +1 -1
  100. package/lib/controllers/api/transform.js +23 -22
  101. package/lib/controllers/api/transform.js.map +1 -0
  102. package/lib/controllers/api/validate.d.ts +3 -3
  103. package/lib/controllers/api/validate.js +19 -12
  104. package/lib/controllers/api/validate.js.map +1 -0
  105. package/lib/controllers/portal/quickstart.d.ts +13 -0
  106. package/lib/controllers/portal/quickstart.js +214 -0
  107. package/lib/controllers/portal/quickstart.js.map +1 -0
  108. package/lib/hooks/not-found.d.ts +3 -0
  109. package/lib/hooks/not-found.js +52 -0
  110. package/lib/hooks/not-found.js.map +1 -0
  111. package/lib/hooks/utils.d.ts +5 -0
  112. package/lib/hooks/utils.js +51 -0
  113. package/lib/hooks/utils.js.map +1 -0
  114. package/lib/index.d.ts +1 -1
  115. package/lib/index.js +2 -4
  116. package/lib/index.js.map +1 -0
  117. package/lib/infrastructure/api-client-utils.d.ts +6 -0
  118. package/lib/infrastructure/api-client-utils.js +34 -0
  119. package/lib/infrastructure/api-client-utils.js.map +1 -0
  120. package/lib/infrastructure/api-utils.d.ts +9 -0
  121. package/lib/infrastructure/api-utils.js +33 -0
  122. package/lib/infrastructure/api-utils.js.map +1 -0
  123. package/lib/infrastructure/env-info.d.ts +12 -0
  124. package/lib/infrastructure/env-info.js +58 -0
  125. package/lib/infrastructure/env-info.js.map +1 -0
  126. package/lib/infrastructure/file-service.d.ts +18 -0
  127. package/lib/infrastructure/file-service.js +76 -0
  128. package/lib/infrastructure/file-service.js.map +1 -0
  129. package/lib/infrastructure/launcher-service.d.ts +5 -0
  130. package/lib/infrastructure/launcher-service.js +47 -0
  131. package/lib/infrastructure/launcher-service.js.map +1 -0
  132. package/lib/infrastructure/services/api-service.d.ts +10 -0
  133. package/lib/infrastructure/services/api-service.js +55 -0
  134. package/lib/infrastructure/services/api-service.js.map +1 -0
  135. package/lib/infrastructure/services/auth-service.d.ts +11 -0
  136. package/lib/infrastructure/services/auth-service.js +35 -0
  137. package/lib/infrastructure/services/auth-service.js.map +1 -0
  138. package/lib/infrastructure/services/portal-service.d.ts +23 -0
  139. package/lib/infrastructure/services/portal-service.js +186 -0
  140. package/lib/infrastructure/services/portal-service.js.map +1 -0
  141. package/lib/infrastructure/services/telemetry-service.d.ts +8 -0
  142. package/lib/infrastructure/services/telemetry-service.js +40 -0
  143. package/lib/infrastructure/services/telemetry-service.js.map +1 -0
  144. package/lib/infrastructure/tmp-extensions.d.ts +2 -0
  145. package/lib/infrastructure/tmp-extensions.js +6 -0
  146. package/lib/infrastructure/tmp-extensions.js.map +1 -0
  147. package/lib/infrastructure/zip-service.d.ts +6 -0
  148. package/lib/infrastructure/zip-service.js +39 -0
  149. package/lib/infrastructure/zip-service.js.map +1 -0
  150. package/lib/prompts/auth/login.d.ts +5 -0
  151. package/lib/prompts/auth/login.js +13 -0
  152. package/lib/prompts/auth/login.js.map +1 -0
  153. package/lib/prompts/portal/common/base-prompts.d.ts +7 -0
  154. package/lib/prompts/portal/common/base-prompts.js +19 -0
  155. package/lib/prompts/portal/common/base-prompts.js.map +1 -0
  156. package/lib/prompts/portal/copilot.d.ts +14 -0
  157. package/lib/prompts/portal/copilot.js +71 -0
  158. package/lib/prompts/portal/copilot.js.map +1 -0
  159. package/lib/prompts/portal/generate.d.ts +11 -0
  160. package/lib/prompts/portal/generate.js +42 -0
  161. package/lib/prompts/portal/generate.js.map +1 -0
  162. package/lib/prompts/portal/quickstart.d.ts +30 -0
  163. package/lib/prompts/portal/quickstart.js +240 -0
  164. package/lib/prompts/portal/quickstart.js.map +1 -0
  165. package/lib/prompts/portal/recipe/new-recipe.d.ts +24 -0
  166. package/lib/prompts/portal/recipe/new-recipe.js +203 -0
  167. package/lib/prompts/portal/recipe/new-recipe.js.map +1 -0
  168. package/lib/prompts/portal/serve.d.ts +4 -0
  169. package/lib/prompts/portal/serve.js +14 -0
  170. package/lib/prompts/portal/serve.js.map +1 -0
  171. package/lib/prompts/portal/toc/new-toc.d.ts +11 -0
  172. package/lib/prompts/portal/toc/new-toc.js +39 -0
  173. package/lib/prompts/portal/toc/new-toc.js.map +1 -0
  174. package/lib/prompts/sdk/generate.d.ts +11 -0
  175. package/lib/prompts/sdk/generate.js +42 -0
  176. package/lib/prompts/sdk/generate.js.map +1 -0
  177. package/lib/types/api/account.d.ts +10 -0
  178. package/lib/types/api/account.js +2 -0
  179. package/lib/types/api/account.js.map +1 -0
  180. package/lib/types/api/transform.d.ts +19 -4
  181. package/lib/types/api/transform.js +19 -4
  182. package/lib/types/api/transform.js.map +1 -0
  183. package/lib/types/api/validate.d.ts +3 -3
  184. package/lib/types/api/validate.js +2 -2
  185. package/lib/types/api/validate.js.map +1 -0
  186. package/lib/types/build/build.d.ts +14 -0
  187. package/lib/types/build/build.js +4 -0
  188. package/lib/types/build/build.js.map +1 -0
  189. package/lib/types/build-context.d.ts +13 -0
  190. package/lib/types/build-context.js +30 -0
  191. package/lib/types/build-context.js.map +1 -0
  192. package/lib/types/common/result.d.ts +17 -0
  193. package/lib/types/common/result.js +32 -0
  194. package/lib/types/common/result.js.map +1 -0
  195. package/lib/types/events/domain-event.d.ts +8 -0
  196. package/lib/types/events/domain-event.js +11 -0
  197. package/lib/types/events/domain-event.js.map +1 -0
  198. package/lib/types/events/quickstart-completed.d.ts +7 -0
  199. package/lib/types/events/quickstart-completed.js +10 -0
  200. package/lib/types/events/quickstart-completed.js.map +1 -0
  201. package/lib/types/events/quickstart-initiated.d.ts +7 -0
  202. package/lib/types/events/quickstart-initiated.js +10 -0
  203. package/lib/types/events/quickstart-initiated.js.map +1 -0
  204. package/lib/types/events/recipe-creation-failed.d.ts +5 -0
  205. package/lib/types/events/recipe-creation-failed.js +8 -0
  206. package/lib/types/events/recipe-creation-failed.js.map +1 -0
  207. package/lib/types/events/toc-creation-failed.d.ts +5 -0
  208. package/lib/types/events/toc-creation-failed.js +8 -0
  209. package/lib/types/events/toc-creation-failed.js.map +1 -0
  210. package/lib/types/file/directoryPath.d.ts +7 -0
  211. package/lib/types/file/directoryPath.js +16 -0
  212. package/lib/types/file/directoryPath.js.map +1 -0
  213. package/lib/types/file/fileName.d.ts +5 -0
  214. package/lib/types/file/fileName.js +9 -0
  215. package/lib/types/file/fileName.js.map +1 -0
  216. package/lib/types/file/filePath.d.ts +8 -0
  217. package/lib/types/file/filePath.js +11 -0
  218. package/lib/types/file/filePath.js.map +1 -0
  219. package/lib/types/flags-provider.d.ts +15 -0
  220. package/lib/types/flags-provider.js +34 -0
  221. package/lib/types/flags-provider.js.map +1 -0
  222. package/lib/types/portal/generate.d.ts +13 -9
  223. package/lib/types/portal/generate.js +3 -2
  224. package/lib/types/portal/generate.js.map +1 -0
  225. package/lib/types/portal/quickstart.d.ts +17 -0
  226. package/lib/types/portal/quickstart.js +2 -0
  227. package/lib/types/portal/quickstart.js.map +1 -0
  228. package/lib/types/portal/serve.d.ts +12 -0
  229. package/lib/types/portal/serve.js +2 -0
  230. package/lib/types/portal/serve.js.map +1 -0
  231. package/lib/types/portal-context.d.ts +11 -0
  232. package/lib/types/portal-context.js +28 -0
  233. package/lib/types/portal-context.js.map +1 -0
  234. package/lib/types/recipe/recipe.d.ts +37 -0
  235. package/lib/types/recipe/recipe.js +6 -0
  236. package/lib/types/recipe/recipe.js.map +1 -0
  237. package/lib/types/sdk/generate.d.ts +11 -10
  238. package/lib/types/sdk/generate.js +11 -12
  239. package/lib/types/sdk/generate.js.map +1 -0
  240. package/lib/types/sdk-context.d.ts +13 -0
  241. package/lib/types/sdk-context.js +28 -0
  242. package/lib/types/sdk-context.js.map +1 -0
  243. package/lib/types/sdl/sdl.d.ts +12 -0
  244. package/lib/types/sdl/sdl.js +2 -0
  245. package/lib/types/sdl/sdl.js.map +1 -0
  246. package/lib/types/spec-context.d.ts +7 -0
  247. package/lib/types/spec-context.js +12 -0
  248. package/lib/types/spec-context.js.map +1 -0
  249. package/lib/types/toc/toc.d.ts +31 -0
  250. package/lib/types/toc/toc.js +9 -0
  251. package/lib/types/toc/toc.js.map +1 -0
  252. package/lib/types/utils.d.ts +3 -3
  253. package/lib/types/utils.js +2 -2
  254. package/lib/types/utils.js.map +1 -0
  255. package/lib/utils/utils.d.ts +16 -7
  256. package/lib/utils/utils.js +142 -86
  257. package/lib/utils/utils.js.map +1 -0
  258. package/lib/validators/common/directoryValidator.d.ts +5 -0
  259. package/lib/validators/common/directoryValidator.js +22 -0
  260. package/lib/validators/common/directoryValidator.js.map +1 -0
  261. package/lib/validators/portal/serve-validator.d.ts +6 -0
  262. package/lib/validators/portal/serve-validator.js +15 -0
  263. package/lib/validators/portal/serve-validator.js.map +1 -0
  264. package/package.json +100 -43
  265. package/bin/run +0 -5
  266. package/lib/controllers/portal/generate.d.ts +0 -2
  267. package/lib/controllers/portal/generate.js +0 -49
  268. package/lib/controllers/sdk/generate.d.ts +0 -4
  269. package/lib/controllers/sdk/generate.js +0 -64
@@ -0,0 +1,7 @@
1
+ import { DomainEvent } from "./domain-event.js";
2
+ export declare class QuickstartCompletedEvent extends DomainEvent {
3
+ protected readonly eventName: string;
4
+ private static readonly message;
5
+ private static readonly commandName;
6
+ constructor();
7
+ }
@@ -0,0 +1,10 @@
1
+ import { DomainEvent } from "./domain-event.js";
2
+ export class QuickstartCompletedEvent extends DomainEvent {
3
+ constructor() {
4
+ super(QuickstartCompletedEvent.message, QuickstartCompletedEvent.commandName, {});
5
+ this.eventName = QuickstartCompletedEvent.name;
6
+ }
7
+ }
8
+ QuickstartCompletedEvent.message = "Quickstart completed.";
9
+ QuickstartCompletedEvent.commandName = "portal:quickstart";
10
+ //# sourceMappingURL=quickstart-completed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickstart-completed.js","sourceRoot":"","sources":["../../../src/types/events/quickstart-completed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,wBAAyB,SAAQ,WAAW;IAKvD;QACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QALjE,cAAS,GAAG,wBAAwB,CAAC,IAAI,CAAC;IAM7D,CAAC;;AALuB,gCAAO,GAAG,uBAAgC,AAAnC,CAAoC;AAC3C,oCAAW,GAAG,mBAA4B,AAA/B,CAAgC"}
@@ -0,0 +1,7 @@
1
+ import { DomainEvent } from "./domain-event.js";
2
+ export declare class QuickstartInitiatedEvent extends DomainEvent {
3
+ protected readonly eventName: string;
4
+ private static readonly message;
5
+ private static readonly commandName;
6
+ constructor();
7
+ }
@@ -0,0 +1,10 @@
1
+ import { DomainEvent } from "./domain-event.js";
2
+ export class QuickstartInitiatedEvent extends DomainEvent {
3
+ constructor() {
4
+ super(QuickstartInitiatedEvent.message, QuickstartInitiatedEvent.commandName, {});
5
+ this.eventName = QuickstartInitiatedEvent.name;
6
+ }
7
+ }
8
+ QuickstartInitiatedEvent.message = "Quickstart initiated.";
9
+ QuickstartInitiatedEvent.commandName = "portal:quickstart";
10
+ //# sourceMappingURL=quickstart-initiated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickstart-initiated.js","sourceRoot":"","sources":["../../../src/types/events/quickstart-initiated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,wBAAyB,SAAQ,WAAW;IAKvD;QACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QALjE,cAAS,GAAG,wBAAwB,CAAC,IAAI,CAAC;IAM7D,CAAC;;AALuB,gCAAO,GAAG,uBAAgC,AAAnC,CAAoC;AAC3C,oCAAW,GAAG,mBAA4B,AAA/B,CAAgC"}
@@ -0,0 +1,5 @@
1
+ import { DomainEvent } from "../../types/events/domain-event.js";
2
+ export declare class RecipeCreationFailedEvent extends DomainEvent {
3
+ protected readonly eventName: string;
4
+ constructor(message: string, commandName: string, flags: Record<string, unknown>);
5
+ }
@@ -0,0 +1,8 @@
1
+ import { DomainEvent } from "../../types/events/domain-event.js";
2
+ export class RecipeCreationFailedEvent extends DomainEvent {
3
+ constructor(message, commandName, flags) {
4
+ super(message, commandName, flags);
5
+ this.eventName = RecipeCreationFailedEvent.name;
6
+ }
7
+ }
8
+ //# sourceMappingURL=recipe-creation-failed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe-creation-failed.js","sourceRoot":"","sources":["../../../src/types/events/recipe-creation-failed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IAGxD,YAAY,OAAe,EAAE,WAAmB,EAAE,KAA8B;QAC9E,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAHlB,cAAS,GAAG,yBAAyB,CAAC,IAAI,CAAC;IAI9D,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ import { DomainEvent } from "../../types/events/domain-event.js";
2
+ export declare class TocCreationFailedEvent extends DomainEvent {
3
+ protected readonly eventName: string;
4
+ constructor(message: string, commandName: string, flags: Record<string, unknown>);
5
+ }
@@ -0,0 +1,8 @@
1
+ import { DomainEvent } from "../../types/events/domain-event.js";
2
+ export class TocCreationFailedEvent extends DomainEvent {
3
+ constructor(message, commandName, flags) {
4
+ super(message, commandName, flags);
5
+ this.eventName = TocCreationFailedEvent.name;
6
+ }
7
+ }
8
+ //# sourceMappingURL=toc-creation-failed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc-creation-failed.js","sourceRoot":"","sources":["../../../src/types/events/toc-creation-failed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAGrD,YAAY,OAAe,EAAE,WAAmB,EAAE,KAA8B;QAC9E,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAHlB,cAAS,GAAG,sBAAsB,CAAC,IAAI,CAAC;IAI3D,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ export declare class DirectoryPath {
2
+ private readonly directoryPath;
3
+ constructor(directoryPath: string, ...subPaths: string[]);
4
+ toString(): string;
5
+ join(subPath: string): DirectoryPath;
6
+ isEqual(other: DirectoryPath): boolean;
7
+ }
@@ -0,0 +1,16 @@
1
+ import * as path from "path";
2
+ export class DirectoryPath {
3
+ constructor(directoryPath, ...subPaths) {
4
+ this.directoryPath = path.resolve(directoryPath, ...subPaths);
5
+ }
6
+ toString() {
7
+ return this.directoryPath;
8
+ }
9
+ join(subPath) {
10
+ return new DirectoryPath(path.join(this.directoryPath, subPath));
11
+ }
12
+ isEqual(other) {
13
+ return this.directoryPath === other.directoryPath;
14
+ }
15
+ }
16
+ //# sourceMappingURL=directoryPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directoryPath.js","sourceRoot":"","sources":["../../../src/types/file/directoryPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,MAAM,OAAO,aAAa;IAGxB,YAAY,aAAqB,EAAE,GAAG,QAAkB;QACtD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,QAAQ,CAAC,CAAC;IAChE,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAEM,IAAI,CAAC,OAAe;QACzB,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IACnE,CAAC;IAEM,OAAO,CAAC,KAAoB;QACjC,OAAO,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,CAAC;IACpD,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ export declare class FileName {
2
+ private readonly name;
3
+ constructor(name: string);
4
+ toString(): string;
5
+ }
@@ -0,0 +1,9 @@
1
+ export class FileName {
2
+ constructor(name) {
3
+ this.name = name;
4
+ }
5
+ toString() {
6
+ return this.name;
7
+ }
8
+ }
9
+ //# sourceMappingURL=fileName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileName.js","sourceRoot":"","sources":["../../../src/types/file/fileName.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAQ;IAGnB,YAAY,IAAY;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { FileName } from "./fileName.js";
2
+ import { DirectoryPath } from "./directoryPath.js";
3
+ export declare class FilePath {
4
+ private readonly fileName;
5
+ private readonly directoryPath;
6
+ constructor(path: DirectoryPath, name: FileName);
7
+ toString(): string;
8
+ }
@@ -0,0 +1,11 @@
1
+ import path from "path";
2
+ export class FilePath {
3
+ constructor(path, name) {
4
+ this.fileName = name;
5
+ this.directoryPath = path;
6
+ }
7
+ toString() {
8
+ return path.join(this.directoryPath.toString(), this.fileName.toString());
9
+ }
10
+ }
11
+ //# sourceMappingURL=filePath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filePath.js","sourceRoot":"","sources":["../../../src/types/file/filePath.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,QAAQ;IAInB,YAAY,IAAmB,EAAE,IAAc;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ export declare class FlagsProvider {
2
+ private static readonly inputFlagName;
3
+ static input: {
4
+ [FlagsProvider.inputFlagName]: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
5
+ };
6
+ static destination(artifact: string, artifactName: string): {
7
+ destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ };
9
+ static authKey: {
10
+ "auth-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ static force: {
13
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ }
@@ -0,0 +1,34 @@
1
+ import { Flags } from "@oclif/core";
2
+ export class FlagsProvider {
3
+ static destination(artifact, artifactName) {
4
+ return {
5
+ destination: Flags.string({
6
+ char: "d",
7
+ description: `[default: <${FlagsProvider.inputFlagName}>/${artifact}] path where the ${artifactName} will be generated.`
8
+ })
9
+ };
10
+ }
11
+ }
12
+ FlagsProvider.inputFlagName = "input";
13
+ // Common folder flag group
14
+ FlagsProvider.input = {
15
+ [FlagsProvider.inputFlagName]: Flags.string({
16
+ char: "i",
17
+ description: "[default: ./] path to the parent directory containing the 'src' directory, which includes API specifications and configuration files."
18
+ })
19
+ };
20
+ // Auth key group
21
+ FlagsProvider.authKey = {
22
+ "auth-key": Flags.string({
23
+ char: "k",
24
+ description: "override current authentication state with an authentication key."
25
+ })
26
+ };
27
+ FlagsProvider.force = {
28
+ force: Flags.boolean({
29
+ char: "f",
30
+ default: false,
31
+ description: "overwrite changes without asking for user consent."
32
+ })
33
+ };
34
+ //# sourceMappingURL=flags-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags-provider.js","sourceRoot":"","sources":["../../src/types/flags-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,OAAO,aAAa;IAWjB,MAAM,CAAC,WAAW,CAAC,QAAgB,EAAE,YAAoB;QAC9D,OAAO;YACL,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;gBACxB,IAAI,EAAE,GAAG;gBACT,WAAW,EAAE,cAAc,aAAa,CAAC,aAAa,KAAK,QAAQ,oBAAoB,YAAY,qBAAqB;aACzH,CAAC;SACH,CAAC;IACJ,CAAC;;AAjBuB,2BAAa,GAAW,OAAgB,CAAC;AACjE,2BAA2B;AACb,mBAAK,GAAG;IACpB,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;QAC1C,IAAI,EAAE,GAAG;QACT,WAAW,EACT,uIAAuI;KAC1I,CAAC;CACH,CAAC;AAWF,iBAAiB;AACH,qBAAO,GAAG;IACtB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,mEAAmE;KACjF,CAAC;CACH,CAAC;AAEY,mBAAK,GAAG;IACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,oDAAoD;KAClE,CAAC;CACH,CAAC"}
@@ -1,9 +1,13 @@
1
- import { DocsPortalManagementController } from "@apimatic/sdk";
2
- export declare type GeneratePortalParams = {
3
- zippedBuildFilePath: string;
4
- portalFolderPath: string;
5
- zippedPortalPath: string;
6
- docsPortalController: DocsPortalManagementController;
7
- overrideAuthKey: string | null;
8
- zip: boolean;
9
- };
1
+ export interface GeneratePortalParams {
2
+ readonly sourceBuildInputZipFilePath: string;
3
+ readonly generatedPortalArtifactsFolderPath: string;
4
+ readonly generatedPortalArtifactsZipFilePath: string;
5
+ readonly overrideAuthKey: string | null;
6
+ readonly generateZipFile: boolean;
7
+ }
8
+ export interface ErrorResponse {
9
+ readonly title: string;
10
+ readonly detail?: string;
11
+ readonly errors: Record<string, string[]>;
12
+ readonly message?: string;
13
+ }
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ ;
2
+ export {};
3
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/types/portal/generate.ts"],"names":[],"mappings":"AAMC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export type LoginCredentials = {
2
+ email: string;
3
+ password: string;
4
+ };
5
+ export type SpecFile = {
6
+ localPath: string;
7
+ url: string;
8
+ };
9
+ export type PortalServerConfig = {
10
+ generatedPortalPath: string;
11
+ sourceDirectoryPath: string;
12
+ configDir: string;
13
+ authKey: string | null;
14
+ ignoredPaths?: string[];
15
+ port?: number;
16
+ openInBrowser?: boolean;
17
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=quickstart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../../src/types/portal/quickstart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface ServeFlags {
2
+ readonly port: number;
3
+ readonly folder: string;
4
+ readonly destination: string;
5
+ readonly open: boolean;
6
+ readonly "auth-key": string | undefined;
7
+ readonly "no-reload": boolean;
8
+ }
9
+ export interface ServePaths {
10
+ readonly sourceDirectoryPath: string;
11
+ readonly destinationDirectoryPath: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=serve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/types/portal/serve.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { DirectoryPath } from "./file/directoryPath.js";
2
+ import { FilePath } from "./file/filePath.js";
3
+ export declare class PortalContext {
4
+ private readonly portalDirectory;
5
+ private readonly fileService;
6
+ private readonly zipService;
7
+ constructor(portalDirectory: DirectoryPath);
8
+ get ZipPath(): FilePath;
9
+ exists(): Promise<boolean>;
10
+ save(tempPortalFilePath: FilePath, zipPortal: boolean): Promise<void>;
11
+ }
@@ -0,0 +1,28 @@
1
+ import { FileService } from "../infrastructure/file-service.js";
2
+ import { FilePath } from "./file/filePath.js";
3
+ import { FileName } from "./file/fileName.js";
4
+ import { ZipService } from "../infrastructure/zip-service.js";
5
+ export class PortalContext {
6
+ constructor(portalDirectory) {
7
+ this.portalDirectory = portalDirectory;
8
+ this.fileService = new FileService();
9
+ this.zipService = new ZipService();
10
+ }
11
+ get ZipPath() {
12
+ // TODO: add checks for build file path
13
+ return new FilePath(this.portalDirectory, new FileName("portal.zip"));
14
+ }
15
+ async exists() {
16
+ return !await this.fileService.directoryEmpty(this.portalDirectory);
17
+ }
18
+ async save(tempPortalFilePath, zipPortal) {
19
+ await this.fileService.cleanDirectory(this.portalDirectory);
20
+ if (zipPortal) {
21
+ await this.fileService.copy(tempPortalFilePath, this.ZipPath);
22
+ }
23
+ else {
24
+ await this.zipService.unArchive(tempPortalFilePath, this.portalDirectory);
25
+ }
26
+ }
27
+ }
28
+ //# sourceMappingURL=portal-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-context.js","sourceRoot":"","sources":["../../src/types/portal-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,MAAM,OAAO,aAAa;IAKxB,YAA6B,eAA8B;QAA9B,oBAAe,GAAf,eAAe,CAAe;QAH1C,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAG/C,CAAC;IAED,IAAW,OAAO;QAChB,uCAAuC;QACvC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;IACxE,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,kBAA4B,EAAE,SAAkB;QAChE,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC5D,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,kBAAkB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ export declare enum StepType {
2
+ Content = "content",
3
+ Endpoint = "endpoint"
4
+ }
5
+ export interface RecipeContext {
6
+ showContent(content: string): Promise<any>;
7
+ showEndpoint(config: EndpointConfig): Promise<any>;
8
+ }
9
+ export interface EndpointConfig {
10
+ description: string;
11
+ endpointPermalink: string;
12
+ }
13
+ export interface StepConfig {
14
+ name: string;
15
+ stepCallback: () => Promise<any>;
16
+ }
17
+ export interface RecipeDefinition {
18
+ [stepKey: string]: StepConfig;
19
+ }
20
+ export interface SerializableRecipe {
21
+ name: string;
22
+ steps: SerializableStep[];
23
+ }
24
+ export interface SerializableStep {
25
+ key: string;
26
+ name: string;
27
+ type: "content" | "endpoint";
28
+ config: ContentStepConfig | EndpointStepConfig;
29
+ }
30
+ export interface ContentStepConfig {
31
+ content: string;
32
+ }
33
+ export interface EndpointStepConfig extends EndpointConfig {
34
+ }
35
+ export interface DirectoryNode {
36
+ [key: string]: DirectoryNode | string | null | undefined;
37
+ }
@@ -0,0 +1,6 @@
1
+ export var StepType;
2
+ (function (StepType) {
3
+ StepType["Content"] = "content";
4
+ StepType["Endpoint"] = "endpoint";
5
+ })(StepType || (StepType = {}));
6
+ //# sourceMappingURL=recipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;AACvB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB"}
@@ -1,22 +1,23 @@
1
- export declare type GenerationIdParams = {
1
+ export type GenerationIdParams = {
2
2
  file: string;
3
3
  url: string;
4
4
  platform: string;
5
5
  };
6
- export declare type DownloadSDKParams = {
6
+ export type DownloadSDKParams = {
7
7
  codeGenId: string;
8
8
  zip: boolean;
9
9
  zippedSDKPath: string;
10
10
  sdkFolderPath: string;
11
11
  };
12
- export declare type SDKGenerateUnprocessableError = {
12
+ export type SDKGenerateUnprocessableError = {
13
13
  message: string;
14
14
  };
15
- export declare enum SimplePlatforms {
16
- CSHARP = "CS_NET_STANDARD_LIB",
17
- JAVA = "JAVA_ECLIPSE_JRE_LIB",
18
- PHP = "PHP_GENERIC_LIB",
19
- PYTHON = "PYTHON_GENERIC_LIB",
20
- RUBY = "RUBY_GENERIC_LIB",
21
- TYPESCRIPT = "TS_GENERIC_LIB"
15
+ export declare enum LanguagePlatform {
16
+ CSHARP = "csharp",
17
+ JAVA = "java",
18
+ PHP = "php",
19
+ PYTHON = "python",
20
+ RUBY = "ruby",
21
+ TYPESCRIPT = "typescript",
22
+ GO = "go"
22
23
  }
@@ -1,12 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimplePlatforms = void 0;
4
- var SimplePlatforms;
5
- (function (SimplePlatforms) {
6
- SimplePlatforms["CSHARP"] = "CS_NET_STANDARD_LIB";
7
- SimplePlatforms["JAVA"] = "JAVA_ECLIPSE_JRE_LIB";
8
- SimplePlatforms["PHP"] = "PHP_GENERIC_LIB";
9
- SimplePlatforms["PYTHON"] = "PYTHON_GENERIC_LIB";
10
- SimplePlatforms["RUBY"] = "RUBY_GENERIC_LIB";
11
- SimplePlatforms["TYPESCRIPT"] = "TS_GENERIC_LIB";
12
- })(SimplePlatforms = exports.SimplePlatforms || (exports.SimplePlatforms = {}));
1
+ export var LanguagePlatform;
2
+ (function (LanguagePlatform) {
3
+ LanguagePlatform["CSHARP"] = "csharp";
4
+ LanguagePlatform["JAVA"] = "java";
5
+ LanguagePlatform["PHP"] = "php";
6
+ LanguagePlatform["PYTHON"] = "python";
7
+ LanguagePlatform["RUBY"] = "ruby";
8
+ LanguagePlatform["TYPESCRIPT"] = "typescript";
9
+ LanguagePlatform["GO"] = "go";
10
+ })(LanguagePlatform || (LanguagePlatform = {}));
11
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/types/sdk/generate.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAN,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,6CAAyB,CAAA;IACzB,6BAAS,CAAA;AACX,CAAC,EARW,gBAAgB,KAAhB,gBAAgB,QAQ3B"}
@@ -0,0 +1,13 @@
1
+ import { DirectoryPath } from "./file/directoryPath.js";
2
+ import { FilePath } from "./file/filePath.js";
3
+ import { LanguagePlatform } from "./sdk/generate.js";
4
+ export declare class SdkContext {
5
+ private readonly sdkDirectory;
6
+ private readonly platform;
7
+ private readonly fileService;
8
+ private readonly zipService;
9
+ constructor(sdkDirectory: DirectoryPath, platform: LanguagePlatform);
10
+ get ZipPath(): FilePath;
11
+ exists(): Promise<boolean>;
12
+ save(tempPortalFilePath: FilePath, zipPortal: boolean): Promise<void>;
13
+ }
@@ -0,0 +1,28 @@
1
+ import { FileService } from "../infrastructure/file-service.js";
2
+ import { FilePath } from "./file/filePath.js";
3
+ import { FileName } from "./file/fileName.js";
4
+ import { ZipService } from "../infrastructure/zip-service.js";
5
+ export class SdkContext {
6
+ constructor(sdkDirectory, platform) {
7
+ this.sdkDirectory = sdkDirectory;
8
+ this.platform = platform;
9
+ this.fileService = new FileService();
10
+ this.zipService = new ZipService();
11
+ }
12
+ get ZipPath() {
13
+ return new FilePath(this.sdkDirectory, new FileName(`${this.platform}.zip`));
14
+ }
15
+ async exists() {
16
+ return !await this.fileService.directoryEmpty(this.sdkDirectory);
17
+ }
18
+ async save(tempPortalFilePath, zipPortal) {
19
+ await this.fileService.cleanDirectory(this.sdkDirectory);
20
+ if (zipPortal) {
21
+ await this.fileService.copy(tempPortalFilePath, this.ZipPath);
22
+ }
23
+ else {
24
+ await this.zipService.unArchive(tempPortalFilePath, this.sdkDirectory);
25
+ }
26
+ }
27
+ }
28
+ //# sourceMappingURL=sdk-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk-context.js","sourceRoot":"","sources":["../../src/types/sdk-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,MAAM,OAAO,UAAU;IAKrB,YAA6B,YAA2B,EACrC,QAA0B;QADhB,iBAAY,GAAZ,YAAY,CAAe;QACrC,aAAQ,GAAR,QAAQ,CAAkB;QAJ5B,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAI/C,CAAC;IAED,IAAW,OAAO;QAChB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACnE,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,kBAA4B,EAAE,SAAkB;QAChE,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzD,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,kBAAkB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ export interface Sdl {
2
+ readonly Endpoints: SdlEndpoint[];
3
+ readonly CustomTypes: SdlModel[];
4
+ }
5
+ export interface SdlEndpoint {
6
+ readonly Name: string;
7
+ readonly Description: string;
8
+ readonly Group: string;
9
+ }
10
+ export interface SdlModel {
11
+ readonly Name: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sdl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdl.js","sourceRoot":"","sources":["../../../src/types/sdl/sdl.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { DirectoryPath } from "./file/directoryPath.js";
2
+ export declare class SpecContext {
3
+ private readonly fileService;
4
+ private readonly specDirectory;
5
+ constructor(specDirectory: DirectoryPath);
6
+ validate(): Promise<boolean>;
7
+ }
@@ -0,0 +1,12 @@
1
+ import { FileService } from "../infrastructure/file-service.js";
2
+ export class SpecContext {
3
+ constructor(specDirectory) {
4
+ this.fileService = new FileService();
5
+ this.specDirectory = specDirectory;
6
+ }
7
+ async validate() {
8
+ // TODO: add more checks here
9
+ return await this.fileService.directoryExists(this.specDirectory);
10
+ }
11
+ }
12
+ //# sourceMappingURL=spec-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-context.js","sourceRoot":"","sources":["../../src/types/spec-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGhE,MAAM,OAAO,WAAW;IAItB,YAAY,aAA4B;QAHvB,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAI/C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,6BAA6B;QAC7B,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IACnE,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ export interface Toc {
2
+ toc: Array<TocGroup | TocGenerated>;
3
+ }
4
+ export interface TocGroup {
5
+ readonly group: string;
6
+ readonly items: Array<TocGroup | TocGenerated | TocEndpoint | TocEndpointGroupOverview | TocModel | TocCustomPage>;
7
+ }
8
+ export interface TocGenerated {
9
+ readonly generate: string;
10
+ readonly from: string;
11
+ }
12
+ export interface TocEndpointGroupOverview {
13
+ readonly generate: null;
14
+ readonly from: "endpoint-group-overview";
15
+ readonly endpointGroup: string;
16
+ }
17
+ export interface TocEndpoint {
18
+ readonly generate: null;
19
+ readonly from: "endpoint";
20
+ readonly endpointName: string;
21
+ readonly endpointGroup: string;
22
+ }
23
+ export interface TocModel {
24
+ readonly generate: null;
25
+ readonly from: "model";
26
+ readonly modelName: string;
27
+ }
28
+ export interface TocCustomPage {
29
+ readonly page: string;
30
+ readonly file: string;
31
+ }
@@ -0,0 +1,9 @@
1
+ ;
2
+ ;
3
+ ;
4
+ ;
5
+ ;
6
+ ;
7
+ ;
8
+ export {};
9
+ //# sourceMappingURL=toc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.js","sourceRoot":"","sources":["../../../src/types/toc/toc.ts"],"names":[],"mappings":"AAEC,CAAC;AAKD,CAAC;AAKD,CAAC;AAMD,CAAC;AAOD,CAAC;AAMD,CAAC;AAKD,CAAC"}
@@ -1,14 +1,14 @@
1
- export declare type ValidationMessages = {
1
+ export type ValidationMessages = {
2
2
  messages: string[];
3
3
  warnings: string[];
4
4
  errors: string[];
5
5
  };
6
- export declare type loggers = {
6
+ export type loggers = {
7
7
  log: (message: string) => void;
8
8
  warn: (message: string) => void;
9
9
  error: (message: string) => void;
10
10
  };
11
- export declare type AuthenticationError = {
11
+ export type AuthenticationError = {
12
12
  statusCode: number;
13
13
  body: string;
14
14
  };