@bid-scents/shared-sdk 1.1.0 → 1.1.2
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/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/models/BoostRequest.d.ts +5 -0
- package/dist/api/models/BoostRequest.d.ts.map +1 -0
- package/dist/api/models/BoostRequest.js +1 -0
- package/dist/api/models/BoostResponse.d.ts +22 -0
- package/dist/api/models/BoostResponse.d.ts.map +1 -0
- package/dist/api/models/BoostResponse.js +1 -0
- package/dist/api/models/BoostType.d.ts +5 -0
- package/dist/api/models/BoostType.d.ts.map +1 -0
- package/dist/api/models/BoostType.js +9 -0
- package/dist/api/models/PassType.d.ts +6 -0
- package/dist/api/models/PassType.d.ts.map +1 -0
- package/dist/api/models/PassType.js +10 -0
- package/dist/api/models/SubscriptionRequest.d.ts +15 -0
- package/dist/api/models/SubscriptionRequest.d.ts.map +1 -0
- package/dist/api/models/SubscriptionRequest.js +1 -0
- package/dist/api/models/User.d.ts +0 -1
- package/dist/api/models/User.d.ts.map +1 -1
- package/dist/api/services/NotificationsService.js +1 -1
- package/dist/api/services/PaymentsService.d.ts +56 -1
- package/dist/api/services/PaymentsService.d.ts.map +1 -1
- package/dist/api/services/PaymentsService.js +98 -1
- package/dist/stores/auth.d.ts +17 -0
- package/dist/stores/auth.d.ts.map +1 -1
- package/dist/stores/auth.js +43 -7
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export type { BidDetails } from './models/BidDetails';
|
|
|
13
13
|
export type { BidRequest } from './models/BidRequest';
|
|
14
14
|
export type { BidResData } from './models/BidResData';
|
|
15
15
|
export type { BidResponse } from './models/BidResponse';
|
|
16
|
+
export type { BoostRequest } from './models/BoostRequest';
|
|
17
|
+
export type { BoostResponse } from './models/BoostResponse';
|
|
18
|
+
export { BoostType } from './models/BoostType';
|
|
16
19
|
export type { CheckUniqueUsernameResponse } from './models/CheckUniqueUsernameResponse';
|
|
17
20
|
export type { CommentContent } from './models/CommentContent';
|
|
18
21
|
export type { CommentDetails } from './models/CommentDetails';
|
|
@@ -63,6 +66,7 @@ export type { OnboardResponse } from './models/OnboardResponse';
|
|
|
63
66
|
export type { OutbidContent } from './models/OutbidContent';
|
|
64
67
|
export type { PaginationDetails } from './models/PaginationDetails';
|
|
65
68
|
export type { Participant } from './models/Participant';
|
|
69
|
+
export { PassType } from './models/PassType';
|
|
66
70
|
export type { PreferencesResponse } from './models/PreferencesResponse';
|
|
67
71
|
export type { ProfileDetails } from './models/ProfileDetails';
|
|
68
72
|
export type { ProfileResponse } from './models/ProfileResponse';
|
|
@@ -76,6 +80,7 @@ export type { RichTextContent } from './models/RichTextContent';
|
|
|
76
80
|
export type { SearchRequest } from './models/SearchRequest';
|
|
77
81
|
export type { SearchResponse } from './models/SearchResponse';
|
|
78
82
|
export type { SortParameter } from './models/SortParameter';
|
|
83
|
+
export type { SubscriptionRequest } from './models/SubscriptionRequest';
|
|
79
84
|
export type { TextContent } from './models/TextContent';
|
|
80
85
|
export type { TypingReqData } from './models/TypingReqData';
|
|
81
86
|
export type { TypingResData } from './models/TypingResData';
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,OA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AAwB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { ApiError } from './core/ApiError';
|
|
|
6
6
|
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
7
7
|
export { OpenAPI } from './core/OpenAPI';
|
|
8
8
|
export { AuctionStatus } from './models/AuctionStatus';
|
|
9
|
+
export { BoostType } from './models/BoostType';
|
|
9
10
|
export { ConversationType } from './models/ConversationType';
|
|
10
11
|
export { ListingBoxCondition } from './models/ListingBoxCondition';
|
|
11
12
|
export { ListingCategory } from './models/ListingCategory';
|
|
@@ -16,6 +17,7 @@ export { MessageActionType } from './models/MessageActionType';
|
|
|
16
17
|
export { MessageType } from './models/MessageType';
|
|
17
18
|
export { NotificationPriority } from './models/NotificationPriority';
|
|
18
19
|
export { NotificationType } from './models/NotificationType';
|
|
20
|
+
export { PassType } from './models/PassType';
|
|
19
21
|
export { ProfileTab } from './models/ProfileTab';
|
|
20
22
|
export { ReviewSortField } from './models/ReviewSortField';
|
|
21
23
|
export { WSErrorCode } from './models/WSErrorCode';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostRequest.d.ts","sourceRoot":"","sources":["../../../src/api/models/BoostRequest.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model for the response returned after a boost request
|
|
3
|
+
*/
|
|
4
|
+
export type BoostResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* The client secret for the payment intent.
|
|
7
|
+
*/
|
|
8
|
+
client_secret: string;
|
|
9
|
+
/**
|
|
10
|
+
* The amount to be charged.
|
|
11
|
+
*/
|
|
12
|
+
amount: number;
|
|
13
|
+
/**
|
|
14
|
+
* The currency of the payment.
|
|
15
|
+
*/
|
|
16
|
+
currency: string;
|
|
17
|
+
/**
|
|
18
|
+
* The boost credits available for the user.
|
|
19
|
+
*/
|
|
20
|
+
boost_credits: Record<string, number>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=BoostResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostResponse.d.ts","sourceRoot":"","sources":["../../../src/api/models/BoostResponse.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostType.d.ts","sourceRoot":"","sources":["../../../src/api/models/BoostType.ts"],"names":[],"mappings":"AAIA,oBAAY,SAAS;IACjB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAChC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export var BoostType;
|
|
6
|
+
(function (BoostType) {
|
|
7
|
+
BoostType["PREMIUM_BOOST"] = "premium_boost";
|
|
8
|
+
BoostType["NORMAL_BOOST"] = "normal_boost";
|
|
9
|
+
})(BoostType || (BoostType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PassType.d.ts","sourceRoot":"","sources":["../../../src/api/models/PassType.ts"],"names":[],"mappings":"AAIA,oBAAY,QAAQ;IAChB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;CAC9B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export var PassType;
|
|
6
|
+
(function (PassType) {
|
|
7
|
+
PassType["WEEKLY_SWAP"] = "weekly_swap";
|
|
8
|
+
PassType["MONTHLY_SWAP"] = "monthly_swap";
|
|
9
|
+
PassType["YEARLY_SWAP"] = "yearly_swap";
|
|
10
|
+
})(PassType || (PassType = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PassType } from './PassType';
|
|
2
|
+
/**
|
|
3
|
+
* Model for requesting a subscription
|
|
4
|
+
*/
|
|
5
|
+
export type SubscriptionRequest = {
|
|
6
|
+
/**
|
|
7
|
+
* Type of the subscription
|
|
8
|
+
*/
|
|
9
|
+
subscription_type: PassType;
|
|
10
|
+
/**
|
|
11
|
+
* ID of the payment method if the user doesn't have a customer account setup
|
|
12
|
+
*/
|
|
13
|
+
payment_method_id?: (string | null);
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=SubscriptionRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionRequest.d.ts","sourceRoot":"","sources":["../../../src/api/models/SubscriptionRequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B;;OAEG;IACH,iBAAiB,EAAE,QAAQ,CAAC;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/api/models/User.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/api/models/User.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAClC,CAAC"}
|
|
@@ -69,7 +69,7 @@ export class NotificationsService {
|
|
|
69
69
|
* @returns NotificationResponse Successful Response
|
|
70
70
|
* @throws ApiError
|
|
71
71
|
*/
|
|
72
|
-
static getNotificationsV1NotificationsGet(cursor = '2025-08-
|
|
72
|
+
static getNotificationsV1NotificationsGet(cursor = '2025-08-14T01:29:52.175036+00:00', limit = 20) {
|
|
73
73
|
return __request(OpenAPI, {
|
|
74
74
|
method: 'GET',
|
|
75
75
|
url: '/v1/notifications/',
|
|
@@ -1,12 +1,67 @@
|
|
|
1
|
+
import type { BoostRequest } from '../models/BoostRequest';
|
|
2
|
+
import type { BoostResponse } from '../models/BoostResponse';
|
|
3
|
+
import type { SubscriptionRequest } from '../models/SubscriptionRequest';
|
|
1
4
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
2
5
|
export declare class PaymentsService {
|
|
6
|
+
/**
|
|
7
|
+
* Boost Listing
|
|
8
|
+
* Create a payment intent for boosting listings.
|
|
9
|
+
* This endpoint processes the boost request and returns a payment intent client secret.
|
|
10
|
+
* @param requestBody
|
|
11
|
+
* @returns BoostResponse Successful Response
|
|
12
|
+
* @throws ApiError
|
|
13
|
+
*/
|
|
14
|
+
static boostListingV1PaymentsBoostPost(requestBody: BoostRequest): CancelablePromise<BoostResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Setup Payment Method
|
|
17
|
+
* Sets up a payment method for a user
|
|
18
|
+
* @returns any Successful Response
|
|
19
|
+
* @throws ApiError
|
|
20
|
+
*/
|
|
21
|
+
static setupPaymentMethodV1PaymentsPaymentMethodPost(): CancelablePromise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Create Subscription
|
|
24
|
+
* Creates/updates subscription to swap pass for a user
|
|
25
|
+
* @param requestBody
|
|
26
|
+
* @returns void
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
static createSubscriptionV1PaymentsSubscriptionPost(requestBody: SubscriptionRequest): CancelablePromise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Cancel Subscription
|
|
32
|
+
* Cancels the subscription for a user
|
|
33
|
+
* @returns void
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
static cancelSubscriptionV1PaymentsSubscriptionDelete(): CancelablePromise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* List Products
|
|
39
|
+
* @returns any Successful Response
|
|
40
|
+
* @throws ApiError
|
|
41
|
+
*/
|
|
42
|
+
static listProductsV1PaymentsProductsGet(): CancelablePromise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Reset Pricing
|
|
45
|
+
* Resets the products dict to reflect changes in stripe
|
|
46
|
+
* @returns any Successful Response
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
static resetPricingV1PaymentsResetPost(): CancelablePromise<any>;
|
|
3
50
|
/**
|
|
4
51
|
* Stripe Webhook
|
|
5
52
|
* Handle Stripe webhook events.
|
|
6
53
|
* This endpoint is used to process events sent by Stripe, such as payment success or failure.
|
|
54
|
+
* @returns void
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
static stripeWebhookV1PaymentsWebhookPost(): CancelablePromise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Get Boost Packages
|
|
60
|
+
* Retrieve available boost packages.
|
|
61
|
+
* This endpoint returns the prices and details of the available boost packages.
|
|
7
62
|
* @returns any Successful Response
|
|
8
63
|
* @throws ApiError
|
|
9
64
|
*/
|
|
10
|
-
static
|
|
65
|
+
static getBoostPackagesV1PaymentsBoostPackagesGet(): CancelablePromise<any>;
|
|
11
66
|
}
|
|
12
67
|
//# sourceMappingURL=PaymentsService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentsService.d.ts","sourceRoot":"","sources":["../../../src/api/services/PaymentsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,eAAe;IACxB;;;;;;OAMG;WACW,kCAAkC,IAAI,iBAAiB,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"PaymentsService.d.ts","sourceRoot":"","sources":["../../../src/api/services/PaymentsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,qBAAa,eAAe;IACxB;;;;;;;OAOG;WACW,+BAA+B,CACzC,WAAW,EAAE,YAAY,GAC1B,iBAAiB,CAAC,aAAa,CAAC;IAWnC;;;;;OAKG;WACW,6CAA6C,IAAI,iBAAiB,CAAC,GAAG,CAAC;IAMrF;;;;;;OAMG;WACW,4CAA4C,CACtD,WAAW,EAAE,mBAAmB,GACjC,iBAAiB,CAAC,IAAI,CAAC;IAW1B;;;;;OAKG;WACW,8CAA8C,IAAI,iBAAiB,CAAC,IAAI,CAAC;IAMvF;;;;OAIG;WACW,iCAAiC,IAAI,iBAAiB,CAAC,GAAG,CAAC;IAMzE;;;;;OAKG;WACW,+BAA+B,IAAI,iBAAiB,CAAC,GAAG,CAAC;IAMvE;;;;;;OAMG;WACW,kCAAkC,IAAI,iBAAiB,CAAC,IAAI,CAAC;IAM3E;;;;;;OAMG;WACW,0CAA0C,IAAI,iBAAiB,CAAC,GAAG,CAAC;CAMrF"}
|
|
@@ -1,11 +1,95 @@
|
|
|
1
1
|
import { OpenAPI } from '../core/OpenAPI';
|
|
2
2
|
import { request as __request } from '../core/request';
|
|
3
3
|
export class PaymentsService {
|
|
4
|
+
/**
|
|
5
|
+
* Boost Listing
|
|
6
|
+
* Create a payment intent for boosting listings.
|
|
7
|
+
* This endpoint processes the boost request and returns a payment intent client secret.
|
|
8
|
+
* @param requestBody
|
|
9
|
+
* @returns BoostResponse Successful Response
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static boostListingV1PaymentsBoostPost(requestBody) {
|
|
13
|
+
return __request(OpenAPI, {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: '/v1/payments/boost',
|
|
16
|
+
body: requestBody,
|
|
17
|
+
mediaType: 'application/json',
|
|
18
|
+
errors: {
|
|
19
|
+
422: `Validation Error`,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Setup Payment Method
|
|
25
|
+
* Sets up a payment method for a user
|
|
26
|
+
* @returns any Successful Response
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
static setupPaymentMethodV1PaymentsPaymentMethodPost() {
|
|
30
|
+
return __request(OpenAPI, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
url: '/v1/payments/payment-method',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create Subscription
|
|
37
|
+
* Creates/updates subscription to swap pass for a user
|
|
38
|
+
* @param requestBody
|
|
39
|
+
* @returns void
|
|
40
|
+
* @throws ApiError
|
|
41
|
+
*/
|
|
42
|
+
static createSubscriptionV1PaymentsSubscriptionPost(requestBody) {
|
|
43
|
+
return __request(OpenAPI, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
url: '/v1/payments/subscription',
|
|
46
|
+
body: requestBody,
|
|
47
|
+
mediaType: 'application/json',
|
|
48
|
+
errors: {
|
|
49
|
+
422: `Validation Error`,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Cancel Subscription
|
|
55
|
+
* Cancels the subscription for a user
|
|
56
|
+
* @returns void
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static cancelSubscriptionV1PaymentsSubscriptionDelete() {
|
|
60
|
+
return __request(OpenAPI, {
|
|
61
|
+
method: 'DELETE',
|
|
62
|
+
url: '/v1/payments/subscription',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List Products
|
|
67
|
+
* @returns any Successful Response
|
|
68
|
+
* @throws ApiError
|
|
69
|
+
*/
|
|
70
|
+
static listProductsV1PaymentsProductsGet() {
|
|
71
|
+
return __request(OpenAPI, {
|
|
72
|
+
method: 'GET',
|
|
73
|
+
url: '/v1/payments/products',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Reset Pricing
|
|
78
|
+
* Resets the products dict to reflect changes in stripe
|
|
79
|
+
* @returns any Successful Response
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
82
|
+
static resetPricingV1PaymentsResetPost() {
|
|
83
|
+
return __request(OpenAPI, {
|
|
84
|
+
method: 'POST',
|
|
85
|
+
url: '/v1/payments/reset',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
4
88
|
/**
|
|
5
89
|
* Stripe Webhook
|
|
6
90
|
* Handle Stripe webhook events.
|
|
7
91
|
* This endpoint is used to process events sent by Stripe, such as payment success or failure.
|
|
8
|
-
* @returns
|
|
92
|
+
* @returns void
|
|
9
93
|
* @throws ApiError
|
|
10
94
|
*/
|
|
11
95
|
static stripeWebhookV1PaymentsWebhookPost() {
|
|
@@ -14,4 +98,17 @@ export class PaymentsService {
|
|
|
14
98
|
url: '/v1/payments/webhook',
|
|
15
99
|
});
|
|
16
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Get Boost Packages
|
|
103
|
+
* Retrieve available boost packages.
|
|
104
|
+
* This endpoint returns the prices and details of the available boost packages.
|
|
105
|
+
* @returns any Successful Response
|
|
106
|
+
* @throws ApiError
|
|
107
|
+
*/
|
|
108
|
+
static getBoostPackagesV1PaymentsBoostPackagesGet() {
|
|
109
|
+
return __request(OpenAPI, {
|
|
110
|
+
method: 'GET',
|
|
111
|
+
url: '/v1/payments/boost/packages',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
17
114
|
}
|
package/dist/stores/auth.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { User } from '../api/models/User';
|
|
2
|
+
import type { LoginResponse } from '../api/models/LoginResponse';
|
|
2
3
|
interface AuthState {
|
|
3
4
|
user: User | null;
|
|
4
5
|
session: any | null;
|
|
@@ -6,11 +7,14 @@ interface AuthState {
|
|
|
6
7
|
isOnboarded: boolean;
|
|
7
8
|
loading: boolean;
|
|
8
9
|
error: string | null;
|
|
10
|
+
deviceToken: string | null;
|
|
9
11
|
setUser: (user: User | null) => void;
|
|
10
12
|
setSession: (session: any | null) => void;
|
|
13
|
+
setAuthState: (session: any | null, loginResponse: LoginResponse | null) => void;
|
|
11
14
|
setLoading: (loading: boolean) => void;
|
|
12
15
|
setError: (error: string | null) => void;
|
|
13
16
|
logout: () => void;
|
|
17
|
+
setDeviceToken: (deviceToken: string | null) => void;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* Zustand store for authentication state management with Supabase.
|
|
@@ -18,6 +22,19 @@ interface AuthState {
|
|
|
18
22
|
* Manages user data, session state, loading states, and errors.
|
|
19
23
|
* Supabase automatically handles token refresh in the background.
|
|
20
24
|
*
|
|
25
|
+
* ## Usage Guidelines:
|
|
26
|
+
*
|
|
27
|
+
* **For complete auth operations (login, OAuth, session establishment):**
|
|
28
|
+
* - Use `setAuthState(session, loginResponse)` - sets all auth state atomically
|
|
29
|
+
* - Prevents race conditions by updating isAuthenticated and isOnboarded together
|
|
30
|
+
*
|
|
31
|
+
* **For partial updates (profile edits, user data changes):**
|
|
32
|
+
* - Use `setUser(user)` - updates only user data without changing auth state
|
|
33
|
+
* - Use `setSession(session)` - updates only session without changing auth state
|
|
34
|
+
*
|
|
35
|
+
* **For clearing all auth state:**
|
|
36
|
+
* - Use `logout()` - clears everything atomically
|
|
37
|
+
*
|
|
21
38
|
* @returns Auth store with user state, session, loading, and actions
|
|
22
39
|
*/
|
|
23
40
|
export declare const useAuthStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<AuthState>, "persist"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/stores/auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/stores/auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAEhE,UAAU,SAAS;IACjB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;IACjB,OAAO,EAAE,GAAG,GAAG,IAAI,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IACpC,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC,YAAY,EAAE,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;IAChF,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;CACrD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;EA0GxB,CAAA"}
|
package/dist/stores/auth.js
CHANGED
|
@@ -7,6 +7,19 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
|
7
7
|
* Manages user data, session state, loading states, and errors.
|
|
8
8
|
* Supabase automatically handles token refresh in the background.
|
|
9
9
|
*
|
|
10
|
+
* ## Usage Guidelines:
|
|
11
|
+
*
|
|
12
|
+
* **For complete auth operations (login, OAuth, session establishment):**
|
|
13
|
+
* - Use `setAuthState(session, loginResponse)` - sets all auth state atomically
|
|
14
|
+
* - Prevents race conditions by updating isAuthenticated and isOnboarded together
|
|
15
|
+
*
|
|
16
|
+
* **For partial updates (profile edits, user data changes):**
|
|
17
|
+
* - Use `setUser(user)` - updates only user data without changing auth state
|
|
18
|
+
* - Use `setSession(session)` - updates only session without changing auth state
|
|
19
|
+
*
|
|
20
|
+
* **For clearing all auth state:**
|
|
21
|
+
* - Use `logout()` - clears everything atomically
|
|
22
|
+
*
|
|
10
23
|
* @returns Auth store with user state, session, loading, and actions
|
|
11
24
|
*/
|
|
12
25
|
export const useAuthStore = create()(persist((set) => ({
|
|
@@ -14,31 +27,45 @@ export const useAuthStore = create()(persist((set) => ({
|
|
|
14
27
|
session: null,
|
|
15
28
|
isAuthenticated: false,
|
|
16
29
|
isOnboarded: false,
|
|
17
|
-
loading: true,
|
|
30
|
+
loading: true,
|
|
18
31
|
error: null,
|
|
32
|
+
deviceToken: null,
|
|
19
33
|
/**
|
|
20
|
-
* Updates the current user
|
|
34
|
+
* Updates the current user only (without changing auth state).
|
|
35
|
+
* Use setAuthState() for complete auth state updates.
|
|
21
36
|
*
|
|
22
37
|
* @param user - User profile data or null to clear
|
|
23
38
|
*/
|
|
24
39
|
setUser: (user) => {
|
|
25
40
|
set({
|
|
26
41
|
user,
|
|
27
|
-
isOnboarded: !!user?.onboarded_at,
|
|
28
|
-
loading: false, // Clear loading when user is set
|
|
29
42
|
error: null // Clear any errors
|
|
30
43
|
});
|
|
31
44
|
},
|
|
32
45
|
/**
|
|
33
|
-
* Updates the Supabase session
|
|
46
|
+
* Updates the Supabase session only (without changing auth state).
|
|
47
|
+
* Use setAuthState() for complete auth state updates.
|
|
34
48
|
*
|
|
35
49
|
* @param session - Supabase session object containing tokens
|
|
36
50
|
*/
|
|
37
51
|
setSession: (session) => {
|
|
52
|
+
set({ session });
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Sets complete authentication state atomically from session and LoginResponse.
|
|
56
|
+
* This prevents race conditions by updating both auth and onboarding status together.
|
|
57
|
+
*
|
|
58
|
+
* @param session - Supabase session object or null
|
|
59
|
+
* @param loginResponse - API response containing onboarded status and user profile
|
|
60
|
+
*/
|
|
61
|
+
setAuthState: (session, loginResponse) => {
|
|
38
62
|
set({
|
|
39
63
|
session,
|
|
40
64
|
isAuthenticated: !!session,
|
|
41
|
-
|
|
65
|
+
isOnboarded: loginResponse?.onboarded || false,
|
|
66
|
+
user: loginResponse?.profile || null,
|
|
67
|
+
loading: false,
|
|
68
|
+
error: null
|
|
42
69
|
});
|
|
43
70
|
},
|
|
44
71
|
/**
|
|
@@ -69,6 +96,14 @@ export const useAuthStore = create()(persist((set) => ({
|
|
|
69
96
|
loading: false,
|
|
70
97
|
error: null
|
|
71
98
|
});
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* Sets the device token for push notifications.
|
|
102
|
+
*
|
|
103
|
+
* @param deviceToken - Device token string or null to clear
|
|
104
|
+
*/
|
|
105
|
+
setDeviceToken: (deviceToken) => {
|
|
106
|
+
set({ deviceToken });
|
|
72
107
|
}
|
|
73
108
|
}), {
|
|
74
109
|
name: 'auth-storage',
|
|
@@ -77,7 +112,8 @@ export const useAuthStore = create()(persist((set) => ({
|
|
|
77
112
|
user: state.user,
|
|
78
113
|
session: state.session,
|
|
79
114
|
isAuthenticated: state.isAuthenticated,
|
|
80
|
-
isOnboarded: state.isOnboarded
|
|
115
|
+
isOnboarded: state.isOnboarded,
|
|
116
|
+
deviceToken: state.deviceToken
|
|
81
117
|
// Don't persist loading or error states
|
|
82
118
|
})
|
|
83
119
|
}));
|