prismadoc 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +425 -0
  2. package/dist/config.type.js +38 -0
  3. package/dist/entities/dto-generator.js +69 -0
  4. package/dist/entities/enum.js +40 -0
  5. package/dist/entities/field.js +192 -0
  6. package/dist/entities/generic.js +24 -0
  7. package/dist/entities/model.js +83 -0
  8. package/dist/entities/response-generator.js +30 -0
  9. package/dist/entities/validator.js +16 -0
  10. package/dist/field.type.js +22 -0
  11. package/dist/fields.ts +138 -0
  12. package/dist/file.js +27 -0
  13. package/dist/generic.dto.ts +13 -0
  14. package/dist/index.js +1 -0
  15. package/dist/index.ts +40 -0
  16. package/dist/main.js +155 -0
  17. package/dist/rules.js +35 -0
  18. package/dist/schemas/config.schema.json +136 -0
  19. package/dist/static.js +3 -0
  20. package/dist/types/account-agenda.ts +68 -0
  21. package/dist/types/account-two-factor-auth-log.ts +127 -0
  22. package/dist/types/account-two-factor-auth.ts +145 -0
  23. package/dist/types/account.ts +126 -0
  24. package/dist/types/admin.ts +68 -0
  25. package/dist/types/agenda-day-time-config.ts +113 -0
  26. package/dist/types/agenda-week-day-config.ts +68 -0
  27. package/dist/types/customer.ts +99 -0
  28. package/dist/types/dummy-many.ts +71 -0
  29. package/dist/types/dummy-unique.ts +68 -0
  30. package/dist/types/dummy.ts +68 -0
  31. package/dist/types/email-auth-code.ts +136 -0
  32. package/dist/types/file.ts +299 -0
  33. package/dist/types/firebase-config.ts +140 -0
  34. package/dist/types/knowledge-base-category.ts +91 -0
  35. package/dist/types/knowledge-base-post.ts +262 -0
  36. package/dist/types/kyc-attempt-details.ts +273 -0
  37. package/dist/types/kyc-attempt.ts +365 -0
  38. package/dist/types/kyc-config.ts +199 -0
  39. package/dist/types/kyc-document.ts +260 -0
  40. package/dist/types/meeting-guest.ts +185 -0
  41. package/dist/types/meeting.ts +205 -0
  42. package/dist/types/member.ts +99 -0
  43. package/dist/types/notification.ts +193 -0
  44. package/dist/types/otp-auth-code-request-log.ts +116 -0
  45. package/dist/types/otp-auth-code.ts +136 -0
  46. package/dist/types/owner.ts +68 -0
  47. package/dist/types/policy.ts +169 -0
  48. package/dist/types/push-notification.ts +77 -0
  49. package/dist/types/smtp-config.ts +188 -0
  50. package/dist/types/staff-role.ts +121 -0
  51. package/dist/types/staff.ts +99 -0
  52. package/dist/types/tenant-plan.ts +177 -0
  53. package/dist/types/tenant-role.ts +152 -0
  54. package/dist/types/tenant.ts +149 -0
  55. package/dist/types/ticket-message.ts +177 -0
  56. package/dist/types/ticket.ts +177 -0
  57. package/dist/types/user.ts +281 -0
  58. package/dist/types.js +1 -0
  59. package/dist/utils/helpers.js +146 -0
  60. package/dist/utils/loader.js +81 -0
  61. package/dist/utils/prisma-utils.js +73 -0
  62. package/dist/utils/propeties.static.js +2 -0
  63. package/package.json +45 -0
