@bid-scents/shared-sdk 1.0.5 → 1.0.6

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.
Files changed (99) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.d.ts +26 -3
  3. package/dist/api/index.d.ts.map +1 -1
  4. package/dist/api/index.js +6 -0
  5. package/dist/api/models/ActionContent.d.ts +12 -0
  6. package/dist/api/models/ActionContent.d.ts.map +1 -0
  7. package/dist/api/models/BidRequest.d.ts +10 -0
  8. package/dist/api/models/BidRequest.d.ts.map +1 -0
  9. package/dist/api/models/ConversationResponse.d.ts +30 -0
  10. package/dist/api/models/ConversationResponse.d.ts.map +1 -0
  11. package/dist/api/models/ConversationSummary.d.ts +34 -0
  12. package/dist/api/models/ConversationSummary.d.ts.map +1 -0
  13. package/dist/api/models/ConversationSummary.js +1 -0
  14. package/dist/api/models/ConversationType.d.ts +6 -0
  15. package/dist/api/models/ConversationType.d.ts.map +1 -0
  16. package/dist/api/models/ConversationType.js +10 -0
  17. package/dist/api/models/ErrorResData.d.ts +12 -0
  18. package/dist/api/models/ErrorResData.d.ts.map +1 -0
  19. package/dist/api/models/ErrorResData.js +1 -0
  20. package/dist/api/models/FileContent.d.ts +19 -0
  21. package/dist/api/models/FileContent.d.ts.map +1 -0
  22. package/dist/api/models/FileContent.js +1 -0
  23. package/dist/api/models/ListingPreview.d.ts +7 -0
  24. package/dist/api/models/ListingPreview.d.ts.map +1 -0
  25. package/dist/api/models/ListingPreview.js +1 -0
  26. package/dist/api/models/Message.d.ts +28 -0
  27. package/dist/api/models/Message.d.ts.map +1 -0
  28. package/dist/api/models/Message.js +1 -0
  29. package/dist/api/models/MessageActionType.d.ts +5 -0
  30. package/dist/api/models/MessageActionType.d.ts.map +1 -0
  31. package/dist/api/models/MessageActionType.js +9 -0
  32. package/dist/api/models/MessageReqData.d.ts +19 -0
  33. package/dist/api/models/MessageReqData.d.ts.map +1 -0
  34. package/dist/api/models/MessageReqData.js +1 -0
  35. package/dist/api/models/MessageResData.d.ts +32 -0
  36. package/dist/api/models/MessageResData.d.ts.map +1 -0
  37. package/dist/api/models/MessageResData.js +1 -0
  38. package/dist/api/models/MessageType.d.ts +7 -0
  39. package/dist/api/models/MessageType.d.ts.map +1 -0
  40. package/dist/api/models/MessageType.js +11 -0
  41. package/dist/api/models/MessagesSummary.d.ts +12 -0
  42. package/dist/api/models/MessagesSummary.d.ts.map +1 -0
  43. package/dist/api/models/MessagesSummary.js +1 -0
  44. package/dist/api/models/Participant.d.ts +12 -0
  45. package/dist/api/models/Participant.d.ts.map +1 -0
  46. package/dist/api/models/Participant.js +1 -0
  47. package/dist/api/models/RichActionContent.d.ts +13 -0
  48. package/dist/api/models/RichActionContent.d.ts.map +1 -0
  49. package/dist/api/models/RichActionContent.js +1 -0
  50. package/dist/api/models/RichTextContent.d.ts +12 -0
  51. package/dist/api/models/RichTextContent.d.ts.map +1 -0
  52. package/dist/api/models/RichTextContent.js +1 -0
  53. package/dist/api/models/TextContent.d.ts +11 -0
  54. package/dist/api/models/TextContent.d.ts.map +1 -0
  55. package/dist/api/models/TextContent.js +1 -0
  56. package/dist/api/models/TypingReqData.d.ts +11 -0
  57. package/dist/api/models/TypingReqData.d.ts.map +1 -0
  58. package/dist/api/models/TypingReqData.js +1 -0
  59. package/dist/api/models/TypingResData.d.ts +16 -0
  60. package/dist/api/models/TypingResData.d.ts.map +1 -0
  61. package/dist/api/models/TypingResData.js +1 -0
  62. package/dist/api/models/UpdateLastReadData.d.ts +15 -0
  63. package/dist/api/models/UpdateLastReadData.d.ts.map +1 -0
  64. package/dist/api/models/UpdateLastReadData.js +1 -0
  65. package/dist/api/models/UserPreview.d.ts +0 -9
  66. package/dist/api/models/UserPreview.d.ts.map +1 -1
  67. package/dist/api/models/WSErrorCode.d.ts +9 -0
  68. package/dist/api/models/WSErrorCode.d.ts.map +1 -0
  69. package/dist/api/models/WSErrorCode.js +13 -0
  70. package/dist/api/models/WSMessageRequest.d.ts +14 -0
  71. package/dist/api/models/WSMessageRequest.d.ts.map +1 -0
  72. package/dist/api/models/WSMessageRequest.js +1 -0
  73. package/dist/api/models/WSMessageResponse.d.ts +16 -0
  74. package/dist/api/models/WSMessageResponse.d.ts.map +1 -0
  75. package/dist/api/models/WSMessageResponse.js +1 -0
  76. package/dist/api/models/WSType.d.ts +10 -0
  77. package/dist/api/models/WSType.d.ts.map +1 -0
  78. package/dist/api/models/WSType.js +14 -0
  79. package/dist/api/services/AuctionsService.d.ts +2 -12
  80. package/dist/api/services/AuctionsService.d.ts.map +1 -1
  81. package/dist/api/services/AuctionsService.js +0 -21
  82. package/dist/api/services/AuthService.d.ts +1 -1
  83. package/dist/api/services/AuthService.js +1 -1
  84. package/dist/api/services/MessageService.d.ts +65 -0
  85. package/dist/api/services/MessageService.d.ts.map +1 -0
  86. package/dist/api/services/MessageService.js +128 -0
  87. package/dist/utils/validation/create-listing-schema.d.ts +391 -0
  88. package/dist/utils/validation/create-listing-schema.d.ts.map +1 -0
  89. package/dist/utils/validation/create-listing-schema.js +125 -0
  90. package/package.json +1 -1
  91. package/dist/api/models/AuctionExpiryResponse.d.ts +0 -14
  92. package/dist/api/models/AuctionExpiryResponse.d.ts.map +0 -1
  93. package/dist/api/models/Body_place_bid_v1_auctions__listing_id__bid_post.d.ts +0 -7
  94. package/dist/api/models/Body_place_bid_v1_auctions__listing_id__bid_post.d.ts.map +0 -1
  95. package/dist/api/models/Body_process_expiry_v1_auctions_cron_expiry_post.d.ts +0 -7
  96. package/dist/api/models/Body_process_expiry_v1_auctions_cron_expiry_post.d.ts.map +0 -1
  97. /package/dist/api/models/{AuctionExpiryResponse.js → ActionContent.js} +0 -0
  98. /package/dist/api/models/{Body_place_bid_v1_auctions__listing_id__bid_post.js → BidRequest.js} +0 -0
  99. /package/dist/api/models/{Body_process_expiry_v1_auctions_cron_expiry_post.js → ConversationResponse.js} +0 -0
