@kl1/contracts 1.0.60 → 1.0.62

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.mjs CHANGED
@@ -791,6 +791,63 @@ var messenger = initContract6().router(
791
791
  pathPrefix: "/messenger"
792
792
  }
793
793
  );
794
+ var instagram = initContract6().router(
795
+ {
796
+ getPages: {
797
+ method: "GET",
798
+ path: "/pages",
799
+ query: GetFacebookPagesQuerySchema,
800
+ responses: {
801
+ 200: DefaultSuccessResponseSchema.extend({
802
+ data: GetFacebookPagesSchema
803
+ }),
804
+ 500: DefaultErrorResponseSchema
805
+ }
806
+ },
807
+ connect: {
808
+ method: "POST",
809
+ path: "/connect",
810
+ responses: {
811
+ 200: DefaultSuccessResponseSchema.extend({
812
+ channel: ChannelSchema
813
+ }),
814
+ 408: DefaultErrorResponseSchema
815
+ },
816
+ body: ConnectChannelSchema,
817
+ summary: "Connect message channel"
818
+ },
819
+ relogin: {
820
+ method: "POST",
821
+ path: "/relogin",
822
+ responses: {
823
+ 200: DefaultSuccessResponseSchema.extend({
824
+ channel: ChannelSchema
825
+ }),
826
+ 408: DefaultErrorResponseSchema
827
+ },
828
+ body: ConnectChannelSchema,
829
+ summary: "Relogin message channel"
830
+ },
831
+ disconnect: {
832
+ method: "POST",
833
+ path: "/disconnect/:channelId",
834
+ pathParams: z20.object({
835
+ channelId: z20.string().uuid()
836
+ }),
837
+ responses: {
838
+ 200: DefaultSuccessResponseSchema.extend({
839
+ channel: ChannelSchema
840
+ }),
841
+ 408: DefaultErrorResponseSchema
842
+ },
843
+ body: null,
844
+ summary: "Disconnect message channel"
845
+ }
846
+ },
847
+ {
848
+ pathPrefix: "/instagram"
849
+ }
850
+ );
794
851
  var line = initContract6().router(
795
852
  {
796
853
  connect: {
@@ -850,7 +907,8 @@ var channelContract = initContract6().router(
850
907
  summary: "Get Channels"
851
908
  },
852
909
  messenger,
853
- line
910
+ line,
911
+ instagram
854
912
  },
855
913
  {
856
914
  baseHeaders: DefaultHeaderSchema,
@@ -2364,20 +2422,22 @@ var ContactContractValidationSchema = {
2364
2422
  },
2365
2423
  merge: {
2366
2424
  request: z40.object({
2367
- primaryContactId: z40.string().uuid(),
2368
- emails: z40.array(
2369
- z40.object({
2370
- email: z40.string(),
2371
- isPrimary: z40.boolean()
2372
- })
2373
- ),
2374
- phones: z40.array(
2375
- z40.object({
2376
- phone: z40.string(),
2377
- isPrimary: z40.boolean()
2378
- })
2379
- ),
2380
- otherContacts: z40.array(z40.string().uuid())
2425
+ primaryContact: z40.object({
2426
+ id: z40.string().uuid(),
2427
+ emails: z40.array(
2428
+ z40.object({
2429
+ email: z40.string().email(),
2430
+ isPrimary: z40.boolean()
2431
+ })
2432
+ ),
2433
+ phones: z40.array(
2434
+ z40.object({
2435
+ phone: z40.string(),
2436
+ isPrimary: z40.boolean()
2437
+ })
2438
+ )
2439
+ }),
2440
+ secondaryContacts: z40.array(z40.string().uuid())
2381
2441
  }),
2382
2442
  response: ContactSchema
2383
2443
  },
@@ -2708,6 +2768,19 @@ var contactContract = initContract10().router(
2708
2768
  422: DefaultUnprocessibleSchema
2709
2769
  },
2710
2770
  summary: "Get a contact by id"
2771
+ },
2772
+ getExportContacts: {
2773
+ method: "GET",
2774
+ path: "/export",
2775
+ query: ContactContractValidationSchema.getAll.request,
2776
+ responses: {
2777
+ 200: null,
2778
+ 400: z41.object({
2779
+ message: z41.string()
2780
+ }),
2781
+ 401: DefaultUnauthorizedSchema,
2782
+ 404: DefaultNotFoundSchema
2783
+ }
2711
2784
  }
2712
2785
  },
2713
2786
  {
@@ -6058,6 +6131,7 @@ export {
6058
6131
  commentActivityContract,
6059
6132
  commentContract,
6060
6133
  companyContract,
6134
+ contactContract,
6061
6135
  cxLogContract,
6062
6136
  dashboardContract,
6063
6137
  evaluateFormContract,