@kl1/contracts 1.0.61 → 1.0.63

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 CHANGED
@@ -852,6 +852,63 @@ var messenger = (0, import_core6.initContract)().router(
852
852
  pathPrefix: "/messenger"
853
853
  }
854
854
  );
855
+ var instagram = (0, import_core6.initContract)().router(
856
+ {
857
+ getPages: {
858
+ method: "GET",
859
+ path: "/pages",
860
+ query: GetFacebookPagesQuerySchema,
861
+ responses: {
862
+ 200: DefaultSuccessResponseSchema.extend({
863
+ data: GetFacebookPagesSchema
864
+ }),
865
+ 500: DefaultErrorResponseSchema
866
+ }
867
+ },
868
+ connect: {
869
+ method: "POST",
870
+ path: "/connect",
871
+ responses: {
872
+ 200: DefaultSuccessResponseSchema.extend({
873
+ channel: ChannelSchema
874
+ }),
875
+ 408: DefaultErrorResponseSchema
876
+ },
877
+ body: ConnectChannelSchema,
878
+ summary: "Connect message channel"
879
+ },
880
+ relogin: {
881
+ method: "POST",
882
+ path: "/relogin",
883
+ responses: {
884
+ 200: DefaultSuccessResponseSchema.extend({
885
+ channel: ChannelSchema
886
+ }),
887
+ 408: DefaultErrorResponseSchema
888
+ },
889
+ body: ConnectChannelSchema,
890
+ summary: "Relogin message channel"
891
+ },
892
+ disconnect: {
893
+ method: "POST",
894
+ path: "/disconnect/:channelId",
895
+ pathParams: import_zod20.default.object({
896
+ channelId: import_zod20.default.string().uuid()
897
+ }),
898
+ responses: {
899
+ 200: DefaultSuccessResponseSchema.extend({
900
+ channel: ChannelSchema
901
+ }),
902
+ 408: DefaultErrorResponseSchema
903
+ },
904
+ body: null,
905
+ summary: "Disconnect message channel"
906
+ }
907
+ },
908
+ {
909
+ pathPrefix: "/instagram"
910
+ }
911
+ );
855
912
  var line = (0, import_core6.initContract)().router(
856
913
  {
857
914
  connect: {
@@ -911,7 +968,8 @@ var channelContract = (0, import_core6.initContract)().router(
911
968
  summary: "Get Channels"
912
969
  },
913
970
  messenger,
914
- line
971
+ line,
972
+ instagram
915
973
  },
916
974
  {
917
975
  baseHeaders: DefaultHeaderSchema,
@@ -2425,20 +2483,22 @@ var ContactContractValidationSchema = {
2425
2483
  },
2426
2484
  merge: {
2427
2485
  request: import_zod40.default.object({
2428
- primaryContactId: import_zod40.default.string().uuid(),
2429
- emails: import_zod40.default.array(
2430
- import_zod40.default.object({
2431
- email: import_zod40.default.string(),
2432
- isPrimary: import_zod40.default.boolean()
2433
- })
2434
- ),
2435
- phones: import_zod40.default.array(
2436
- import_zod40.default.object({
2437
- phone: import_zod40.default.string(),
2438
- isPrimary: import_zod40.default.boolean()
2439
- })
2440
- ),
2441
- otherContacts: import_zod40.default.array(import_zod40.default.string().uuid())
2486
+ primaryContact: import_zod40.default.object({
2487
+ id: import_zod40.default.string().uuid(),
2488
+ emails: import_zod40.default.array(
2489
+ import_zod40.default.object({
2490
+ email: import_zod40.default.string().email(),
2491
+ isPrimary: import_zod40.default.boolean()
2492
+ })
2493
+ ),
2494
+ phones: import_zod40.default.array(
2495
+ import_zod40.default.object({
2496
+ phone: import_zod40.default.string(),
2497
+ isPrimary: import_zod40.default.boolean()
2498
+ })
2499
+ )
2500
+ }),
2501
+ secondaryContacts: import_zod40.default.array(import_zod40.default.string().uuid())
2442
2502
  }),
2443
2503
  response: ContactSchema
2444
2504
  },
@@ -3397,6 +3457,8 @@ var extensionContract = (0, import_core14.initContract)().router(
3397
3457
  message: import_zod50.default.string()
3398
3458
  }),
3399
3459
  401: DefaultUnauthorizedSchema,
3460
+ 404: DefaultNotFoundSchema,
3461
+ 422: DefaultUnprocessibleSchema,
3400
3462
  500: DefaultErrorResponseSchema
3401
3463
  },
3402
3464
  summary: "Create a extension."
@@ -3433,6 +3495,8 @@ var extensionContract = (0, import_core14.initContract)().router(
3433
3495
  message: import_zod50.default.string()
3434
3496
  }),
