@purpleschool/multisite 0.0.1

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 (254) hide show
  1. package/api/controller/http/ai-proxy.ts +6 -0
  2. package/api/controller/http/auth.ts +7 -0
  3. package/api/controller/http/cloud-payments.ts +6 -0
  4. package/api/controller/http/file.ts +7 -0
  5. package/api/controller/http/health.ts +4 -0
  6. package/api/controller/http/image-generation.ts +15 -0
  7. package/api/controller/http/index.ts +12 -0
  8. package/api/controller/http/payment.ts +6 -0
  9. package/api/controller/http/product.ts +7 -0
  10. package/api/controller/http/subscription.ts +8 -0
  11. package/api/controller/http/transaction.ts +6 -0
  12. package/api/controller/http/unregistered-user.ts +1 -0
  13. package/api/controller/http/user.ts +5 -0
  14. package/api/controller/index.ts +2 -0
  15. package/api/index.ts +2 -0
  16. package/api/routes.ts +76 -0
  17. package/build/api/controller/http/ai-proxy.js +7 -0
  18. package/build/api/controller/http/auth.js +8 -0
  19. package/build/api/controller/http/cloud-payments.js +7 -0
  20. package/build/api/controller/http/file.js +8 -0
  21. package/build/api/controller/http/health.js +6 -0
  22. package/build/api/controller/http/image-generation.js +17 -0
  23. package/build/api/controller/http/index.js +28 -0
  24. package/build/api/controller/http/payment.js +7 -0
  25. package/build/api/controller/http/product.js +9 -0
  26. package/build/api/controller/http/subscription.js +9 -0
  27. package/build/api/controller/http/transaction.js +7 -0
  28. package/build/api/controller/http/unregistered-user.js +4 -0
  29. package/build/api/controller/http/user.js +7 -0
  30. package/build/api/controller/index.js +17 -0
  31. package/build/api/index.js +18 -0
  32. package/build/api/routes.js +103 -0
  33. package/build/commands/auth/index.js +18 -0
  34. package/build/commands/auth/login.command.js +17 -0
  35. package/build/commands/auth/register.command.js +17 -0
  36. package/build/commands/file/index.js +17 -0
  37. package/build/commands/file/upload-file.command.js +11 -0
  38. package/build/commands/image-generation/execute-image-generation.command.js +17 -0
  39. package/build/commands/image-generation/index.js +23 -0
  40. package/build/commands/image-generation/proxy-image-generation-callback.command.js +21 -0
  41. package/build/commands/image-generation/retry-image-generation-job.command.js +17 -0
  42. package/build/commands/image-generation/set-reaction-to-image-generation-job.command.js +26 -0
  43. package/build/commands/image-generation/soft-delete-image-generation-job-by-uuid.command.js +10 -0
  44. package/build/commands/image-generation/soft-delete-image-generation-jobs-by-criteria.command.js +10 -0
  45. package/build/commands/image-generation/update-image-generation-job-title.command.js +14 -0
  46. package/build/commands/index.js +24 -0
  47. package/build/commands/payment/cloud-payments.command.js +47 -0
  48. package/build/commands/payment/index.js +17 -0
  49. package/build/commands/product/buy-product.command.js +17 -0
  50. package/build/commands/product/index.js +17 -0
  51. package/build/commands/subscription/buy-subscription.command.js +17 -0
  52. package/build/commands/subscription/index.js +17 -0
  53. package/build/commands/transaction/index.js +17 -0
  54. package/build/commands/transaction/write-off.command.js +19 -0
  55. package/build/commands/unregistered-user/index.js +17 -0
  56. package/build/commands/unregistered-user/upsert-unregistered-user.command.js +16 -0
  57. package/build/constants/common/enums/index.js +17 -0
  58. package/build/constants/common/enums/user-reaction.enum.js +8 -0
  59. package/build/constants/common/index.js +17 -0
  60. package/build/constants/errors/errors.js +298 -0
  61. package/build/constants/errors/index.js +17 -0
  62. package/build/constants/files/enums/file-type.enum.js +7 -0
  63. package/build/constants/files/enums/index.js +17 -0
  64. package/build/constants/files/index.js +17 -0
  65. package/build/constants/image-generation/enums/image-generation-model-strategy.enum.js +18 -0
  66. package/build/constants/image-generation/enums/image-generation-resolution.enum.js +9 -0
  67. package/build/constants/image-generation/enums/index.js +18 -0
  68. package/build/constants/image-generation/index.js +17 -0
  69. package/build/constants/index.js +28 -0
  70. package/build/constants/order/enums/index.js +18 -0
  71. package/build/constants/order/enums/order-status.enum.js +9 -0
  72. package/build/constants/order/enums/order-type.enum.js +7 -0
  73. package/build/constants/order/index.js +17 -0
  74. package/build/constants/payment/enums/index.js +17 -0
  75. package/build/constants/payment/enums/payment-status.enum.js +7 -0
  76. package/build/constants/payment/index.js +17 -0
  77. package/build/constants/subscription/free-subscription-id.constant.js +4 -0
  78. package/build/constants/subscription/index.js +17 -0
  79. package/build/constants/tools/enums/index.js +20 -0
  80. package/build/constants/tools/enums/job-request-origin.enum.js +7 -0
  81. package/build/constants/tools/enums/job-status.enum.js +9 -0
  82. package/build/constants/tools/enums/tool-model-status.enum.js +8 -0
  83. package/build/constants/tools/enums/tool-type.enum.js +7 -0
  84. package/build/constants/tools/index.js +17 -0
  85. package/build/constants/transaction/enums/index.js +17 -0
  86. package/build/constants/transaction/enums/transaction-status.enum.js +9 -0
  87. package/build/constants/transaction/index.js +17 -0
  88. package/build/constants/user/enums/index.js +18 -0
  89. package/build/constants/user/enums/user-role.enum.js +9 -0
  90. package/build/constants/user/enums/user-status.enum.js +9 -0
  91. package/build/constants/user/index.js +17 -0
  92. package/build/constants/user-to-product/enums/index.js +17 -0
  93. package/build/constants/user-to-product/enums/user-to-product-status.enum.js +7 -0
  94. package/build/constants/user-to-product/index.js +17 -0
  95. package/build/constants/user-to-subscription/enums/index.js +17 -0
  96. package/build/constants/user-to-subscription/enums/user-to-subscription-status.enum.js +7 -0
  97. package/build/constants/user-to-subscription/index.js +17 -0
  98. package/build/index.js +21 -0
  99. package/build/models/cloud-payments-widget-data.schema.js +17 -0
  100. package/build/models/cloud-payments-widget.schema.js +17 -0
  101. package/build/models/common/attached-file.schema.js +14 -0
  102. package/build/models/common/icon-variants.schema.js +12 -0
  103. package/build/models/common/index.js +20 -0
  104. package/build/models/common/json-value.schema.js +6 -0
  105. package/build/models/common/receipt.schema.js +18 -0
  106. package/build/models/file.schema.js +15 -0
  107. package/build/models/image-generation/image-generation-config.schema.js +10 -0
  108. package/build/models/image-generation/image-generation-job-attempt.schema.js +11 -0
  109. package/build/models/image-generation/image-generation-job-params.schema.js +12 -0
  110. package/build/models/image-generation/image-generation-job-request-params.schema.js +11 -0
  111. package/build/models/image-generation/image-generation-job.schema.js +32 -0
  112. package/build/models/image-generation/image-generation-model-params.schema.js +20 -0
  113. package/build/models/image-generation/image-generation-model.schema.js +30 -0
  114. package/build/models/image-generation/image-generation-preset.schema.js +10 -0
  115. package/build/models/image-generation/image-generation-pricing-rule.schema.js +14 -0
  116. package/build/models/image-generation/image-generation-vendor.schema.js +9 -0
  117. package/build/models/image-generation/index.js +26 -0
  118. package/build/models/index.js +25 -0
  119. package/build/models/product.schema.js +12 -0
  120. package/build/models/subscription.schema.js +14 -0
  121. package/build/models/tools/index.js +17 -0
  122. package/build/models/tools/vendor.schema.js +11 -0
  123. package/build/models/user.schema.js +13 -0
  124. package/build/queries/file/find-files.command.js +20 -0
  125. package/build/queries/file/get-file.command.js +14 -0
  126. package/build/queries/file/index.js +18 -0
  127. package/build/queries/image-generation/find-image-generation-jobs.command.js +20 -0
  128. package/build/queries/image-generation/get-image-generation-config.command.js +11 -0
  129. package/build/queries/image-generation/get-image-generation-job.command.js +14 -0
  130. package/build/queries/image-generation/get-image-generation-price.command.js +19 -0
  131. package/build/queries/image-generation/index.js +20 -0
  132. package/build/queries/index.js +22 -0
  133. package/build/queries/payment/get-payment-history.command.js +18 -0
  134. package/build/queries/payment/index.js +17 -0
  135. package/build/queries/product/find-products.command.js +11 -0
  136. package/build/queries/product/index.js +17 -0
  137. package/build/queries/subscription/find-subscriptions.command.js +11 -0
  138. package/build/queries/subscription/index.js +17 -0
  139. package/build/queries/user/get-my-products.command.js +19 -0
  140. package/build/queries/user/get-my-subscriptions.command.js +21 -0
  141. package/build/queries/user/get-user.command.js +16 -0
  142. package/build/queries/user/index.js +19 -0
  143. package/commands/auth/index.ts +2 -0
  144. package/commands/auth/login.command.ts +18 -0
  145. package/commands/auth/register.command.ts +18 -0
  146. package/commands/file/index.ts +1 -0
  147. package/commands/file/upload-file.command.ts +10 -0
  148. package/commands/image-generation/execute-image-generation.command.ts +20 -0
  149. package/commands/image-generation/index.ts +7 -0
  150. package/commands/image-generation/proxy-image-generation-callback.command.ts +21 -0
  151. package/commands/image-generation/retry-image-generation-job.command.ts +20 -0
  152. package/commands/image-generation/set-reaction-to-image-generation-job.command.ts +29 -0
  153. package/commands/image-generation/soft-delete-image-generation-job-by-uuid.command.ts +10 -0
  154. package/commands/image-generation/soft-delete-image-generation-jobs-by-criteria.command.ts +10 -0
  155. package/commands/image-generation/update-image-generation-job-title.command.ts +17 -0
  156. package/commands/index.ts +8 -0
  157. package/commands/payment/cloud-payments.command.ts +53 -0
  158. package/commands/payment/index.ts +1 -0
  159. package/commands/product/buy-product.command.ts +20 -0
  160. package/commands/product/index.ts +1 -0
  161. package/commands/subscription/buy-subscription.command.ts +20 -0
  162. package/commands/subscription/index.ts +1 -0
  163. package/commands/transaction/index.ts +1 -0
  164. package/commands/transaction/write-off.command.ts +19 -0
  165. package/commands/unregistered-user/index.ts +2 -0
  166. package/commands/unregistered-user/upsert-unregistered-user.command.ts +17 -0
  167. package/constants/common/enums/index.ts +2 -0
  168. package/constants/common/enums/user-reaction.enum.ts +5 -0
  169. package/constants/common/index.ts +2 -0
  170. package/constants/errors/errors.ts +308 -0
  171. package/constants/errors/index.ts +2 -0
  172. package/constants/files/enums/file-type.enum.ts +4 -0
  173. package/constants/files/enums/index.ts +2 -0
  174. package/constants/files/index.ts +2 -0
  175. package/constants/image-generation/enums/image-generation-model-strategy.enum.ts +15 -0
  176. package/constants/image-generation/enums/image-generation-resolution.enum.ts +6 -0
  177. package/constants/image-generation/enums/index.ts +2 -0
  178. package/constants/image-generation/index.ts +2 -0
  179. package/constants/index.ts +12 -0
  180. package/constants/order/enums/index.ts +3 -0
  181. package/constants/order/enums/order-status.enum.ts +6 -0
  182. package/constants/order/enums/order-type.enum.ts +4 -0
  183. package/constants/order/index.ts +2 -0
  184. package/constants/payment/enums/index.ts +2 -0
  185. package/constants/payment/enums/payment-status.enum.ts +4 -0
  186. package/constants/payment/index.ts +2 -0
  187. package/constants/subscription/free-subscription-id.constant.ts +2 -0
  188. package/constants/subscription/index.ts +2 -0
  189. package/constants/tools/enums/index.ts +4 -0
  190. package/constants/tools/enums/job-request-origin.enum.ts +4 -0
  191. package/constants/tools/enums/job-status.enum.ts +6 -0
  192. package/constants/tools/enums/tool-model-status.enum.ts +5 -0
  193. package/constants/tools/enums/tool-type.enum.ts +4 -0
  194. package/constants/tools/index.ts +2 -0
  195. package/constants/transaction/enums/index.ts +2 -0
  196. package/constants/transaction/enums/transaction-status.enum.ts +6 -0
  197. package/constants/transaction/index.ts +2 -0
  198. package/constants/user/enums/index.ts +3 -0
  199. package/constants/user/enums/user-role.enum.ts +6 -0
  200. package/constants/user/enums/user-status.enum.ts +6 -0
  201. package/constants/user/index.ts +2 -0
  202. package/constants/user-to-product/enums/index.ts +2 -0
  203. package/constants/user-to-product/enums/user-to-product-status.enum.ts +4 -0
  204. package/constants/user-to-product/index.ts +2 -0
  205. package/constants/user-to-subscription/enums/index.ts +2 -0
  206. package/constants/user-to-subscription/enums/user-to-subscription-status.enum.ts +4 -0
  207. package/constants/user-to-subscription/index.ts +2 -0
  208. package/index.ts +5 -0
  209. package/models/cloud-payments-widget-data.schema.ts +19 -0
  210. package/models/cloud-payments-widget.schema.ts +15 -0
  211. package/models/common/attached-file.schema.ts +14 -0
  212. package/models/common/icon-variants.schema.ts +13 -0
  213. package/models/common/index.ts +4 -0
  214. package/models/common/json-value.schema.ts +11 -0
  215. package/models/common/receipt.schema.ts +20 -0
  216. package/models/file.schema.ts +14 -0
  217. package/models/image-generation/image-generation-config.schema.ts +11 -0
  218. package/models/image-generation/image-generation-job-attempt.schema.ts +12 -0
  219. package/models/image-generation/image-generation-job-params.schema.ts +11 -0
  220. package/models/image-generation/image-generation-job-request-params.schema.ts +11 -0
  221. package/models/image-generation/image-generation-job.schema.ts +30 -0
  222. package/models/image-generation/image-generation-model-params.schema.ts +22 -0
  223. package/models/image-generation/image-generation-model.schema.ts +28 -0
  224. package/models/image-generation/image-generation-preset.schema.ts +11 -0
  225. package/models/image-generation/image-generation-pricing-rule.schema.ts +20 -0
  226. package/models/image-generation/image-generation-vendor.schema.ts +9 -0
  227. package/models/image-generation/index.ts +10 -0
  228. package/models/index.ts +9 -0
  229. package/models/product.schema.ts +10 -0
  230. package/models/subscription.schema.ts +12 -0
  231. package/models/tools/index.ts +2 -0
  232. package/models/tools/vendor.schema.ts +12 -0
  233. package/models/user.schema.ts +11 -0
  234. package/package.json +18 -0
  235. package/queries/file/find-files.command.ts +21 -0
  236. package/queries/file/get-file.command.ts +15 -0
  237. package/queries/file/index.ts +3 -0
  238. package/queries/image-generation/find-image-generation-jobs.command.ts +21 -0
  239. package/queries/image-generation/get-image-generation-config.command.ts +9 -0
  240. package/queries/image-generation/get-image-generation-job.command.ts +15 -0
  241. package/queries/image-generation/get-image-generation-price.command.ts +19 -0
  242. package/queries/image-generation/index.ts +4 -0
  243. package/queries/index.ts +7 -0
  244. package/queries/payment/get-payment-history.command.ts +17 -0
  245. package/queries/payment/index.ts +2 -0
  246. package/queries/product/find-products.command.ts +10 -0
  247. package/queries/product/index.ts +2 -0
  248. package/queries/subscription/find-subscriptions.command.ts +10 -0
  249. package/queries/subscription/index.ts +2 -0
  250. package/queries/user/get-my-products.command.ts +19 -0
  251. package/queries/user/get-my-subscriptions.command.ts +21 -0
  252. package/queries/user/get-user.command.ts +14 -0
  253. package/queries/user/index.ts +3 -0
  254. package/tsconfig.json +104 -0
