@kl1/contracts 1.3.33 → 1.3.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/dist/api-contracts/src/botpress/index.d.ts +3 -3
  2. package/dist/api-contracts/src/channel/index.d.ts +3 -3
  3. package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
  4. package/dist/api-contracts/src/contract.d.ts +1053 -487
  5. package/dist/api-contracts/src/contract.d.ts.map +1 -1
  6. package/dist/api-contracts/src/presence-status/index.d.ts +542 -50
  7. package/dist/api-contracts/src/presence-status/index.d.ts.map +1 -1
  8. package/dist/api-contracts/src/presence-status/schema.d.ts +385 -10
  9. package/dist/api-contracts/src/presence-status/schema.d.ts.map +1 -1
  10. package/dist/api-contracts/src/presence-status/validation.d.ts +30 -12
  11. package/dist/api-contracts/src/presence-status/validation.d.ts.map +1 -1
  12. package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +85 -34
  13. package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts.map +1 -1
  14. package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts +25 -10
  15. package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts.map +1 -1
  16. package/dist/api-contracts/src/user-presence-status-log/index.d.ts +40 -16
  17. package/dist/api-contracts/src/user-presence-status-log/index.d.ts.map +1 -1
  18. package/dist/api-contracts/src/user-presence-status-log/schema.d.ts +50 -20
  19. package/dist/api-contracts/src/user-presence-status-log/schema.d.ts.map +1 -1
  20. package/dist/index.js +70 -35
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +70 -35
  23. package/dist/index.mjs.map +1 -1
  24. package/package.json +1 -1
@@ -213,50 +213,68 @@ export declare const UserPresenceStatusLogSchema: z.ZodObject<{
213
213
  createdAt: z.ZodDate;
214
214
  updatedAt: z.ZodDate;
215
215
  deletedAt: z.ZodNullable<z.ZodDate>;
216
- status: z.ZodString;
217
- description: z.ZodEnum<["Can do everything.", "Mute all notifications.", "You won't receive call, but can still do other."]>;
216
+ systemName: z.ZodString;
217
+ displayName: z.ZodString;
218
+ description: z.ZodNullable<z.ZodString>;
218
219
  position: z.ZodNumber;
220
+ emoji: z.ZodNullable<z.ZodString>;
221
+ presenceStatusOption: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"receive_call">, z.ZodLiteral<"do_not_receive_call">, z.ZodLiteral<"receive_chat_message">, z.ZodLiteral<"do_not_receive_chat_message">]>, "many">;
219
222
  }, "strip", z.ZodTypeAny, {
223
+ emoji: string | null;
220
224
  id: string;
221
225
  position: number;
222
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
223
- status: string;
226
+ description: string | null;
224
227
  createdAt: Date;
225
228
  updatedAt: Date;
226
229
  deletedAt: Date | null;
230
+ systemName: string;
231
+ displayName: string;
232
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
227
233
  }, {
234
+ emoji: string | null;
228
235
  id: string;
229
236
  position: number;
230
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
231
- status: string;
237
+ description: string | null;
232
238
  createdAt: Date;
233
239
  updatedAt: Date;
234
240
  deletedAt: Date | null;
241
+ systemName: string;
242
+ displayName: string;
243
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
235
244
  }>;
