@kl1/contracts 1.1.59 → 1.1.60

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
@@ -2258,7 +2258,7 @@ var WaapiQrResponseSchema = DefaultSuccessResponseSchema.extend({
2258
2258
  data: WaapiQrSchema
2259
2259
  });
2260
2260
  var GetWaapiQrQuerySchema = z40.object({
2261
- instanceId: z40.string()
2261
+ channelId: z40.string()
2262
2262
  });
2263
2263
  var SendSeenToWaapiSchema = z40.object({
2264
2264
  channelId: z40.string().uuid(),
@@ -2456,7 +2456,7 @@ var whatsapp = initContract7().router(
2456
2456
  },
2457
2457
  createWaapi: {
2458
2458
  method: "POST",
2459
- path: "/mobile",
2459
+ path: "/waapi",
2460
2460
  body: null,
2461
2461
  responses: {
2462
2462
  200: WaapiResponseSchema,
@@ -2466,26 +2466,13 @@ var whatsapp = initContract7().router(
2466
2466
  },
2467
2467
  getWaapiQr: {
2468
2468
  method: "GET",
2469
- path: "/mobile/qr",
2469
+ path: "/waapi/qr",
2470
2470
  query: GetWaapiQrQuerySchema,
2471
2471
  responses: {
2472
2472
  200: WaapiQrResponseSchema,
2473
2473
  500: DefaultErrorResponseSchema,
2474
2474
  400: DefaultErrorResponseSchema
2475
2475
  }
2476
- },
2477
- deleteWaapi: {
2478
- method: "DELETE",
2479
- path: "/mobile/:instanceId",
2480
- pathParams: z41.object({
2481
- instanceId: z41.string()
2482
- }),
2483
- body: z41.any().optional(),
2484
- responses: {
2485
- 200: DefaultSuccessResponseSchema,
2486
- 500: DefaultErrorResponseSchema,
2487
- 400: DefaultErrorResponseSchema
2488
- }
2489
2476
  }
2490
2477
  },
2491
2478
  {
@@ -8439,7 +8426,7 @@ var whatsappContract = initContract42().router({
8439
8426
  },
8440
8427
  createWaapi: {
8441
8428
  method: "POST",
8442
- path: "/mobile",
8429
+ path: "/waapi",
8443
8430
  body: null,
8444
8431
  responses: {
8445
8432
  200: WaapiResponseSchema,
@@ -8449,7 +8436,7 @@ var whatsappContract = initContract42().router({
8449
8436
  },
8450
8437
  getWaapiQr: {
8451
8438
  method: "GET",
8452
- path: "/mobile/qr",
8439
+ path: "/waapi/qr",
8453
8440
  query: GetWaapiQrQuerySchema,
8454
8441
  responses: {
8455
8442
  200: WaapiQrResponseSchema,
@@ -8457,22 +8444,9 @@ var whatsappContract = initContract42().router({
8457
8444
  400: DefaultErrorResponseSchema
8458
8445
  }
8459
8446
  },
8460
- deleteWaapi: {
8461
- method: "DELETE",
8462
- path: "/mobile/:instanceId",
8463
- pathParams: z114.object({
8464
- instanceId: z114.string()
8465
- }),
8466
- body: z114.any().optional(),
8467
- responses: {
8468
- 200: DefaultSuccessResponseSchema,
8469
- 500: DefaultErrorResponseSchema,
8470
- 400: DefaultErrorResponseSchema
8471
- }
8472
- },
8473
8447
  sendSeenToWaapi: {
8474
8448
  method: "POST",
8475
- path: "/mobile/send-seen",
8449
+ path: "/waapi/send-seen",
8476
8450
  body: SendSeenToWaapiSchema,
8477
8451
  responses: {
8478
8452
  200: WaapiResponseSchema,
@@ -9857,69 +9831,74 @@ var ConnectWebChatChannelSchema = z131.object({
9857
9831
  });
9858
9832
 
9859
9833
  // src/webchat/index.ts
9860
- var platformWebchatContract = initContract51().router({
9861
- sendMessage: {
9862
- method: "POST",
9863
- path: "/message",
9864
- body: SendMessageToPlatformSchema,
9865
- responses: {
9866
- 200: SendMessageResponseSchema,
9867
- 400: DefaultErrorResponseSchema,
9868
- 500: DefaultErrorResponseSchema
9869
- }
9870
- },
9871
- connect: {
9872
- method: "POST",
9873
- path: "/connect",
9874
- summary: "Connect to a webchat channel",
9875
- responses: {
9876
- 200: DefaultSuccessResponseSchema.extend({
9877
- channel: ChannelSchema
9834
+ var platformWebchatContract = initContract51().router(
9835
+ {
9836
+ sendMessage: {
9837
+ method: "POST",
9838
+ path: "/message",
9839
+ body: SendMessageToPlatformSchema,
9840
+ responses: {
9841
+ 200: SendMessageResponseSchema,
9842
+ 400: DefaultErrorResponseSchema,
9843
+ 500: DefaultErrorResponseSchema
9844
+ }
9845
+ },
9846
+ connect: {
9847
+ method: "POST",
9848
+ path: "/connect",
9849
+ summary: "Connect to a webchat channel",
9850
+ responses: {
9851
+ 200: DefaultSuccessResponseSchema.extend({
9852
+ channel: ChannelSchema
9853
+ }),
9854
+ 400: DefaultErrorResponseSchema,
9855
+ 500: DefaultErrorResponseSchema
9856
+ },
9857
+ body: ConnectWebChatChannelSchema
9858
+ },
9859
+ disconnectToService: {
9860
+ method: "POST",
9861
+ path: "/disconnect",
9862
+ body: z132.object({
9863
+ id: z132.string().uuid()
9878
9864
  }),
9879
- 400: DefaultErrorResponseSchema,
9880
- 500: DefaultErrorResponseSchema
9865
+ responses: {
9866
+ 200: ChannelServiceResponseSchema,
9867
+ 500: DefaultErrorResponseSchema,
9868
+ 400: DefaultErrorResponseSchema
9869
+ }
9881
9870
  },
9882
- body: ConnectWebChatChannelSchema
9883
- },
9884
- disconnectToService: {
9885
- method: "POST",
9886
- path: "/disconnect",
9887
- body: z132.object({
9888
- id: z132.string().uuid()
9889
- }),
9890
- responses: {
9891
- 200: ChannelServiceResponseSchema,
9892
- 500: DefaultErrorResponseSchema,
9893
- 400: DefaultErrorResponseSchema
9894
- }
9895
- },
9896
- reconnect: {
9897
- method: "POST",
9898
- path: "/reconnect/:channelId",
9899
- pathParams: z132.object({
9900
- channelId: z132.string().uuid()
9901
- }),
9902
- body: null,
9903
- responses: {
9904
- 200: ChannelServiceResponseSchema,
9905
- 500: DefaultErrorResponseSchema,
9906
- 400: DefaultErrorResponseSchema
9871
+ reconnect: {
9872
+ method: "POST",
9873
+ path: "/reconnect/:channelId",
9874
+ pathParams: z132.object({
9875
+ channelId: z132.string().uuid()
9876
+ }),
9877
+ body: null,
9878
+ responses: {
9879
+ 200: ChannelServiceResponseSchema,
9880
+ 500: DefaultErrorResponseSchema,
9881
+ 400: DefaultErrorResponseSchema
9882
+ }
9883
+ },
9884
+ delete: {
9885
+ method: "DELETE",
9886
+ path: "/delete/:channelId",
9887
+ pathParams: z132.object({
9888
+ channelId: z132.string().uuid()
9889
+ }),
9890
+ body: null,
9891
+ responses: {
9892
+ 200: ChannelServiceResponseSchema,
9893
+ 500: DefaultErrorResponseSchema,
9894
+ 400: DefaultErrorResponseSchema
9895
+ }
9907
9896
  }
9908
9897
  },
9909
- delete: {
9910
- method: "DELETE",
9911
- path: "/delete/:channelId",
9912
- pathParams: z132.object({
9913
- channelId: z132.string().uuid()
9914
- }),
9915
- body: null,
9916
- responses: {
9917
- 200: ChannelServiceResponseSchema,
9918
- 500: DefaultErrorResponseSchema,
9919
- 400: DefaultErrorResponseSchema
9920
- }
9898
+ {
9899
+ pathPrefix: "wcs"
9921
9900
  }
9922
- });
9901
+ );
9923
9902
 
9924
9903
  // src/hold-label/index.ts
9925
9904
  import { initContract as initContract52 } from "@ts-rest/core";