@@ -0,0 +1,6 @@
1
+ export const AI_PROXY_CONTROLLER = 'ai-proxy' as const;
2
+
3
+ export const AI_PROXY_ROUTES = {
4
+ IMAGE_GENERATION_CALLBACK: 'image-generation/callback',
5
+ } as const;
6
+
@@ -0,0 +1,7 @@
1
+ export const AUTH_CONTROLLER = 'auth' as const;
2
+
3
+ export const AUTH_ROUTES = {
4
+ REGISTER: 'register',
5
+ LOGIN: 'login',
6
+ } as const;
7
+
@@ -0,0 +1,6 @@
1
+ export const CLOUD_PAYMENTS_CONTROLLER = 'cloud-payments' as const;
2
+
3
+ export const CLOUD_PAYMENTS_ROUTES = {
4
+ CALLBACK: 'callback',
5
+ } as const;
6
+
@@ -0,0 +1,7 @@
1
+ export const FILE_PRIVATE_CONTROLLER = 'files/private' as const;
2
+ export const FILE_PUBLIC_CONTROLLER = 'files/public' as const;
3
+
4
+ export const FILE_ROUTES = {
5
+ UPLOAD: 'upload',
6
+ } as const;
7
+
@@ -0,0 +1,4 @@
1
+ export const HEALTH_ROUTES = {
2
+ PING: 'ping',
3
+ } as const;
4
+
@@ -0,0 +1,15 @@
1
+ export const IMAGE_GENERATION_PRIVATE_CONTROLLER = 'image-generation/private' as const;
2
+ export const IMAGE_GENERATION_PUBLIC_CONTROLLER = 'image-generation/public' as const;
3
+
4
+ export const IMAGE_GENERATION_ROUTES = {
5
+ CONFIG: 'config',
6
+ PRICE: 'price',
7
+ EXECUTE: 'execute',
8
+ GET_JOBS: 'jobs',
9
+ GET_JOB: (uuid: string) => `jobs/${uuid}`,
10
+ UPDATE: (uuid: string) => `jobs/${uuid}`,
11
+ SET_REACTION: (uuid: string) => `jobs/${uuid}/reaction`,
12
+ DELETE: (uuid: string) => `jobs/${uuid}`,
13
+ DELETE_ALL: 'jobs',
14
+ RETRY: (uuid: string) => `jobs/${uuid}/retry`,
15
+ } as const;
@@ -0,0 +1,12 @@
1
+ export * from './auth';
2
+ export * from './user';
3
+ export * from './product';
4
+ export * from './subscription';
5
+ export * from './payment';
6
+ export * from './cloud-payments';
7
+ export * from './transaction';
8
+ export * from './health';
9
+ export * from './image-generation';
10
+ export * from './ai-proxy';
11
+ export * from './file';
12
+ export * from './unregistered-user';
@@ -0,0 +1,6 @@
1
+ export const PAYMENT_CONTROLLER = 'payments' as const;
2
+
3
+ export const PAYMENT_ROUTES = {
4
+ HISTORY: 'history',
5
+ } as const;
6
+
@@ -0,0 +1,7 @@
1
+ export const PRODUCT_PRIVATE_CONTROLLER = 'product/private' as const;
2
+ export const PRODUCT_PUBLIC_CONTROLLER = 'product/public' as const;
3
+
4
+ export const PRODUCT_ROUTES = {
5
+ GET_ALL: 'all',
6
+ BUY: 'buy',
7
+ } as const;
@@ -0,0 +1,8 @@
1
+ export const SUBSCRIPTION_PRIVATE_CONTROLLER = 'subscription/private' as const;
2
+ export const SUBSCRIPTION_PUBLIC_CONTROLLER = 'subscription/public' as const;
3
+
4
+ export const SUBSCRIPTION_ROUTES = {
5
+ GET_ALL: 'all',
6
+ BUY: 'buy',
7
+ } as const;
8
+
@@ -0,0 +1,6 @@
1
+ export const TRANSACTION_CONTROLLER = 'transactions' as const;
2
+
3
+ export const TRANSACTION_ROUTES = {
4
+ WRITE_OFF: 'write-off',
5
+ } as const;
6
+
@@ -0,0 +1 @@
1
+ export const UNREGISTERED_USER_CONTROLLER = 'unregistered-user' as const;
@@ -0,0 +1,5 @@
1
+ export const USER_CONTROLLER = 'users' as const;
2
+
3
+ export const USER_ROUTES = {
4
+ GET: 'me',
5
+ } as const;
@@ -0,0 +1,2 @@
1
+ export * from './http';
2
+
package/api/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './controller';
2
+ export * from './routes';
package/api/routes.ts ADDED
@@ -0,0 +1,76 @@
1
+ import * as CONTROLLERS from './controller';
2
+
3
+ export const ROOT = '/api' as const;
4
+
5
+ export const REST_API = {
6
+ HEALTH: {
7
+ PING: `${ROOT}/${CONTROLLERS.HEALTH_ROUTES.PING}`,
8
+ },
9
+ AUTH: {
10
+ REGISTER: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
11
+ LOGIN: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
12
+ },
13
+ UNREGISTERED_USER: {
14
+ UPSERT: `${ROOT}/${CONTROLLERS.UNREGISTERED_USER_CONTROLLER}`,
15
+ },
16
+ USERS: {
17
+ GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}`,
18
+ },
19
+ PRODUCT_PUBLIC: {
20
+ GET: `${ROOT}/${CONTROLLERS.PRODUCT_PUBLIC_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
21
+ },
22
+ PRODUCT_PRIVATE: {
23
+ GET: `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
24
+ BUY: (uuid: string) =>
25
+ `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.PRODUCT_ROUTES.BUY}`,
26
+ },
27
+ SUBSCRIPTION_PUBLIC: {
28
+ GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
29
+ },
30
+ SUBSCRIPTION_PRIVATE: {
31
+ GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
32
+ BUY: (uuid: string) =>
33
+ `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.BUY}`,
34
+ },
35
+ PAYMENT: {
36
+ HISTORY: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
37
+ },
38
+ CLOUD_PAYMENTS: {
39
+ CALLBACK: (type: string) =>
40
+ `${ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}/${type}`,
41
+ },
42
+ IMAGE_GENERATION_PUBLIC: {
43
+ CONFIG: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
44
+ PRICE: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.PRICE}`,
45
+ },
46
+ IMAGE_GENERATION_PRIVATE: {
47
+ CONFIG: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
48
+ EXECUTE: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.EXECUTE}`,
49
+ LIST_JOBS: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOBS}`,
50
+ GET_JOB: (uuid: string) =>
51
+ `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOB(uuid)}`,
52
+ UPDATE: (uuid: string) =>
53
+ `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.UPDATE(uuid)}`,
54
+ SET_REACTION: (uuid: string) =>
55
+ `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.SET_REACTION(uuid)}`,
56
+ DELETE: (uuid: string) =>
57
+ `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE(uuid)}`,
58
+ DELETE_ALL: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE_ALL}`,
59
+ },
60
+ AI_PROXY: {
61
+ IMAGE_GENERATION_CALLBACK: `${ROOT}/${CONTROLLERS.AI_PROXY_CONTROLLER}/${CONTROLLERS.AI_PROXY_ROUTES.IMAGE_GENERATION_CALLBACK}`,
62
+ },
63
+ FILES_PRIVATE: {
64
+ UPLOAD: `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
65
+ LIST: `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}`,
66
+ GET: (uuid: string) => `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${uuid}`,
67
+ },
68
+ FILES_PUBLIC: {
69
+ UPLOAD: `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
70
+ LIST: `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}`,
71
+ GET: (uuid: string) => `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${uuid}`,
72
+ },
73
+ TRANSACTION: {
74
+ WRITE_OFF: `${ROOT}/${CONTROLLERS.TRANSACTION_CONTROLLER}/${CONTROLLERS.TRANSACTION_ROUTES.WRITE_OFF}`,
75
+ },
76
+ } as const;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_PROXY_ROUTES = exports.AI_PROXY_CONTROLLER = void 0;
4
+ exports.AI_PROXY_CONTROLLER = 'ai-proxy';
5
+ exports.AI_PROXY_ROUTES = {
6
+ IMAGE_GENERATION_CALLBACK: 'image-generation/callback',
7
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AUTH_ROUTES = exports.AUTH_CONTROLLER = void 0;
4
+ exports.AUTH_CONTROLLER = 'auth';
5
+ exports.AUTH_ROUTES = {
6
+ REGISTER: 'register',
7
+ LOGIN: 'login',
8
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLOUD_PAYMENTS_ROUTES = exports.CLOUD_PAYMENTS_CONTROLLER = void 0;
4
+ exports.CLOUD_PAYMENTS_CONTROLLER = 'cloud-payments';
5
+ exports.CLOUD_PAYMENTS_ROUTES = {
6
+ CALLBACK: 'callback',
7
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FILE_ROUTES = exports.FILE_PUBLIC_CONTROLLER = exports.FILE_PRIVATE_CONTROLLER = void 0;
4
+ exports.FILE_PRIVATE_CONTROLLER = 'files/private';
5
+ exports.FILE_PUBLIC_CONTROLLER = 'files/public';
6
+ exports.FILE_ROUTES = {
7
+ UPLOAD: 'upload',
8
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HEALTH_ROUTES = void 0;
4
+ exports.HEALTH_ROUTES = {
5
+ PING: 'ping',
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IMAGE_GENERATION_ROUTES = exports.IMAGE_GENERATION_PUBLIC_CONTROLLER = exports.IMAGE_GENERATION_PRIVATE_CONTROLLER = void 0;
4
+ exports.IMAGE_GENERATION_PRIVATE_CONTROLLER = 'image-generation/private';
5
+ exports.IMAGE_GENERATION_PUBLIC_CONTROLLER = 'image-generation/public';
6
+ exports.IMAGE_GENERATION_ROUTES = {
7
+ CONFIG: 'config',
8
+ PRICE: 'price',
9
+ EXECUTE: 'execute',
10
+ GET_JOBS: 'jobs',
11
+ GET_JOB: (uuid) => `jobs/${uuid}`,
12
+ UPDATE: (uuid) => `jobs/${uuid}`,
13
+ SET_REACTION: (uuid) => `jobs/${uuid}/reaction`,
14
+ DELETE: (uuid) => `jobs/${uuid}`,
15
+ DELETE_ALL: 'jobs',
16
+ RETRY: (uuid) => `jobs/${uuid}/retry`,
17
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./auth"), exports);
18
+ __exportStar(require("./user"), exports);
19
+ __exportStar(require("./product"), exports);
20
+ __exportStar(require("./subscription"), exports);
21
+ __exportStar(require("./payment"), exports);
22
+ __exportStar(require("./cloud-payments"), exports);
23
+ __exportStar(require("./transaction"), exports);
24
+ __exportStar(require("./health"), exports);
25
+ __exportStar(require("./image-generation"), exports);
26
+ __exportStar(require("./ai-proxy"), exports);
27
+ __exportStar(require("./file"), exports);
28
+ __exportStar(require("./unregistered-user"), exports);
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAYMENT_ROUTES = exports.PAYMENT_CONTROLLER = void 0;
4
+ exports.PAYMENT_CONTROLLER = 'payments';
5
+ exports.PAYMENT_ROUTES = {
6
+ HISTORY: 'history',
7
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRODUCT_ROUTES = exports.PRODUCT_PUBLIC_CONTROLLER = exports.PRODUCT_PRIVATE_CONTROLLER = void 0;
4
+ exports.PRODUCT_PRIVATE_CONTROLLER = 'product/private';
5
+ exports.PRODUCT_PUBLIC_CONTROLLER = 'product/public';
6
+ exports.PRODUCT_ROUTES = {
7
+ GET_ALL: 'all',
8
+ BUY: 'buy',
9
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUBSCRIPTION_ROUTES = exports.SUBSCRIPTION_PUBLIC_CONTROLLER = exports.SUBSCRIPTION_PRIVATE_CONTROLLER = void 0;
4
+ exports.SUBSCRIPTION_PRIVATE_CONTROLLER = 'subscription/private';
5
+ exports.SUBSCRIPTION_PUBLIC_CONTROLLER = 'subscription/public';
6
+ exports.SUBSCRIPTION_ROUTES = {
7
+ GET_ALL: 'all',
8
+ BUY: 'buy',
9
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRANSACTION_ROUTES = exports.TRANSACTION_CONTROLLER = void 0;
4
+ exports.TRANSACTION_CONTROLLER = 'transactions';
5
+ exports.TRANSACTION_ROUTES = {
6
+ WRITE_OFF: 'write-off',
7
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNREGISTERED_USER_CONTROLLER = void 0;
4
+ exports.UNREGISTERED_USER_CONTROLLER = 'unregistered-user';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_ROUTES = exports.USER_CONTROLLER = void 0;
4
+ exports.USER_CONTROLLER = 'users';
5
+ exports.USER_ROUTES = {
6
+ GET: 'me',
7
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./http"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./controller"), exports);
18
+ __exportStar(require("./routes"), exports);
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.REST_API = exports.ROOT = void 0;
37
+ const CONTROLLERS = __importStar(require("./controller"));
38
+ exports.ROOT = '/api';
39
+ exports.REST_API = {
40
+ HEALTH: {
41
+ PING: `${exports.ROOT}/${CONTROLLERS.HEALTH_ROUTES.PING}`,
42
+ },
43
+ AUTH: {
44
+ REGISTER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
45
+ LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
46
+ },
47
+ UNREGISTERED_USER: {
48
+ UPSERT: `${exports.ROOT}/${CONTROLLERS.UNREGISTERED_USER_CONTROLLER}`,
49
+ },
50
+ USERS: {
51
+ GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}`,
52
+ },
53
+ PRODUCT_PUBLIC: {
54
+ GET: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PUBLIC_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
55
+ },
56
+ PRODUCT_PRIVATE: {
57
+ GET: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
58
+ BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.PRODUCT_ROUTES.BUY}`,
59
+ },
60
+ SUBSCRIPTION_PUBLIC: {
61
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
62
+ },
63
+ SUBSCRIPTION_PRIVATE: {
64
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
65
+ BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.BUY}`,
66
+ },
67
+ PAYMENT: {
68
+ HISTORY: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
69
+ },
70
+ CLOUD_PAYMENTS: {
71
+ CALLBACK: (type) => `${exports.ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}/${type}`,
72
+ },
73
+ IMAGE_GENERATION_PUBLIC: {
74
+ CONFIG: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
75
+ PRICE: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.PRICE}`,
76
+ },
77
+ IMAGE_GENERATION_PRIVATE: {
78
+ CONFIG: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
79
+ EXECUTE: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.EXECUTE}`,
80
+ LIST_JOBS: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOBS}`,
81
+ GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOB(uuid)}`,
82
+ UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.UPDATE(uuid)}`,
83
+ SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.SET_REACTION(uuid)}`,
84
+ DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE(uuid)}`,
85
+ DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE_ALL}`,
86
+ },
87
+ AI_PROXY: {
88
+ IMAGE_GENERATION_CALLBACK: `${exports.ROOT}/${CONTROLLERS.AI_PROXY_CONTROLLER}/${CONTROLLERS.AI_PROXY_ROUTES.IMAGE_GENERATION_CALLBACK}`,
89
+ },
90
+ FILES_PRIVATE: {
91
+ UPLOAD: `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
92
+ LIST: `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}`,
93
+ GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${uuid}`,
94
+ },
95
+ FILES_PUBLIC: {
96
+ UPLOAD: `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
97
+ LIST: `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}`,
98
+ GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${uuid}`,
99
+ },
100
+ TRANSACTION: {
101
+ WRITE_OFF: `${exports.ROOT}/${CONTROLLERS.TRANSACTION_CONTROLLER}/${CONTROLLERS.TRANSACTION_ROUTES.WRITE_OFF}`,
102
+ },
103
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./login.command"), exports);
18
+ __exportStar(require("./register.command"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoginCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var LoginCommand;
7
+ (function (LoginCommand) {
8
+ LoginCommand.RequestSchema = models_1.UserSchema.pick({
9
+ email: true,
10
+ password: true,
11
+ });
12
+ LoginCommand.ResponseSchema = zod_1.z.object({
13
+ data: zod_1.z.object({
14
+ accessToken: zod_1.z.string(),
15
+ }),
16
+ });
17
+ })(LoginCommand || (exports.LoginCommand = LoginCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegisterCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var RegisterCommand;
7
+ (function (RegisterCommand) {
8
+ RegisterCommand.RequestSchema = models_1.UserSchema.pick({
9
+ email: true,
10
+ password: true,
11
+ });
12
+ RegisterCommand.ResponseSchema = zod_1.z.object({
13
+ data: zod_1.z.object({
14
+ accessToken: zod_1.z.string(),
15
+ }),
16
+ });
17
+ })(RegisterCommand || (exports.RegisterCommand = RegisterCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./upload-file.command"), exports);
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadFileCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var UploadFileCommand;
7
+ (function (UploadFileCommand) {
8
+ UploadFileCommand.ResponseSchema = zod_1.z.object({
9
+ data: models_1.FileSchema,
10
+ });
11
+ })(UploadFileCommand || (exports.UploadFileCommand = UploadFileCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExecuteImageGenerationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var ExecuteImageGenerationCommand;
7
+ (function (ExecuteImageGenerationCommand) {
8
+ ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
9
+ modelId: zod_1.z.string().uuid(),
10
+ prompt: zod_1.z.string().min(1).max(4000),
11
+ presetId: zod_1.z.string().uuid().nullable().optional(),
12
+ params: models_1.ImageGenerationJobRequestParamsSchema,
13
+ });
14
+ ExecuteImageGenerationCommand.ResponseSchema = zod_1.z.object({
15
+ data: models_1.ImageGenerationJobSchema,
16
+ });
17
+ })(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./execute-image-generation.command"), exports);
18
+ __exportStar(require("./retry-image-generation-job.command"), exports);
19
+ __exportStar(require("./set-reaction-to-image-generation-job.command"), exports);
20
+ __exportStar(require("./update-image-generation-job-title.command"), exports);
21
+ __exportStar(require("./soft-delete-image-generation-job-by-uuid.command"), exports);
22
+ __exportStar(require("./soft-delete-image-generation-jobs-by-criteria.command"), exports);
23
+ __exportStar(require("./proxy-image-generation-callback.command"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProxyImageGenerationCallbackCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var ProxyImageGenerationCallbackCommand;
6
+ (function (ProxyImageGenerationCallbackCommand) {
7
+ ProxyImageGenerationCallbackCommand.RequestSchema = zod_1.z.object({
8
+ model: zod_1.z.string(),
9
+ response: zod_1.z
10
+ .object({
11
+ data: zod_1.z.array(zod_1.z.string()),
12
+ externalId: zod_1.z.string(),
13
+ type: zod_1.z.string(),
14
+ errorMsg: zod_1.z.string().optional(),
15
+ })
16
+ .optional(),
17
+ });
18
+ ProxyImageGenerationCallbackCommand.ResponseSchema = zod_1.z.object({
19
+ ok: zod_1.z.boolean(),
20
+ });
21
+ })(ProxyImageGenerationCallbackCommand || (exports.ProxyImageGenerationCallbackCommand = ProxyImageGenerationCallbackCommand = {}));