@riocrypto/common 1.0.1499 → 1.0.1501

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.
@@ -106,11 +106,11 @@ export declare class RioAdminClient {
106
106
  uploadCSF(id: string, formData: FormData): Promise<User>;
107
107
  uploadProofOfAddress(id: string, formData: FormData): Promise<User>;
108
108
  createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
109
- createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string): Promise<{
109
+ createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string, referrerId?: string): Promise<{
110
110
  id: string;
111
111
  kycLink: string;
112
112
  }>;
113
- createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, }: {
113
+ createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }: {
114
114
  userType: UserType;
115
115
  businessName?: string;
116
116
  firstName?: string;
@@ -119,6 +119,7 @@ export declare class RioAdminClient {
119
119
  secondLastName?: string;
120
120
  email: string;
121
121
  brokerId?: string;
122
+ referrerId?: string;
122
123
  }): Promise<{
123
124
  id: string;
124
125
  kycLink: string;
@@ -126,7 +127,12 @@ export declare class RioAdminClient {
126
127
  }>;
127
128
  createIncrementalOnboardingByLink(userId: string, countryOfOperation: Country): Promise<{
128
129
  id: string;
129
- link: string;
130
+ kycLink: string;
131
+ }>;
132
+ createIncrementalUSOnboardingByLink(userId: string): Promise<{
133
+ id: string;
134
+ kycLink: string;
135
+ tosLink: string;
130
136
  }>;
131
137
  getOnboarding(id: string): Promise<Onboarding>;
132
138
  sendVerificationEmail(type: IdentityVerificationType, id: string, country: Country): Promise<void>;
@@ -250,17 +250,18 @@ class RioAdminClient {
250
250
  return data.link;
251
251
  });
252
252
  }
253
- createOnboardingByLink(userType, countryOfOperation, brokerId) {
253
+ createOnboardingByLink(userType, countryOfOperation, brokerId, referrerId) {
254
254
  return __awaiter(this, void 0, void 0, function* () {
255
255
  const { data } = yield this.axios.post(`/api/onboardings/${countryOfOperation}/link`, {
256
256
  userType,
257
257
  countryOfOperation,
258
258
  brokerId,
259
+ referrerId,
259
260
  });
260
261
  return data;
261
262
  });
262
263
  }
263
- createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, }) {
264
+ createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }) {
264
265
  return __awaiter(this, void 0, void 0, function* () {
265
266
  const { data } = yield this.axios.post("/api/onboardings/US/link", {
266
267
  userType,
@@ -271,15 +272,23 @@ class RioAdminClient {
271
272
  secondLastName,
272
273
  email,
273
274
  brokerId,
275
+ referrerId,
274
276
  });
275
277
  return data;
276
278
  });
277
279
  }
278
280
  createIncrementalOnboardingByLink(userId, countryOfOperation) {
279
281
  return __awaiter(this, void 0, void 0, function* () {
280
- const { data } = yield this.axios.post("/api/onboardings/incremental/link", {
282
+ const { data } = yield this.axios.post(`/api/onboardings/${countryOfOperation}/incremental/link`, {
283
+ userId,
284
+ });
285
+ return data;
286
+ });
287
+ }
288
+ createIncrementalUSOnboardingByLink(userId) {
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ const { data } = yield this.axios.post(`/api/onboardings/us/incremental/link`, {
281
291
  userId,
282
- countryOfOperation,
283
292
  });
284
293
  return data;
285
294
  });
@@ -191,11 +191,11 @@ export declare class RioClient {
191
191
  updateAuth(update: AuthUpdate, id: string): Promise<Auth>;
192
192
  getInvoice(orderId: string): Promise<Invoice>;
193
193
  getCryptoBalance(asset: Crypto, userId?: string): Promise<number>;
194
- createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string): Promise<{
194
+ createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string, referrerId?: string): Promise<{
195
195
  id: string;
196
196
  kycLink: string;
197
197
  }>;
198
- createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, }: {
198
+ createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }: {
199
199
  userType: UserType;
200
200
  businessName?: string;
201
201
  firstName?: string;
@@ -204,6 +204,7 @@ export declare class RioClient {
204
204
  secondLastName?: string;
205
205
  email: string;
206
206
  brokerId?: string;
207
+ referrerId?: string;
207
208
  }): Promise<{
208
209
  id: string;
209
210
  kycLink: string;
@@ -211,7 +212,12 @@ export declare class RioClient {
211
212
  }>;
212
213
  createIncrementalOnboardingByLink(userId: string, countryOfOperation: Country): Promise<{
213
214
  id: string;
214
- link: string;
215
+ kycLink: string;
216
+ }>;
217
+ createIncrementalUSOnboardingByLink(userId: string): Promise<{
218
+ id: string;
219
+ kycLink: string;
220
+ tosLink: string;
215
221
  }>;
216
222
  getOnboarding(id: string): Promise<Onboarding>;
217
223
  }
@@ -731,17 +731,18 @@ class RioClient {
731
731
  return response.data.balance;
732
732
  });
733
733
  }
734
- createOnboardingByLink(userType, countryOfOperation, brokerId) {
734
+ createOnboardingByLink(userType, countryOfOperation, brokerId, referrerId) {
735
735
  return __awaiter(this, void 0, void 0, function* () {
736
736
  const { data } = yield this.axios.post(`/api/onboardings/${countryOfOperation}/link`, {
737
737
  userType,
738
738
  countryOfOperation,
739
739
  brokerId,
740
+ referrerId,
740
741
  });
741
742
  return data;
742
743
  });
743
744
  }
744
- createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, }) {
745
+ createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }) {
745
746
  return __awaiter(this, void 0, void 0, function* () {
746
747
  const { data } = yield this.axios.post("/api/onboardings/US/link", {
747
748
  userType,
@@ -752,15 +753,23 @@ class RioClient {
752
753
  secondLastName,
753
754
  email,
754
755
  brokerId,
756
+ referrerId,
755
757
  });
756
758
  return data;
757
759
  });
758
760
  }
759
761
  createIncrementalOnboardingByLink(userId, countryOfOperation) {
760
762
  return __awaiter(this, void 0, void 0, function* () {
761
- const { data } = yield this.axios.post("/api/onboardings/incremental/link", {
763
+ const { data } = yield this.axios.post(`/api/onboardings/${countryOfOperation}/incremental/link`, {
764
+ userId,
765
+ });
766
+ return data;
767
+ });
768
+ }
769
+ createIncrementalUSOnboardingByLink(userId) {
770
+ return __awaiter(this, void 0, void 0, function* () {
771
+ const { data } = yield this.axios.post(`/api/onboardings/us/incremental/link`, {
762
772
  userId,
763
- countryOfOperation,
764
773
  });
765
774
  return data;
766
775
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1499",
3
+ "version": "1.0.1501",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",