@ai-grator/api 0.1.23 → 0.1.25

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 (164) hide show
  1. package/admin/endpoints/admin.ts +6 -0
  2. package/admin/endpoints/commands/index.ts +2 -0
  3. package/admin/endpoints/commands/mark-admin-support-chat-read.command.ts +25 -0
  4. package/admin/endpoints/commands/send-admin-support-reply.command.ts +38 -0
  5. package/admin/endpoints/queries/get-admin-support-chat-messages.query.ts +33 -0
  6. package/admin/endpoints/queries/get-admin-support-chats.query.ts +27 -0
  7. package/admin/endpoints/queries/index.ts +6 -4
  8. package/admin/models/admin-support-chat-list-item.schema.ts +13 -0
  9. package/admin/models/index.ts +1 -0
  10. package/build/admin/endpoints/admin.d.ts +4 -0
  11. package/build/admin/endpoints/admin.d.ts.map +1 -1
  12. package/build/admin/endpoints/admin.js +5 -0
  13. package/build/admin/endpoints/commands/index.d.ts +2 -0
  14. package/build/admin/endpoints/commands/index.d.ts.map +1 -1
  15. package/build/admin/endpoints/commands/index.js +2 -0
  16. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts +24 -0
  17. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts.map +1 -0
  18. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.js +25 -0
  19. package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts +79 -0
  20. package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts.map +1 -0
  21. package/build/admin/endpoints/commands/send-admin-support-reply.command.js +37 -0
  22. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts +86 -0
  23. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts.map +1 -0
  24. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.js +32 -0
  25. package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts +49 -0
  26. package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts.map +1 -0
  27. package/build/admin/endpoints/queries/get-admin-support-chats.query.js +27 -0
  28. package/build/admin/endpoints/queries/index.d.ts +6 -4
  29. package/build/admin/endpoints/queries/index.d.ts.map +1 -1
  30. package/build/admin/endpoints/queries/index.js +6 -4
  31. package/build/admin/models/admin-support-chat-list-item.schema.d.ts +12 -0
  32. package/build/admin/models/admin-support-chat-list-item.schema.d.ts.map +1 -0
  33. package/build/admin/models/admin-support-chat-list-item.schema.js +13 -0
  34. package/build/admin/models/index.d.ts +1 -0
  35. package/build/admin/models/index.d.ts.map +1 -1
  36. package/build/admin/models/index.js +1 -0
  37. package/build/chat/endpoints/commands/create-chat.command.d.ts +2 -0
  38. package/build/chat/endpoints/commands/create-chat.command.d.ts.map +1 -1
  39. package/build/chat/endpoints/commands/update-chat.command.d.ts +2 -0
  40. package/build/chat/endpoints/commands/update-chat.command.d.ts.map +1 -1
  41. package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts +2 -0
  42. package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts.map +1 -1
  43. package/build/chat/endpoints/queries/get-chats.query.d.ts +2 -0
  44. package/build/chat/endpoints/queries/get-chats.query.d.ts.map +1 -1
  45. package/build/chat/models/chat-response.schema.d.ts +1 -0
  46. package/build/chat/models/chat-response.schema.d.ts.map +1 -1
  47. package/build/chat/models/chat-response.schema.js +1 -0
  48. package/build/errors/errors.d.ts +28 -1
  49. package/build/errors/errors.d.ts.map +1 -1
  50. package/build/errors/errors.js +28 -1
  51. package/build/file/enums/file.enum.d.ts +1 -0
  52. package/build/file/enums/file.enum.d.ts.map +1 -1
  53. package/build/file/enums/file.enum.js +59 -59
  54. package/build/file/helpers/allowed-file-formats.helper.d.ts +4 -0
  55. package/build/file/helpers/allowed-file-formats.helper.d.ts.map +1 -0
  56. package/build/file/helpers/allowed-file-formats.helper.js +15 -0
  57. package/build/file/helpers/index.d.ts +2 -0
  58. package/build/file/helpers/index.d.ts.map +1 -0
  59. package/build/file/helpers/index.js +17 -0
  60. package/build/file/index.d.ts +1 -0
  61. package/build/file/index.d.ts.map +1 -1
  62. package/build/file/index.js +1 -0
  63. package/build/file/models/file-format-list.schema.d.ts +8 -0
  64. package/build/file/models/file-format-list.schema.d.ts.map +1 -0
  65. package/build/file/models/file-format-list.schema.js +9 -0
  66. package/build/file/models/index.d.ts +1 -0
  67. package/build/file/models/index.d.ts.map +1 -1
  68. package/build/file/models/index.js +1 -0
  69. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +20 -2
  70. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
  71. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +20 -2
  72. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
  73. package/build/generation-model/models/generation-model-response.schema.d.ts +31 -1
  74. package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
  75. package/build/generation-model/models/generation-model-response.schema.js +10 -2
  76. package/build/index.d.ts +1 -0
  77. package/build/index.d.ts.map +1 -1
  78. package/build/index.js +1 -0
  79. package/build/marketplace-card/endpoints/marketplace-card.d.ts +1 -0
  80. package/build/marketplace-card/endpoints/marketplace-card.d.ts.map +1 -1
  81. package/build/marketplace-card/endpoints/marketplace-card.js +1 -0
  82. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts +27 -0
  83. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts.map +1 -0
  84. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.js +20 -0
  85. package/build/marketplace-card/endpoints/queries/index.d.ts +1 -0
  86. package/build/marketplace-card/endpoints/queries/index.d.ts.map +1 -1
  87. package/build/marketplace-card/endpoints/queries/index.js +1 -0
  88. package/build/scripts/generate-openapi.js +67 -0
  89. package/build/support/endpoints/commands/index.d.ts +3 -0
  90. package/build/support/endpoints/commands/index.d.ts.map +1 -0
  91. package/build/support/endpoints/commands/index.js +18 -0
  92. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts +12 -0
  93. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts.map +1 -0
  94. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.js +15 -0
  95. package/build/support/endpoints/commands/send-support-message.command.d.ts +70 -0
  96. package/build/support/endpoints/commands/send-support-message.command.d.ts.map +1 -0
  97. package/build/support/endpoints/commands/send-support-message.command.js +30 -0
  98. package/build/support/endpoints/index.d.ts +4 -0
  99. package/build/support/endpoints/index.d.ts.map +1 -0
  100. package/build/support/endpoints/index.js +19 -0
  101. package/build/support/endpoints/queries/get-support-history.query.d.ts +77 -0
  102. package/build/support/endpoints/queries/get-support-history.query.d.ts.map +1 -0
  103. package/build/support/endpoints/queries/get-support-history.query.js +25 -0
  104. package/build/support/endpoints/queries/get-support-unread-count.query.d.ts +17 -0
  105. package/build/support/endpoints/queries/get-support-unread-count.query.d.ts.map +1 -0
  106. package/build/support/endpoints/queries/get-support-unread-count.query.js +18 -0
  107. package/build/support/endpoints/queries/index.d.ts +3 -0
  108. package/build/support/endpoints/queries/index.d.ts.map +1 -0
  109. package/build/support/endpoints/queries/index.js +18 -0
  110. package/build/support/endpoints/support.d.ts +8 -0
  111. package/build/support/endpoints/support.d.ts.map +1 -0
  112. package/build/support/endpoints/support.js +10 -0
  113. package/build/support/enums/index.d.ts +2 -0
  114. package/build/support/enums/index.d.ts.map +1 -0
  115. package/build/support/enums/index.js +17 -0
  116. package/build/support/enums/support-message-author-type.enum.d.ts +5 -0
  117. package/build/support/enums/support-message-author-type.enum.d.ts.map +1 -0
  118. package/build/support/enums/support-message-author-type.enum.js +8 -0
  119. package/build/support/index.d.ts +5 -0
  120. package/build/support/index.d.ts.map +1 -0
  121. package/build/support/index.js +20 -0
  122. package/build/support/models/index.d.ts +2 -0
  123. package/build/support/models/index.d.ts.map +1 -0
  124. package/build/support/models/index.js +17 -0
  125. package/build/support/models/support-message-response.schema.d.ts +28 -0
  126. package/build/support/models/support-message-response.schema.d.ts.map +1 -0
  127. package/build/support/models/support-message-response.schema.js +14 -0
  128. package/build/support/websocket/index.d.ts +2 -0
  129. package/build/support/websocket/index.d.ts.map +1 -0
  130. package/build/support/websocket/index.js +17 -0
  131. package/build/support/websocket/support-socket-events.d.ts +50 -0
  132. package/build/support/websocket/support-socket-events.d.ts.map +1 -0
  133. package/build/support/websocket/support-socket-events.js +27 -0
  134. package/build/tsconfig.tsbuildinfo +1 -1
  135. package/chat/models/chat-response.schema.ts +1 -0
  136. package/errors/errors.ts +28 -1
  137. package/file/enums/file.enum.ts +60 -59
  138. package/file/helpers/allowed-file-formats.helper.ts +16 -0
  139. package/file/helpers/index.ts +1 -0
  140. package/file/index.ts +1 -0
  141. package/file/models/file-format-list.schema.ts +9 -0
  142. package/file/models/index.ts +1 -0
  143. package/generation-model/models/generation-model-response.schema.ts +11 -1
  144. package/index.ts +1 -0
  145. package/marketplace-card/endpoints/marketplace-card.ts +1 -0
  146. package/marketplace-card/endpoints/queries/get-marketplace-card-config.query.ts +21 -0
  147. package/marketplace-card/endpoints/queries/index.ts +1 -0
  148. package/package.json +1 -1
  149. package/scripts/generate-openapi.ts +104 -0
  150. package/support/endpoints/commands/index.ts +2 -0
  151. package/support/endpoints/commands/mark-support-chat-read-by-user.command.ts +14 -0
  152. package/support/endpoints/commands/send-support-message.command.ts +30 -0
  153. package/support/endpoints/index.ts +3 -0
  154. package/support/endpoints/queries/get-support-history.query.ts +25 -0
  155. package/support/endpoints/queries/get-support-unread-count.query.ts +17 -0
  156. package/support/endpoints/queries/index.ts +2 -0
  157. package/support/endpoints/support.ts +8 -0
  158. package/support/enums/index.ts +1 -0
  159. package/support/enums/support-message-author-type.enum.ts +4 -0
  160. package/support/index.ts +4 -0
  161. package/support/models/index.ts +1 -0
  162. package/support/models/support-message-response.schema.ts +14 -0
  163. package/support/websocket/index.ts +1 -0
  164. package/support/websocket/support-socket-events.ts +35 -0
