@dgpholdings/greatoak-shared 1.1.91 → 1.1.93

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.
@@ -74,20 +74,3 @@ export type TApiSignInTokenRes = {
74
74
  } | {
75
75
  status: 500;
76
76
  });
77
- export type TApiForgotPasswordReq = {
78
- email: string;
79
- captchaToken: string;
80
- };
81
- export type TApiForgotPasswordRes = {
82
- success: boolean;
83
- state: "token_issued_recently" | "token_issued" | "failed";
84
- lastIssuedTokenTimeStamp?: number;
85
- };
86
- export type TApiResetPasswordReq = {
87
- verifyToken: string;
88
- newPassword: string;
89
- captchaToken: string;
90
- };
91
- export type TApiResetPasswordRes = {
92
- success: boolean;
93
- };
@@ -0,0 +1,35 @@
1
+ export type TRevenueCatEventType = "INITIAL_PURCHASE" | "RENEWAL" | "CANCELLATION" | "UNCANCELLATION" | "NON_RENEWING_PURCHASE" | "EXPIRATION" | "BILLING_ISSUE" | "PRODUCT_CHANGE" | "TRANSFER" | "SUBSCRIPTION_PAUSED" | "SUBSCRIPTION_EXTENDED";
2
+ export type TApiRevenueCatWebhookReq = {
3
+ api_version: string;
4
+ event: {
5
+ type: TRevenueCatEventType;
6
+ app_user_id: string;
7
+ original_app_user_id: string;
8
+ product_id: string;
9
+ purchased_at_ms: number;
10
+ expiration_at_ms?: number;
11
+ store: "app_store" | "play_store";
12
+ environment: "PRODUCTION" | "SANDBOX";
13
+ entitlement_ids: string[];
14
+ period_type: "NORMAL" | "TRIAL" | "INTRO";
15
+ is_trial_conversion: boolean;
16
+ price?: number;
17
+ currency?: string;
18
+ price_in_purchased_currency?: number;
19
+ transaction_id: string;
20
+ original_transaction_id: string;
21
+ presented_offering_id?: string;
22
+ takehome_percentage?: number;
23
+ aliases?: string[];
24
+ id?: string;
25
+ cancellation_at_ms?: number;
26
+ unsubscribe_detected_at_ms?: number;
27
+ billing_issues_detected_at_ms?: number;
28
+ grace_period_expires_at_ms?: number;
29
+ new_product_id?: string;
30
+ };
31
+ };
32
+ export type TApiRevenueCatWebhookRes = {
33
+ status: 200 | 400 | 401 | 500;
34
+ message?: string;
35
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ export type TSubscriptionStatus = "active" | "cancelled" | "expired" | "trial" |
8
8
  export type TSubscriptionType = "monthly" | "yearly" | null;
9
9
  export type TAppStore = "app_store" | "play_store" | null;
10
10
  export type TUserMetric = {
11
+ userId: string;
11
12
  dob: Date;
12
13
  userCode: string;
13
14
  fullName?: string;
@@ -32,8 +33,7 @@ export type TUserMetric = {
32
33
  createdAt: Date;
33
34
  updatedAt?: Date;
34
35
  };
35
- export type TUserMetricWoSubscription = Omit<TUserMetric, "subscriptionStatus" | "subscriptionType" | "subscriptionExpiresAt" | "subscriptionStartedAt" | "subscriptionWillRenew" | "subscriptionStore" | "subscriptionLastUpdatedAt">;
36
- export type TApiUserUpdateReq = Omit<TUserMetricWoSubscription, "createdAt" | "updatedAt">;
36
+ export type TApiUserUpdateReq = Omit<TUserMetric, "userId" | "subscriptionStatus" | "subscriptionType" | "subscriptionExpiresAt" | "subscriptionStartedAt" | "subscriptionWillRenew" | "subscriptionStore" | "subscriptionLastUpdatedAt">;
37
37
  export type TApiUserUpdateRes = {
38
38
  status: 400 | 500;
39
39
  state: "failed" | "time_restricted_error";
@@ -7,3 +7,4 @@ export type * from "./TApiBillingPlan";
7
7
  export type * from "./TApiUser";
8
8
  export type * from "./TApiTemplateShop";
9
9
  export type * from "./commonTypes";
10
+ export type * from "./TApiRevenueCat";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dgpholdings/greatoak-shared",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "description": "Shared TypeScript types and utilities for @dgpholdings projects",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",