@@ -0,0 +1,16 @@
1
+ import type { UserPreview } from './UserPreview';
2
+ export type TypingResData = {
3
+ /**
4
+ * ID of the conversation
5
+ */
6
+ conversation_id: string;
7
+ /**
8
+ * Indicates if the user is typing or stopped typing
9
+ */
10
+ is_typing: boolean;
11
+ /**
12
+ * Information about the user who is typing
13
+ */
14
+ user: UserPreview;
15
+ };
16
+ //# sourceMappingURL=TypingResData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypingResData.d.ts","sourceRoot":"","sources":["../../../src/api/models/TypingResData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ export type UpdateLastReadData = {
2
+ /**
3
+ * ID of the conversation
4
+ */
5
+ conversation_id: string;
6
+ /**
7
+ * ID of the user updating the last read timestamp
8
+ */
9
+ user_id: string;
10
+ /**
11
+ * Timestamp of the last read, in ISO 8601 format
12
+ */
13
+ last_read_at: string;
14
+ };
15
+ //# sourceMappingURL=UpdateLastReadData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateLastReadData.d.ts","sourceRoot":"","sources":["../../../src/api/models/UpdateLastReadData.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,15 +1,6 @@
1
1
  export type UserPreview = {
2
- /**
3
- * Unique identifier for the user
4
- */
5
2
  id: string;
6
- /**
7
- * Username of the user
8
- */
9
3
  username: string;
10
- /**
11
- * URL for the user's profile image
12
- */
13
4
  profile_image_url?: (string | null);
14
5
  };