@@ -14,7 +14,16 @@ export declare const GetGenerationModelsQueryResponse: z.ZodObject<{
14
14
  providerTitle: z.ZodString;
15
15
  order: z.ZodInt;
16
16
  isActive: z.ZodBoolean;
17
- attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodUnknown>;
17
+ attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
18
+ fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
19
+ required: z.ZodBoolean;
20
+ maxCount: z.ZodInt;
21
+ allowedFormats: z.ZodObject<{
22
+ mimeTypes: z.ZodArray<z.ZodString>;
23
+ extensions: z.ZodArray<z.ZodString>;
24
+ maxSize: z.ZodInt;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>>;
18
27
  paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
28
  pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
20
29
  type: z.ZodLiteral<"base">;
@@ -52,7 +61,16 @@ export declare const GetGenerationModelsQuery: {
52
61
  providerTitle: z.ZodString;
53
62
  order: z.ZodInt;
54
63
  isActive: z.ZodBoolean;
55
- attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodUnknown>;
64
+ attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
65
+ fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
66
+ required: z.ZodBoolean;
67
+ maxCount: z.ZodInt;
68
+ allowedFormats: z.ZodObject<{
69
+ mimeTypes: z.ZodArray<z.ZodString>;
70
+ extensions: z.ZodArray<z.ZodString>;
71
+ maxSize: z.ZodInt;
72
+ }, z.core.$strip>;
73
+ }, z.core.$strip>>;
56
74
  paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
57
75
  pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
58
76
  type: z.ZodLiteral<"base">;
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation-models.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAC"}
1
+ {"version":3,"file":"get-generation-models.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAC"}
@@ -1,6 +1,27 @@
1
1
  import { z } from 'zod';
2
+ import { FILE_TYPE } from '../../file';
2
3
  import { GENERATION_TYPE } from '../enums';
3
4
  export declare const GenerationTypeSchema: z.ZodEnum<typeof GENERATION_TYPE>;
5
+ export declare const AttachmentSlotSchema: z.ZodObject<{
6
+ fileType: z.ZodEnum<typeof FILE_TYPE>;
7
+ required: z.ZodBoolean;
8
+ maxCount: z.ZodInt;
9
+ allowedFormats: z.ZodObject<{
10
+ mimeTypes: z.ZodArray<z.ZodString>;
11
+ extensions: z.ZodArray<z.ZodString>;
12
+ maxSize: z.ZodInt;
13
+ }, z.core.$strip>;
14
+ }, z.core.$strip>;
15
+ export declare const AttachmentPolicySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
16
+ fileType: z.ZodEnum<typeof FILE_TYPE>;
17
+ required: z.ZodBoolean;
18
+ maxCount: z.ZodInt;
19
+ allowedFormats: z.ZodObject<{
20
+ mimeTypes: z.ZodArray<z.ZodString>;
21
+ extensions: z.ZodArray<z.ZodString>;
22
+ maxSize: z.ZodInt;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>>;
4
25
  export declare const GenerationModelResponseSchema: z.ZodObject<{
5
26
  uuid: z.ZodUUID;
6
27
  titleModel: z.ZodString;
@@ -14,7 +35,16 @@ export declare const GenerationModelResponseSchema: z.ZodObject<{
14
35
  providerTitle: z.ZodString;
15
36
  order: z.ZodInt;
16
37
  isActive: z.ZodBoolean;
17
- attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodUnknown>;
38
+ attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
39
+ fileType: z.ZodEnum<typeof FILE_TYPE>;
40
+ required: z.ZodBoolean;
41
+ maxCount: z.ZodInt;
42
+ allowedFormats: z.ZodObject<{
43
+ mimeTypes: z.ZodArray<z.ZodString>;
44
+ extensions: z.ZodArray<z.ZodString>;
45
+ maxSize: z.ZodInt;
46
+ }, z.core.$strip>;
47
+ }, z.core.$strip>>;
18
48
  paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
49
  pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
20
50
  type: z.ZodLiteral<"base">;
@@ -1 +1 @@
1
- {"version":3,"file":"generation-model-response.schema.d.ts","sourceRoot":"","sources":["../../../generation-model/models/generation-model-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,oBAAoB,mCAA0B,CAAC;AAE5D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
1
+ {"version":3,"file":"generation-model-response.schema.d.ts","sourceRoot":"","sources":["../../../generation-model/models/generation-model-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAwB,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,oBAAoB,mCAA0B,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;iBAK/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;kBAA6C,CAAC;AAEjF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GenerationModelResponseSchema = exports.GenerationTypeSchema = void 0;
3
+ exports.GenerationModelResponseSchema = exports.AttachmentPolicySchema = exports.AttachmentSlotSchema = exports.GenerationTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const file_1 = require("../../file");
5
6
  const _common_1 = require("../../_common");
6
7
  const enums_1 = require("../enums");
7
8
  const pricing_policy_schema_1 = require("./pricing-policy.schema");
8
9
  const JsonObjectSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
9
10
  exports.GenerationTypeSchema = zod_1.z.enum(enums_1.GENERATION_TYPE);
11
+ exports.AttachmentSlotSchema = zod_1.z.object({
12
+ fileType: zod_1.z.enum(file_1.FILE_TYPE),
13
+ required: zod_1.z.boolean(),
14
+ maxCount: zod_1.z.int().positive(),
15
+ allowedFormats: file_1.FileFormatListSchema,
16
+ });
17
+ exports.AttachmentPolicySchema = zod_1.z.record(zod_1.z.string(), exports.AttachmentSlotSchema);
10
18
  exports.GenerationModelResponseSchema = zod_1.z.object({
11
19
  uuid: zod_1.z.uuid(),
12
20
  titleModel: zod_1.z.string().min(1),
@@ -17,7 +25,7 @@ exports.GenerationModelResponseSchema = zod_1.z.object({
17
25
  providerTitle: zod_1.z.string().min(1),
18
26
  order: zod_1.z.int(),
19
27
  isActive: zod_1.z.boolean(),
20
- attachmentPolicy: JsonObjectSchema,
28
+ attachmentPolicy: exports.AttachmentPolicySchema,
21
29
  paramsSchema: JsonObjectSchema,
22
30
  pricingPolicy: pricing_policy_schema_1.PricingPolicySchema,
23
31
  });
package/build/index.d.ts CHANGED
@@ -16,4 +16,5 @@ export * from './admin';
16
16
  export * from './file';
17
17
  export * from './generation-job-chat';
18
18
  export * from './marketplace-card';
19
+ export * from './support';
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC"}
package/build/index.js CHANGED
@@ -32,3 +32,4 @@ __exportStar(require("./admin"), exports);
32
32
  __exportStar(require("./file"), exports);
33
33
  __exportStar(require("./generation-job-chat"), exports);
34
34
  __exportStar(require("./marketplace-card"), exports);
35
+ __exportStar(require("./support"), exports);
@@ -2,6 +2,7 @@ export declare const MARKETPLACE_CARD_CONTROLLER: "marketplace-cards";
2
2
  export declare const MARKETPLACE_CARD_ROUTES: {
3
3
  readonly CREATE: "";
4
4
  readonly GET_ALL: "";
5
+ readonly GET_CONFIG: "config";
5
6
  readonly GET_BY_UUID: (uuid: string) => string;
6
7
  readonly DOWNLOAD: (uuid: string) => string;
7
8
  readonly UPDATE: (uuid: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-card.d.ts","sourceRoot":"","sources":["../../../marketplace-card/endpoints/marketplace-card.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;iCAGZ,MAAM;8BACT,MAAM;4BACR,MAAM;4BACN,MAAM;CACf,CAAC"}
1
+ {"version":3,"file":"marketplace-card.d.ts","sourceRoot":"","sources":["../../../marketplace-card/endpoints/marketplace-card.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;iCAIZ,MAAM;8BACT,MAAM;4BACR,MAAM;4BACN,MAAM;CACf,CAAC"}
@@ -5,6 +5,7 @@ exports.MARKETPLACE_CARD_CONTROLLER = 'marketplace-cards';
5
5
  exports.MARKETPLACE_CARD_ROUTES = {
6
6
  CREATE: '',
7
7
  GET_ALL: '',
8
+ GET_CONFIG: 'config',
8
9
  GET_BY_UUID: (uuid) => `${uuid}`,
9
10
  DOWNLOAD: (uuid) => `${uuid}/download`,
10
11
  UPDATE: (uuid) => `${uuid}`,
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ export declare const GetMarketplaceCardConfigResponse: z.ZodObject<{
4
+ styleReferenceFile: z.ZodObject<{
5
+ mimeTypes: z.ZodArray<z.ZodString>;
6
+ extensions: z.ZodArray<z.ZodString>;
7
+ maxSize: z.ZodInt;
8
+ }, z.core.$strip>;
9
+ }, z.core.$strip>;
10
+ export type GetMarketplaceCardConfigResponseType = z.infer<typeof GetMarketplaceCardConfigResponse>;
11
+ export declare const GetMarketplaceCardConfigQuery: {
12
+ method: HTTP_METHODS.GET;
13
+ path: "config";
14
+ summary: string;
15
+ responses: {
16
+ 200: z.ZodObject<{
17
+ styleReferenceFile: z.ZodObject<{
18
+ mimeTypes: z.ZodArray<z.ZodString>;
19
+ extensions: z.ZodArray<z.ZodString>;
20
+ maxSize: z.ZodInt;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>;
23
+ 401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
24
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
25
+ };
26
+ };
27
+ //# sourceMappingURL=get-marketplace-card-config.query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-marketplace-card-config.query.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/get-marketplace-card-config.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAGzF,eAAO,MAAM,gCAAgC;;;;;;iBAE3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CASxC,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetMarketplaceCardConfigQuery = exports.GetMarketplaceCardConfigResponse = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_1 = require("../../../file");
6
+ const _common_1 = require("../../../_common");
7
+ const marketplace_card_1 = require("../marketplace-card");
8
+ exports.GetMarketplaceCardConfigResponse = zod_1.z.object({
9
+ styleReferenceFile: file_1.FileFormatListSchema,
10
+ });
11
+ exports.GetMarketplaceCardConfigQuery = (0, _common_1.defineContract)({
12
+ method: _common_1.HTTP_METHODS.GET,
13
+ path: marketplace_card_1.MARKETPLACE_CARD_ROUTES.GET_CONFIG,
14
+ summary: 'Get marketplace card generation config (allowed file formats)',
15
+ responses: {
16
+ 200: exports.GetMarketplaceCardConfigResponse,
17
+ 401: _common_1.HttpErrorResponseSchema,
18
+ 500: _common_1.HttpErrorResponseSchema,
19
+ },
20
+ });
@@ -1,3 +1,4 @@
1
1
  export * from './get-marketplace-card.query';
2
2
  export * from './get-marketplace-card-history.query';
3
+ export * from './get-marketplace-card-config.query';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC"}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-marketplace-card.query"), exports);
18
18
  __exportStar(require("./get-marketplace-card-history.query"), exports);
19
+ __exportStar(require("./get-marketplace-card-config.query"), exports);
@@ -45,6 +45,15 @@ const get_messages_by_chat_query_1 = require("../message/endpoints/queries/get-m
45
45
  const get_message_price_estimate_query_1 = require("../message/endpoints/queries/get-message-price-estimate.query");
46
46
  const file_1 = require("../file/endpoints/file");
47
47
  const upload_file_command_1 = require("../file/endpoints/commands/upload-file.command");
48
+ const support_1 = require("../support/endpoints/support");
49
+ const send_support_message_command_1 = require("../support/endpoints/commands/send-support-message.command");
50
+ const mark_support_chat_read_by_user_command_1 = require("../support/endpoints/commands/mark-support-chat-read-by-user.command");
51
+ const get_support_history_query_1 = require("../support/endpoints/queries/get-support-history.query");
52
+ const get_support_unread_count_query_1 = require("../support/endpoints/queries/get-support-unread-count.query");
53
+ const send_admin_support_reply_command_1 = require("../admin/endpoints/commands/send-admin-support-reply.command");
54
+ const mark_admin_support_chat_read_command_1 = require("../admin/endpoints/commands/mark-admin-support-chat-read.command");
55
+ const get_admin_support_chats_query_1 = require("../admin/endpoints/queries/get-admin-support-chats.query");
56
+ const get_admin_support_chat_messages_query_1 = require("../admin/endpoints/queries/get-admin-support-chat-messages.query");
48
57
  const wallet_1 = require("../wallet/endpoints/wallet");
49
58
  const get_wallet_balance_query_1 = require("../wallet/endpoints/queries/get-wallet-balance.query");
50
59
  const get_wallet_transactions_query_1 = require("../wallet/endpoints/queries/get-wallet-transactions.query");
@@ -77,6 +86,7 @@ const delete_marketplace_card_command_1 = require("../marketplace-card/endpoints
77
86
  const update_marketplace_card_command_1 = require("../marketplace-card/endpoints/commands/update-marketplace-card.command");
78
87
  const get_marketplace_card_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card.query");
79
88
  const get_marketplace_card_history_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card-history.query");
89
+ const get_marketplace_card_config_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card-config.query");
80
90
  const supportedHttpMethods = new Set(['get', 'post', 'put', 'patch', 'delete']);
81
91
  function toOpenApiPath(controller, routePath) {
82
92
  const normalizedController = controller.replace(/^\/+|\/+$/g, '');
@@ -238,6 +248,22 @@ async function main() {
238
248
  registerSchema('AdminGetStatsQuery', get_admin_stats_query_1.GetAdminStatsQueryQuery);
239
249
  registerSchema('AdminGetStatsResponse', get_admin_stats_query_1.GetAdminStatsQueryResponse);
240
250
  registerSchema('AdminGetKieBalanceResponse', get_admin_kie_balance_query_1.GetAdminKieBalanceQueryResponse);
251
+ registerSchema('AdminGetSupportChatsQuery', get_admin_support_chats_query_1.GetAdminSupportChatsQueryQuery);
252
+ registerSchema('AdminGetSupportChatsResponse', get_admin_support_chats_query_1.GetAdminSupportChatsQueryResponse);
253
+ registerSchema('AdminGetSupportChatMessagesParams', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryParams);
254
+ registerSchema('AdminGetSupportChatMessagesQuery', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryQuery);
255
+ registerSchema('AdminGetSupportChatMessagesResponse', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryResponse);
256
+ registerSchema('AdminSendSupportReplyParams', send_admin_support_reply_command_1.SendAdminSupportReplyCommandParams);
257
+ registerSchema('AdminSendSupportReplyRequest', send_admin_support_reply_command_1.SendAdminSupportReplyCommandBody);
258
+ registerSchema('AdminSendSupportReplyResponse', send_admin_support_reply_command_1.SendAdminSupportReplyCommandResponse);
259
+ registerSchema('AdminMarkSupportChatReadParams', mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommandParams);
260
+ registerSchema('AdminMarkSupportChatReadResponse', mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommandResponse);
261
+ registerSchema('SupportSendMessageRequest', send_support_message_command_1.SendSupportMessageCommandBody);
262
+ registerSchema('SupportSendMessageResponse', send_support_message_command_1.SendSupportMessageCommandResponse);
263
+ registerSchema('SupportGetHistoryQuery', get_support_history_query_1.GetSupportHistoryQueryQuery);
264
+ registerSchema('SupportGetHistoryResponse', get_support_history_query_1.GetSupportHistoryQueryResponse);
265
+ registerSchema('SupportGetUnreadCountResponse', get_support_unread_count_query_1.GetSupportUnreadCountQueryResponse);
266
+ registerSchema('SupportMarkReadResponse', mark_support_chat_read_by_user_command_1.MarkSupportChatReadByUserCommandResponse);
241
267
  registerSchema('MarketplaceCardCreateRequest', create_marketplace_card_command_1.CreateMarketplaceCardCommandBody);
242
268
  registerSchema('MarketplaceCardCreateResponse', create_marketplace_card_command_1.CreateMarketplaceCardCommandResponse);
243
269
  registerSchema('MarketplaceCardGetByUuidParams', get_marketplace_card_query_1.GetMarketplaceCardQueryParams);
@@ -249,6 +275,7 @@ async function main() {
249
275
  registerSchema('MarketplaceCardDeleteResponse', delete_marketplace_card_command_1.DeleteMarketplaceCardCommandResponse);
250
276
  registerSchema('MarketplaceCardHistoryQuery', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryQuery);
251
277
  registerSchema('MarketplaceCardHistoryResponse', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryResponse);
278
+ registerSchema('MarketplaceCardConfigResponse', get_marketplace_card_config_query_1.GetMarketplaceCardConfigResponse);
252
279
  const authContracts = [
253
280
  register_command_1.RegisterCommand,
254
281
  login_command_1.LoginCommand,
@@ -274,11 +301,18 @@ async function main() {
274
301
  delete_message_command_1.DeleteMessageCommand,
275
302
  ];
276
303
  const fileContracts = [upload_file_command_1.UploadFileCommand];
304
+ const supportContracts = [
305
+ send_support_message_command_1.SendSupportMessageCommand,
306
+ get_support_history_query_1.GetSupportHistoryQuery,
307
+ get_support_unread_count_query_1.GetSupportUnreadCountQuery,
308
+ mark_support_chat_read_by_user_command_1.MarkSupportChatReadByUserCommand,
309
+ ];
277
310
  const walletContracts = [get_wallet_balance_query_1.GetWalletBalanceQuery, get_wallet_transactions_query_1.GetWalletTransactionsQuery];
278
311
  const paymentContracts = [create_payment_command_1.CreatePaymentCommand];
279
312
  const marketplaceCardContracts = [
280
313
  create_marketplace_card_command_1.CreateMarketplaceCardCommand,
281
314
  get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQuery,
315
+ get_marketplace_card_config_query_1.GetMarketplaceCardConfigQuery,
282
316
  get_marketplace_card_query_1.GetMarketplaceCardQuery,
283
317
  update_marketplace_card_command_1.UpdateMarketplaceCardCommand,
284
318
  delete_marketplace_card_command_1.DeleteMarketplaceCardCommand,
@@ -322,6 +356,10 @@ async function main() {
322
356
  get_admin_user_transactions_query_1.GetAdminUserTransactionsQuery,
323
357
  get_admin_stats_query_1.GetAdminStatsQuery,
324
358
  get_admin_kie_balance_query_1.GetAdminKieBalanceQuery,
359
+ get_admin_support_chats_query_1.GetAdminSupportChatsQuery,
360
+ get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQuery,
361
+ send_admin_support_reply_command_1.SendAdminSupportReplyCommand,
362
+ mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommand,
325
363
  ];
326
364
  for (const contract of authContracts) {
327
365
  const method = contract.method.toLowerCase();
@@ -441,6 +479,35 @@ async function main() {
441
479
  responses: buildResponses(contract.responses, resolveSchema),
442
480
  });
443
481
  }
482
+ for (const contract of supportContracts) {
483
+ const method = contract.method.toLowerCase();
484
+ if (!supportedHttpMethods.has(method)) {
485
+ throw new Error(`Unsupported HTTP method: ${contract.method}`);
486
+ }
487
+ registry.registerPath({
488
+ method: method,
489
+ path: toOpenApiPath(support_1.SUPPORT_CONTROLLER, contract.path),
490
+ summary: contract.summary,
491
+ tags: ['Support'],
492
+ request: {
493
+ ...(contract.request?.body
494
+ ? {
495
+ body: {
496
+ required: true,
497
+ content: {
498
+ 'application/json': {
499
+ schema: resolveSchema(contract.request.body),
500
+ },
501
+ },
502
+ },
503
+ }
504
+ : {}),
505
+ ...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
506
+ ...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
507
+ },
508
+ responses: buildResponses(contract.responses, resolveSchema),
509
+ });
510
+ }
444
511
  for (const contract of walletContracts) {
445
512
  const method = contract.method.toLowerCase();
446
513
  if (!supportedHttpMethods.has(method)) {
@@ -0,0 +1,3 @@
1
+ export * from './send-support-message.command';
2
+ export * from './mark-support-chat-read-by-user.command';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC"}
@@ -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("./send-support-message.command"), exports);
18
+ __exportStar(require("./mark-support-chat-read-by-user.command"), exports);
@@ -0,0 +1,12 @@
1
+ import { HTTP_METHODS } from '../../../_common';
2
+ export declare const MarkSupportChatReadByUserCommandResponse: import("zod").ZodType<import("../../../_common").HttpSuccessResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
3
+ export declare const MarkSupportChatReadByUserCommand: {
4
+ method: HTTP_METHODS.POST;
5
+ path: "read";
6
+ summary: string;
7
+ responses: {
8
+ 200: import("zod").ZodType<import("../../../_common").HttpSuccessResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
9
+ 500: import("zod").ZodType<import("../../../_common").HttpErrorResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
10
+ };
11
+ };
12
+ //# sourceMappingURL=mark-support-chat-read-by-user.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark-support-chat-read-by-user.command.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/mark-support-chat-read-by-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAsD,MAAM,kBAAkB,CAAC;AAGpH,eAAO,MAAM,wCAAwC,kLAA4B,CAAC;AAElF,eAAO,MAAM,gCAAgC;;;;;;;;CAQ3C,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarkSupportChatReadByUserCommand = exports.MarkSupportChatReadByUserCommandResponse = void 0;
4
+ const _common_1 = require("../../../_common");
5
+ const support_1 = require("../support");
6
+ exports.MarkSupportChatReadByUserCommandResponse = _common_1.HttpSuccessResponseSchema;
7
+ exports.MarkSupportChatReadByUserCommand = (0, _common_1.defineContract)({
8
+ method: _common_1.HTTP_METHODS.POST,
9
+ path: support_1.SUPPORT_ROUTES.MARK_READ,
10
+ summary: 'Mark support chat as read by the current user',
11
+ responses: {
12
+ 200: exports.MarkSupportChatReadByUserCommandResponse,
13
+ 500: _common_1.HttpErrorResponseSchema,
14
+ },
15
+ });
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ export declare const SendSupportMessageCommandBody: z.ZodObject<{
4
+ text: z.ZodOptional<z.ZodString>;
5
+ fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
6
+ }, z.core.$strip>;
7
+ export declare const SendSupportMessageCommandResponse: z.ZodObject<{
8
+ uuid: z.ZodUUID;
9
+ chatId: z.ZodUUID;
10
+ authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
11
+ text: z.ZodNullable<z.ZodString>;
12
+ files: z.ZodArray<z.ZodObject<{
13
+ uuid: z.ZodUUID;
14
+ fileName: z.ZodString;
15
+ fileUrl: z.ZodString;
16
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
17
+ mimeType: z.ZodString;
18
+ fileType: z.ZodString;
19
+ extention: z.ZodNullable<z.ZodString>;
20
+ size: z.ZodNumber;
21
+ userId: z.ZodUUID;
22
+ messageId: z.ZodNullable<z.ZodUUID>;
23
+ durationMs: z.ZodNullable<z.ZodNumber>;
24
+ content: z.ZodNullable<z.ZodString>;
25
+ contentLength: z.ZodNullable<z.ZodNumber>;
26
+ createdAt: z.ZodISODateTime;
27
+ updatedAt: z.ZodISODateTime;
28
+ }, z.core.$strip>>;
29
+ createdAt: z.ZodISODateTime;
30
+ }, z.core.$strip>;
31
+ export declare const SendSupportMessageCommand: {
32
+ method: HTTP_METHODS.POST;
33
+ path: "";
34
+ summary: string;
35
+ request: {
36
+ body: z.ZodObject<{
37
+ text: z.ZodOptional<z.ZodString>;
38
+ fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
39
+ }, z.core.$strip>;
40
+ };
41
+ responses: {
42
+ 201: z.ZodObject<{
43
+ uuid: z.ZodUUID;
44
+ chatId: z.ZodUUID;
45
+ authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
46
+ text: z.ZodNullable<z.ZodString>;
47
+ files: z.ZodArray<z.ZodObject<{
48
+ uuid: z.ZodUUID;
49
+ fileName: z.ZodString;
50
+ fileUrl: z.ZodString;
51
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
52
+ mimeType: z.ZodString;
53
+ fileType: z.ZodString;
54
+ extention: z.ZodNullable<z.ZodString>;
55
+ size: z.ZodNumber;
56
+ userId: z.ZodUUID;
57
+ messageId: z.ZodNullable<z.ZodUUID>;
58
+ durationMs: z.ZodNullable<z.ZodNumber>;
59
+ content: z.ZodNullable<z.ZodString>;
60
+ contentLength: z.ZodNullable<z.ZodNumber>;
61
+ createdAt: z.ZodISODateTime;
62
+ updatedAt: z.ZodISODateTime;
63
+ }, z.core.$strip>>;
64
+ createdAt: z.ZodISODateTime;
65
+ }, z.core.$strip>;
66
+ 400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
67
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
68
+ };
69
+ };
70
+ //# sourceMappingURL=send-support-message.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-support-message.command.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/send-support-message.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,6BAA6B;;;iBAQpC,CAAC;AAEP,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpC,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendSupportMessageCommand = exports.SendSupportMessageCommandResponse = exports.SendSupportMessageCommandBody = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const support_1 = require("../support");
7
+ const models_1 = require("../../models");
8
+ exports.SendSupportMessageCommandBody = zod_1.z
9
+ .object({
10
+ text: zod_1.z.string().trim().min(1).optional(),
11
+ fileIds: zod_1.z.array(zod_1.z.uuid()).optional(),
12
+ })
13
+ .refine(({ text, fileIds }) => Boolean(text) || Boolean(fileIds?.length), {
14
+ message: 'text or fileIds is required',
15
+ path: ['text'],
16
+ });
17
+ exports.SendSupportMessageCommandResponse = models_1.SupportMessageResponseSchema;
18
+ exports.SendSupportMessageCommand = (0, _common_1.defineContract)({
19
+ method: _common_1.HTTP_METHODS.POST,
20
+ path: support_1.SUPPORT_ROUTES.SEND_MESSAGE,
21
+ summary: 'Send a message to support (creates the chat on the first message)',
22
+ request: {
23
+ body: exports.SendSupportMessageCommandBody,
24
+ },
25
+ responses: {
26
+ 201: exports.SendSupportMessageCommandResponse,
27
+ 400: _common_1.HttpErrorResponseSchema,
28
+ 500: _common_1.HttpErrorResponseSchema,
29
+ },
30
+ });
@@ -0,0 +1,4 @@
1
+ export * from './support';
2
+ export * from './commands';
3
+ export * from './queries';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../support/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,19 @@
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("./support"), exports);
18
+ __exportStar(require("./commands"), exports);
19
+ __exportStar(require("./queries"), exports);