236
245
  newPresenceStatus: z.ZodObject<{
237
246
  id: z.ZodString;
238
247
  createdAt: z.ZodDate;
239
248
  updatedAt: z.ZodDate;
240
249
  deletedAt: z.ZodNullable<z.ZodDate>;
241
- status: z.ZodString;
242
- description: z.ZodEnum<["Can do everything.", "Mute all notifications.", "You won't receive call, but can still do other."]>;
250
+ systemName: z.ZodString;
251
+ displayName: z.ZodString;
252
+ description: z.ZodNullable<z.ZodString>;
243
253
  position: z.ZodNumber;
254
+ emoji: z.ZodNullable<z.ZodString>;
255
+ presenceStatusOption: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"receive_call">, z.ZodLiteral<"do_not_receive_call">, z.ZodLiteral<"receive_chat_message">, z.ZodLiteral<"do_not_receive_chat_message">]>, "many">;
244
256
  }, "strip", z.ZodTypeAny, {
257
+ emoji: string | null;
245
258
  id: string;
246
259
  position: number;
247
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
248
- status: string;
260
+ description: string | null;
249
261
  createdAt: Date;
250
262
  updatedAt: Date;
251
263
  deletedAt: Date | null;
264
+ systemName: string;
265
+ displayName: string;
266
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
252
267
  }, {
268
+ emoji: string | null;
253
269
  id: string;
254
270
  position: number;
255
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
256
- status: string;
271
+ description: string | null;
257
272
  createdAt: Date;
258
273
  updatedAt: Date;
259
274
  deletedAt: Date | null;
275
+ systemName: string;
276
+ displayName: string;
277
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
260
278
  }>;
261
279
  reason: z.ZodString;