15
6
  //# sourceMappingURL=UserPreview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserPreview.d.ts","sourceRoot":"","sources":["../../../src/api/models/UserPreview.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC,CAAC"}
1
+ {"version":3,"file":"UserPreview.d.ts","sourceRoot":"","sources":["../../../src/api/models/UserPreview.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare enum WSErrorCode {
2
+ CONVERSATION_NOT_FOUND = "CONVERSATION_NOT_FOUND",
3
+ UNAUTHORIZED = "UNAUTHORIZED",
4
+ INVALID_STRUCTURE = "INVALID_STRUCTURE",
5
+ BID_NOT_ACCEPTED = "BID_NOT_ACCEPTED",
6
+ AUCTION_NOT_FOUND = "AUCTION_NOT_FOUND",
7
+ UNEXPECTED_ERROR = "UNEXPECTED_ERROR"
8
+ }
9
+ //# sourceMappingURL=WSErrorCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WSErrorCode.d.ts","sourceRoot":"","sources":["../../../src/api/models/WSErrorCode.ts"],"names":[],"mappings":"AAIA,oBAAY,WAAW;IACnB,sBAAsB,2BAA2B;IACjD,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;CACxC"}
@@ -0,0 +1,13 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var WSErrorCode;
6
+ (function (WSErrorCode) {
7
+ WSErrorCode["CONVERSATION_NOT_FOUND"] = "CONVERSATION_NOT_FOUND";
8
+ WSErrorCode["UNAUTHORIZED"] = "UNAUTHORIZED";
9
+ WSErrorCode["INVALID_STRUCTURE"] = "INVALID_STRUCTURE";
10
+ WSErrorCode["BID_NOT_ACCEPTED"] = "BID_NOT_ACCEPTED";
11
+ WSErrorCode["AUCTION_NOT_FOUND"] = "AUCTION_NOT_FOUND";
12
+ WSErrorCode["UNEXPECTED_ERROR"] = "UNEXPECTED_ERROR";
13
+ })(WSErrorCode || (WSErrorCode = {}));
@@ -0,0 +1,14 @@
1
+ import type { MessageReqData } from './MessageReqData';
2
+ import type { TypingReqData } from './TypingReqData';
3
+ import type { WSType } from './WSType';
4
+ export type WSMessageRequest = {
5
+ /**
6
+ * Type of the WebSocket request
7
+ */
8
+ type: WSType;
9
+ /**
10
+ * Data associated with the WebSocket message
11
+ */
12
+ data: (MessageReqData | TypingReqData);
13
+ };
14
+ //# sourceMappingURL=WSMessageRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WSMessageRequest.d.ts","sourceRoot":"","sources":["../../../src/api/models/WSMessageRequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,CAAC,cAAc,GAAG,aAAa,CAAC,CAAC;CAC1C,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { ErrorResData } from './ErrorResData';
2
+ import type { MessageResData } from './MessageResData';
3
+ import type { TypingResData } from './TypingResData';
4
+ import type { UpdateLastReadData } from './UpdateLastReadData';
5
+ import type { WSType } from './WSType';
6
+ export type WSMessageResponse = {
7
+ /**
8
+ * Type of the WebSocket response
9
+ */
10
+ type: WSType;
11
+ /**
12
+ * Data associated with the WebSocket message
13
+ */
14
+ data: (MessageResData | TypingResData | ErrorResData | UpdateLastReadData);
15
+ };
16
+ //# sourceMappingURL=WSMessageResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WSMessageResponse.d.ts","sourceRoot":"","sources":["../../../src/api/models/WSMessageResponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,CAAC,cAAc,GAAG,aAAa,GAAG,YAAY,GAAG,kBAAkB,CAAC,CAAC;CAC9E,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export declare enum WSType {
2
+ MESSAGE = "MESSAGE",
3
+ TYPING = "TYPING",
4
+ UPDATE_LAST_READ = "UPDATE_LAST_READ",
5
+ ERROR = "ERROR",
6
+ BID = "BID",
7
+ JOIN = "JOIN",
8
+ NOTIFICATION = "NOTIFICATION"
9
+ }
10
+ //# sourceMappingURL=WSType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WSType.d.ts","sourceRoot":"","sources":["../../../src/api/models/WSType.ts"],"names":[],"mappings":"AAIA,oBAAY,MAAM;IACd,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;IACrC,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,YAAY,iBAAiB;CAChC"}
@@ -0,0 +1,14 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var WSType;
6
+ (function (WSType) {
7
+ WSType["MESSAGE"] = "MESSAGE";
8
+ WSType["TYPING"] = "TYPING";
9
+ WSType["UPDATE_LAST_READ"] = "UPDATE_LAST_READ";
10
+ WSType["ERROR"] = "ERROR";
11
+ WSType["BID"] = "BID";
12
+ WSType["JOIN"] = "JOIN";
13
+ WSType["NOTIFICATION"] = "NOTIFICATION";
14
+ })(WSType || (WSType = {}));
@@ -1,7 +1,5 @@
1
- import type { AuctionExpiryResponse } from '../models/AuctionExpiryResponse';
1
+ import type { BidRequest } from '../models/BidRequest';
2
2
  import type { BidResponse } from '../models/BidResponse';