@@ -0,0 +1,365 @@
1
+ // AUTO-GERADO: NÃO EDITAR MANUALMENTE. SUJEITO A PAULADAS!
2
+ /* eslint-disable @typescript-eslint/no-namespace */
3
+ import { ApiProperty, IntersectionType } from "@nestjs/swagger";
4
+ import { EnumKycStatus } from "@prisma/client";
5
+ import { IsString, IsNotEmpty, IsEnum, IsOptional } from "src/_nest/validators";
6
+
7
+ class StatusDto {
8
+ @ApiProperty({
9
+ enum: EnumKycStatus,
10
+ example: Object.values(EnumKycStatus)[0],
11
+ required: true,
12
+ })
13
+ @IsEnum(EnumKycStatus)
14
+ status!: EnumKycStatus;
15
+ }
16
+
17
+ class AccountIdDto {
18
+ @ApiProperty({
19
+ type: "string",
20
+ example: "cmfxu4njg000008l52v7t8qze",
21
+ required: true,
22
+ })
23
+ @IsString()
24
+ @IsNotEmpty()
25
+ accountId!: string;
26
+ }
27
+
28
+ class TenantIdDto {
29
+ @ApiProperty({
30
+ type: "string",
31
+ example: "cmfxu4njg000008l52v7t8qze",
32
+ required: false,
33
+ })
34
+ @IsString()
35
+ @IsOptional()
36
+ tenantId?: string;
37
+ }
38
+
39
+ class LegalNameDto {
40
+ @ApiProperty({ type: "string", example: "ordinary string", required: true })
41
+ @IsString()
42
+ @IsNotEmpty()
43
+ legalName!: string;
44
+ }
45
+
46
+ class DateOfBirthDto {
47
+ @ApiProperty({
48
+ type: "string",
49
+ example: "2025-09-03T03:00:00.000Z",
50
+ required: true,
51
+ })
52
+ @IsString()
53
+ @IsNotEmpty()
54
+ dateOfBirth!: Date;
55
+ }
56
+
57
+ class RejectionReasonDto {
58
+ @ApiProperty({
59
+ type: "string",
60
+ example: "A foto está desfocada",
61
+ required: false,
62
+ })
63
+ @IsString()
64
+ @IsOptional()
65
+ rejectionReason?: string;
66
+ }
67
+
68
+ class AdminCommentsDto {
69
+ @ApiProperty({ type: "string", example: "ordinary string", required: false })
70
+ @IsString()
71
+ @IsOptional()
72
+ adminComments?: string;
73
+ }
74
+
75
+ class SubmittedAtDto {
76
+ @ApiProperty({
77
+ type: "string",
78
+ example: "2025-09-03T03:00:00.000Z",
79
+ required: false,
80
+ })
81
+ @IsString()
82
+ @IsOptional()
83
+ submittedAt?: Date;
84
+ }
85
+
86
+ class ApprovedAtDto {
87
+ @ApiProperty({
88
+ type: "string",
89
+ example: "2025-09-03T03:00:00.000Z",
90
+ required: false,
91
+ })
92
+ @IsString()
93
+ @IsOptional()
94
+ approvedAt?: Date;
95
+ }
96
+
97
+ class RejectedAtDto {
98
+ @ApiProperty({
99
+ type: "string",
100
+ example: "2025-09-03T03:00:00.000Z",
101
+ required: false,
102
+ })
103
+ @IsString()
104
+ @IsOptional()
105
+ rejectedAt?: Date;
106
+ }
107
+
108
+ class ExpiresAtDto {
109
+ @ApiProperty({
110
+ type: "string",
111
+ example: "2025-09-03T03:00:00.000Z",
112
+ required: false,
113
+ })
114
+ @IsString()
115
+ @IsOptional()
116
+ expiresAt?: Date;
117
+ }
118
+
119
+ class KycAttemptDto extends IntersectionType(
120
+ StatusDto,
121
+ AccountIdDto,
122
+ TenantIdDto,
123
+ LegalNameDto,
124
+ DateOfBirthDto,
125
+ RejectionReasonDto,
126
+ AdminCommentsDto,
127
+ SubmittedAtDto,
128
+ ApprovedAtDto,
129
+ RejectedAtDto,
130
+ ExpiresAtDto,
131
+ ) {}
132
+
133
+ class KycAttemptId {
134
+ @ApiProperty({
135
+ type: "string",
136
+ example: "cmfxu4njg000008l52v7t8qze",
137
+ required: true,
138
+ })
139
+ @IsString()
140
+ @IsNotEmpty()
141
+ kycattemptId!: string;
142
+ }
143
+ class IdRes {
144
+ @ApiProperty({
145
+ type: "string",
146
+ example: "cmfxu4njg000008l52v7t8qze",
147
+ required: true,
148
+ })
149
+ id!: string;
150
+ }
151
+
152
+ class StatusRes {
153
+ @ApiProperty({
154
+ enum: EnumKycStatus,
155
+ example: Object.values(EnumKycStatus)[0],
156
+ required: true,
157
+ })
158
+ status!: EnumKycStatus;
159
+ }
160
+
161
+ class AccountIdRes {
162
+ @ApiProperty({
163
+ type: "string",
164
+ example: "cmfxu4njg000008l52v7t8qze",
165
+ required: true,
166
+ })
167
+ accountId!: string;
168
+ }
169
+
170
+ class TenantIdRes {
171
+ @ApiProperty({
172
+ type: "string",
173
+ example: "cmfxu4njg000008l52v7t8qze",
174
+ required: false,
175
+ })
176
+ tenantId?: string;
177
+ }
178
+
179
+ class LegalNameRes {
180
+ @ApiProperty({ type: "string", example: "ordinary string", required: true })
181
+ legalName!: string;
182
+ }
183
+
184
+ class DateOfBirthRes {
185
+ @ApiProperty({
186
+ type: "string",
187
+ example: "2025-09-03T03:00:00.000Z",
188
+ required: true,
189
+ })
190
+ dateOfBirth!: Date;
191
+ }
192
+
193
+ class RejectionReasonRes {
194
+ @ApiProperty({
195
+ type: "string",
196
+ example: "A foto está desfocada",
197
+ required: false,
198
+ })
199
+ rejectionReason?: string;
200
+ }
201
+
202
+ class AdminCommentsRes {
203
+ @ApiProperty({ type: "string", example: "ordinary string", required: false })
204
+ adminComments?: string;
205
+ }
206
+
207
+ class SubmittedAtRes {
208
+ @ApiProperty({
209
+ type: "string",
210
+ example: "2025-09-03T03:00:00.000Z",
211
+ required: false,
212
+ })
213
+ submittedAt?: Date;
214
+ }
215
+
216
+ class ApprovedAtRes {
217
+ @ApiProperty({
218
+ type: "string",
219
+ example: "2025-09-03T03:00:00.000Z",
220
+ required: false,
221
+ })
222
+ approvedAt?: Date;
223
+ }
224
+
225
+ class RejectedAtRes {
226
+ @ApiProperty({
227
+ type: "string",
228
+ example: "2025-09-03T03:00:00.000Z",
229
+ required: false,
230
+ })
231
+ rejectedAt?: Date;
232
+ }
233
+
234
+ class ExpiresAtRes {
235
+ @ApiProperty({
236
+ type: "string",
237
+ example: "2025-09-03T03:00:00.000Z",
238
+ required: false,
239
+ })
240
+ expiresAt?: Date;
241
+ }
242
+
243
+ class CreatedAtRes {
244
+ @ApiProperty({
245
+ type: "string",
246
+ example: "2025-09-03T03:00:00.000Z",
247
+ required: true,
248
+ })
249
+ createdAt!: Date;
250
+ }
251
+
252
+ class UpdatedAtRes {
253
+ @ApiProperty({
254
+ type: "string",
255
+ example: "2025-09-03T03:00:00.000Z",
256
+ required: true,
257
+ })
258
+ updatedAt!: Date;
259
+ }
260
+
261
+ class KycAttemptRes extends IntersectionType(
262
+ IdRes,
263
+ StatusRes,
264
+ AccountIdRes,
265
+ TenantIdRes,
266
+ LegalNameRes,
267
+ DateOfBirthRes,
268
+ RejectionReasonRes,
269
+ AdminCommentsRes,
270
+ SubmittedAtRes,
271
+ ApprovedAtRes,
272
+ RejectedAtRes,
273
+ ExpiresAtRes,
274
+ CreatedAtRes,
275
+ UpdatedAtRes,
276
+ ) {}
277
+ export namespace KycAttempt {
278
+ export const Dto = KycAttemptDto;
279
+ export type Dto = KycAttemptDto;
280
+ export const Res = KycAttemptRes;
281
+ export type Res = KycAttemptRes;
282
+ export const Id = KycAttemptId;
283
+ export type Id = KycAttemptId;
284
+
285
+ export namespace Input {
286
+ export namespace Status {
287
+ export type Dto = StatusDto;
288
+ export const Dto = StatusDto;
289
+ export type Res = StatusRes;
290
+ export const Res = StatusRes;
291
+ }
292
+ export namespace AccountId {
293
+ export type Dto = AccountIdDto;
294
+ export const Dto = AccountIdDto;
295
+ export type Res = AccountIdRes;
296
+ export const Res = AccountIdRes;
297
+ }
298
+ export namespace TenantId {
299
+ export type Dto = TenantIdDto;
300
+ export const Dto = TenantIdDto;
301
+ export type Res = TenantIdRes;
302
+ export const Res = TenantIdRes;
303
+ }
304
+ export namespace LegalName {
305
+ export type Dto = LegalNameDto;
306
+ export const Dto = LegalNameDto;
307
+ export type Res = LegalNameRes;
308
+ export const Res = LegalNameRes;
309
+ }
310
+ export namespace DateOfBirth {
311
+ export type Dto = DateOfBirthDto;
312
+ export const Dto = DateOfBirthDto;
313
+ export type Res = DateOfBirthRes;
314
+ export const Res = DateOfBirthRes;
315
+ }
316
+ export namespace RejectionReason {
317
+ export type Dto = RejectionReasonDto;
318
+ export const Dto = RejectionReasonDto;
319
+ export type Res = RejectionReasonRes;
320
+ export const Res = RejectionReasonRes;
321
+ }
322
+ export namespace AdminComments {
323
+ export type Dto = AdminCommentsDto;
324
+ export const Dto = AdminCommentsDto;
325
+ export type Res = AdminCommentsRes;
326
+ export const Res = AdminCommentsRes;
327
+ }
328
+ export namespace SubmittedAt {
329
+ export type Dto = SubmittedAtDto;
330
+ export const Dto = SubmittedAtDto;
331
+ export type Res = SubmittedAtRes;
332
+ export const Res = SubmittedAtRes;
333
+ }
334
+ export namespace ApprovedAt {
335
+ export type Dto = ApprovedAtDto;
336
+ export const Dto = ApprovedAtDto;
337
+ export type Res = ApprovedAtRes;
338
+ export const Res = ApprovedAtRes;
339
+ }
340
+ export namespace RejectedAt {
341
+ export type Dto = RejectedAtDto;
342
+ export const Dto = RejectedAtDto;
343
+ export type Res = RejectedAtRes;
344
+ export const Res = RejectedAtRes;
345
+ }
346
+ export namespace ExpiresAt {
347
+ export type Dto = ExpiresAtDto;
348
+ export const Dto = ExpiresAtDto;
349
+ export type Res = ExpiresAtRes;
350
+ export const Res = ExpiresAtRes;
351
+ }
352
+ export namespace Id {
353
+ export type Res = IdRes;
354
+ export const Res = IdRes;
355
+ }
356
+ export namespace CreatedAt {
357
+ export type Res = CreatedAtRes;
358
+ export const Res = CreatedAtRes;
359
+ }
360
+ export namespace UpdatedAt {
361
+ export type Res = UpdatedAtRes;
362
+ export const Res = UpdatedAtRes;
363
+ }
364
+ }
365
+ }
@@ -0,0 +1,199 @@
1
+ // AUTO-GERADO: NÃO EDITAR MANUALMENTE. SUJEITO A PAULADAS!
2
+ /* eslint-disable @typescript-eslint/no-namespace */
3
+ import { ApiProperty, IntersectionType } from "@nestjs/swagger";
4
+ import { EnumKycDocumentType } from "@prisma/client";
5
+ import {
6
+ IsString,
7
+ IsNotEmpty,
8
+ IsBoolean,
9
+ IsArray,
10
+ IsEnum,
11
+ IsNumber,
12
+ IsOptional,
13
+ } from "src/_nest/validators";
14
+
15
+ class IsEnabledDto {
16
+ @ApiProperty({ type: "boolean", example: true, required: true })
17
+ @IsBoolean()
18
+ isEnabled!: boolean;
19
+ }
20
+
21
+ class MandatoryDocumentsDto {
22
+ @ApiProperty({
23
+ enum: EnumKycDocumentType,
24
+ example: Object.values(EnumKycDocumentType),
25
+ required: true,
26
+ isArray: true,
27
+ })
28
+ @IsArray()
29
+ @IsEnum(EnumKycDocumentType, { each: true })
30
+ mandatoryDocuments!: EnumKycDocumentType[];
31
+ }
32
+
33
+ class ExpirationInDaysDto {
34
+ @ApiProperty({ type: "number", example: 777, required: false })
35
+ @IsNumber()
36
+ @IsOptional()
37
+ expirationInDays?: number;
38
+ }
39
+
40
+ class MaxAttemptsDto {
41
+ @ApiProperty({ type: "number", example: 777, required: false })
42
+ @IsNumber()
43
+ @IsOptional()
44
+ maxAttempts?: number;
45
+ }
46
+
47
+ class TenantIdDto {
48
+ @ApiProperty({
49
+ type: "string",
50
+ example: "cmfxu4njg000008l52v7t8qze",
51
+ required: false,
52
+ })
53
+ @IsString()
54
+ @IsOptional()
55
+ tenantId?: string;
56
+ }
57
+
58
+ class KycConfigDto extends IntersectionType(
59
+ IsEnabledDto,
60
+ MandatoryDocumentsDto,
61
+ ExpirationInDaysDto,
62
+ MaxAttemptsDto,
63
+ TenantIdDto,
64
+ ) {}
65
+
66
+ class KycConfigId {
67
+ @ApiProperty({
68
+ type: "string",
69
+ example: "cmfxu4njg000008l52v7t8qze",
70
+ required: true,
71
+ })
72
+ @IsString()
73
+ @IsNotEmpty()
74
+ kycconfigId!: string;
75
+ }
76
+ class IdRes {
77
+ @ApiProperty({
78
+ type: "string",
79
+ example: "cmfxu4njg000008l52v7t8qze",
80
+ required: true,
81
+ })
82
+ id!: string;
83
+ }
84
+
85
+ class IsEnabledRes {
86
+ @ApiProperty({ type: "boolean", example: true, required: true })
87
+ isEnabled!: boolean;
88
+ }
89
+
90
+ class MandatoryDocumentsRes {
91
+ @ApiProperty({
92
+ enum: EnumKycDocumentType,
93
+ example: Object.values(EnumKycDocumentType),
94
+ required: true,
95
+ isArray: true,
96
+ })
97
+ mandatoryDocuments!: EnumKycDocumentType[];
98
+ }
99
+
100
+ class ExpirationInDaysRes {
101
+ @ApiProperty({ type: "number", example: 777, required: false })
102
+ expirationInDays?: number;
103
+ }
104
+
105
+ class MaxAttemptsRes {
106
+ @ApiProperty({ type: "number", example: 777, required: false })
107
+ maxAttempts?: number;
108
+ }
109
+
110
+ class TenantIdRes {
111
+ @ApiProperty({
112
+ type: "string",
113
+ example: "cmfxu4njg000008l52v7t8qze",
114
+ required: false,
115
+ })
116
+ tenantId?: string;
117
+ }
118
+
119
+ class CreatedAtRes {
120
+ @ApiProperty({
121
+ type: "string",
122
+ example: "2025-09-03T03:00:00.000Z",
123
+ required: true,
124
+ })
125
+ createdAt!: Date;
126
+ }
127
+
128
+ class UpdatedAtRes {
129
+ @ApiProperty({
130
+ type: "string",
131
+ example: "2025-09-03T03:00:00.000Z",
132
+ required: true,
133
+ })
134
+ updatedAt!: Date;
135
+ }
136
+
137
+ class KycConfigRes extends IntersectionType(
138
+ IdRes,
139
+ IsEnabledRes,
140
+ MandatoryDocumentsRes,
141
+ ExpirationInDaysRes,
142
+ MaxAttemptsRes,
143
+ TenantIdRes,
144
+ CreatedAtRes,
145
+ UpdatedAtRes,
146
+ ) {}
147
+ export namespace KycConfig {
148
+ export const Dto = KycConfigDto;
149
+ export type Dto = KycConfigDto;
150
+ export const Res = KycConfigRes;
151
+ export type Res = KycConfigRes;
152
+ export const Id = KycConfigId;
153
+ export type Id = KycConfigId;
154
+
155
+ export namespace Input {
156
+ export namespace IsEnabled {
157
+ export type Dto = IsEnabledDto;
158
+ export const Dto = IsEnabledDto;
159
+ export type Res = IsEnabledRes;
160
+ export const Res = IsEnabledRes;
161
+ }
162
+ export namespace MandatoryDocuments {
163
+ export type Dto = MandatoryDocumentsDto;
164
+ export const Dto = MandatoryDocumentsDto;
165
+ export type Res = MandatoryDocumentsRes;
166
+ export const Res = MandatoryDocumentsRes;
167
+ }
168
+ export namespace ExpirationInDays {
169
+ export type Dto = ExpirationInDaysDto;
170
+ export const Dto = ExpirationInDaysDto;
171
+ export type Res = ExpirationInDaysRes;
172
+ export const Res = ExpirationInDaysRes;
173
+ }
174
+ export namespace MaxAttempts {
175
+ export type Dto = MaxAttemptsDto;
176
+ export const Dto = MaxAttemptsDto;
177
+ export type Res = MaxAttemptsRes;
178
+ export const Res = MaxAttemptsRes;
179
+ }
180
+ export namespace TenantId {
181
+ export type Dto = TenantIdDto;
182
+ export const Dto = TenantIdDto;
183
+ export type Res = TenantIdRes;
184
+ export const Res = TenantIdRes;
185
+ }
186
+ export namespace Id {
187
+ export type Res = IdRes;
188
+ export const Res = IdRes;
189
+ }
190
+ export namespace CreatedAt {
191
+ export type Res = CreatedAtRes;
192
+ export const Res = CreatedAtRes;
193
+ }
194
+ export namespace UpdatedAt {
195
+ export type Res = UpdatedAtRes;
196
+ export const Res = UpdatedAtRes;
197
+ }
198
+ }
199
+ }