@mcdylanproperenterprise/nodejs-proper-money-types 0.0.2 → 0.0.4

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 (3) hide show
  1. package/package.json +1 -1
  2. package/user.ts +20 -103
  3. package/exchangeRate.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcdylanproperenterprise/nodejs-proper-money-types",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
package/user.ts CHANGED
@@ -1,9 +1,25 @@
1
- import { TJwtToken } from "./middleware";
2
1
  import {
3
2
  ESubscriptionEntitlement,
4
3
  EVerificationOneTimePasswordType,
5
4
  } from "./enum";
6
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
+
7
23
  export type TMemberFeature = {
8
24
  name: ESubscriptionEntitlement;
9
25
  maximumCategories: number;
@@ -46,113 +62,12 @@ export type TSharedUserInfo = {
46
62
  notificationToken: string | null;
47
63
  } | null;
48
64
 
49
- export type TSSOgoogle = {
50
- userId: String;
51
- accessToken: String;
52
- refreshToken: String;
53
- email: String;
54
- name: String | null;
55
- picture: String | null;
56
- } | null;
57
-
58
- export type TSSOapple = {
59
- identityToken: string;
60
- email: string;
61
- userId: string;
62
- accessToken: string;
63
- refreshToken: string;
64
- authorizationCode: string;
65
- } | null;
66
-
67
- export type TSSOfacebook = {
68
- userId: String;
69
- accessToken: String;
70
- email: String;
71
- name: String | null;
72
- } | null;
73
-
74
- export type TUser = {
75
- _id: string;
76
- phoneNumber: string;
77
- profileImage: string;
78
- displayName: string;
79
- language: string;
80
- currency: string;
81
- sharedUserId: string | null;
82
- sharedUserInfo: TSharedUserInfo;
83
- lastActiveAt: Date;
84
- premiumMemberTrialEndAt: Date | null;
85
- topUpMemberRole: ESubscriptionEntitlement | null;
86
- topUpMemberEndAt: Date | null;
87
- createdAt: Date;
88
- notificationToken: string | null;
89
- };
90
-
91
- export type TUserGetInfoResponse = TUser;
92
-
93
- export type TUserContinueWithGoogleBody = {
94
- deviceUniqueId: string;
95
- idToken: string;
96
- serverAuthCode: string;
97
- };
98
-
99
- export type TUserContinueWithGoogleResponse = TJwtToken;
100
-
101
- export type TUserContinueWithAppleBody = {
102
- authorizationCode: string;
103
- deviceUniqueId: string;
104
- identityToken: string;
105
- appleUserId: string;
106
- };
107
-
108
- export type TUserContinueWithAppleResponse = TJwtToken;
109
-
110
- export type TUserContinueWithFacebookBody = {
111
- deviceUniqueId: string;
112
- accessToken: string;
113
- };
114
-
115
- export type TUserContinueWithFacebookResponse = TJwtToken;
116
-
117
- export type TUserRegisterNotificationBody = {
118
- notificationToken: string;
119
- };
120
-
121
- export type TUserUpdateUserDisplayNameBody = {
122
- displayName: string;
123
- };
124
-
125
- export type TUserUpdateUserLanguageBody = {
126
- language: string;
127
- };
128
-
129
- export type TUserUpdateUserCurrencyBody = {
130
- currency: string;
131
- };
132
-
133
- export type TUserResetPasswordBody = {
134
- deviceUniqueId: string;
135
- emailAddress?: string;
136
- phoneNumber?: string;
137
- password: string;
138
- oneTimePassword: string;
139
- oneTimePasswordType: EVerificationOneTimePasswordType;
140
- };
141
-
142
- export type TUserChangePasswordBody = {
143
- currentPassword: string;
144
- newPassword: string;
145
- };
65
+ export type TUserDetailResponse = TUser;
146
66
 
147
67
  export type TUserRemoveSharedUserBody = {
148
68
  sharedUserId: string;
149
69
  };
150
70
 
151
- export type TUserSendGlobalNotificationBody = {
152
- title: string;
153
- body: string;
154
- };
155
-
156
71
  export type TUserRequestOTPBody = {
157
72
  phoneNumber: string;
158
73
  };
@@ -160,3 +75,5 @@ export type TUserRequestOTPBody = {
160
75
  export type TUserRequestOTPResponse = {
161
76
  verificationOneTimePasswordType: EVerificationOneTimePasswordType;
162
77
  };
78
+
79
+ export type TUserUpdateBody = Partial<TUser>;
package/exchangeRate.ts DELETED
@@ -1,6 +0,0 @@
1
- export type TExchangeRate = {
2
- amount: number;
3
- base: string;
4
- date: Date;
5
- rates: Object;
6
- };