3
- import type { Body_place_bid_v1_auctions__listing_id__bid_post } from '../models/Body_place_bid_v1_auctions__listing_id__bid_post';
4
- import type { Body_process_expiry_v1_auctions_cron_expiry_post } from '../models/Body_process_expiry_v1_auctions_cron_expiry_post';
5
3
  import type { CancelablePromise } from '../core/CancelablePromise';
6
4
  export declare class AuctionsService {
7
5
  /**
@@ -12,14 +10,6 @@ export declare class AuctionsService {
12
10
  * @returns BidResponse Successful Response
13
11
  * @throws ApiError
14
12
  */
15
- static placeBidV1AuctionsListingIdBidPost(listingId: string, requestBody: Body_place_bid_v1_auctions__listing_id__bid_post): CancelablePromise<BidResponse>;
16
- /**
17
- * Process Expiry
18
- * @param xApiKey
19
- * @param requestBody
20
- * @returns AuctionExpiryResponse Successful Response
21
- * @throws ApiError
22
- */
23
- static processExpiryV1AuctionsCronExpiryPost(xApiKey: string, requestBody: Body_process_expiry_v1_auctions_cron_expiry_post): CancelablePromise<Array<AuctionExpiryResponse>>;
13
+ static placeBidV1AuctionsListingIdBidPost(listingId: string, requestBody: BidRequest): CancelablePromise<BidResponse>;
24
14
  }
25
15
  //# sourceMappingURL=AuctionsService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuctionsService.d.ts","sourceRoot":"","sources":["../../../src/api/services/AuctionsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,gDAAgD,EAAE,MAAM,4DAA4D,CAAC;AACnI,OAAO,KAAK,EAAE,gDAAgD,EAAE,MAAM,4DAA4D,CAAC;AACnI,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,eAAe;IACxB;;;;;;;OAOG;WACW,kCAAkC,CAC5C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,gDAAgD,GAC9D,iBAAiB,CAAC,WAAW,CAAC;IAcjC;;;;;;OAMG;WACW,qCAAqC,CAC/C,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,gDAAgD,GAC9D,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;CAcrD"}
1
+ {"version":3,"file":"AuctionsService.d.ts","sourceRoot":"","sources":["../../../src/api/services/AuctionsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,eAAe;IACxB;;;;;;;OAOG;WACW,kCAAkC,CAC5C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,UAAU,GACxB,iBAAiB,CAAC,WAAW,CAAC;CAcpC"}
@@ -23,25 +23,4 @@ export class AuctionsService {
23
23
  },
24
24
  });
25
25
  }
26
- /**
27
- * Process Expiry
28
- * @param xApiKey
29
- * @param requestBody
30
- * @returns AuctionExpiryResponse Successful Response
31
- * @throws ApiError
32
- */
33
- static processExpiryV1AuctionsCronExpiryPost(xApiKey, requestBody) {
34
- return __request(OpenAPI, {
35
- method: 'POST',
36
- url: '/v1/auctions/cron/expiry',
37
- headers: {
38
- 'x-api-key': xApiKey,
39
- },
40
- body: requestBody,
41
- mediaType: 'application/json',
42
- errors: {
43
- 422: `Validation Error`,
44
- },
45
- });
46
- }
47
26
  }