262
280
  }, "strip", z.ZodTypeAny, {
@@ -310,22 +328,28 @@ export declare const UserPresenceStatusLogSchema: z.ZodObject<{
310
328
  updatedAt: Date;
311
329
  deletedAt: Date | null;
312
330
  previousPresenceStatus: {
331
+ emoji: string | null;
313
332
  id: string;
314
333
  position: number;
315
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
316
- status: string;
334
+ description: string | null;
317
335
  createdAt: Date;
318
336
  updatedAt: Date;
319
337
  deletedAt: Date | null;
338
+ systemName: string;
339
+ displayName: string;
340
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
320
341
  };
321
342
  newPresenceStatus: {
343
+ emoji: string | null;
322
344
  id: string;
323
345
  position: number;
324
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
325
- status: string;
346
+ description: string | null;
326
347
  createdAt: Date;
327
348
  updatedAt: Date;
328
349
  deletedAt: Date | null;
350
+ systemName: string;
351
+ displayName: string;
352
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
329
353
  };
330
354
  }, {
331
355
  reason: string;
@@ -378,22 +402,28 @@ export declare const UserPresenceStatusLogSchema: z.ZodObject<{
378
402
  updatedAt: Date;
379
403
  deletedAt: Date | null;
380
404
  previousPresenceStatus: {
405
+ emoji: string | null;
381
406
  id: string;
382
407
  position: number;
383
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
384
- status: string;
408
+ description: string | null;
385
409
  createdAt: Date;
386
410
  updatedAt: Date;
387
411
  deletedAt: Date | null;
412
+ systemName: string;
413
+ displayName: string;
414
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
388
415
  };
389
416
  newPresenceStatus: {
417
+ emoji: string | null;
390
418
  id: string;
391
419
  position: number;
392
- description: "Can do everything." | "Mute all notifications." | "You won't receive call, but can still do other.";
393
- status: string;
420
+ description: string | null;
394
421
  createdAt: Date;
395
422
  updatedAt: Date;
396
423
  deletedAt: Date | null;
424
+ systemName: string;
425
+ displayName: string;
426
+ presenceStatusOption: ("receive_call" | "do_not_receive_call" | "receive_chat_message" | "do_not_receive_chat_message")[];
397
427
  };
398
428
  }>;
399
429
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/user-presence-status-log/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/user-presence-status-log/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC"}
package/dist/index.js CHANGED
@@ -2620,7 +2620,7 @@ var channelContract = (0, import_core7.initContract)().router(
2620
2620
  {
2621
2621
  getChannels: {
2622
2622
  method: "GET",
2623
- path: "/channel",
2623
+ path: "channel",
2624
2624
  responses: {
2625
2625
  200: DefaultSuccessResponseSchema.extend({
2626
2626
  data: ChannelSchema.array()
@@ -2790,28 +2790,33 @@ var channelFacebookFeedContract = (0, import_core7.initContract)().router(
2790
2790
  pathPrefix: "ms/facebook-feed"
2791
2791
  }
2792
2792
  );
2793
- var channelBotContract = (0, import_core7.initContract)().router({
2794
- connectBot: {
2795
- method: "POST",
2796
- path: "/connect-bot/:channelId",
2797
- responses: {
2798
- 200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
2799
- 400: DefaultErrorResponseSchema,
2800
- 500: DefaultErrorResponseSchema
2793
+ var channelBotContract = (0, import_core7.initContract)().router(
2794
+ {
2795
+ connectBot: {
2796
+ method: "POST",
2797
+ path: "/connect-bot/:channelId",
2798
+ responses: {
2799
+ 200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
2800
+ 400: DefaultErrorResponseSchema,
2801
+ 500: DefaultErrorResponseSchema
2802
+ },
2803
+ body: ConnectBotSchema
2801
2804
  },
2802
- body: ConnectBotSchema
2805
+ disconnectBot: {
2806
+ method: "POST",
2807
+ path: "/disconnect-bot/:channelId",
2808
+ responses: {
2809
+ 200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
2810
+ 400: DefaultErrorResponseSchema,
2811
+ 500: DefaultErrorResponseSchema
2812
+ },
2813
+ body: import_zod41.default.object({})
2814
+ }
2803
2815
  },
2804
- disconnectBot: {
2805
- method: "POST",
2806
- path: "/disconnect-bot/:channelId",
2807
- responses: {
2808
- 200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
2809
- 400: DefaultErrorResponseSchema,
2810
- 500: DefaultErrorResponseSchema
2811
- },
2812
- body: import_zod41.default.object({})
2816
+ {
2817
+ pathPrefix: "ms"
2813
2818
  }
2814
- });
2819
+ );
2815
2820
  var channelSMSContract = (0, import_core7.initContract)().router(
2816
2821
  {
2817
2822
  connect: {
@@ -5555,23 +5560,36 @@ var import_zod72 = __toESM(require("zod"));
5555
5560
 
5556
5561
  // src/presence-status/schema.ts
5557
5562
  var import_zod71 = __toESM(require("zod"));
5558
- var PresenceStatusDesEnum = import_zod71.default.enum([
5559
- "Can do everything.",
5560
- "Mute all notifications.",
5561
- `You won't receive call, but can still do other.`
5563
+ var TPresenceStatusOption = import_zod71.default.union([
5564
+ import_zod71.default.literal("receive_call"),
5565
+ import_zod71.default.literal("do_not_receive_call"),
5566
+ import_zod71.default.literal("receive_chat_message"),
5567
+ import_zod71.default.literal("do_not_receive_chat_message")
5562
5568
  ]);
5563
5569
  var PresenceStatusSchema = import_zod71.default.object({
5564
5570
  id: import_zod71.default.string().uuid(),
5565
5571
  createdAt: import_zod71.default.date(),
5566
5572
  updatedAt: import_zod71.default.date(),
5567
5573
  deletedAt: import_zod71.default.date().nullable(),
5568
- status: import_zod71.default.string(),
5569
- description: PresenceStatusDesEnum,
5570
- position: import_zod71.default.number()
5574
+ systemName: import_zod71.default.string(),
5575
+ displayName: import_zod71.default.string(),
5576
+ description: import_zod71.default.string().nullable(),
5577
+ position: import_zod71.default.number(),
5578
+ emoji: import_zod71.default.string().nullable(),
5579
+ presenceStatusOption: import_zod71.default.array(TPresenceStatusOption)
5580
+ });
5581
+ var UserPresenceStatusSchema = import_zod71.default.object({
5582
+ id: import_zod71.default.string().uuid(),
5583
+ createdAt: import_zod71.default.date(),
5584
+ updatedAt: import_zod71.default.date(),
5585
+ deletedAt: import_zod71.default.date().nullable(),
5586
+ userId: import_zod71.default.string(),
5587
+ user: UserSchema,
5588
+ presenceStatus: PresenceStatusSchema
5571
5589
  });
5572
5590
 
5573
5591
  // src/telephony-agent-presence-status/schema.ts
5574
- var UserPresenceStatusSchema = DefaultEntitySchema.extend({
5592
+ var UserPresenceStatusSchema2 = DefaultEntitySchema.extend({
5575
5593
  user: UserSchema,
5576
5594
  presenceStatus: PresenceStatusSchema,
5577
5595
  customPresenceStatus: import_zod72.default.string().nullable().optional()
@@ -5594,7 +5612,7 @@ var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().rou
5594
5612
  path: "/agents/presence_status",
5595
5613
  headers: DefaultHeaderSchema,
5596
5614
  responses: {
5597
- 200: import_zod74.default.array(UserPresenceStatusSchema),
5615
+ 200: import_zod74.default.array(UserPresenceStatusSchema2),
5598
5616
  400: import_zod74.default.object({
5599
5617
  message: import_zod74.default.string()
5600
5618
  }),
@@ -5609,7 +5627,7 @@ var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().rou
5609
5627
  pathParams: import_zod74.default.object({ userId: import_zod74.default.string() }),
5610
5628
  headers: DefaultHeaderSchema,
5611
5629
  responses: {
5612
- 200: UserPresenceStatusSchema,
5630
+ 200: UserPresenceStatusSchema2,
5613
5631
  400: import_zod74.default.object({
5614
5632
  message: import_zod74.default.string()
5615
5633
  }),
@@ -5625,7 +5643,7 @@ var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().rou
5625
5643
  body: UpdateUserStatusSchema,
5626
5644
  responses: {
5627
5645
  200: DefaultSuccessResponseSchema.extend({
5628
- userPresenceStatu: UserPresenceStatusSchema
5646
+ userPresenceStatu: UserPresenceStatusSchema2
5629
5647
  }),
5630
5648
  400: import_zod74.default.object({
5631
5649
  message: import_zod74.default.string()
@@ -8464,7 +8482,7 @@ var botpressContract = (0, import_core40.initContract)().router(
8464
8482
  body: SendBotpressMessageSchema
8465
8483
  }
8466
8484
  },
8467
- { pathPrefix: "/bots" }
8485
+ { pathPrefix: "bots" }
8468
8486
  );
8469
8487
  var botContract = (0, import_core40.initContract)().router(
8470
8488
  {
@@ -8504,9 +8522,12 @@ var import_zod113 = __toESM(require("zod"));
8504
8522
  // src/presence-status/validation.ts
8505
8523
  var import_zod112 = require("zod");
8506
8524
  var CreatePresenceStatusSchema = import_zod112.z.object({
8507
- status: import_zod112.z.string(),
8508
- description: PresenceStatusDesEnum,
8509
- position: import_zod112.z.number()
8525
+ systemName: import_zod112.z.string(),
8526
+ displayName: import_zod112.z.string(),
8527
+ description: import_zod112.z.string().optional(),
8528
+ position: import_zod112.z.number(),
8529
+ emoji: import_zod112.z.string(),
8530
+ presenceStatusOption: import_zod112.z.array(TPresenceStatusOption)
8510
8531
  });
8511
8532
  var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
8512
8533
 
@@ -8530,6 +8551,20 @@ var presenceStatusContract = (0, import_core41.initContract)().router(
8530
8551
  },
8531
8552
  summary: "Get all presence status list."
8532
8553
  },
8554
+ getAllUserPresenceStatus: {
8555
+ method: "GET",
8556
+ path: "/ps/user-presence-status",
8557
+ headers: DefaultHeaderSchema,
8558
+ responses: {
8559
+ 200: import_zod113.default.array(UserPresenceStatusSchema),
8560
+ 400: import_zod113.default.object({
8561
+ message: import_zod113.default.string()
8562
+ }),
8563
+ 401: DefaultUnauthorizedSchema,
8564
+ 500: DefaultErrorResponseSchema
8565
+ },
8566
+ summary: "Get all users presence status"
8567
+ },
8533
8568
  createPresenceStatus: {
8534
8569
  method: "POST",
8535
8570
  path: "",