@flusys/nestjs-auth 5.1.1 → 5.1.2
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.
- package/cjs/dtos/company-branch.dto.js +109 -14
- package/cjs/dtos/company.dto.js +107 -12
- package/cjs/dtos/user.dto.js +34 -0
- package/cjs/services/branch.service.js +2 -0
- package/cjs/services/company.service.js +2 -0
- package/dtos/company-branch.dto.d.ts +13 -3
- package/dtos/company.dto.d.ts +13 -3
- package/fesm/dtos/company-branch.dto.js +109 -14
- package/fesm/dtos/company.dto.js +107 -12
- package/fesm/dtos/user.dto.js +34 -0
- package/fesm/services/branch.service.js +2 -0
- package/fesm/services/company.service.js +2 -0
- package/package.json +3 -3
package/cjs/dtos/user.dto.js
CHANGED
|
@@ -20,6 +20,7 @@ _export(exports, {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const _swagger = require("@nestjs/swagger");
|
|
23
|
+
const _classtransformer = require("class-transformer");
|
|
23
24
|
const _classvalidator = require("class-validator");
|
|
24
25
|
const _passwordvalidator = require("../validators/password.validator");
|
|
25
26
|
function _define_property(obj, key, value) {
|
|
@@ -58,6 +59,7 @@ let CreateUserDto = class CreateUserDto {
|
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
_ts_decorate([
|
|
62
|
+
(0, _classtransformer.Expose)(),
|
|
61
63
|
(0, _swagger.ApiProperty)({
|
|
62
64
|
example: 'John Doe',
|
|
63
65
|
description: 'Full name'
|
|
@@ -66,6 +68,7 @@ _ts_decorate([
|
|
|
66
68
|
_ts_metadata("design:type", String)
|
|
67
69
|
], CreateUserDto.prototype, "name", void 0);
|
|
68
70
|
_ts_decorate([
|
|
71
|
+
(0, _classtransformer.Expose)(),
|
|
69
72
|
(0, _swagger.ApiPropertyOptional)({
|
|
70
73
|
example: '+1234567890',
|
|
71
74
|
description: 'Phone number'
|
|
@@ -75,6 +78,7 @@ _ts_decorate([
|
|
|
75
78
|
_ts_metadata("design:type", String)
|
|
76
79
|
], CreateUserDto.prototype, "phone", void 0);
|
|
77
80
|
_ts_decorate([
|
|
81
|
+
(0, _classtransformer.Expose)(),
|
|
78
82
|
(0, _swagger.ApiProperty)({
|
|
79
83
|
example: 'john@example.com',
|
|
80
84
|
description: 'Email address'
|
|
@@ -83,6 +87,7 @@ _ts_decorate([
|
|
|
83
87
|
_ts_metadata("design:type", String)
|
|
84
88
|
], CreateUserDto.prototype, "email", void 0);
|
|
85
89
|
_ts_decorate([
|
|
90
|
+
(0, _classtransformer.Expose)(),
|
|
86
91
|
(0, _swagger.ApiProperty)({
|
|
87
92
|
example: 'SecureP@ss123',
|
|
88
93
|
description: 'Password (must meet complexity requirements)'
|
|
@@ -94,6 +99,7 @@ _ts_decorate([
|
|
|
94
99
|
_ts_metadata("design:type", String)
|
|
95
100
|
], CreateUserDto.prototype, "password", void 0);
|
|
96
101
|
_ts_decorate([
|
|
102
|
+
(0, _classtransformer.Expose)(),
|
|
97
103
|
(0, _swagger.ApiPropertyOptional)({
|
|
98
104
|
description: 'Profile picture file ID'
|
|
99
105
|
}),
|
|
@@ -102,6 +108,7 @@ _ts_decorate([
|
|
|
102
108
|
_ts_metadata("design:type", String)
|
|
103
109
|
], CreateUserDto.prototype, "profilePictureId", void 0);
|
|
104
110
|
_ts_decorate([
|
|
111
|
+
(0, _classtransformer.Expose)(),
|
|
105
112
|
(0, _swagger.ApiPropertyOptional)({
|
|
106
113
|
default: true,
|
|
107
114
|
description: 'Is user active'
|
|
@@ -111,6 +118,7 @@ _ts_decorate([
|
|
|
111
118
|
_ts_metadata("design:type", Boolean)
|
|
112
119
|
], CreateUserDto.prototype, "isActive", void 0);
|
|
113
120
|
_ts_decorate([
|
|
121
|
+
(0, _classtransformer.Expose)(),
|
|
114
122
|
(0, _swagger.ApiPropertyOptional)({
|
|
115
123
|
default: false,
|
|
116
124
|
description: 'Is email verified'
|
|
@@ -120,6 +128,7 @@ _ts_decorate([
|
|
|
120
128
|
_ts_metadata("design:type", Boolean)
|
|
121
129
|
], CreateUserDto.prototype, "emailVerified", void 0);
|
|
122
130
|
_ts_decorate([
|
|
131
|
+
(0, _classtransformer.Expose)(),
|
|
123
132
|
(0, _swagger.ApiPropertyOptional)({
|
|
124
133
|
default: false,
|
|
125
134
|
description: 'Is phone verified'
|
|
@@ -129,6 +138,7 @@ _ts_decorate([
|
|
|
129
138
|
_ts_metadata("design:type", Boolean)
|
|
130
139
|
], CreateUserDto.prototype, "phoneVerified", void 0);
|
|
131
140
|
_ts_decorate([
|
|
141
|
+
(0, _classtransformer.Expose)(),
|
|
132
142
|
(0, _swagger.ApiPropertyOptional)({
|
|
133
143
|
description: 'Additional custom fields'
|
|
134
144
|
}),
|
|
@@ -152,6 +162,7 @@ let UpdateUserDto = class UpdateUserDto {
|
|
|
152
162
|
}
|
|
153
163
|
};
|
|
154
164
|
_ts_decorate([
|
|
165
|
+
(0, _classtransformer.Expose)(),
|
|
155
166
|
(0, _swagger.ApiProperty)({
|
|
156
167
|
description: 'User ID'
|
|
157
168
|
}),
|
|
@@ -159,6 +170,7 @@ _ts_decorate([
|
|
|
159
170
|
_ts_metadata("design:type", String)
|
|
160
171
|
], UpdateUserDto.prototype, "id", void 0);
|
|
161
172
|
_ts_decorate([
|
|
173
|
+
(0, _classtransformer.Expose)(),
|
|
162
174
|
(0, _swagger.ApiPropertyOptional)({
|
|
163
175
|
example: 'John Doe',
|
|
164
176
|
description: 'Full name'
|
|
@@ -168,6 +180,7 @@ _ts_decorate([
|
|
|
168
180
|
_ts_metadata("design:type", String)
|
|
169
181
|
], UpdateUserDto.prototype, "name", void 0);
|
|
170
182
|
_ts_decorate([
|
|
183
|
+
(0, _classtransformer.Expose)(),
|
|
171
184
|
(0, _swagger.ApiPropertyOptional)({
|
|
172
185
|
example: '+1234567890',
|
|
173
186
|
description: 'Phone number'
|
|
@@ -177,6 +190,7 @@ _ts_decorate([
|
|
|
177
190
|
_ts_metadata("design:type", String)
|
|
178
191
|
], UpdateUserDto.prototype, "phone", void 0);
|
|
179
192
|
_ts_decorate([
|
|
193
|
+
(0, _classtransformer.Expose)(),
|
|
180
194
|
(0, _swagger.ApiPropertyOptional)({
|
|
181
195
|
example: 'john@example.com',
|
|
182
196
|
description: 'Email address'
|
|
@@ -186,6 +200,7 @@ _ts_decorate([
|
|
|
186
200
|
_ts_metadata("design:type", String)
|
|
187
201
|
], UpdateUserDto.prototype, "email", void 0);
|
|
188
202
|
_ts_decorate([
|
|
203
|
+
(0, _classtransformer.Expose)(),
|
|
189
204
|
(0, _swagger.ApiPropertyOptional)({
|
|
190
205
|
description: 'New password (must meet complexity requirements)'
|
|
191
206
|
}),
|
|
@@ -196,6 +211,7 @@ _ts_decorate([
|
|
|
196
211
|
_ts_metadata("design:type", String)
|
|
197
212
|
], UpdateUserDto.prototype, "password", void 0);
|
|
198
213
|
_ts_decorate([
|
|
214
|
+
(0, _classtransformer.Expose)(),
|
|
199
215
|
(0, _swagger.ApiPropertyOptional)({
|
|
200
216
|
description: 'Current password (required when changing password on own profile)'
|
|
201
217
|
}),
|
|
@@ -204,6 +220,7 @@ _ts_decorate([
|
|
|
204
220
|
_ts_metadata("design:type", String)
|
|
205
221
|
], UpdateUserDto.prototype, "oldPassword", void 0);
|
|
206
222
|
_ts_decorate([
|
|
223
|
+
(0, _classtransformer.Expose)(),
|
|
207
224
|
(0, _swagger.ApiPropertyOptional)({
|
|
208
225
|
description: 'Profile picture file ID'
|
|
209
226
|
}),
|
|
@@ -212,6 +229,7 @@ _ts_decorate([
|
|
|
212
229
|
_ts_metadata("design:type", String)
|
|
213
230
|
], UpdateUserDto.prototype, "profilePictureId", void 0);
|
|
214
231
|
_ts_decorate([
|
|
232
|
+
(0, _classtransformer.Expose)(),
|
|
215
233
|
(0, _swagger.ApiPropertyOptional)({
|
|
216
234
|
description: 'Is user active'
|
|
217
235
|
}),
|
|
@@ -220,6 +238,7 @@ _ts_decorate([
|
|
|
220
238
|
_ts_metadata("design:type", Boolean)
|
|
221
239
|
], UpdateUserDto.prototype, "isActive", void 0);
|
|
222
240
|
_ts_decorate([
|
|
241
|
+
(0, _classtransformer.Expose)(),
|
|
223
242
|
(0, _swagger.ApiPropertyOptional)({
|
|
224
243
|
description: 'Is email verified'
|
|
225
244
|
}),
|
|
@@ -228,6 +247,7 @@ _ts_decorate([
|
|
|
228
247
|
_ts_metadata("design:type", Boolean)
|
|
229
248
|
], UpdateUserDto.prototype, "emailVerified", void 0);
|
|
230
249
|
_ts_decorate([
|
|
250
|
+
(0, _classtransformer.Expose)(),
|
|
231
251
|
(0, _swagger.ApiPropertyOptional)({
|
|
232
252
|
description: 'Is phone verified'
|
|
233
253
|
}),
|
|
@@ -236,6 +256,7 @@ _ts_decorate([
|
|
|
236
256
|
_ts_metadata("design:type", Boolean)
|
|
237
257
|
], UpdateUserDto.prototype, "phoneVerified", void 0);
|
|
238
258
|
_ts_decorate([
|
|
259
|
+
(0, _classtransformer.Expose)(),
|
|
239
260
|
(0, _swagger.ApiPropertyOptional)({
|
|
240
261
|
description: 'Additional custom fields'
|
|
241
262
|
}),
|
|
@@ -261,18 +282,21 @@ let UserResponseDto = class UserResponseDto {
|
|
|
261
282
|
}
|
|
262
283
|
};
|
|
263
284
|
_ts_decorate([
|
|
285
|
+
(0, _classtransformer.Expose)(),
|
|
264
286
|
(0, _swagger.ApiProperty)({
|
|
265
287
|
example: '550e8400-e29b-41d4-a716-446655440000'
|
|
266
288
|
}),
|
|
267
289
|
_ts_metadata("design:type", String)
|
|
268
290
|
], UserResponseDto.prototype, "id", void 0);
|
|
269
291
|
_ts_decorate([
|
|
292
|
+
(0, _classtransformer.Expose)(),
|
|
270
293
|
(0, _swagger.ApiProperty)({
|
|
271
294
|
example: 'John Doe'
|
|
272
295
|
}),
|
|
273
296
|
_ts_metadata("design:type", String)
|
|
274
297
|
], UserResponseDto.prototype, "name", void 0);
|
|
275
298
|
_ts_decorate([
|
|
299
|
+
(0, _classtransformer.Expose)(),
|
|
276
300
|
(0, _swagger.ApiPropertyOptional)({
|
|
277
301
|
example: '+1-555-123-4567',
|
|
278
302
|
nullable: true
|
|
@@ -280,12 +304,14 @@ _ts_decorate([
|
|
|
280
304
|
_ts_metadata("design:type", Object)
|
|
281
305
|
], UserResponseDto.prototype, "phone", void 0);
|
|
282
306
|
_ts_decorate([
|
|
307
|
+
(0, _classtransformer.Expose)(),
|
|
283
308
|
(0, _swagger.ApiProperty)({
|
|
284
309
|
example: 'john@example.com'
|
|
285
310
|
}),
|
|
286
311
|
_ts_metadata("design:type", String)
|
|
287
312
|
], UserResponseDto.prototype, "email", void 0);
|
|
288
313
|
_ts_decorate([
|
|
314
|
+
(0, _classtransformer.Expose)(),
|
|
289
315
|
(0, _swagger.ApiPropertyOptional)({
|
|
290
316
|
example: 'pic_abc123',
|
|
291
317
|
nullable: true
|
|
@@ -293,24 +319,28 @@ _ts_decorate([
|
|
|
293
319
|
_ts_metadata("design:type", Object)
|
|
294
320
|
], UserResponseDto.prototype, "profilePictureId", void 0);
|
|
295
321
|
_ts_decorate([
|
|
322
|
+
(0, _classtransformer.Expose)(),
|
|
296
323
|
(0, _swagger.ApiProperty)({
|
|
297
324
|
example: true
|
|
298
325
|
}),
|
|
299
326
|
_ts_metadata("design:type", Boolean)
|
|
300
327
|
], UserResponseDto.prototype, "isActive", void 0);
|
|
301
328
|
_ts_decorate([
|
|
329
|
+
(0, _classtransformer.Expose)(),
|
|
302
330
|
(0, _swagger.ApiProperty)({
|
|
303
331
|
example: true
|
|
304
332
|
}),
|
|
305
333
|
_ts_metadata("design:type", Boolean)
|
|
306
334
|
], UserResponseDto.prototype, "emailVerified", void 0);
|
|
307
335
|
_ts_decorate([
|
|
336
|
+
(0, _classtransformer.Expose)(),
|
|
308
337
|
(0, _swagger.ApiProperty)({
|
|
309
338
|
example: false
|
|
310
339
|
}),
|
|
311
340
|
_ts_metadata("design:type", Boolean)
|
|
312
341
|
], UserResponseDto.prototype, "phoneVerified", void 0);
|
|
313
342
|
_ts_decorate([
|
|
343
|
+
(0, _classtransformer.Expose)(),
|
|
314
344
|
(0, _swagger.ApiPropertyOptional)({
|
|
315
345
|
example: '2024-12-18T10:30:00.000Z',
|
|
316
346
|
nullable: true
|
|
@@ -318,6 +348,7 @@ _ts_decorate([
|
|
|
318
348
|
_ts_metadata("design:type", Object)
|
|
319
349
|
], UserResponseDto.prototype, "lastLoginAt", void 0);
|
|
320
350
|
_ts_decorate([
|
|
351
|
+
(0, _classtransformer.Expose)(),
|
|
321
352
|
(0, _swagger.ApiPropertyOptional)({
|
|
322
353
|
example: {
|
|
323
354
|
department: 'Engineering',
|
|
@@ -328,18 +359,21 @@ _ts_decorate([
|
|
|
328
359
|
_ts_metadata("design:type", Object)
|
|
329
360
|
], UserResponseDto.prototype, "additionalFields", void 0);
|
|
330
361
|
_ts_decorate([
|
|
362
|
+
(0, _classtransformer.Expose)(),
|
|
331
363
|
(0, _swagger.ApiProperty)({
|
|
332
364
|
example: '2024-01-15T10:30:00.000Z'
|
|
333
365
|
}),
|
|
334
366
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
335
367
|
], UserResponseDto.prototype, "createdAt", void 0);
|
|
336
368
|
_ts_decorate([
|
|
369
|
+
(0, _classtransformer.Expose)(),
|
|
337
370
|
(0, _swagger.ApiProperty)({
|
|
338
371
|
example: '2024-12-18T14:45:00.000Z'
|
|
339
372
|
}),
|
|
340
373
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
341
374
|
], UserResponseDto.prototype, "updatedAt", void 0);
|
|
342
375
|
_ts_decorate([
|
|
376
|
+
(0, _classtransformer.Expose)(),
|
|
343
377
|
(0, _swagger.ApiPropertyOptional)({
|
|
344
378
|
example: null,
|
|
345
379
|
nullable: true
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
1
2
|
export declare class CreateCompanyBranchDto {
|
|
2
3
|
name: string;
|
|
3
4
|
slug: string;
|
|
@@ -15,9 +16,18 @@ declare const UpdateCompanyBranchDto_base: import("@nestjs/common").Type<Partial
|
|
|
15
16
|
export declare class UpdateCompanyBranchDto extends UpdateCompanyBranchDto_base {
|
|
16
17
|
id: string;
|
|
17
18
|
}
|
|
18
|
-
export declare class CompanyBranchResponseDto extends
|
|
19
|
+
export declare class CompanyBranchResponseDto extends IdentityResponseDto {
|
|
20
|
+
name: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
companyId: string;
|
|
23
|
+
parentId?: string | null;
|
|
24
|
+
logoId?: string | null;
|
|
25
|
+
address?: string | null;
|
|
26
|
+
phone?: string | null;
|
|
27
|
+
email?: string | null;
|
|
28
|
+
serial?: number | null;
|
|
29
|
+
isActive: boolean;
|
|
19
30
|
readOnly: boolean;
|
|
20
|
-
|
|
21
|
-
updatedAt: Date;
|
|
31
|
+
additionalFields?: Record<string, any> | null;
|
|
22
32
|
}
|
|
23
33
|
export {};
|
package/dtos/company.dto.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
1
2
|
export declare class CreateCompanyDto {
|
|
2
3
|
name: string;
|
|
3
4
|
slug: string;
|
|
@@ -15,9 +16,18 @@ declare const UpdateCompanyDto_base: import("@nestjs/common").Type<Partial<Creat
|
|
|
15
16
|
export declare class UpdateCompanyDto extends UpdateCompanyDto_base {
|
|
16
17
|
id: string;
|
|
17
18
|
}
|
|
18
|
-
export declare class CompanyResponseDto extends
|
|
19
|
+
export declare class CompanyResponseDto extends IdentityResponseDto {
|
|
20
|
+
name: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
logoId?: string | null;
|
|
23
|
+
address?: string | null;
|
|
24
|
+
phone?: string | null;
|
|
25
|
+
email?: string | null;
|
|
26
|
+
website?: string | null;
|
|
27
|
+
serial?: number | null;
|
|
28
|
+
isActive: boolean;
|
|
19
29
|
readOnly: boolean;
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
settings?: Record<string, any> | null;
|
|
31
|
+
additionalFields?: Record<string, any> | null;
|
|
22
32
|
}
|
|
23
33
|
export {};
|
|
@@ -20,7 +20,9 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
20
20
|
function _ts_metadata(k, v) {
|
|
21
21
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
22
|
}
|
|
23
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
23
24
|
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
|
25
|
+
import { Expose } from 'class-transformer';
|
|
24
26
|
import { IsBoolean, IsEmail, IsNumber, IsObject, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
25
27
|
/**
|
|
26
28
|
* Create Company Branch DTO
|
|
@@ -40,6 +42,7 @@ import { IsBoolean, IsEmail, IsNumber, IsObject, IsOptional, IsString, IsUUID }
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
_ts_decorate([
|
|
45
|
+
Expose(),
|
|
43
46
|
ApiProperty({
|
|
44
47
|
example: 'Main Branch',
|
|
45
48
|
description: 'Branch name'
|
|
@@ -48,6 +51,7 @@ _ts_decorate([
|
|
|
48
51
|
_ts_metadata("design:type", String)
|
|
49
52
|
], CreateCompanyBranchDto.prototype, "name", void 0);
|
|
50
53
|
_ts_decorate([
|
|
54
|
+
Expose(),
|
|
51
55
|
ApiProperty({
|
|
52
56
|
example: 'main-branch',
|
|
53
57
|
description: 'URL-friendly slug'
|
|
@@ -56,6 +60,7 @@ _ts_decorate([
|
|
|
56
60
|
_ts_metadata("design:type", String)
|
|
57
61
|
], CreateCompanyBranchDto.prototype, "slug", void 0);
|
|
58
62
|
_ts_decorate([
|
|
63
|
+
Expose(),
|
|
59
64
|
ApiProperty({
|
|
60
65
|
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
61
66
|
description: 'Parent company ID'
|
|
@@ -64,6 +69,7 @@ _ts_decorate([
|
|
|
64
69
|
_ts_metadata("design:type", String)
|
|
65
70
|
], CreateCompanyBranchDto.prototype, "companyId", void 0);
|
|
66
71
|
_ts_decorate([
|
|
72
|
+
Expose(),
|
|
67
73
|
ApiPropertyOptional({
|
|
68
74
|
example: '550e8400-e29b-41d4-a716-446655440003',
|
|
69
75
|
description: 'Parent branch ID (for hierarchical branches)'
|
|
@@ -73,6 +79,7 @@ _ts_decorate([
|
|
|
73
79
|
_ts_metadata("design:type", String)
|
|
74
80
|
], CreateCompanyBranchDto.prototype, "parentId", void 0);
|
|
75
81
|
_ts_decorate([
|
|
82
|
+
Expose(),
|
|
76
83
|
ApiPropertyOptional({
|
|
77
84
|
example: 'logo_xyz789',
|
|
78
85
|
description: 'Branch logo file ID'
|
|
@@ -82,6 +89,7 @@ _ts_decorate([
|
|
|
82
89
|
_ts_metadata("design:type", String)
|
|
83
90
|
], CreateCompanyBranchDto.prototype, "logoId", void 0);
|
|
84
91
|
_ts_decorate([
|
|
92
|
+
Expose(),
|
|
85
93
|
ApiPropertyOptional({
|
|
86
94
|
example: '456 Oak Ave, Los Angeles, CA 90001',
|
|
87
95
|
description: 'Branch address'
|
|
@@ -91,6 +99,7 @@ _ts_decorate([
|
|
|
91
99
|
_ts_metadata("design:type", String)
|
|
92
100
|
], CreateCompanyBranchDto.prototype, "address", void 0);
|
|
93
101
|
_ts_decorate([
|
|
102
|
+
Expose(),
|
|
94
103
|
ApiPropertyOptional({
|
|
95
104
|
example: '+1-555-987-6543',
|
|
96
105
|
description: 'Branch phone number'
|
|
@@ -100,6 +109,7 @@ _ts_decorate([
|
|
|
100
109
|
_ts_metadata("design:type", String)
|
|
101
110
|
], CreateCompanyBranchDto.prototype, "phone", void 0);
|
|
102
111
|
_ts_decorate([
|
|
112
|
+
Expose(),
|
|
103
113
|
ApiPropertyOptional({
|
|
104
114
|
example: 'branch@acme.com',
|
|
105
115
|
description: 'Branch email address'
|
|
@@ -109,6 +119,7 @@ _ts_decorate([
|
|
|
109
119
|
_ts_metadata("design:type", String)
|
|
110
120
|
], CreateCompanyBranchDto.prototype, "email", void 0);
|
|
111
121
|
_ts_decorate([
|
|
122
|
+
Expose(),
|
|
112
123
|
ApiPropertyOptional({
|
|
113
124
|
example: 1,
|
|
114
125
|
description: 'Sort order'
|
|
@@ -118,6 +129,7 @@ _ts_decorate([
|
|
|
118
129
|
_ts_metadata("design:type", Number)
|
|
119
130
|
], CreateCompanyBranchDto.prototype, "serial", void 0);
|
|
120
131
|
_ts_decorate([
|
|
132
|
+
Expose(),
|
|
121
133
|
ApiPropertyOptional({
|
|
122
134
|
example: true,
|
|
123
135
|
default: true,
|
|
@@ -128,6 +140,7 @@ _ts_decorate([
|
|
|
128
140
|
_ts_metadata("design:type", Boolean)
|
|
129
141
|
], CreateCompanyBranchDto.prototype, "isActive", void 0);
|
|
130
142
|
_ts_decorate([
|
|
143
|
+
Expose(),
|
|
131
144
|
ApiPropertyOptional({
|
|
132
145
|
example: {
|
|
133
146
|
timezone: 'America/Los_Angeles',
|
|
@@ -147,6 +160,7 @@ _ts_decorate([
|
|
|
147
160
|
}
|
|
148
161
|
}
|
|
149
162
|
_ts_decorate([
|
|
163
|
+
Expose(),
|
|
150
164
|
ApiProperty({
|
|
151
165
|
example: '550e8400-e29b-41d4-a716-446655440002',
|
|
152
166
|
description: 'Branch ID'
|
|
@@ -156,29 +170,110 @@ _ts_decorate([
|
|
|
156
170
|
], UpdateCompanyBranchDto.prototype, "id", void 0);
|
|
157
171
|
/**
|
|
158
172
|
* Company Branch Response DTO
|
|
159
|
-
*/ export class CompanyBranchResponseDto extends
|
|
173
|
+
*/ export class CompanyBranchResponseDto extends IdentityResponseDto {
|
|
160
174
|
constructor(...args){
|
|
161
|
-
super(...args), _define_property(this, "
|
|
175
|
+
super(...args), _define_property(this, "name", void 0), _define_property(this, "slug", void 0), _define_property(this, "companyId", void 0), _define_property(this, "parentId", void 0), _define_property(this, "logoId", void 0), _define_property(this, "address", void 0), _define_property(this, "phone", void 0), _define_property(this, "email", void 0), _define_property(this, "serial", void 0), _define_property(this, "isActive", void 0), _define_property(this, "readOnly", void 0), _define_property(this, "additionalFields", void 0);
|
|
162
176
|
}
|
|
163
177
|
}
|
|
164
178
|
_ts_decorate([
|
|
179
|
+
Expose(),
|
|
165
180
|
ApiProperty({
|
|
166
|
-
example:
|
|
167
|
-
description: '
|
|
181
|
+
example: 'Main Branch',
|
|
182
|
+
description: 'Branch name'
|
|
168
183
|
}),
|
|
169
|
-
_ts_metadata("design:type",
|
|
170
|
-
], CompanyBranchResponseDto.prototype, "
|
|
184
|
+
_ts_metadata("design:type", String)
|
|
185
|
+
], CompanyBranchResponseDto.prototype, "name", void 0);
|
|
171
186
|
_ts_decorate([
|
|
187
|
+
Expose(),
|
|
172
188
|
ApiProperty({
|
|
173
|
-
example: '
|
|
174
|
-
description: '
|
|
189
|
+
example: 'main-branch',
|
|
190
|
+
description: 'URL-friendly slug'
|
|
175
191
|
}),
|
|
176
|
-
_ts_metadata("design:type",
|
|
177
|
-
], CompanyBranchResponseDto.prototype, "
|
|
192
|
+
_ts_metadata("design:type", String)
|
|
193
|
+
], CompanyBranchResponseDto.prototype, "slug", void 0);
|
|
178
194
|
_ts_decorate([
|
|
195
|
+
Expose(),
|
|
179
196
|
ApiProperty({
|
|
180
|
-
example: '
|
|
181
|
-
description: '
|
|
197
|
+
example: '550e8400-e29b-41d4-a716-446655440001',
|
|
198
|
+
description: 'Parent company ID'
|
|
199
|
+
}),
|
|
200
|
+
_ts_metadata("design:type", String)
|
|
201
|
+
], CompanyBranchResponseDto.prototype, "companyId", void 0);
|
|
202
|
+
_ts_decorate([
|
|
203
|
+
Expose(),
|
|
204
|
+
ApiPropertyOptional({
|
|
205
|
+
example: '550e8400-e29b-41d4-a716-446655440003',
|
|
206
|
+
description: 'Parent branch ID',
|
|
207
|
+
nullable: true
|
|
208
|
+
}),
|
|
209
|
+
_ts_metadata("design:type", Object)
|
|
210
|
+
], CompanyBranchResponseDto.prototype, "parentId", void 0);
|
|
211
|
+
_ts_decorate([
|
|
212
|
+
Expose(),
|
|
213
|
+
ApiPropertyOptional({
|
|
214
|
+
example: 'logo_xyz789',
|
|
215
|
+
description: 'Branch logo file ID',
|
|
216
|
+
nullable: true
|
|
217
|
+
}),
|
|
218
|
+
_ts_metadata("design:type", Object)
|
|
219
|
+
], CompanyBranchResponseDto.prototype, "logoId", void 0);
|
|
220
|
+
_ts_decorate([
|
|
221
|
+
Expose(),
|
|
222
|
+
ApiPropertyOptional({
|
|
223
|
+
example: '456 Oak Ave, Los Angeles, CA 90001',
|
|
224
|
+
description: 'Branch address',
|
|
225
|
+
nullable: true
|
|
226
|
+
}),
|
|
227
|
+
_ts_metadata("design:type", Object)
|
|
228
|
+
], CompanyBranchResponseDto.prototype, "address", void 0);
|
|
229
|
+
_ts_decorate([
|
|
230
|
+
Expose(),
|
|
231
|
+
ApiPropertyOptional({
|
|
232
|
+
example: '+1-555-987-6543',
|
|
233
|
+
description: 'Branch phone number',
|
|
234
|
+
nullable: true
|
|
235
|
+
}),
|
|
236
|
+
_ts_metadata("design:type", Object)
|
|
237
|
+
], CompanyBranchResponseDto.prototype, "phone", void 0);
|
|
238
|
+
_ts_decorate([
|
|
239
|
+
Expose(),
|
|
240
|
+
ApiPropertyOptional({
|
|
241
|
+
example: 'branch@acme.com',
|
|
242
|
+
description: 'Branch email address',
|
|
243
|
+
nullable: true
|
|
244
|
+
}),
|
|
245
|
+
_ts_metadata("design:type", Object)
|
|
246
|
+
], CompanyBranchResponseDto.prototype, "email", void 0);
|
|
247
|
+
_ts_decorate([
|
|
248
|
+
Expose(),
|
|
249
|
+
ApiPropertyOptional({
|
|
250
|
+
example: 1,
|
|
251
|
+
description: 'Sort order',
|
|
252
|
+
nullable: true
|
|
253
|
+
}),
|
|
254
|
+
_ts_metadata("design:type", Object)
|
|
255
|
+
], CompanyBranchResponseDto.prototype, "serial", void 0);
|
|
256
|
+
_ts_decorate([
|
|
257
|
+
Expose(),
|
|
258
|
+
ApiProperty({
|
|
259
|
+
example: true,
|
|
260
|
+
description: 'Is branch active'
|
|
261
|
+
}),
|
|
262
|
+
_ts_metadata("design:type", Boolean)
|
|
263
|
+
], CompanyBranchResponseDto.prototype, "isActive", void 0);
|
|
264
|
+
_ts_decorate([
|
|
265
|
+
Expose(),
|
|
266
|
+
ApiProperty({
|
|
267
|
+
example: false,
|
|
268
|
+
description: 'Is read-only'
|
|
269
|
+
}),
|
|
270
|
+
_ts_metadata("design:type", Boolean)
|
|
271
|
+
], CompanyBranchResponseDto.prototype, "readOnly", void 0);
|
|
272
|
+
_ts_decorate([
|
|
273
|
+
Expose(),
|
|
274
|
+
ApiPropertyOptional({
|
|
275
|
+
description: 'Additional custom fields',
|
|
276
|
+
nullable: true
|
|
182
277
|
}),
|
|
183
|
-
_ts_metadata("design:type",
|
|
184
|
-
], CompanyBranchResponseDto.prototype, "
|
|
278
|
+
_ts_metadata("design:type", Object)
|
|
279
|
+
], CompanyBranchResponseDto.prototype, "additionalFields", void 0);
|