@@ -22,7 +22,7 @@ export declare class AuthService {
22
22
  /**
23
23
  * Check Unique Username
24
24
  * Check if a username is unique.
25
- * @param username
25
+ * @param username Username to check for uniqueness
26
26
  * @returns CheckUniqueUsernameResponse Successful Response
27
27
  * @throws ApiError
28
28
  */
@@ -34,7 +34,7 @@ export class AuthService {
34
34
  /**
35
35
  * Check Unique Username
36
36
  * Check if a username is unique.
37
- * @param username
37
+ * @param username Username to check for uniqueness
38
38
  * @returns CheckUniqueUsernameResponse Successful Response
39
39
  * @throws ApiError
40
40
  */
@@ -0,0 +1,65 @@
1
+ import type { ConversationResponse } from '../models/ConversationResponse';
2
+ import type { Message } from '../models/Message';
3
+ import type { MessagesSummary } from '../models/MessagesSummary';
4
+ import type { WSMessageRequest } from '../models/WSMessageRequest';
5
+ import type { WSMessageResponse } from '../models/WSMessageResponse';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class MessageService {
8
+ /**
9
+ * Contact Seller
10
+ * Endpoint to initiate contact or get existing conversation with a seller.
11
+ * @param sellerId
12
+ * @returns ConversationResponse Successful Response
13
+ * @throws ApiError
14
+ */
15
+ static contactSellerV1MessageContactSellerSellerIdGet(sellerId: string): CancelablePromise<ConversationResponse>;
16
+ /**
17
+ * Update Last Read
18
+ * Update the last read timestamp for a conversation.
19
+ * @param conversationId
20
+ * @returns void
21
+ * @throws ApiError
22
+ */
23
+ static updateLastReadV1MessageUpdateLastReadPatch(conversationId: string): CancelablePromise<void>;
24
+ /**
25
+ * Get Conversation
26
+ * Get a conversation by its ID and mark the conversation as read.
27
+ * @param conversationId
28
+ * @returns ConversationResponse Successful Response
29
+ * @throws ApiError
30
+ */
31
+ static getConversationV1MessageConversationConversationIdGet(conversationId: string): CancelablePromise<ConversationResponse>;
32
+ /**
33
+ * Get Conversation Summary
34
+ * Get a summary of all conversations for the current user.
35
+ * @returns MessagesSummary Successful Response
36
+ * @throws ApiError
37
+ */
38
+ static getConversationSummaryV1MessageSummaryGet(): CancelablePromise<MessagesSummary>;
39
+ /**
40
+ * Get Messages
41
+ * Get messages for a conversation with cursor pagination.
42
+ * @param conversationId
43
+ * @param cursor Timestamp of last cursor in ISO format
44
+ * @param limit
45
+ * @returns Message Successful Response
46
+ * @throws ApiError
47
+ */
48
+ static getMessagesV1MessageMessagesConversationIdGet(conversationId: string, cursor: string, limit?: number): CancelablePromise<Array<Message>>;
49
+ /**
50
+ * Get Ws Types
51
+ * Dummy endpoint so openapi codegen can generate the WebSocket types.
52
+ * @param requestBody
53
+ * @returns WSMessageResponse Successful Response
54
+ * @throws ApiError
55
+ */
56
+ static getWsTypesV1MessageWsTypesGet(requestBody: (WSMessageRequest | null)): CancelablePromise<WSMessageResponse>;
57
+ /**
58
+ * Get Connected Users
59
+ * Get a list of currently connected users.
60
+ * @returns string Successful Response
61
+ * @throws ApiError
62
+ */
63
+ static getConnectedUsersV1MessageConnectedUsersGet(): CancelablePromise<Array<string>>;
64
+ }
65
+ //# sourceMappingURL=MessageService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageService.d.ts","sourceRoot":"","sources":["../../../src/api/services/MessageService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,cAAc;IACvB;;;;;;OAMG;WACW,8CAA8C,CACxD,QAAQ,EAAE,MAAM,GACjB,iBAAiB,CAAC,oBAAoB,CAAC;IAY1C;;;;;;OAMG;WACW,0CAA0C,CACpD,cAAc,EAAE,MAAM,GACvB,iBAAiB,CAAC,IAAI,CAAC;IAY1B;;;;;;OAMG;WACW,qDAAqD,CAC/D,cAAc,EAAE,MAAM,GACvB,iBAAiB,CAAC,oBAAoB,CAAC;IAY1C;;;;;OAKG;WACW,yCAAyC,IAAI,iBAAiB,CAAC,eAAe,CAAC;IAM7F;;;;;;;;OAQG;WACW,6CAA6C,CACvD,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,MAAW,GACnB,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAgBpC;;;;;;OAMG;WACW,6BAA6B,CACvC,WAAW,EAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC,GACvC,iBAAiB,CAAC,iBAAiB,CAAC;IAWvC;;;;;OAKG;WACW,2CAA2C,IAAI,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAMhG"}
@@ -0,0 +1,128 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class MessageService {
4
+ /**
5
+ * Contact Seller
6
+ * Endpoint to initiate contact or get existing conversation with a seller.
7
+ * @param sellerId
8
+ * @returns ConversationResponse Successful Response
9
+ * @throws ApiError
10
+ */
11
+ static contactSellerV1MessageContactSellerSellerIdGet(sellerId) {
12
+ return __request(OpenAPI, {
13
+ method: 'GET',
14
+ url: '/v1/message/contact-seller/{seller_id}',
15
+ path: {
16
+ 'seller_id': sellerId,
17
+ },
18
+ errors: {
19
+ 422: `Validation Error`,
20
+ },
21
+ });
22
+ }
23
+ /**
24
+ * Update Last Read
25
+ * Update the last read timestamp for a conversation.
26
+ * @param conversationId
27
+ * @returns void
28
+ * @throws ApiError
29
+ */
30
+ static updateLastReadV1MessageUpdateLastReadPatch(conversationId) {
31
+ return __request(OpenAPI, {
32
+ method: 'PATCH',
33
+ url: '/v1/message/update-last-read',
34
+ query: {
35
+ 'conversation_id': conversationId,
36
+ },
37
+ errors: {
38
+ 422: `Validation Error`,
39
+ },
40
+ });
41
+ }
42
+ /**
43
+ * Get Conversation
44
+ * Get a conversation by its ID and mark the conversation as read.
45
+ * @param conversationId
46
+ * @returns ConversationResponse Successful Response
47
+ * @throws ApiError
48
+ */
49
+ static getConversationV1MessageConversationConversationIdGet(conversationId) {
50
+ return __request(OpenAPI, {
51
+ method: 'GET',
52
+ url: '/v1/message/conversation/{conversation_id}',
53
+ path: {
54
+ 'conversation_id': conversationId,
55
+ },
56
+ errors: {
57
+ 422: `Validation Error`,
58
+ },
59
+ });
60
+ }
61
+ /**
62
+ * Get Conversation Summary
63
+ * Get a summary of all conversations for the current user.
64
+ * @returns MessagesSummary Successful Response
65
+ * @throws ApiError
66
+ */
67
+ static getConversationSummaryV1MessageSummaryGet() {
68
+ return __request(OpenAPI, {
69
+ method: 'GET',
70
+ url: '/v1/message/summary',
71
+ });
72
+ }
73
+ /**
74
+ * Get Messages
75
+ * Get messages for a conversation with cursor pagination.
76
+ * @param conversationId
77
+ * @param cursor Timestamp of last cursor in ISO format
78
+ * @param limit
79
+ * @returns Message Successful Response
80
+ * @throws ApiError
81
+ */
82
+ static getMessagesV1MessageMessagesConversationIdGet(conversationId, cursor, limit = 20) {
83
+ return __request(OpenAPI, {
84
+ method: 'GET',
85
+ url: '/v1/message/messages/{conversation_id}',
86
+ path: {
87
+ 'conversation_id': conversationId,
88
+ },
89
+ query: {
90
+ 'cursor': cursor,
91
+ 'limit': limit,
92
+ },
93
+ errors: {
94
+ 422: `Validation Error`,
95
+ },
96
+ });
97
+ }
98
+ /**
99
+ * Get Ws Types
100
+ * Dummy endpoint so openapi codegen can generate the WebSocket types.
101
+ * @param requestBody
102
+ * @returns WSMessageResponse Successful Response
103
+ * @throws ApiError
104
+ */
105
+ static getWsTypesV1MessageWsTypesGet(requestBody) {
106
+ return __request(OpenAPI, {
107
+ method: 'GET',
108
+ url: '/v1/message/ws-types',
109
+ body: requestBody,
110
+ mediaType: 'application/json',
111
+ errors: {
112
+ 422: `Validation Error`,
113
+ },
114
+ });
115
+ }
116
+ /**
117
+ * Get Connected Users
118
+ * Get a list of currently connected users.
119
+ * @returns string Successful Response
120
+ * @throws ApiError
121
+ */
122
+ static getConnectedUsersV1MessageConnectedUsersGet() {
123
+ return __request(OpenAPI, {
124
+ method: 'GET',
125
+ url: '/v1/message/connected-users',
126
+ });
127
+ }
128
+ }