@rift-finance/wallet 1.4.33 → 1.4.34
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/services/Deposits.js +2 -2
- package/dist/services/Deposits.js.map +1 -1
- package/dist/services/assets.js +7 -7
- package/dist/services/assets.js.map +1 -1
- package/dist/services/auth.js +19 -19
- package/dist/services/auth.js.map +1 -1
- package/dist/services/bridge.js +3 -3
- package/dist/services/bridge.js.map +1 -1
- package/dist/services/defi.js +1 -1
- package/dist/services/defi.js.map +1 -1
- package/dist/services/kyc.js +7 -7
- package/dist/services/kyc.js.map +1 -1
- package/dist/services/merchant.js +3 -3
- package/dist/services/merchant.js.map +1 -1
- package/dist/services/notifications.d.ts +23 -19
- package/dist/services/notifications.d.ts.map +1 -1
- package/dist/services/notifications.js +28 -43
- package/dist/services/notifications.js.map +1 -1
- package/dist/services/offramp.js +8 -8
- package/dist/services/offramp.js.map +1 -1
- package/dist/services/onramp_v2.js +3 -3
- package/dist/services/onramp_v2.js.map +1 -1
- package/dist/services/signer.js +4 -4
- package/dist/services/signer.js.map +1 -1
- package/dist/services/transactions.js +3 -3
- package/dist/services/transactions.js.map +1 -1
- package/dist/services/user-management.js +4 -4
- package/dist/services/user-management.js.map +1 -1
- package/dist/services/vault.js +19 -19
- package/dist/services/vault.js.map +1 -1
- package/dist/services/wallet-connect.js +6 -6
- package/dist/services/wallet-connect.js.map +1 -1
- package/dist/services/wallet.js +2 -2
- package/dist/services/wallet.js.map +1 -1
- package/dist/types.d.ts +13 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +41 -41
|
@@ -6,13 +6,13 @@ class DepositsService extends base_service_1.BaseService {
|
|
|
6
6
|
async getAllDeposits() {
|
|
7
7
|
return this.authenticatedRequest({
|
|
8
8
|
method: "GET",
|
|
9
|
-
url: "/
|
|
9
|
+
url: "/v1/deposits",
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
async getDepositStats() {
|
|
13
13
|
return this.authenticatedRequest({
|
|
14
14
|
method: "GET",
|
|
15
|
-
url: "/
|
|
15
|
+
url: "/v1/deposits/stats",
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deposits.js","sourceRoot":"","sources":["../../src/services/Deposits.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,MAAa,eAAgB,SAAQ,0BAAW;IAE5C,KAAK,CAAC,cAAc;QAChB,OAAO,IAAI,CAAC,oBAAoB,CAAyB;YACrD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"Deposits.js","sourceRoot":"","sources":["../../src/services/Deposits.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,MAAa,eAAgB,SAAQ,0BAAW;IAE5C,KAAK,CAAC,cAAc;QAChB,OAAO,IAAI,CAAC,oBAAoB,CAAyB;YACrD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;SACtB,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,eAAe;QACjB,OAAO,IAAI,CAAC,oBAAoB,CAAuB;YACnD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC5B,CAAC,CAAC;IACP,CAAC;CAEJ;AAhBD,0CAgBC"}
|
package/dist/services/assets.js
CHANGED
|
@@ -12,7 +12,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
12
12
|
// This requires authentication
|
|
13
13
|
return this.authenticatedRequest({
|
|
14
14
|
method: "GET",
|
|
15
|
-
url: "/
|
|
15
|
+
url: "/v1/chains",
|
|
16
16
|
params: { active: "true" },
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -20,7 +20,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
20
20
|
// Public endpoint
|
|
21
21
|
return this.publicRequest({
|
|
22
22
|
method: "GET",
|
|
23
|
-
url: "/
|
|
23
|
+
url: "/v1/chains",
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -30,7 +30,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
30
30
|
async getAllTokens() {
|
|
31
31
|
return this.publicRequest({
|
|
32
32
|
method: "GET",
|
|
33
|
-
url: "/
|
|
33
|
+
url: "/v1/tokens",
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -39,7 +39,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
39
39
|
async getUserTokens() {
|
|
40
40
|
return this.authenticatedRequest({
|
|
41
41
|
method: "GET",
|
|
42
|
-
url: "/
|
|
42
|
+
url: "/v1/me/tokens",
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -48,7 +48,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
48
48
|
async getTokensByChainId(chainId) {
|
|
49
49
|
return this.publicRequest({
|
|
50
50
|
method: "GET",
|
|
51
|
-
url: `/
|
|
51
|
+
url: `/v1/chains/${chainId}/tokens`,
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -58,7 +58,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
58
58
|
async getTokenById(tokenId) {
|
|
59
59
|
return this.publicRequest({
|
|
60
60
|
method: "GET",
|
|
61
|
-
url: `/
|
|
61
|
+
url: `/v1/tokens/${tokenId}`,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -67,7 +67,7 @@ class AssetsService extends base_service_1.BaseService {
|
|
|
67
67
|
async getChainById(chainId) {
|
|
68
68
|
return this.publicRequest({
|
|
69
69
|
method: "GET",
|
|
70
|
-
url: `/
|
|
70
|
+
url: `/v1/chains/${chainId}`,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/services/assets.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAQ9C,MAAa,aAAc,SAAQ,0BAAW;IAC5C;;;OAGG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAAgB;QAEhB,IAAI,MAAM,EAAE,CAAC;YACX,+BAA+B;YAC/B,OAAO,IAAI,CAAC,oBAAoB,CAA6B;gBAC3D,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/services/assets.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAQ9C,MAAa,aAAc,SAAQ,0BAAW;IAC5C;;;OAGG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAAgB;QAEhB,IAAI,MAAM,EAAE,CAAC;YACX,+BAA+B;YAC/B,OAAO,IAAI,CAAC,oBAAoB,CAA6B;gBAC3D,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;aAC3B,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,kBAAkB;YAClB,OAAO,IAAI,CAAC,aAAa,CAA6B;gBACpD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,YAAY;aAClB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,aAAa,CAA6B;YACpD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,YAAY;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,oBAAoB,CAA6B;YAC3D,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,eAAe;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAe;QAEf,OAAO,IAAI,CAAC,aAAa,CAA6B;YACpD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,OAAO,SAAS;SACpC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,aAAa,CAA2B;YAClD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,OAAO,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,aAAa,CAA2B;YAClD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,OAAO,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;CACF;AA5ED,sCA4EC"}
|
package/dist/services/auth.js
CHANGED
|
@@ -6,14 +6,14 @@ class AuthService extends base_service_1.BaseService {
|
|
|
6
6
|
async signup(request) {
|
|
7
7
|
return this.publicRequest({
|
|
8
8
|
method: "POST",
|
|
9
|
-
url: "/auth/
|
|
9
|
+
url: "/v1/auth/sign-up",
|
|
10
10
|
data: request,
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
async login(request) {
|
|
14
14
|
const response = await this.publicRequest({
|
|
15
15
|
method: "POST",
|
|
16
|
-
url: "/auth/
|
|
16
|
+
url: "/v1/auth/sign-in",
|
|
17
17
|
data: request,
|
|
18
18
|
});
|
|
19
19
|
if (response.accessToken) {
|
|
@@ -36,7 +36,7 @@ class AuthService extends base_service_1.BaseService {
|
|
|
36
36
|
async loginWithGoogle(request) {
|
|
37
37
|
const response = await this.publicRequest({
|
|
38
38
|
method: "POST",
|
|
39
|
-
url: "/auth/google",
|
|
39
|
+
url: "/v1/auth/sign-in/google",
|
|
40
40
|
data: request,
|
|
41
41
|
});
|
|
42
42
|
if (response.accessToken) {
|
|
@@ -62,7 +62,7 @@ class AuthService extends base_service_1.BaseService {
|
|
|
62
62
|
async loginWithApple(request) {
|
|
63
63
|
const response = await this.publicRequest({
|
|
64
64
|
method: "POST",
|
|
65
|
-
url: "/auth/apple",
|
|
65
|
+
url: "/v1/auth/sign-in/apple",
|
|
66
66
|
data: request,
|
|
67
67
|
});
|
|
68
68
|
if (response.accessToken) {
|
|
@@ -73,34 +73,34 @@ class AuthService extends base_service_1.BaseService {
|
|
|
73
73
|
async updateUser(request) {
|
|
74
74
|
return this.authenticatedRequest({
|
|
75
75
|
method: "PUT",
|
|
76
|
-
url: "/
|
|
76
|
+
url: "/v1/me",
|
|
77
77
|
data: request,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
async sendOtp(request) {
|
|
81
81
|
return this.publicRequest({
|
|
82
82
|
method: "POST",
|
|
83
|
-
url: "/
|
|
83
|
+
url: "/v1/one-time-codes",
|
|
84
84
|
data: request,
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
async verifyOtp(request) {
|
|
88
88
|
return this.publicRequest({
|
|
89
89
|
method: "POST",
|
|
90
|
-
url: "/
|
|
90
|
+
url: "/v1/one-time-codes/verify",
|
|
91
91
|
data: request,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
async getUser() {
|
|
95
95
|
return this.authenticatedRequest({
|
|
96
96
|
method: "GET",
|
|
97
|
-
url: "/
|
|
97
|
+
url: "/v1/me",
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
async deleteUser(request) {
|
|
101
101
|
const response = await this.authenticatedRequest({
|
|
102
102
|
method: "DELETE",
|
|
103
|
-
url: "/
|
|
103
|
+
url: "/v1/me",
|
|
104
104
|
data: request,
|
|
105
105
|
});
|
|
106
106
|
this.clearBearerToken();
|
|
@@ -116,69 +116,69 @@ class AuthService extends base_service_1.BaseService {
|
|
|
116
116
|
async createRecoveryMethods(request) {
|
|
117
117
|
return this.authenticatedRequest({
|
|
118
118
|
method: "POST",
|
|
119
|
-
url: "/recovery/
|
|
119
|
+
url: "/v1/recovery/methods",
|
|
120
120
|
data: request,
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
async getRecoveryOptions(externalId) {
|
|
124
124
|
return this.publicRequest({
|
|
125
125
|
method: "GET",
|
|
126
|
-
url: `/recovery/options/${externalId}`,
|
|
126
|
+
url: `/v1/recovery/options/${externalId}`,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
async requestPasswordReset(request) {
|
|
130
130
|
return this.publicRequest({
|
|
131
131
|
method: "POST",
|
|
132
|
-
url: "/recovery/
|
|
132
|
+
url: "/v1/recovery/password-reset",
|
|
133
133
|
data: request,
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
async resetPassword(request) {
|
|
137
137
|
return this.publicRequest({
|
|
138
138
|
method: "POST",
|
|
139
|
-
url: "/recovery/reset
|
|
139
|
+
url: "/v1/recovery/password-reset/complete",
|
|
140
140
|
data: request,
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
async updateRecoveryMethods(request) {
|
|
144
144
|
return this.authenticatedRequest({
|
|
145
145
|
method: "PUT",
|
|
146
|
-
url: "/recovery/
|
|
146
|
+
url: "/v1/recovery/methods",
|
|
147
147
|
data: request,
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
async addRecoveryMethod(request) {
|
|
151
151
|
return this.authenticatedRequest({
|
|
152
152
|
method: "POST",
|
|
153
|
-
url: "/recovery/
|
|
153
|
+
url: "/v1/recovery/methods/by-type",
|
|
154
154
|
data: request,
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
async removeRecoveryMethod(request) {
|
|
158
158
|
return this.authenticatedRequest({
|
|
159
159
|
method: "DELETE",
|
|
160
|
-
url: "/recovery/
|
|
160
|
+
url: "/v1/recovery/methods/by-type",
|
|
161
161
|
data: request,
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
async updateRecoveryMethod(request) {
|
|
165
165
|
return this.authenticatedRequest({
|
|
166
166
|
method: "PUT",
|
|
167
|
-
url: "/recovery/
|
|
167
|
+
url: "/v1/recovery/methods/by-type",
|
|
168
168
|
data: request,
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
async getMyRecoveryMethods(request) {
|
|
172
172
|
return this.authenticatedRequest({
|
|
173
173
|
method: "POST",
|
|
174
|
-
url: "/recovery/
|
|
174
|
+
url: "/v1/recovery/methods",
|
|
175
175
|
data: request,
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
async deleteAllRecoveryMethods(request) {
|
|
179
179
|
return this.authenticatedRequest({
|
|
180
180
|
method: "DELETE",
|
|
181
|
-
url: "/recovery/
|
|
181
|
+
url: "/v1/recovery/methods",
|
|
182
182
|
data: request,
|
|
183
183
|
});
|
|
184
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAwC9C,MAAa,WAAY,SAAQ,0BAAW;IAC1C,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,IAAI,CAAC,aAAa,CAAiB;YACxC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAwC9C,MAAa,WAAY,SAAQ,0BAAW;IAC1C,KAAK,CAAC,MAAM,CAAC,OAAsB;QACjC,OAAO,IAAI,CAAC,aAAa,CAAiB;YACxC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAgB;YACvD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,QAAQ,CAAC;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ends base_service_1.BaseService {
|
|
|
6
6
|
async getRoutes() {
|
|
7
7
|
return this.publicRequest({
|
|
8
8
|
method: "GET",
|
|
9
|
-
url: "/bridge/routes",
|
|
9
|
+
url: "/v1/bridge/routes",
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
async getQuote(request) {
|
|
13
13
|
return this.publicRequest({
|
|
14
14
|
method: "POST",
|
|
15
|
-
url: "/bridge/
|
|
15
|
+
url: "/v1/bridge/quotes",
|
|
16
16
|
data: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async execute(request) {
|
|
20
20
|
return this.authenticatedRequest({
|
|
21
21
|
method: "POST",
|
|
22
|
-
url: "/bridge/
|
|
22
|
+
url: "/v1/bridge/transfers",
|
|
23
23
|
data: request,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../src/services/bridge.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAS9C,MAAa,aAAc,SAAQ,0BAAW;IAC5C,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,aAAa,CAAuB;YAC9C,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../../src/services/bridge.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAS9C,MAAa,aAAc,SAAQ,0BAAW;IAC5C,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,aAAa,CAAuB;YAC9C,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mBAAmB;SACzB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA2B;QACxC,OAAO,IAAI,CAAC,aAAa,CAAsB;YAC7C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAA6B;QACzC,OAAO,IAAI,CAAC,oBAAoB,CAAwB;YACtD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,sBAAsB;YAC3B,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,sCAuBC"}
|
package/dist/services/defi.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defi.js","sourceRoot":"","sources":["../../src/services/defi.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,MAAa,WAAY,SAAQ,0BAAW;IAC1C,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAe;YAC7C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"defi.js","sourceRoot":"","sources":["../../src/services/defi.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,MAAa,WAAY,SAAQ,0BAAW;IAC1C,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAe;YAC7C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;CACF;AARD,kCAQC"}
|
package/dist/services/kyc.js
CHANGED
|
@@ -6,48 +6,48 @@ class KYCService extends base_service_1.BaseService {
|
|
|
6
6
|
async getToken(request) {
|
|
7
7
|
return this.publicRequest({
|
|
8
8
|
method: "POST",
|
|
9
|
-
url: "/
|
|
9
|
+
url: "/v1/kyc/sessions",
|
|
10
10
|
data: request,
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
async checkUserExists(request) {
|
|
14
14
|
return this.publicRequest({
|
|
15
15
|
method: "POST",
|
|
16
|
-
url: "/
|
|
16
|
+
url: "/v1/users/lookup",
|
|
17
17
|
data: request,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
async getStatus(request) {
|
|
21
21
|
return this.publicRequest({
|
|
22
22
|
method: "POST",
|
|
23
|
-
url: "/
|
|
23
|
+
url: "/v1/kyc/status",
|
|
24
24
|
data: request,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
async verifyAndSendOtp(request) {
|
|
28
28
|
return this.publicRequest({
|
|
29
29
|
method: "POST",
|
|
30
|
-
url: "/
|
|
30
|
+
url: "/v1/kyc/poll-and-notify",
|
|
31
31
|
data: request,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
async verify(request) {
|
|
35
35
|
return this.authenticatedRequest({
|
|
36
36
|
method: "POST",
|
|
37
|
-
url: "/
|
|
37
|
+
url: "/v1/kyc/submissions",
|
|
38
38
|
data: request,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
async isVerified() {
|
|
42
42
|
return this.authenticatedRequest({
|
|
43
43
|
method: "GET",
|
|
44
|
-
url: "/
|
|
44
|
+
url: "/v1/kyc/status",
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
async getJobStatus(jobId) {
|
|
48
48
|
return this.authenticatedRequest({
|
|
49
49
|
method: "GET",
|
|
50
|
-
url: `/
|
|
50
|
+
url: `/v1/kyc/jobs/${jobId}`,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
package/dist/services/kyc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kyc.js","sourceRoot":"","sources":["../../src/services/kyc.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAe9C,MAAa,UAAW,SAAQ,0BAAW;IACzC,KAAK,CAAC,QAAQ,CAAC,OAAwB;QACrC,OAAO,IAAI,CAAC,aAAa,CAAmB;YAC1C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"kyc.js","sourceRoot":"","sources":["../../src/services/kyc.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAe9C,MAAa,UAAW,SAAQ,0BAAW;IACzC,KAAK,CAAC,QAA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_1.BaseService {
|
|
|
14
14
|
async createInvoice(request) {
|
|
15
15
|
return this.authenticatedRequest({
|
|
16
16
|
method: "POST",
|
|
17
|
-
url: "/invoices",
|
|
17
|
+
url: "/v1/invoices",
|
|
18
18
|
data: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -26,7 +26,7 @@ class MerchantService extends base_service_1.BaseService {
|
|
|
26
26
|
async getInvoices(request) {
|
|
27
27
|
return this.authenticatedRequest({
|
|
28
28
|
method: "GET",
|
|
29
|
-
url: "/invoices",
|
|
29
|
+
url: "/v1/invoices",
|
|
30
30
|
params: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -49,7 +49,7 @@ class MerchantService extends base_service_1.BaseService {
|
|
|
49
49
|
async getMerchantStatus(request) {
|
|
50
50
|
return this.authenticatedRequest({
|
|
51
51
|
method: "GET",
|
|
52
|
-
url: "/merchants/
|
|
52
|
+
url: "/v1/merchants/me",
|
|
53
53
|
params: request,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merchant.js","sourceRoot":"","sources":["../../src/services/merchant.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAW9C,MAAa,eAAgB,SAAQ,0BAAW;IAC9C,YAAY,UAA0B;QACpC,KAAK,CAAC,UAAU,CAAC,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CACjB,OAA6B;QAE7B,OAAO,IAAI,CAAC,oBAAoB,CAAwB;YACtD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"merchant.js","sourceRoot":"","sources":["../../src/services/merchant.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAW9C,MAAa,eAAgB,SAAQ,0BAAW;IAC9C,YAAY,UAA0B;QACpC,KAAK,CAAC,UAAU,CAAC,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CACjB,OAA6B;QAE7B,OAAO,IAAI,CAAC,oBAAoB,CAAwB;YACtD,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CACf,OAA4B;QAE5B,OAAO,IAAI,CAAC,oBAAoB,CAAsB;YACpD,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAkC;QAElC,OAAO,IAAI,CAAC,oBAAoB,CAA4B;YAC1D,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,kBAAkB;YACvB,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AA5DD,0CA4DC"}
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import { BaseService } from "../base-service";
|
|
2
2
|
import { ApiResponse, NotificationSubscriptionRequest, NotificationSubscription, NotificationTestRequest, NotificationSendRequest, NotificationSendResponse, UserNotificationSubscription } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* NotificationService — email-only in v1.
|
|
5
|
+
*
|
|
6
|
+
* The backend dropped push notifications (Pusher Beams, Webpushr, Firebase)
|
|
7
|
+
* and the per-device subscription registry. The remaining surface is
|
|
8
|
+
* email delivery via Resend, branded per project. We keep the class
|
|
9
|
+
* signatures of the push methods for backwards compatibility but they
|
|
10
|
+
* now throw a clear error so callers can find them quickly. Use
|
|
11
|
+
* `sendTestNotification` and `sendToAllUserSubscribers` to deliver email.
|
|
12
|
+
*/
|
|
3
13
|
export declare class NotificationService extends BaseService {
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
registerSubscription(request: NotificationSubscriptionRequest): Promise<ApiResponse<{
|
|
14
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
15
|
+
registerSubscription(_request: NotificationSubscriptionRequest): Promise<ApiResponse<{
|
|
8
16
|
subscription: NotificationSubscription;
|
|
9
17
|
}>>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
unsubscribe(subscriberId: string): Promise<ApiResponse<void>>;
|
|
14
|
-
/**
|
|
15
|
-
* Get all notification subscriptions for the current user
|
|
16
|
-
*/
|
|
18
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
19
|
+
unsubscribe(_subscriberId: string): Promise<ApiResponse<void>>;
|
|
20
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
17
21
|
getUserSubscriptions(): Promise<ApiResponse<{
|
|
18
22
|
subscriptions: UserNotificationSubscription[];
|
|
19
23
|
activeCount: number;
|
|
20
24
|
totalCount: number;
|
|
21
25
|
}>>;
|
|
26
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
27
|
+
deleteAllSubscriptions(): Promise<ApiResponse<{
|
|
28
|
+
deletedCount: number;
|
|
29
|
+
}>>;
|
|
22
30
|
/**
|
|
23
|
-
* Send a test notification to
|
|
31
|
+
* Send a test email notification to the authenticated user. The legacy
|
|
32
|
+
* `subscriberId` field is ignored (kept on the request shape for source
|
|
33
|
+
* compatibility); delivery is to the user's recorded email.
|
|
24
34
|
*/
|
|
25
35
|
sendTestNotification(request: NotificationTestRequest): Promise<ApiResponse<{
|
|
26
36
|
requestId: string;
|
|
27
37
|
}>>;
|
|
28
38
|
/**
|
|
29
|
-
* Send notification to
|
|
39
|
+
* Send a notification email to the authenticated user.
|
|
30
40
|
*/
|
|
31
41
|
sendToAllUserSubscribers(request: NotificationSendRequest): Promise<ApiResponse<NotificationSendResponse>>;
|
|
32
|
-
/**
|
|
33
|
-
* Delete all notification subscriptions for the current user
|
|
34
|
-
*/
|
|
35
|
-
deleteAllSubscriptions(): Promise<ApiResponse<{
|
|
36
|
-
deletedCount: number;
|
|
37
|
-
}>>;
|
|
38
42
|
}
|
|
39
43
|
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/services/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,+BAA+B,EAC/B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,qBAAa,mBAAoB,SAAQ,WAAW;IAClD
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/services/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,+BAA+B,EAC/B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,wEAAwE;IAClE,oBAAoB,CACxB,QAAQ,EAAE,+BAA+B,GACxC,OAAO,CAAC,WAAW,CAAC;QAAE,YAAY,EAAE,wBAAwB,CAAA;KAAE,CAAC,CAAC;IAMnE,wEAAwE;IAClE,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAIpE,wEAAwE;IAClE,oBAAoB,IAAI,OAAO,CACnC,WAAW,CAAC;QACV,aAAa,EAAE,4BAA4B,EAAE,CAAC;QAC9C,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CACH;IAID,wEAAwE;IAClE,sBAAsB,IAAI,OAAO,CAAC,WAAW,CAAC;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAI9E;;;;OAIG;IACG,oBAAoB,CACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAY9C;;OAEG;IACG,wBAAwB,CAC5B,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;CAWlD"}
|
|
@@ -2,49 +2,43 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotificationService = void 0;
|
|
4
4
|
const base_service_1 = require("../base-service");
|
|
5
|
+
/**
|
|
6
|
+
* NotificationService — email-only in v1.
|
|
7
|
+
*
|
|
8
|
+
* The backend dropped push notifications (Pusher Beams, Webpushr, Firebase)
|
|
9
|
+
* and the per-device subscription registry. The remaining surface is
|
|
10
|
+
* email delivery via Resend, branded per project. We keep the class
|
|
11
|
+
* signatures of the push methods for backwards compatibility but they
|
|
12
|
+
* now throw a clear error so callers can find them quickly. Use
|
|
13
|
+
* `sendTestNotification` and `sendToAllUserSubscribers` to deliver email.
|
|
14
|
+
*/
|
|
5
15
|
class NotificationService extends base_service_1.BaseService {
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
async registerSubscription(request) {
|
|
10
|
-
return this.authenticatedRequest({
|
|
11
|
-
method: "POST",
|
|
12
|
-
url: "/notifications/register",
|
|
13
|
-
data: {
|
|
14
|
-
subscriberId: request.subscriberId,
|
|
15
|
-
deviceInfo: request.deviceInfo,
|
|
16
|
-
platform: request.platform,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
16
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
17
|
+
async registerSubscription(_request) {
|
|
18
|
+
throw new Error("registerSubscription was removed in v1 — push notifications are no longer supported. Email is delivered automatically to the user's recorded email.");
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
async unsubscribe(subscriberId) {
|
|
24
|
-
return this.authenticatedRequest({
|
|
25
|
-
method: "POST",
|
|
26
|
-
url: "/notifications/unsubscribe",
|
|
27
|
-
data: { subscriberId },
|
|
28
|
-
});
|
|
20
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
21
|
+
async unsubscribe(_subscriberId) {
|
|
22
|
+
throw new Error("unsubscribe was removed in v1 — there are no per-device push subscriptions to remove.");
|
|
29
23
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Get all notification subscriptions for the current user
|
|
32
|
-
*/
|
|
24
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
33
25
|
async getUserSubscriptions() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
throw new Error("getUserSubscriptions was removed in v1 — there are no per-device push subscriptions to list.");
|
|
27
|
+
}
|
|
28
|
+
/** @deprecated Push notifications are removed in v1. No-op (throws). */
|
|
29
|
+
async deleteAllSubscriptions() {
|
|
30
|
+
throw new Error("deleteAllSubscriptions was removed in v1 — there are no per-device push subscriptions to delete.");
|
|
38
31
|
}
|
|
39
32
|
/**
|
|
40
|
-
* Send a test notification to
|
|
33
|
+
* Send a test email notification to the authenticated user. The legacy
|
|
34
|
+
* `subscriberId` field is ignored (kept on the request shape for source
|
|
35
|
+
* compatibility); delivery is to the user's recorded email.
|
|
41
36
|
*/
|
|
42
37
|
async sendTestNotification(request) {
|
|
43
38
|
return this.authenticatedRequest({
|
|
44
39
|
method: "POST",
|
|
45
|
-
url: "/notifications/test",
|
|
40
|
+
url: "/v1/notifications/test",
|
|
46
41
|
data: {
|
|
47
|
-
subscriberId: request.subscriberId,
|
|
48
42
|
message: request.message,
|
|
49
43
|
targetUrl: request.targetUrl,
|
|
50
44
|
title: request.title,
|
|
@@ -52,12 +46,12 @@ class NotificationService extends base_service_1.BaseService {
|
|
|
52
46
|
});
|
|
53
47
|
}
|
|
54
48
|
/**
|
|
55
|
-
* Send notification to
|
|
49
|
+
* Send a notification email to the authenticated user.
|
|
56
50
|
*/
|
|
57
51
|
async sendToAllUserSubscribers(request) {
|
|
58
52
|
return this.authenticatedRequest({
|
|
59
53
|
method: "POST",
|
|
60
|
-
url: "/notifications/
|
|
54
|
+
url: "/v1/notifications/messages",
|
|
61
55
|
data: {
|
|
62
56
|
message: request.message,
|
|
63
57
|
targetUrl: request.targetUrl,
|
|
@@ -65,15 +59,6 @@ class NotificationService extends base_service_1.BaseService {
|
|
|
65
59
|
},
|
|
66
60
|
});
|
|
67
61
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Delete all notification subscriptions for the current user
|
|
70
|
-
*/
|
|
71
|
-
async deleteAllSubscriptions() {
|
|
72
|
-
return this.authenticatedRequest({
|
|
73
|
-
method: "DELETE",
|
|
74
|
-
url: "/notifications/subscriptions",
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
62
|
}
|
|
78
63
|
exports.NotificationService = NotificationService;
|
|
79
64
|
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/services/notifications.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAW9C,MAAa,mBAAoB,SAAQ,0BAAW;IAClD
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/services/notifications.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAW9C;;;;;;;;;GASG;AACH,MAAa,mBAAoB,SAAQ,0BAAW;IAClD,wEAAwE;IACxE,KAAK,CAAC,oBAAoB,CACxB,QAAyC;QAEzC,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,WAAW,CAAC,aAAqB;QACrC,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;IAC3G,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,oBAAoB;QAOxB,MAAM,IAAI,KAAK,CAAC,8FAA8F,CAAC,CAAC;IAClH,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,sBAAsB;QAC1B,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;IACtH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAgC;QAEhC,OAAO,IAAI,CAAC,oBAAoB,CAAqC;YACnE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,wBAAwB;YAC7B,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,wBAAwB,CAC5B,OAAgC;QAEhC,OAAO,IAAI,CAAC,oBAAoB,CAAwC;YACtE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,4BAA4B;YACjC,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAlED,kDAkEC"}
|