@cshah18/sdk 4.15.0 → 4.16.0
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/cobuy-sdk.esm.js +84 -8
- package/dist/cobuy-sdk.esm.js.map +1 -1
- package/dist/cobuy-sdk.umd.js +84 -8
- package/dist/cobuy-sdk.umd.js.map +1 -1
- package/dist/types/core/api-client.d.ts +7 -1
- package/dist/types/core/endpoints.d.ts +1 -0
- package/dist/types/ui/lobby/lobby-modal.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiRequestOptions, ApiResponse, ApiClientConfig, ProductRewardData, ProductContextData, ProductPrimaryGroupData, GroupJoinResponseData, GroupInviteResponseData, InviteResolveResponseData, AuthStrategy, ShareChannel, Contact, LeaveGroupResponseData, RecoverOrJoinGroupResponseData, CheckoutValidationData, CheckoutConfirmData } from "./types";
|
|
1
|
+
import { ApiRequestOptions, ApiResponse, ApiClientConfig, ProductRewardData, ProductContextData, ProductPrimaryGroupData, GroupJoinResponseData, GroupInviteResponseData, InviteResolveResponseData, AuthStrategy, ShareChannel, Contact, OfflineRedemption, LeaveGroupResponseData, RecoverOrJoinGroupResponseData, CheckoutValidationData, CheckoutConfirmData } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* HTTP client for communicating with CoBuy API
|
|
4
4
|
*
|
|
@@ -453,6 +453,12 @@ export declare class ApiClient {
|
|
|
453
453
|
leave_source?: "close_icon" | "browser_close" | "unknown";
|
|
454
454
|
leave_reason?: "voluntary_with_contact" | "voluntary_no_contact" | "unknown";
|
|
455
455
|
}): Promise<ApiResponse<LeaveGroupResponseData>>;
|
|
456
|
+
/**
|
|
457
|
+
* Fetch current session member's offline redemption codes for a group.
|
|
458
|
+
*/
|
|
459
|
+
getGroupOfflineRedemption(groupId: string): Promise<ApiResponse<{
|
|
460
|
+
offline_redemption?: OfflineRedemption;
|
|
461
|
+
}>>;
|
|
456
462
|
recoverOrJoinGroup(productId: string, contact?: Contact): Promise<ApiResponse<RecoverOrJoinGroupResponseData>>;
|
|
457
463
|
/**
|
|
458
464
|
* Best-effort leave signal for unload/pagehide scenarios.
|
|
@@ -11,6 +11,7 @@ export declare const API_ENDPOINTS: {
|
|
|
11
11
|
readonly GROUP_CREATE_AND_JOIN: "/v1/sdk/groups/new/join";
|
|
12
12
|
readonly PRODUCT_ACTIVE_GROUPS: "/v1/sdk/products/:productId/groups/active";
|
|
13
13
|
readonly GROUP_INVITE: "/v1/sdk/groups/:groupId/invite";
|
|
14
|
+
readonly GROUP_OFFLINE_REDEMPTION: "/v1/sdk/groups/:groupId/offline-redemption";
|
|
14
15
|
readonly GROUP_CHECKOUT_PREPARE: "/v1/sdk/groups/:groupId/checkout/prepare";
|
|
15
16
|
readonly GROUP_CHECKOUT_VALIDATE: "/v1/sdk/groups/:groupId/checkout/validate";
|
|
16
17
|
readonly GROUP_CHECKOUT_CONFIRM: "/v1/sdk/groups/:groupId/checkout/confirm";
|
|
@@ -341,6 +341,11 @@ export declare class LobbyModal {
|
|
|
341
341
|
* Handle socket group update events
|
|
342
342
|
*/
|
|
343
343
|
private readonly handleSocketGroupUpdate;
|
|
344
|
+
/**
|
|
345
|
+
* Fetch current user's offline redemption codes when group becomes fulfilled
|
|
346
|
+
* This ensures we show the current user's codes, not someone else's
|
|
347
|
+
*/
|
|
348
|
+
private fetchCurrentUserOfflineCodesIfNeeded;
|
|
344
349
|
/**
|
|
345
350
|
* Create activity item from socket event data
|
|
346
351
|
*/
|