3435
3497
  401: DefaultUnauthorizedSchema,
3498
+ 404: DefaultNotFoundSchema,
3499
+ 422: DefaultUnprocessibleSchema,
3436
3500
  500: DefaultErrorResponseSchema
3437
3501
  },
3438
3502
  summary: "Get all extensions"
@@ -3448,6 +3512,8 @@ var extensionContract = (0, import_core14.initContract)().router(
3448
3512
  message: import_zod50.default.string()
3449
3513
  }),
3450
3514
  401: DefaultUnauthorizedSchema,
3515
+ 404: DefaultNotFoundSchema,
3516
+ 422: DefaultUnprocessibleSchema,
3451
3517
  500: DefaultErrorResponseSchema
3452
3518
  },
3453
3519
  summary: "Get extension by user id"
@@ -3463,11 +3529,13 @@ var extensionContract = (0, import_core14.initContract)().router(
3463
3529
  headers: DefaultHeaderSchema,
3464
3530
  responses: {
3465
3531
  200: WithPagination(ExtensionSchema),
3466
- 500: DefaultErrorResponseSchema,
3467
3532
  400: import_zod50.default.object({
3468
3533
  message: import_zod50.default.string()
3469
3534
  }),
3470
- 401: DefaultUnauthorizedSchema
3535
+ 401: DefaultUnauthorizedSchema,
3536
+ 404: DefaultNotFoundSchema,
3537
+ 422: DefaultUnprocessibleSchema,
3538
+ 500: DefaultErrorResponseSchema
3471
3539
  },
3472
3540
  summary: "Get by dialpad"
3473
3541
  },
@@ -3481,6 +3549,12 @@ var extensionContract = (0, import_core14.initContract)().router(
3481
3549
  200: DefaultSuccessResponseSchema.extend({
3482
3550
  extension: ExtensionSchema
3483
3551
  }),
3552
+ 400: import_zod50.default.object({
3553
+ message: import_zod50.default.string()
3554
+ }),
3555
+ 401: DefaultUnauthorizedSchema,
3556
+ 404: DefaultNotFoundSchema,
3557
+ 422: DefaultUnprocessibleSchema,
3484
3558
  500: DefaultErrorResponseSchema
3485
3559
  },
3486
3560
  summary: "Update a extension."
@@ -3493,6 +3567,12 @@ var extensionContract = (0, import_core14.initContract)().router(
3493
3567
  body: null,
3494
3568
  responses: {
3495
3569
  200: DefaultSuccessResponseSchema.extend({ message: import_zod50.default.string() }),
3570
+ 400: import_zod50.default.object({
3571
+ message: import_zod50.default.string()
3572
+ }),
3573
+ 401: DefaultUnauthorizedSchema,
3574
+ 404: DefaultNotFoundSchema,
3575
+ 422: DefaultUnprocessibleSchema,
3496
3576
  500: DefaultErrorResponseSchema
3497
3577
  },
3498
3578
  summary: "Delete a extension."