@kl1/contracts 1.1.26-uat → 1.1.28-uat
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/dist/index.js +324 -184
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +323 -184
- package/dist/index.mjs.map +1 -1
- package/dist/src/business-calendar/index.d.ts +784 -0
- package/dist/src/business-calendar/index.d.ts.map +1 -0
- package/dist/src/business-calendar/schema.d.ts +169 -0
- package/dist/src/business-calendar/schema.d.ts.map +1 -0
- package/dist/src/business-calendar/validation.d.ts +210 -0
- package/dist/src/business-calendar/validation.d.ts.map +1 -0
- package/dist/src/chat/index.d.ts +1667 -141
- package/dist/src/chat/index.d.ts.map +1 -1
- package/dist/src/chat/schema.d.ts +236 -0
- package/dist/src/chat/schema.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +308 -0
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +4071 -360
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/cx-log/index.d.ts +106 -0
- package/dist/src/cx-log/index.d.ts.map +1 -1
- package/dist/src/cx-log/schema.d.ts +164 -0
- package/dist/src/cx-log/schema.d.ts.map +1 -1
- package/dist/src/instagram/index.d.ts +154 -0
- package/dist/src/instagram/index.d.ts.map +1 -1
- package/dist/src/line/index.d.ts +154 -0
- package/dist/src/line/index.d.ts.map +1 -1
- package/dist/src/mail/mail-contract.d.ts +390 -0
- package/dist/src/mail/mail-contract.d.ts.map +1 -1
- package/dist/src/mail/room-contract.d.ts +390 -0
- package/dist/src/mail/room-contract.d.ts.map +1 -1
- package/dist/src/mail/schemas/room-validation.schema.d.ts +130 -0
- package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
- package/dist/src/mail/schemas/room.schema.d.ts +106 -0
- package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
- package/dist/src/messenger/index.d.ts +154 -0
- package/dist/src/messenger/index.d.ts.map +1 -1
- package/dist/src/viber/index.d.ts +154 -0
- package/dist/src/viber/index.d.ts.map +1 -1
- package/dist/src/webchat/index.d.ts +154 -0
- package/dist/src/webchat/index.d.ts.map +1 -1
- package/dist/src/wrap-up-form/index.d.ts +294 -0
- package/dist/src/wrap-up-form/index.d.ts.map +1 -1
- package/dist/src/wrap-up-form/schema.d.ts +58 -0
- package/dist/src/wrap-up-form/schema.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// src/contract.ts
|
2
|
-
import { initContract as
|
2
|
+
import { initContract as initContract42 } from "@ts-rest/core";
|
3
3
|
|
4
4
|
// src/activity-log/index.ts
|
5
5
|
import { initContract } from "@ts-rest/core";
|
@@ -988,6 +988,18 @@ var TelephonyDropdownListSchema = z23.object({
|
|
988
988
|
|
989
989
|
// src/wrap-up-form/schema.ts
|
990
990
|
import z24 from "zod";
|
991
|
+
var CustomFieldSchema = z24.object({
|
992
|
+
id: z24.string().uuid(),
|
993
|
+
createdAt: z24.date(),
|
994
|
+
updatedAt: z24.date(),
|
995
|
+
deletedAt: z24.date().nullable(),
|
996
|
+
textValue: z24.string().nullable(),
|
997
|
+
booleanValue: z24.boolean().nullable(),
|
998
|
+
numberValue: z24.number().nullable(),
|
999
|
+
dateValue: z24.date().nullable(),
|
1000
|
+
entityId: z24.string().uuid(),
|
1001
|
+
attributeId: z24.string().uuid()
|
1002
|
+
});
|
991
1003
|
var WrapUpFormSchema = DefaultEntitySchema.extend({
|
992
1004
|
note: z24.string().nullable(),
|
993
1005
|
disposition: z24.string().nullable(),
|
@@ -995,7 +1007,8 @@ var WrapUpFormSchema = DefaultEntitySchema.extend({
|
|
995
1007
|
tags: z24.array(TagSchema),
|
996
1008
|
categories: z24.array(CategorySchema),
|
997
1009
|
callFrom: z24.string().nullable(),
|
998
|
-
callTo: z24.string().nullable()
|
1010
|
+
callTo: z24.string().nullable(),
|
1011
|
+
customFields: z24.array(CustomFieldSchema).optional()
|
999
1012
|
});
|
1000
1013
|
|
1001
1014
|
// src/cx-log/schema.ts
|
@@ -1343,7 +1356,7 @@ import z29 from "zod";
|
|
1343
1356
|
|
1344
1357
|
// src/custom-field/schema.ts
|
1345
1358
|
import z28 from "zod";
|
1346
|
-
var
|
1359
|
+
var CustomFieldSchema2 = DefaultEntitySchema.extend({
|
1347
1360
|
textValue: z28.string().nullable(),
|
1348
1361
|
booleanValue: z28.boolean().nullable(),
|
1349
1362
|
numberValue: z28.number().nullable(),
|
@@ -1367,7 +1380,7 @@ var GetRoomsSchema = z29.object({
|
|
1367
1380
|
address: z29.string().optional(),
|
1368
1381
|
contactGroups: z29.string().array().optional(),
|
1369
1382
|
selectedDate: z29.string().optional(),
|
1370
|
-
customFields: z29.array(
|
1383
|
+
customFields: z29.array(CustomFieldSchema2).optional(),
|
1371
1384
|
tags: z29.string().array().optional(),
|
1372
1385
|
phone: z29.string().optional(),
|
1373
1386
|
email: z29.string().optional(),
|
@@ -2753,7 +2766,7 @@ var ContactContractValidationSchema = {
|
|
2753
2766
|
})
|
2754
2767
|
)
|
2755
2768
|
}),
|
2756
|
-
response:
|
2769
|
+
response: CustomFieldSchema2
|
2757
2770
|
}
|
2758
2771
|
};
|
2759
2772
|
|
@@ -7197,179 +7210,301 @@ var snippetContract = initContract39().router(
|
|
7197
7210
|
}
|
7198
7211
|
);
|
7199
7212
|
|
7200
|
-
// src/
|
7213
|
+
// src/business-calendar/index.ts
|
7201
7214
|
import { initContract as initContract40 } from "@ts-rest/core";
|
7215
|
+
|
7216
|
+
// src/business-calendar/validation.ts
|
7217
|
+
import z104 from "zod";
|
7218
|
+
var TimeSlotDataSchema = z104.any();
|
7219
|
+
var CreateBusinessHourSchema = z104.object({
|
7220
|
+
day: z104.string(),
|
7221
|
+
isEnabled: z104.boolean(),
|
7222
|
+
timeSlots: TimeSlotDataSchema
|
7223
|
+
}).array();
|
7224
|
+
var UpdateBusinessHourSchema = z104.object({
|
7225
|
+
id: z104.string(),
|
7226
|
+
day: z104.string(),
|
7227
|
+
isEnabled: z104.boolean(),
|
7228
|
+
timeSlots: TimeSlotDataSchema
|
7229
|
+
}).array();
|
7230
|
+
var CreateHolidaySchema = z104.object({
|
7231
|
+
name: z104.string(),
|
7232
|
+
date: z104.string(),
|
7233
|
+
isEnabled: z104.boolean()
|
7234
|
+
}).array();
|
7235
|
+
var UpdateHolidaySchema = z104.object({
|
7236
|
+
id: z104.string(),
|
7237
|
+
name: z104.string(),
|
7238
|
+
date: z104.string(),
|
7239
|
+
isEnabled: z104.boolean()
|
7240
|
+
}).array();
|
7241
|
+
var CreateBusinessCalendarSchema = z104.object({
|
7242
|
+
name: z104.string(),
|
7243
|
+
description: z104.string().optional(),
|
7244
|
+
timeZone: z104.string(),
|
7245
|
+
isEnabled: z104.boolean(),
|
7246
|
+
channelIds: z104.string().array(),
|
7247
|
+
businessHours: CreateBusinessHourSchema,
|
7248
|
+
holidays: CreateHolidaySchema
|
7249
|
+
});
|
7250
|
+
var UpdateBusinessCalendarSchema = z104.object({
|
7251
|
+
id: z104.string(),
|
7252
|
+
name: z104.string(),
|
7253
|
+
description: z104.string().optional(),
|
7254
|
+
timeZone: z104.string(),
|
7255
|
+
isEnabled: z104.boolean(),
|
7256
|
+
channelIds: z104.string().array(),
|
7257
|
+
businessHours: UpdateBusinessHourSchema,
|
7258
|
+
holidays: UpdateHolidaySchema
|
7259
|
+
});
|
7260
|
+
var DeleteBusinessCalendarSchema = z104.object({
|
7261
|
+
id: z104.string()
|
7262
|
+
});
|
7263
|
+
|
7264
|
+
// src/business-calendar/schema.ts
|
7265
|
+
import z105 from "zod";
|
7266
|
+
var TimeSlotDataSchema2 = z105.any();
|
7267
|
+
var BusinessHourSchema = DefaultEntitySchema.extend({
|
7268
|
+
day: z105.string(),
|
7269
|
+
isEnabled: z105.boolean(),
|
7270
|
+
timeSlots: TimeSlotDataSchema2
|
7271
|
+
});
|
7272
|
+
var HolidaySchema = DefaultEntitySchema.extend({
|
7273
|
+
name: z105.string(),
|
7274
|
+
date: z105.string(),
|
7275
|
+
isEnabled: z105.boolean()
|
7276
|
+
});
|
7277
|
+
var BusinessCalendarSchema = DefaultEntitySchema.extend({
|
7278
|
+
name: z105.string(),
|
7279
|
+
description: z105.string().optional(),
|
7280
|
+
timeZone: z105.string(),
|
7281
|
+
isEnabled: z105.boolean(),
|
7282
|
+
channelIds: z105.string().array(),
|
7283
|
+
businessHours: BusinessHourSchema.array(),
|
7284
|
+
holidays: HolidaySchema.array()
|
7285
|
+
});
|
7286
|
+
|
7287
|
+
// src/business-calendar/index.ts
|
7202
7288
|
import z106 from "zod";
|
7289
|
+
var businessCalendarContract = initContract40().router({
|
7290
|
+
createBusinessCalendar: {
|
7291
|
+
method: "POST",
|
7292
|
+
path: "business-calendar",
|
7293
|
+
body: CreateBusinessCalendarSchema,
|
7294
|
+
responses: {
|
7295
|
+
201: DefaultSuccessResponseSchema.extend({
|
7296
|
+
businessCalendar: BusinessCalendarSchema
|
7297
|
+
}),
|
7298
|
+
500: DefaultErrorResponseSchema
|
7299
|
+
}
|
7300
|
+
},
|
7301
|
+
getAllBusinessCalendar: {
|
7302
|
+
method: "GET",
|
7303
|
+
path: "business-calendars",
|
7304
|
+
responses: {
|
7305
|
+
200: DefaultSuccessResponseSchema.extend({
|
7306
|
+
businessCalendars: BusinessCalendarSchema.array()
|
7307
|
+
}),
|
7308
|
+
500: DefaultErrorResponseSchema
|
7309
|
+
}
|
7310
|
+
},
|
7311
|
+
updateBusinessCalendar: {
|
7312
|
+
method: "POST",
|
7313
|
+
path: "business-calendars/:id",
|
7314
|
+
pathParams: z106.object({ id: z106.string() }),
|
7315
|
+
body: UpdateBusinessCalendarSchema,
|
7316
|
+
responses: {
|
7317
|
+
201: DefaultSuccessResponseSchema.extend({
|
7318
|
+
businessCalendar: BusinessCalendarSchema
|
7319
|
+
}),
|
7320
|
+
500: DefaultErrorResponseSchema
|
7321
|
+
}
|
7322
|
+
},
|
7323
|
+
deleteBusinessCalendar: {
|
7324
|
+
method: "DELETE",
|
7325
|
+
path: "business-calendars/:id",
|
7326
|
+
pathParams: z106.object({ id: z106.string() }),
|
7327
|
+
body: null,
|
7328
|
+
responses: {
|
7329
|
+
200: DefaultSuccessResponseSchema,
|
7330
|
+
500: DefaultErrorResponseSchema
|
7331
|
+
}
|
7332
|
+
}
|
7333
|
+
});
|
7334
|
+
|
7335
|
+
// src/public-api/index.ts
|
7336
|
+
import { initContract as initContract41 } from "@ts-rest/core";
|
7337
|
+
import z109 from "zod";
|
7203
7338
|
|
7204
7339
|
// src/public-api/validation.ts
|
7205
|
-
import
|
7340
|
+
import z108 from "zod";
|
7206
7341
|
|
7207
7342
|
// src/public-api/schema.ts
|
7208
|
-
import
|
7209
|
-
var ContactPhonesSchema2 =
|
7210
|
-
id:
|
7211
|
-
createdAt:
|
7212
|
-
updatedAt:
|
7213
|
-
deletedAt:
|
7214
|
-
phone:
|
7215
|
-
isPrimary:
|
7216
|
-
});
|
7217
|
-
var ContactEmailsSchema2 =
|
7218
|
-
id:
|
7219
|
-
createdAt:
|
7220
|
-
updatedAt:
|
7221
|
-
deletedAt:
|
7222
|
-
email:
|
7223
|
-
isPrimary:
|
7224
|
-
});
|
7225
|
-
var ContactCustomFieldSchema2 =
|
7226
|
-
id:
|
7227
|
-
createdAt:
|
7228
|
-
updatedAt:
|
7229
|
-
deletedAt:
|
7230
|
-
textValue:
|
7231
|
-
booleanValue:
|
7232
|
-
numberValue:
|
7233
|
-
dateValue:
|
7343
|
+
import z107 from "zod";
|
7344
|
+
var ContactPhonesSchema2 = z107.object({
|
7345
|
+
id: z107.string().uuid(),
|
7346
|
+
createdAt: z107.date(),
|
7347
|
+
updatedAt: z107.date(),
|
7348
|
+
deletedAt: z107.date().nullable(),
|
7349
|
+
phone: z107.string(),
|
7350
|
+
isPrimary: z107.boolean()
|
7351
|
+
});
|
7352
|
+
var ContactEmailsSchema2 = z107.object({
|
7353
|
+
id: z107.string().uuid(),
|
7354
|
+
createdAt: z107.date(),
|
7355
|
+
updatedAt: z107.date(),
|
7356
|
+
deletedAt: z107.date().nullable(),
|
7357
|
+
email: z107.string(),
|
7358
|
+
isPrimary: z107.boolean()
|
7359
|
+
});
|
7360
|
+
var ContactCustomFieldSchema2 = z107.object({
|
7361
|
+
id: z107.string().uuid(),
|
7362
|
+
createdAt: z107.date(),
|
7363
|
+
updatedAt: z107.date(),
|
7364
|
+
deletedAt: z107.date().nullable(),
|
7365
|
+
textValue: z107.string().nullable(),
|
7366
|
+
booleanValue: z107.boolean().nullable(),
|
7367
|
+
numberValue: z107.number().nullable(),
|
7368
|
+
dateValue: z107.date().nullable(),
|
7234
7369
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
7235
|
-
uploads:
|
7236
|
-
});
|
7237
|
-
var ContactEntityTypesSchema2 =
|
7238
|
-
id:
|
7239
|
-
createdAt:
|
7240
|
-
updatedAt:
|
7241
|
-
deletedAt:
|
7242
|
-
entity:
|
7243
|
-
description:
|
7244
|
-
});
|
7245
|
-
var ContactActivitySchema2 =
|
7246
|
-
id:
|
7247
|
-
createdAt:
|
7248
|
-
updatedAt:
|
7249
|
-
deletedAt:
|
7250
|
-
entityId:
|
7251
|
-
description:
|
7370
|
+
uploads: z107.array(UploadSchema)
|
7371
|
+
});
|
7372
|
+
var ContactEntityTypesSchema2 = z107.object({
|
7373
|
+
id: z107.string().uuid(),
|
7374
|
+
createdAt: z107.date(),
|
7375
|
+
updatedAt: z107.date(),
|
7376
|
+
deletedAt: z107.date().nullable(),
|
7377
|
+
entity: z107.string(),
|
7378
|
+
description: z107.string().nullable()
|
7379
|
+
});
|
7380
|
+
var ContactActivitySchema2 = z107.object({
|
7381
|
+
id: z107.string().uuid(),
|
7382
|
+
createdAt: z107.date(),
|
7383
|
+
updatedAt: z107.date(),
|
7384
|
+
deletedAt: z107.date().nullable(),
|
7385
|
+
entityId: z107.string(),
|
7386
|
+
description: z107.string(),
|
7252
7387
|
entityType: ContactEntityTypesSchema2
|
7253
7388
|
});
|
7254
|
-
var ContactSchema2 =
|
7255
|
-
id:
|
7256
|
-
createdAt:
|
7257
|
-
updatedAt:
|
7258
|
-
deletedAt:
|
7259
|
-
name:
|
7260
|
-
address:
|
7261
|
-
channel:
|
7262
|
-
notes:
|
7263
|
-
contactProfile:
|
7264
|
-
socialProfileUrl:
|
7265
|
-
tags:
|
7389
|
+
var ContactSchema2 = z107.object({
|
7390
|
+
id: z107.string().uuid(),
|
7391
|
+
createdAt: z107.date(),
|
7392
|
+
updatedAt: z107.date(),
|
7393
|
+
deletedAt: z107.date().nullable(),
|
7394
|
+
name: z107.string(),
|
7395
|
+
address: z107.string().nullable(),
|
7396
|
+
channel: z107.string().nullable(),
|
7397
|
+
notes: z107.string().nullable(),
|
7398
|
+
contactProfile: z107.string().nullable(),
|
7399
|
+
socialProfileUrl: z107.string().nullable(),
|
7400
|
+
tags: z107.array(TagSchema),
|
7266
7401
|
company: CompanySchema.omit({ customFields: true }).nullable(),
|
7267
|
-
customFields:
|
7268
|
-
contactEmails:
|
7269
|
-
contactPhones:
|
7270
|
-
activityLogs:
|
7402
|
+
customFields: z107.array(ContactCustomFieldSchema2),
|
7403
|
+
contactEmails: z107.array(ContactEmailsSchema2),
|
7404
|
+
contactPhones: z107.array(ContactPhonesSchema2),
|
7405
|
+
activityLogs: z107.array(ContactActivitySchema2).optional()
|
7271
7406
|
});
|
7272
7407
|
|
7273
7408
|
// src/public-api/validation.ts
|
7274
7409
|
var ContactContractValidationSchema2 = {
|
7275
7410
|
create: {
|
7276
|
-
request:
|
7277
|
-
name:
|
7278
|
-
email:
|
7279
|
-
|
7280
|
-
email:
|
7281
|
-
isPrimary:
|
7411
|
+
request: z108.object({
|
7412
|
+
name: z108.string(),
|
7413
|
+
email: z108.array(
|
7414
|
+
z108.object({
|
7415
|
+
email: z108.string().email(),
|
7416
|
+
isPrimary: z108.boolean()
|
7282
7417
|
})
|
7283
7418
|
).optional(),
|
7284
|
-
channel:
|
7285
|
-
address:
|
7286
|
-
phone:
|
7287
|
-
|
7288
|
-
phone:
|
7289
|
-
isPrimary:
|
7419
|
+
channel: z108.string().optional(),
|
7420
|
+
address: z108.string().optional(),
|
7421
|
+
phone: z108.array(
|
7422
|
+
z108.object({
|
7423
|
+
phone: z108.string(),
|
7424
|
+
isPrimary: z108.boolean()
|
7290
7425
|
})
|
7291
7426
|
).optional(),
|
7292
|
-
notes:
|
7293
|
-
tags:
|
7294
|
-
company:
|
7295
|
-
customFields:
|
7427
|
+
notes: z108.string().optional(),
|
7428
|
+
tags: z108.array(z108.string()).optional(),
|
7429
|
+
company: z108.string().optional(),
|
7430
|
+
customFields: z108.record(z108.string())
|
7296
7431
|
// Dynamic keys with string values
|
7297
7432
|
}),
|
7298
7433
|
response: ContactSchema2
|
7299
7434
|
},
|
7300
7435
|
getById: {
|
7301
|
-
request:
|
7302
|
-
id:
|
7436
|
+
request: z108.object({
|
7437
|
+
id: z108.string().uuid()
|
7303
7438
|
})
|
7304
7439
|
},
|
7305
7440
|
delete: {
|
7306
|
-
request:
|
7307
|
-
id:
|
7441
|
+
request: z108.object({
|
7442
|
+
id: z108.string().uuid()
|
7308
7443
|
})
|
7309
7444
|
},
|
7310
7445
|
getAll: {
|
7311
|
-
request:
|
7312
|
-
page:
|
7313
|
-
pageSize:
|
7314
|
-
keyword:
|
7315
|
-
company:
|
7316
|
-
name:
|
7317
|
-
address:
|
7318
|
-
channel:
|
7319
|
-
selectedDate:
|
7320
|
-
customFields:
|
7321
|
-
|
7322
|
-
attributeId:
|
7323
|
-
type:
|
7324
|
-
value:
|
7446
|
+
request: z108.object({
|
7447
|
+
page: z108.coerce.number().default(1),
|
7448
|
+
pageSize: z108.coerce.number().default(10),
|
7449
|
+
keyword: z108.string().optional(),
|
7450
|
+
company: z108.array(z108.string().uuid()),
|
7451
|
+
name: z108.string(),
|
7452
|
+
address: z108.string(),
|
7453
|
+
channel: z108.array(z108.string()),
|
7454
|
+
selectedDate: z108.string(),
|
7455
|
+
customFields: z108.array(
|
7456
|
+
z108.object({
|
7457
|
+
attributeId: z108.string().uuid(),
|
7458
|
+
type: z108.string(),
|
7459
|
+
value: z108.union([z108.string(), z108.array(z108.string())])
|
7325
7460
|
})
|
7326
7461
|
),
|
7327
|
-
tags:
|
7328
|
-
phone:
|
7329
|
-
email:
|
7330
|
-
notes:
|
7462
|
+
tags: z108.array(z108.string().uuid()),
|
7463
|
+
phone: z108.string(),
|
7464
|
+
email: z108.string(),
|
7465
|
+
notes: z108.string()
|
7331
7466
|
}).partial(),
|
7332
7467
|
response: {
|
7333
|
-
page:
|
7334
|
-
pageSize:
|
7335
|
-
total:
|
7336
|
-
lastPage:
|
7337
|
-
data:
|
7468
|
+
page: z108.number(),
|
7469
|
+
pageSize: z108.number(),
|
7470
|
+
total: z108.number(),
|
7471
|
+
lastPage: z108.number(),
|
7472
|
+
data: z108.array(ContactSchema2)
|
7338
7473
|
}
|
7339
7474
|
},
|
7340
7475
|
getContactFields: {
|
7341
|
-
request:
|
7342
|
-
page:
|
7343
|
-
pageSize:
|
7476
|
+
request: z108.object({
|
7477
|
+
page: z108.coerce.number().default(1),
|
7478
|
+
pageSize: z108.coerce.number().default(10)
|
7344
7479
|
}).partial(),
|
7345
7480
|
response: {
|
7346
|
-
page:
|
7347
|
-
pageSize:
|
7348
|
-
total:
|
7349
|
-
lastPage:
|
7350
|
-
data:
|
7481
|
+
page: z108.number(),
|
7482
|
+
pageSize: z108.number(),
|
7483
|
+
total: z108.number(),
|
7484
|
+
lastPage: z108.number(),
|
7485
|
+
data: z108.array(ContactCustomFieldSchema2)
|
7351
7486
|
}
|
7352
7487
|
},
|
7353
7488
|
addAttachments: {
|
7354
|
-
request:
|
7355
|
-
contactId:
|
7356
|
-
attributeId:
|
7357
|
-
contactAttachmentRecords:
|
7358
|
-
|
7359
|
-
bucketName:
|
7360
|
-
fileKey:
|
7361
|
-
fileName:
|
7362
|
-
fileSize:
|
7363
|
-
url:
|
7489
|
+
request: z108.object({
|
7490
|
+
contactId: z108.string(),
|
7491
|
+
attributeId: z108.string().uuid(),
|
7492
|
+
contactAttachmentRecords: z108.array(
|
7493
|
+
z108.object({
|
7494
|
+
bucketName: z108.string(),
|
7495
|
+
fileKey: z108.string(),
|
7496
|
+
fileName: z108.string(),
|
7497
|
+
fileSize: z108.coerce.number(),
|
7498
|
+
url: z108.string()
|
7364
7499
|
})
|
7365
7500
|
)
|
7366
7501
|
}),
|
7367
|
-
response:
|
7502
|
+
response: CustomFieldSchema2
|
7368
7503
|
}
|
7369
7504
|
};
|
7370
7505
|
|
7371
7506
|
// src/public-api/index.ts
|
7372
|
-
var publicApiContract =
|
7507
|
+
var publicApiContract = initContract41().router(
|
7373
7508
|
{
|
7374
7509
|
createContact: {
|
7375
7510
|
method: "POST",
|
@@ -7379,11 +7514,11 @@ var publicApiContract = initContract40().router(
|
|
7379
7514
|
201: DefaultSuccessResponseSchema.extend({
|
7380
7515
|
data: ContactSchema2
|
7381
7516
|
}),
|
7382
|
-
400:
|
7383
|
-
message:
|
7517
|
+
400: z109.object({
|
7518
|
+
message: z109.string()
|
7384
7519
|
}),
|
7385
|
-
409:
|
7386
|
-
message:
|
7520
|
+
409: z109.object({
|
7521
|
+
message: z109.string()
|
7387
7522
|
}),
|
7388
7523
|
401: DefaultUnauthorizedSchema,
|
7389
7524
|
404: DefaultNotFoundSchema,
|
@@ -7398,13 +7533,13 @@ var publicApiContract = initContract40().router(
|
|
7398
7533
|
query: GetTagsSchema,
|
7399
7534
|
responses: {
|
7400
7535
|
200: DefaultSuccessResponseSchema.extend({
|
7401
|
-
tags:
|
7536
|
+
tags: z109.array(TagSchema)
|
7402
7537
|
}),
|
7403
|
-
400:
|
7404
|
-
message:
|
7538
|
+
400: z109.object({
|
7539
|
+
message: z109.string()
|
7405
7540
|
}),
|
7406
|
-
409:
|
7407
|
-
message:
|
7541
|
+
409: z109.object({
|
7542
|
+
message: z109.string()
|
7408
7543
|
}),
|
7409
7544
|
401: DefaultUnauthorizedSchema,
|
7410
7545
|
404: DefaultNotFoundSchema,
|
@@ -7420,11 +7555,11 @@ var publicApiContract = initContract40().router(
|
|
7420
7555
|
200: DefaultSuccessResponseSchema.extend(
|
7421
7556
|
ContactContractValidationSchema2.getAll.response
|
7422
7557
|
),
|
7423
|
-
400:
|
7424
|
-
message:
|
7558
|
+
400: z109.object({
|
7559
|
+
message: z109.string()
|
7425
7560
|
}),
|
7426
|
-
409:
|
7427
|
-
message:
|
7561
|
+
409: z109.object({
|
7562
|
+
message: z109.string()
|
7428
7563
|
}),
|
7429
7564
|
401: DefaultUnauthorizedSchema,
|
7430
7565
|
404: DefaultNotFoundSchema,
|
@@ -7441,11 +7576,11 @@ var publicApiContract = initContract40().router(
|
|
7441
7576
|
200: DefaultSuccessResponseSchema.extend(
|
7442
7577
|
ContactContractValidationSchema2.getContactFields.response
|
7443
7578
|
),
|
7444
|
-
400:
|
7445
|
-
message:
|
7579
|
+
400: z109.object({
|
7580
|
+
message: z109.string()
|
7446
7581
|
}),
|
7447
|
-
409:
|
7448
|
-
message:
|
7582
|
+
409: z109.object({
|
7583
|
+
message: z109.string()
|
7449
7584
|
}),
|
7450
7585
|
401: DefaultUnauthorizedSchema,
|
7451
7586
|
404: DefaultNotFoundSchema,
|
@@ -7459,17 +7594,17 @@ var publicApiContract = initContract40().router(
|
|
7459
7594
|
path: "/contacts/:id",
|
7460
7595
|
pathParams: ContactContractValidationSchema2.getById.request,
|
7461
7596
|
responses: {
|
7462
|
-
200:
|
7463
|
-
status:
|
7464
|
-
message:
|
7597
|
+
200: z109.object({
|
7598
|
+
status: z109.string(),
|
7599
|
+
message: z109.string(),
|
7465
7600
|
data: ContactSchema2,
|
7466
|
-
requestId:
|
7601
|
+
requestId: z109.string()
|
7467
7602
|
}),
|
7468
|
-
400:
|
7469
|
-
message:
|
7603
|
+
400: z109.object({
|
7604
|
+
message: z109.string()
|
7470
7605
|
}),
|
7471
|
-
409:
|
7472
|
-
message:
|
7606
|
+
409: z109.object({
|
7607
|
+
message: z109.string()
|
7473
7608
|
}),
|
7474
7609
|
401: DefaultUnauthorizedSchema,
|
7475
7610
|
404: DefaultNotFoundSchema,
|
@@ -7487,11 +7622,11 @@ var publicApiContract = initContract40().router(
|
|
7487
7622
|
201: DefaultSuccessResponseSchema.extend({
|
7488
7623
|
message: ContactCustomFieldSchema2
|
7489
7624
|
}),
|
7490
|
-
400:
|
7491
|
-
message:
|
7625
|
+
400: z109.object({
|
7626
|
+
message: z109.string()
|
7492
7627
|
}),
|
7493
|
-
409:
|
7494
|
-
message:
|
7628
|
+
409: z109.object({
|
7629
|
+
message: z109.string()
|
7495
7630
|
}),
|
7496
7631
|
401: DefaultUnauthorizedSchema,
|
7497
7632
|
404: DefaultNotFoundSchema,
|
@@ -7505,17 +7640,17 @@ var publicApiContract = initContract40().router(
|
|
7505
7640
|
path: "/contacts/:id",
|
7506
7641
|
pathParams: ContactContractValidationSchema2.getById.request,
|
7507
7642
|
responses: {
|
7508
|
-
200:
|
7509
|
-
status:
|
7510
|
-
message:
|
7643
|
+
200: z109.object({
|
7644
|
+
status: z109.string(),
|
7645
|
+
message: z109.string(),
|
7511
7646
|
data: ContactSchema2,
|
7512
|
-
requestId:
|
7647
|
+
requestId: z109.string()
|
7513
7648
|
}),
|
7514
|
-
400:
|
7515
|
-
message:
|
7649
|
+
400: z109.object({
|
7650
|
+
message: z109.string()
|
7516
7651
|
}),
|
7517
|
-
409:
|
7518
|
-
message:
|
7652
|
+
409: z109.object({
|
7653
|
+
message: z109.string()
|
7519
7654
|
}),
|
7520
7655
|
401: DefaultUnauthorizedSchema,
|
7521
7656
|
404: DefaultNotFoundSchema,
|
@@ -7529,17 +7664,17 @@ var publicApiContract = initContract40().router(
|
|
7529
7664
|
path: "/contacts/:id",
|
7530
7665
|
pathParams: ContactContractValidationSchema2.delete.request,
|
7531
7666
|
responses: {
|
7532
|
-
200:
|
7533
|
-
status:
|
7534
|
-
message:
|
7667
|
+
200: z109.object({
|
7668
|
+
status: z109.string(),
|
7669
|
+
message: z109.string(),
|
7535
7670
|
data: ContactSchema2,
|
7536
|
-
requestId:
|
7671
|
+
requestId: z109.string()
|
7537
7672
|
}),
|
7538
|
-
400:
|
7539
|
-
message:
|
7673
|
+
400: z109.object({
|
7674
|
+
message: z109.string()
|
7540
7675
|
}),
|
7541
|
-
409:
|
7542
|
-
message:
|
7676
|
+
409: z109.object({
|
7677
|
+
message: z109.string()
|
7543
7678
|
}),
|
7544
7679
|
401: DefaultUnauthorizedSchema,
|
7545
7680
|
404: DefaultNotFoundSchema,
|
@@ -7556,7 +7691,7 @@ var publicApiContract = initContract40().router(
|
|
7556
7691
|
);
|
7557
7692
|
|
7558
7693
|
// src/contract.ts
|
7559
|
-
var apiContract =
|
7694
|
+
var apiContract = initContract42().router({
|
7560
7695
|
auth: authContract,
|
7561
7696
|
mail: mailContract,
|
7562
7697
|
cxLog: cxLogContract,
|
@@ -7580,42 +7715,46 @@ var apiContract = initContract41().router({
|
|
7580
7715
|
upload: uploadContract,
|
7581
7716
|
snippet: snippetContract
|
7582
7717
|
});
|
7583
|
-
var contactContract2 =
|
7718
|
+
var contactContract2 = initContract42().router({
|
7584
7719
|
contact: contactContract
|
7585
7720
|
});
|
7586
|
-
var ticketContract2 =
|
7721
|
+
var ticketContract2 = initContract42().router({
|
7587
7722
|
ticket: ticketContract
|
7588
7723
|
});
|
7589
|
-
var extensionContract2 =
|
7724
|
+
var extensionContract2 = initContract42().router({
|
7590
7725
|
extension: extensionContract
|
7591
7726
|
});
|
7592
|
-
var commentActivityContract =
|
7727
|
+
var commentActivityContract = initContract42().router({
|
7593
7728
|
comment: commentContract,
|
7594
7729
|
activityLog: activityLogContract
|
7595
7730
|
});
|
7596
|
-
var platformContract =
|
7731
|
+
var platformContract = initContract42().router({
|
7597
7732
|
line: lineContract,
|
7598
7733
|
messenger: messengerContract,
|
7599
7734
|
instagram: instagramContract,
|
7600
7735
|
viber: viberContract,
|
7601
7736
|
webchat: webchatContract
|
7602
7737
|
});
|
7603
|
-
var chatContract =
|
7738
|
+
var chatContract = initContract42().router({
|
7604
7739
|
main: mainChatContract
|
7605
7740
|
});
|
7606
|
-
var telephonyContract =
|
7741
|
+
var telephonyContract = initContract42().router({
|
7607
7742
|
telephonyCdr: telephonyCdrContract
|
7608
7743
|
});
|
7609
|
-
var notificationContract =
|
7744
|
+
var notificationContract = initContract42().router({
|
7610
7745
|
notification: userNotificationContract
|
7611
7746
|
});
|
7612
|
-
var publicApiContract2 =
|
7747
|
+
var publicApiContract2 = initContract42().router({
|
7613
7748
|
publicApi: publicApiContract
|
7614
7749
|
});
|
7750
|
+
var businessCalendarContract2 = initContract42().router({
|
7751
|
+
businessCalendar: businessCalendarContract
|
7752
|
+
});
|
7615
7753
|
export {
|
7616
7754
|
activityLogContract,
|
7617
7755
|
apiContract,
|
7618
7756
|
attributeContract,
|
7757
|
+
businessCalendarContract2 as businessCalendarContract,
|
7619
7758
|
categoryContract,
|
7620
7759
|
channelContract,
|
7621
7760
|
chatContract,
|