@mcdylanproperenterprise/nodejs-proper-money-types 0.0.6 → 0.0.7

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/enum.ts CHANGED
@@ -1,8 +1,3 @@
1
- export enum EEnvironmentType {
2
- PRODUCTION = "PRODUCTION",
3
- STAGING = "STAGING",
4
- }
5
-
6
1
  export enum ESubscriptionEntitlement {
7
2
  starter = "Starter",
8
3
  plus = "Plus",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcdylanproperenterprise/nodejs-proper-money-types",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
package/types.ts ADDED
@@ -0,0 +1,433 @@
1
+ import {
2
+ EMissionType,
3
+ EPointFromType,
4
+ EPointType,
5
+ ERewardType,
6
+ ESubscriptionEntitlement,
7
+ ETransactionCategoryType,
8
+ EVerificationOneTimePasswordType,
9
+ } from "./enum";
10
+ import { EGetTransactionsBySort, EGetTransactionsByType } from "./enum";
11
+
12
+ export type TJwtTokenObject = {
13
+ userId: string;
14
+ };
15
+
16
+ export type TJwtToken = {
17
+ accessToken: string;
18
+ refreshToken: string;
19
+ };
20
+
21
+ export type TMission = {
22
+ userId?: String;
23
+ type: EMissionType;
24
+ description: string;
25
+ missionCount: {
26
+ completedCount: number;
27
+ totalCount: number;
28
+ };
29
+ point: Number;
30
+ isClaimed: boolean;
31
+ isClaimable: boolean;
32
+ isActive: boolean;
33
+ };
34
+
35
+ export type TGetMissionQuery = {
36
+ entitlement: ESubscriptionEntitlement;
37
+ };
38
+
39
+ export type TGetMissionResponse = {
40
+ dailyMissions: {
41
+ missions: TMission[];
42
+ refreshAt: string;
43
+ };
44
+ weeklyMissions: {
45
+ missions: TMission[];
46
+ period: {
47
+ startAt: Date;
48
+ endAt: Date;
49
+ };
50
+ refreshAt: string;
51
+ };
52
+ };
53
+
54
+ export type TPoint = {
55
+ _id: string;
56
+ userId: string;
57
+ type: EPointType;
58
+ value: number;
59
+ pointFrom: {
60
+ type: EPointFromType;
61
+ id: string | null;
62
+ documentType: ERewardType | EMissionType;
63
+ };
64
+ expiryAt: Date;
65
+ createdAt: Date;
66
+ };
67
+
68
+ export type TGetPointTotalResponse = {
69
+ totalPoints: number;
70
+ };
71
+
72
+ export type TPostPointClaimBody = {
73
+ missionType: EMissionType;
74
+ entitlement: ESubscriptionEntitlement;
75
+ };
76
+
77
+ export type TReward = {
78
+ _id: string;
79
+ userId: string;
80
+ type: ERewardType;
81
+ value: number;
82
+ expiryAt: Date;
83
+ isRedeemed: boolean;
84
+ phoneNumber: null | string;
85
+ emailAddress: null | string;
86
+ };
87
+
88
+ export type TRewardStoreItem = {
89
+ name: string;
90
+ description: string;
91
+ type: ERewardType;
92
+ price: number;
93
+ refreshAt: string;
94
+ inventoryLeft: number;
95
+ };
96
+
97
+ export type TGetRewardQuery = {
98
+ isValid: string;
99
+ page: string;
100
+ limit: string;
101
+ };
102
+
103
+ export type TGetRewardResponse = {
104
+ rewards: TReward[];
105
+ pagination: {
106
+ last_visible_page: number;
107
+ has_next_page: boolean;
108
+ };
109
+ };
110
+
111
+ export type TPostRewardSubmitBody = {
112
+ rewardId: string;
113
+ phoneNumber: string;
114
+ };
115
+
116
+ export type TPostRewardClaimBody = {
117
+ rewardId: string;
118
+ };
119
+
120
+ export type TGetRewardStoreResponse = {
121
+ rewardStoreItems: TRewardStoreItem[];
122
+ };
123
+
124
+ export type TPostRewardRedeemBody = {
125
+ rewardType: ERewardType;
126
+ };
127
+
128
+ export type TPostRewardRedeemResponse = {
129
+ value: string;
130
+ };
131
+
132
+ export type TPostTopUpCreateBillBody = {
133
+ userId: string;
134
+ productId: string;
135
+ description: string;
136
+ name: string;
137
+ email: string;
138
+ amount: string;
139
+ };
140
+
141
+ export type TPostTopUpCreateReferenceBody = {
142
+ userId: string;
143
+ productId: string;
144
+ referenceNo: string;
145
+ };
146
+
147
+ export type TPostTopUpEditReferenceBody = {
148
+ iPayEightyEightResponse: Object;
149
+ iPayEightyEightBackend: Object;
150
+ };
151
+
152
+ export type TTransaction = {
153
+ _id: string;
154
+ userId: string;
155
+ transactionCategoryId: string;
156
+ transactionLabelIds: string[];
157
+ transactionCategory: TTransactionCategory;
158
+ transactionLabels: TTransactionLabel[] | null;
159
+ currency: string;
160
+ amount: number;
161
+ imagePath: string | null;
162
+ note: string | null;
163
+ isDeleted: boolean;
164
+ transactedAt: Date;
165
+ updatedAt: Date;
166
+ createdAt: Date;
167
+ };
168
+
169
+ export type TTimelineTransaction = {
170
+ date: string;
171
+ records: TTransaction[];
172
+ totalIncome: number;
173
+ totalExpense: number;
174
+ totalCurrenciesIncomeAndExpenses: {
175
+ currency: string;
176
+ totalIncomes: number;
177
+ totalExpenses: number;
178
+ }[];
179
+ };
180
+
181
+ export type TGetTransactionsDashboardQuery = {
182
+ startTransactedAt: string;
183
+ endTransactedAt: string;
184
+ };
185
+
186
+ export type TGetTransactionDashboardResponse = {
187
+ user: {
188
+ transactions: TTransaction[];
189
+ transactionCategories: TTransactionCategory[];
190
+ transactionLabels: TTransactionLabel[];
191
+ timelineTransactions: TTimelineTransaction[];
192
+ };
193
+ sharedUser: {
194
+ transactions: TTransaction[];
195
+ transactionCategories: TTransactionCategory[];
196
+ transactionLabels: TTransactionLabel[];
197
+ timelineTransactions: TTimelineTransaction[];
198
+ };
199
+ total: {
200
+ transactions: TTransaction[];
201
+ transactionCategories: TTransactionCategory[];
202
+ transactionLabels: TTransactionLabel[];
203
+ timelineTransactions: TTimelineTransaction[];
204
+ };
205
+ };
206
+
207
+ export type TPostTransactionCreateBody = {
208
+ transactionCategoryId: string;
209
+ transactionLabelIds: string[];
210
+ currency: string;
211
+ amount: number;
212
+ imagePath: string | null;
213
+ note: string | null;
214
+ transactedAt: Date;
215
+ };
216
+
217
+ export type TPostTransactionUpdateBody = {
218
+ _id: string;
219
+ transactionCategoryId: string;
220
+ transactionLabelIds: string[];
221
+ currency: string;
222
+ amount: number;
223
+ imagePath: string | null;
224
+ note: string | null;
225
+ transactedAt: Date;
226
+ };
227
+
228
+ export type TPostTransactionDeleteBody = {
229
+ _id: string;
230
+ };
231
+
232
+ export type TGetTransactionQuery = {
233
+ sort: EGetTransactionsBySort;
234
+ page: string;
235
+ limit: string;
236
+ targetUserId: string;
237
+ _id: string;
238
+ type: EGetTransactionsByType;
239
+ startTransactedAt: string | null;
240
+ endTransactedAt: string | null;
241
+ };
242
+
243
+ export type TGetTransactionResponse = {
244
+ transactions: TTransaction[];
245
+ totalAmount: number;
246
+ totalTransactionsLength: number;
247
+ pagination: {
248
+ last_visible_page: number;
249
+ has_next_page: boolean;
250
+ };
251
+ };
252
+
253
+ export type TTransactionCategory = {
254
+ _id: string;
255
+ name: string;
256
+ type: ETransactionCategoryType;
257
+ backgroundColor: string;
258
+ imagePath: string;
259
+ userId: string;
260
+ isDeleted: boolean;
261
+ updatedAt: Date;
262
+ createdAt: Date;
263
+ };
264
+
265
+ export type TGetTransactionCategoryResponse = {
266
+ categories: TTransactionCategory[];
267
+ };
268
+
269
+ export type TPostTransactionCategoryCreateBody = {
270
+ name: string;
271
+ type: ETransactionCategoryType;
272
+ backgroundColor: string;
273
+ imagePath: string;
274
+ };
275
+
276
+ export type TPostTransactionCategoryCreateResponse = {
277
+ _id: string;
278
+ };
279
+
280
+ export type TPostTransactionCategoryUpdateBody = {
281
+ _id: string;
282
+ name: string;
283
+ type: ETransactionCategoryType;
284
+ backgroundColor: string;
285
+ imagePath: string;
286
+ };
287
+
288
+ export type TPostTransactionCategoryDeleteBody = {
289
+ _id: string;
290
+ };
291
+
292
+ export type TGetTransactionCategoryAssetsResponse = {
293
+ icons: string[];
294
+ backgroundColors: string[];
295
+ };
296
+
297
+ export type TTransactionLabel = {
298
+ _id: string;
299
+ name: string;
300
+ userId: string;
301
+ isDeleted: boolean;
302
+ updatedAt: Date;
303
+ createdAt: Date;
304
+ };
305
+
306
+ export type TGetTransactionLabelResponse = {
307
+ labels: TTransactionLabel[];
308
+ };
309
+
310
+ export type TPostTransactionLabelCreateBody = {
311
+ name: string;
312
+ };
313
+
314
+ export type TPostTransactionLabelCreateResponse = {
315
+ _id: string;
316
+ };
317
+
318
+ export type TPostTransactionLabelUpdateBody = {
319
+ _id: string;
320
+ name: string;
321
+ };
322
+
323
+ export type TPostTransactionLabelDeleteBody = {
324
+ _id: string;
325
+ };
326
+
327
+ export type TUser = {
328
+ _id: string;
329
+ phoneNumber: string;
330
+ profileImage: string;
331
+ displayName: string;
332
+ language: string;
333
+ currency: string;
334
+ sharedUserId: string | null;
335
+ sharedUserInfo: TSharedUserInfo;
336
+ lastActiveAt: Date;
337
+ premiumMemberTrialEndAt: Date | null;
338
+ topUpMemberRole: ESubscriptionEntitlement | null;
339
+ topUpMemberEndAt: Date | null;
340
+ createdAt: Date;
341
+ notificationToken: string | null;
342
+ };
343
+
344
+ export type TMemberFeature = {
345
+ name: ESubscriptionEntitlement;
346
+ maximumCategories: number;
347
+ maximumLabels: number;
348
+ claimPointMultiplier: number;
349
+ isAblePhotoAI: boolean;
350
+ };
351
+
352
+ export const memberFeatureFree: TMemberFeature = {
353
+ name: ESubscriptionEntitlement.starter,
354
+ maximumCategories: 5,
355
+ maximumLabels: 10,
356
+ claimPointMultiplier: 1,
357
+ isAblePhotoAI: false,
358
+ };
359
+
360
+ export const memberFeaturePlus: TMemberFeature = {
361
+ name: ESubscriptionEntitlement.plus,
362
+ maximumCategories: 50,
363
+ maximumLabels: 100,
364
+ claimPointMultiplier: 2,
365
+ isAblePhotoAI: false,
366
+ };
367
+
368
+ export const memberFeaturePremium: TMemberFeature = {
369
+ name: ESubscriptionEntitlement.premium,
370
+ maximumCategories: 100,
371
+ maximumLabels: 200,
372
+ claimPointMultiplier: 4,
373
+ isAblePhotoAI: true,
374
+ };
375
+
376
+ export type TSharedUserInfo = {
377
+ _id: string;
378
+ id: string;
379
+ profileImage: string;
380
+ emailAddress: string | null;
381
+ phoneNumber: string | null;
382
+ displayName: string;
383
+ notificationToken: string | null;
384
+ } | null;
385
+
386
+ export type TGetUserDetailResponse = TUser;
387
+
388
+ export type TPostUserRemoveSharedUserBody = {
389
+ sharedUserId: string;
390
+ };
391
+
392
+ export type TPostUserRequestOTPBody = {
393
+ phoneNumber: string;
394
+ };
395
+
396
+ export type TPostUserRequestOTPResponse = {
397
+ verificationOneTimePasswordType: EVerificationOneTimePasswordType;
398
+ };
399
+
400
+ export type TPostUserUpdateBody = Partial<TUser>;
401
+
402
+ export type TVerification = {
403
+ _id: string;
404
+ userId: string;
405
+ type: EVerificationOneTimePasswordType;
406
+ oneTimePassword: string;
407
+ phoneNumber: string | null;
408
+ expiryAt: Date;
409
+ isVerify: boolean;
410
+ verifiedAt: Date | null;
411
+ createdAt: Date;
412
+ };
413
+
414
+ export type TPostVerificationVerifyBody = {
415
+ phoneNumber: string;
416
+ oneTimePassword: string;
417
+ oneTimePasswordType: EVerificationOneTimePasswordType;
418
+ };
419
+
420
+ export type TPostVerificationVerifyResponse = TJwtToken;
421
+
422
+ export type TGetVerificationPostGenerateShareIdResponse = {
423
+ oneTimePassword: string;
424
+ expiryAt: Date;
425
+ };
426
+
427
+ export type TPostVerifyShareIdBody = {
428
+ oneTimePassword: string;
429
+ };
430
+
431
+ export type TPostVerifyShareIdReponse = {
432
+ sharedUserId: string;
433
+ };
package/middleware.ts DELETED
@@ -1,8 +0,0 @@
1
- export type TJwtTokenObject = {
2
- userId: string;
3
- };
4
-
5
- export type TJwtToken = {
6
- accessToken: string;
7
- refreshToken: string;
8
- };
package/mission.ts DELETED
@@ -1,34 +0,0 @@
1
- import { EMissionType, ESubscriptionEntitlement } from "./enum";
2
-
3
- export type TMission = {
4
- userId?: String;
5
- type: EMissionType;
6
- description: string;
7
- missionCount: {
8
- completedCount: number;
9
- totalCount: number;
10
- };
11
- point: Number;
12
- isClaimed: boolean;
13
- isClaimable: boolean;
14
- isActive: boolean;
15
- };
16
-
17
- export type TMissionGetMissionsQuery = {
18
- entitlement: ESubscriptionEntitlement;
19
- };
20
-
21
- export type TMissionGetMissionsResponse = {
22
- dailyMissions: {
23
- missions: TMission[];
24
- refreshAt: string;
25
- };
26
- weeklyMissions: {
27
- missions: TMission[];
28
- period: {
29
- startAt: Date;
30
- endAt: Date;
31
- };
32
- refreshAt: string;
33
- };
34
- };
package/point.ts DELETED
@@ -1,30 +0,0 @@
1
- import {
2
- EMissionType,
3
- EPointFromType,
4
- EPointType,
5
- ERewardType,
6
- ESubscriptionEntitlement,
7
- } from "./enum";
8
-
9
- export type TPoint = {
10
- _id: string;
11
- userId: string;
12
- type: EPointType;
13
- value: number;
14
- pointFrom: {
15
- type: EPointFromType;
16
- id: string | null;
17
- documentType: ERewardType | EMissionType;
18
- };
19
- expiryAt: Date;
20
- createdAt: Date;
21
- };
22
-
23
- export type TPointGetTotalPointsResponse = {
24
- totalPoints: number;
25
- };
26
-
27
- export type TPointClaimPointBody = {
28
- missionType: EMissionType;
29
- entitlement: ESubscriptionEntitlement;
30
- };
package/reward.ts DELETED
@@ -1,56 +0,0 @@
1
- import { ERewardType } from "./enum";
2
-
3
- export type TReward = {
4
- _id: string;
5
- userId: string;
6
- type: ERewardType;
7
- value: number;
8
- expiryAt: Date;
9
- isRedeemed: boolean;
10
- phoneNumber: null | string;
11
- emailAddress: null | string;
12
- };
13
-
14
- export type TRewardStoreItem = {
15
- name: string;
16
- description: string;
17
- type: ERewardType;
18
- price: number;
19
- refreshAt: string;
20
- inventoryLeft: number;
21
- };
22
-
23
- export type TRewardGetRewardsQuery = {
24
- isValid: string;
25
- page: string;
26
- limit: string;
27
- };
28
-
29
- export type TRewardGetRewardsResponse = {
30
- rewards: TReward[];
31
- pagination: {
32
- last_visible_page: number;
33
- has_next_page: boolean;
34
- };
35
- };
36
-
37
- export type TRewardSubmitRedeemFormBody = {
38
- rewardId: string;
39
- phoneNumber: string;
40
- };
41
-
42
- export type TRewardClaimRewardPointBody = {
43
- rewardId: string;
44
- };
45
-
46
- export type TRewardGetRewardStoreItemsResponse = {
47
- rewardStoreItems: TRewardStoreItem[];
48
- };
49
-
50
- export type TRewardRedeemStoreItemBody = {
51
- rewardType: ERewardType;
52
- };
53
-
54
- export type TRewardRedeemStoreItemResponse = {
55
- value: string;
56
- };
package/topup.ts DELETED
@@ -1,19 +0,0 @@
1
- export type TTopUpCreateBillBody = {
2
- userId: string;
3
- productId: string;
4
- description: string;
5
- name: string;
6
- email: string;
7
- amount:string;
8
- }
9
-
10
- export type TTopUpCreateReferenceBody = {
11
- userId: string;
12
- productId: string;
13
- referenceNo: string;
14
- };
15
-
16
- export type TTopUpEditReferenceBody = {
17
- iPayEightyEightResponse: Object;
18
- iPayEightyEightBackend: Object;
19
- };
package/transaction.ts DELETED
@@ -1,104 +0,0 @@
1
- import { EGetTransactionsBySort, EGetTransactionsByType } from "./enum";
2
- import { TTransactionCategory } from "./transactionCategory";
3
- import { TTransactionLabel } from "./transactionLabel";
4
-
5
- export type TTransaction = {
6
- _id: string;
7
- userId: string;
8
- transactionCategoryId: string;
9
- transactionLabelIds: string[];
10
- transactionCategory: TTransactionCategory;
11
- transactionLabels: TTransactionLabel[] | null;
12
- currency: string;
13
- amount: number;
14
- imagePath: string | null;
15
- note: string | null;
16
- isDeleted: boolean;
17
- transactedAt: Date;
18
- updatedAt: Date;
19
- createdAt: Date;
20
- };
21
-
22
- export type TTimelineTransaction = {
23
- date: string;
24
- records: TTransaction[];
25
- totalIncome: number;
26
- totalExpense: number;
27
- totalCurrenciesIncomeAndExpenses: {
28
- currency: string;
29
- totalIncomes: number;
30
- totalExpenses: number;
31
- }[];
32
- };
33
-
34
- export type TTransactionGetTransactionsQuery = {
35
- startTransactedAt: string;
36
- endTransactedAt: string;
37
- };
38
-
39
- export type TTransactionGetTransactionsResponse = {
40
- user: {
41
- transactions: TTransaction[];
42
- transactionCategories: TTransactionCategory[];
43
- transactionLabels: TTransactionLabel[];
44
- timelineTransactions: TTimelineTransaction[];
45
- };
46
- sharedUser: {
47
- transactions: TTransaction[];
48
- transactionCategories: TTransactionCategory[];
49
- transactionLabels: TTransactionLabel[];
50
- timelineTransactions: TTimelineTransaction[];
51
- };
52
- total: {
53
- transactions: TTransaction[];
54
- transactionCategories: TTransactionCategory[];
55
- transactionLabels: TTransactionLabel[];
56
- timelineTransactions: TTimelineTransaction[];
57
- };
58
- };
59
-
60
- export type TTransactionCreateTransactionBody = {
61
- transactionCategoryId: string;
62
- transactionLabelIds: string[];
63
- currency: string;
64
- amount: number;
65
- imagePath: string | null;
66
- note: string | null;
67
- transactedAt: Date;
68
- };
69
-
70
- export type TTransactionEditTransactionBody = {
71
- _id: string;
72
- transactionCategoryId: string;
73
- transactionLabelIds: string[];
74
- currency: string;
75
- amount: number;
76
- imagePath: string | null;
77
- note: string | null;
78
- transactedAt: Date;
79
- };
80
-
81
- export type TTransactionDeleteTransactionBody = {
82
- _id: string;
83
- };
84
-
85
- export type TTransactionGetTransactionsByIdQuery = {
86
- sort: EGetTransactionsBySort;
87
- targetUserId: string;
88
- _id: string;
89
- type: EGetTransactionsByType;
90
- page: string;
91
- limit: string;
92
- startTransactedAt: string | null;
93
- endTransactedAt: string | null;
94
- };
95
-
96
- export type TTransactionGetTransactionsByIdResponse = {
97
- transactions: TTransaction[];
98
- totalAmount: number;
99
- totalTransactionsLength: number;
100
- pagination: {
101
- last_visible_page: number;
102
- has_next_page: boolean;
103
- };
104
- };
@@ -1,45 +0,0 @@
1
- import { ETransactionCategoryType } from "./enum";
2
-
3
- export type TTransactionCategory = {
4
- _id: string;
5
- name: string;
6
- type: ETransactionCategoryType;
7
- backgroundColor: string;
8
- imagePath: string;
9
- userId: string;
10
- isDeleted: boolean;
11
- updatedAt: Date;
12
- createdAt: Date;
13
- };
14
-
15
- export type TTransactionCategoryGetTransactionCategoryResponse = {
16
- categories: TTransactionCategory[];
17
- };
18
-
19
- export type TTransactionCategoryCreateTransactionCategoryBody = {
20
- name: string;
21
- type: ETransactionCategoryType;
22
- backgroundColor: string;
23
- imagePath: string;
24
- };
25
-
26
- export type TTransactionCategoryCreateTransactionCategoryResponse = {
27
- _id: string;
28
- };
29
-
30
- export type TTransactionCategoryEditTransactionCategoryBody = {
31
- _id: string;
32
- name: string;
33
- type: ETransactionCategoryType;
34
- backgroundColor: string;
35
- imagePath: string;
36
- };
37
-
38
- export type TTransactionCategoryDeleteTransactionCategoryBody = {
39
- _id: string;
40
- };
41
-
42
- export type TTransactionCategoryGetTransactionCategoryAssetResponse = {
43
- icons: string[];
44
- backgroundColors: string[];
45
- };
@@ -1,29 +0,0 @@
1
- export type TTransactionLabel = {
2
- _id: string;
3
- name: string;
4
- userId: string;
5
- isDeleted: boolean;
6
- updatedAt: Date;
7
- createdAt: Date;
8
- };
9
-
10
- export type TTransactionLabelGetTransactionLabelResponse = {
11
- labels: TTransactionLabel[];
12
- };
13
-
14
- export type TTransactionLabelCreateTransactionLabelBody = {
15
- name: string;
16
- };
17
-
18
- export type TTransactionLabelCreateTransactionLabelResponse = {
19
- _id: string;
20
- };
21
-
22
- export type TTransactionLabelEditTransactionLabelBody = {
23
- _id: string;
24
- name: string;
25
- };
26
-
27
- export type TTransactionLabelDeleteTransactionLabelBody = {
28
- _id: string;
29
- };
package/user.ts DELETED
@@ -1,79 +0,0 @@
1
- import {
2
- ESubscriptionEntitlement,
3
- EVerificationOneTimePasswordType,
4
- } from "./enum";
5
-
6
- export type TUser = {
7
- _id: string;
8
- phoneNumber: string;
9
- profileImage: string;
10
- displayName: string;
11
- language: string;
12
- currency: string;
13
- sharedUserId: string | null;
14
- sharedUserInfo: TSharedUserInfo;
15
- lastActiveAt: Date;
16
- premiumMemberTrialEndAt: Date | null;
17
- topUpMemberRole: ESubscriptionEntitlement | null;
18
- topUpMemberEndAt: Date | null;
19
- createdAt: Date;
20
- notificationToken: string | null;
21
- };
22
-
23
- export type TMemberFeature = {
24
- name: ESubscriptionEntitlement;
25
- maximumCategories: number;
26
- maximumLabels: number;
27
- claimPointMultiplier: number;
28
- isAblePhotoAI: boolean;
29
- };
30
-
31
- export const memberFeatureFree: TMemberFeature = {
32
- name: ESubscriptionEntitlement.starter,
33
- maximumCategories: 5,
34
- maximumLabels: 10,
35
- claimPointMultiplier: 1,
36
- isAblePhotoAI: false,
37
- };
38
-
39
- export const memberFeaturePlus: TMemberFeature = {
40
- name: ESubscriptionEntitlement.plus,
41
- maximumCategories: 50,
42
- maximumLabels: 100,
43
- claimPointMultiplier: 2,
44
- isAblePhotoAI: false,
45
- };
46
-
47
- export const memberFeaturePremium: TMemberFeature = {
48
- name: ESubscriptionEntitlement.premium,
49
- maximumCategories: 100,
50
- maximumLabels: 200,
51
- claimPointMultiplier: 4,
52
- isAblePhotoAI: true,
53
- };
54
-
55
- export type TSharedUserInfo = {
56
- _id: string;
57
- id: string;
58
- profileImage: string;
59
- emailAddress: string | null;
60
- phoneNumber: string | null;
61
- displayName: string;
62
- notificationToken: string | null;
63
- } | null;
64
-
65
- export type TUserDetailResponse = TUser;
66
-
67
- export type TUserRemoveSharedUserBody = {
68
- sharedUserId: string;
69
- };
70
-
71
- export type TUserRequestOTPBody = {
72
- phoneNumber: string;
73
- };
74
-
75
- export type TUserRequestOTPResponse = {
76
- verificationOneTimePasswordType: EVerificationOneTimePasswordType;
77
- };
78
-
79
- export type TUserUpdateBody = Partial<TUser>;
package/verification.ts DELETED
@@ -1,35 +0,0 @@
1
- import { EVerificationOneTimePasswordType } from "./enum";
2
- import { TJwtToken } from "./middleware";
3
-
4
- export type TVerification = {
5
- _id: string;
6
- userId: string;
7
- type: EVerificationOneTimePasswordType;
8
- oneTimePassword: string;
9
- phoneNumber: string | null;
10
- expiryAt: Date;
11
- isVerify: boolean;
12
- verifiedAt: Date | null;
13
- createdAt: Date;
14
- };
15
-
16
- export type TVerificationVerifyBody = {
17
- phoneNumber: string;
18
- oneTimePassword: string;
19
- oneTimePasswordType: EVerificationOneTimePasswordType;
20
- };
21
-
22
- export type TVerificationVerifyResponse = TJwtToken;
23
-
24
- export type TVerificationGetShareIdResponse = {
25
- oneTimePassword: string;
26
- expiryAt: Date;
27
- };
28
-
29
- export type TVerifyShareIdBody = {
30
- oneTimePassword: string;
31
- };
32
-
33
- export type TVerifyShareIdReponse = {
34
- sharedUserId: string;
35
- };