@0xsequence/api 0.0.0-20220609204505 → 0.0.0-20220616121217
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/0xsequence-api.cjs.dev.js +104 -2
- package/dist/0xsequence-api.cjs.prod.js +104 -2
- package/dist/0xsequence-api.esm.js +105 -3
- package/dist/declarations/src/api.gen.d.ts +182 -14
- package/package.json +1 -1
- package/src/api.gen.ts +302 -17
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 5d5b5ef657b4f6f0a05998c5740874426c04dee6
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,10 +36,20 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "5d5b5ef657b4f6f0a05998c5740874426c04dee6"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.SmartRampOrderStatus = void 0;
|
|
44
|
+
|
|
45
|
+
(function (SmartRampOrderStatus) {
|
|
46
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
48
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
49
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
50
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
|
+
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
|
+
|
|
43
53
|
exports.SortOrder = void 0;
|
|
44
54
|
|
|
45
55
|
(function (SortOrder) {
|
|
@@ -303,6 +313,98 @@ class API {
|
|
|
303
313
|
});
|
|
304
314
|
};
|
|
305
315
|
|
|
316
|
+
this.invalidateOriginToken = (args, headers) => {
|
|
317
|
+
return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
|
|
318
|
+
return buildResponse(res).then(_data => {
|
|
319
|
+
return {};
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
this.listPayCardsOnFile = headers => {
|
|
325
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
326
|
+
return buildResponse(res).then(_data => {
|
|
327
|
+
return {
|
|
328
|
+
payCards: _data.payCards
|
|
329
|
+
};
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
this.savePayCard = (args, headers) => {
|
|
335
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
336
|
+
return buildResponse(res).then(_data => {
|
|
337
|
+
return {
|
|
338
|
+
ok: _data.ok,
|
|
339
|
+
payCard: _data.payCard
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
this.deletePayCard = (args, headers) => {
|
|
346
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
347
|
+
return buildResponse(res).then(_data => {
|
|
348
|
+
return {
|
|
349
|
+
ok: _data.ok
|
|
350
|
+
};
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
this.smartRampQuote = (args, headers) => {
|
|
356
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
357
|
+
return buildResponse(res).then(_data => {
|
|
358
|
+
return {
|
|
359
|
+
status: _data.status,
|
|
360
|
+
quoteDetails: _data.quoteDetails
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
this.smartRampPurchase = (args, headers) => {
|
|
367
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
368
|
+
return buildResponse(res).then(_data => {
|
|
369
|
+
return {
|
|
370
|
+
processing: _data.processing,
|
|
371
|
+
receipt: _data.receipt
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
378
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
379
|
+
return buildResponse(res).then(_data => {
|
|
380
|
+
return {
|
|
381
|
+
done: _data.done,
|
|
382
|
+
receipt: _data.receipt
|
|
383
|
+
};
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
389
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
390
|
+
return buildResponse(res).then(_data => {
|
|
391
|
+
return {
|
|
392
|
+
cardAuth: _data.cardAuth
|
|
393
|
+
};
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
399
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
400
|
+
return buildResponse(res).then(_data => {
|
|
401
|
+
return {
|
|
402
|
+
status: _data.status
|
|
403
|
+
};
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
|
|
306
408
|
this.getInviteInfo = headers => {
|
|
307
409
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
308
410
|
return buildResponse(res).then(_data => {
|
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 5d5b5ef657b4f6f0a05998c5740874426c04dee6
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,10 +36,20 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "5d5b5ef657b4f6f0a05998c5740874426c04dee6"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.SmartRampOrderStatus = void 0;
|
|
44
|
+
|
|
45
|
+
(function (SmartRampOrderStatus) {
|
|
46
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
48
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
49
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
50
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
|
+
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
|
+
|
|
43
53
|
exports.SortOrder = void 0;
|
|
44
54
|
|
|
45
55
|
(function (SortOrder) {
|
|
@@ -303,6 +313,98 @@ class API {
|
|
|
303
313
|
});
|
|
304
314
|
};
|
|
305
315
|
|
|
316
|
+
this.invalidateOriginToken = (args, headers) => {
|
|
317
|
+
return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
|
|
318
|
+
return buildResponse(res).then(_data => {
|
|
319
|
+
return {};
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
this.listPayCardsOnFile = headers => {
|
|
325
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
326
|
+
return buildResponse(res).then(_data => {
|
|
327
|
+
return {
|
|
328
|
+
payCards: _data.payCards
|
|
329
|
+
};
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
this.savePayCard = (args, headers) => {
|
|
335
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
336
|
+
return buildResponse(res).then(_data => {
|
|
337
|
+
return {
|
|
338
|
+
ok: _data.ok,
|
|
339
|
+
payCard: _data.payCard
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
this.deletePayCard = (args, headers) => {
|
|
346
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
347
|
+
return buildResponse(res).then(_data => {
|
|
348
|
+
return {
|
|
349
|
+
ok: _data.ok
|
|
350
|
+
};
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
this.smartRampQuote = (args, headers) => {
|
|
356
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
357
|
+
return buildResponse(res).then(_data => {
|
|
358
|
+
return {
|
|
359
|
+
status: _data.status,
|
|
360
|
+
quoteDetails: _data.quoteDetails
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
this.smartRampPurchase = (args, headers) => {
|
|
367
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
368
|
+
return buildResponse(res).then(_data => {
|
|
369
|
+
return {
|
|
370
|
+
processing: _data.processing,
|
|
371
|
+
receipt: _data.receipt
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
378
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
379
|
+
return buildResponse(res).then(_data => {
|
|
380
|
+
return {
|
|
381
|
+
done: _data.done,
|
|
382
|
+
receipt: _data.receipt
|
|
383
|
+
};
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
389
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
390
|
+
return buildResponse(res).then(_data => {
|
|
391
|
+
return {
|
|
392
|
+
cardAuth: _data.cardAuth
|
|
393
|
+
};
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
399
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
400
|
+
return buildResponse(res).then(_data => {
|
|
401
|
+
return {
|
|
402
|
+
status: _data.status
|
|
403
|
+
};
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
|
|
306
408
|
this.getInviteInfo = headers => {
|
|
307
409
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
308
410
|
return buildResponse(res).then(_data => {
|
|
@@ -19,7 +19,7 @@ function _extends() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* eslint-disable */
|
|
22
|
-
// sequence-api v0.4.0
|
|
22
|
+
// sequence-api v0.4.0 5d5b5ef657b4f6f0a05998c5740874426c04dee6
|
|
23
23
|
// --
|
|
24
24
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
25
25
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -28,10 +28,20 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
28
28
|
|
|
29
29
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
30
30
|
|
|
31
|
-
const WebRPCSchemaHash = "
|
|
31
|
+
const WebRPCSchemaHash = "5d5b5ef657b4f6f0a05998c5740874426c04dee6"; //
|
|
32
32
|
// Types
|
|
33
33
|
//
|
|
34
34
|
|
|
35
|
+
let SmartRampOrderStatus;
|
|
36
|
+
|
|
37
|
+
(function (SmartRampOrderStatus) {
|
|
38
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
39
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
40
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
41
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
42
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
43
|
+
})(SmartRampOrderStatus || (SmartRampOrderStatus = {}));
|
|
44
|
+
|
|
35
45
|
let SortOrder;
|
|
36
46
|
|
|
37
47
|
(function (SortOrder) {
|
|
@@ -295,6 +305,98 @@ class API {
|
|
|
295
305
|
});
|
|
296
306
|
};
|
|
297
307
|
|
|
308
|
+
this.invalidateOriginToken = (args, headers) => {
|
|
309
|
+
return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
|
|
310
|
+
return buildResponse(res).then(_data => {
|
|
311
|
+
return {};
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
this.listPayCardsOnFile = headers => {
|
|
317
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
318
|
+
return buildResponse(res).then(_data => {
|
|
319
|
+
return {
|
|
320
|
+
payCards: _data.payCards
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
this.savePayCard = (args, headers) => {
|
|
327
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
328
|
+
return buildResponse(res).then(_data => {
|
|
329
|
+
return {
|
|
330
|
+
ok: _data.ok,
|
|
331
|
+
payCard: _data.payCard
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
this.deletePayCard = (args, headers) => {
|
|
338
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
339
|
+
return buildResponse(res).then(_data => {
|
|
340
|
+
return {
|
|
341
|
+
ok: _data.ok
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
this.smartRampQuote = (args, headers) => {
|
|
348
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
349
|
+
return buildResponse(res).then(_data => {
|
|
350
|
+
return {
|
|
351
|
+
status: _data.status,
|
|
352
|
+
quoteDetails: _data.quoteDetails
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
this.smartRampPurchase = (args, headers) => {
|
|
359
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
360
|
+
return buildResponse(res).then(_data => {
|
|
361
|
+
return {
|
|
362
|
+
processing: _data.processing,
|
|
363
|
+
receipt: _data.receipt
|
|
364
|
+
};
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
370
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
done: _data.done,
|
|
374
|
+
receipt: _data.receipt
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
381
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
382
|
+
return buildResponse(res).then(_data => {
|
|
383
|
+
return {
|
|
384
|
+
cardAuth: _data.cardAuth
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
391
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
392
|
+
return buildResponse(res).then(_data => {
|
|
393
|
+
return {
|
|
394
|
+
status: _data.status
|
|
395
|
+
};
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
|
|
298
400
|
this.getInviteInfo = headers => {
|
|
299
401
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
300
402
|
return buildResponse(res).then(_data => {
|
|
@@ -401,4 +503,4 @@ class SequenceAPIClient extends API {
|
|
|
401
503
|
|
|
402
504
|
}
|
|
403
505
|
|
|
404
|
-
export { API, SequenceAPIClient, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
506
|
+
export { API, SequenceAPIClient, SmartRampOrderStatus, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "5d5b5ef657b4f6f0a05998c5740874426c04dee6";
|
|
4
|
+
export declare enum SmartRampOrderStatus {
|
|
5
|
+
UNKNOWN = "UNKNOWN",
|
|
6
|
+
RUNNING_CHECKS = "RUNNING_CHECKS",
|
|
7
|
+
PROCESSING = "PROCESSING",
|
|
8
|
+
FAILED = "FAILED",
|
|
9
|
+
COMPLETE = "COMPLETE"
|
|
10
|
+
}
|
|
4
11
|
export declare enum SortOrder {
|
|
5
12
|
DESC = "DESC",
|
|
6
13
|
ASC = "ASC"
|
|
@@ -99,19 +106,6 @@ export interface UserStorage {
|
|
|
99
106
|
key: string;
|
|
100
107
|
value: any;
|
|
101
108
|
}
|
|
102
|
-
export interface Page {
|
|
103
|
-
pageSize?: number;
|
|
104
|
-
page?: number;
|
|
105
|
-
totalRecords?: number;
|
|
106
|
-
column?: string;
|
|
107
|
-
before?: any;
|
|
108
|
-
after?: any;
|
|
109
|
-
sort?: Array<SortBy>;
|
|
110
|
-
}
|
|
111
|
-
export interface SortBy {
|
|
112
|
-
column: string;
|
|
113
|
-
order: SortOrder;
|
|
114
|
-
}
|
|
115
109
|
export interface Token {
|
|
116
110
|
chainId: number;
|
|
117
111
|
contractAddress: string;
|
|
@@ -137,6 +131,102 @@ export interface ExchangeRate {
|
|
|
137
131
|
vsCurrency: string;
|
|
138
132
|
currencyType: string;
|
|
139
133
|
}
|
|
134
|
+
export interface PayCard {
|
|
135
|
+
id: number;
|
|
136
|
+
userAddress: string;
|
|
137
|
+
cardType: string;
|
|
138
|
+
cardFirstName: string;
|
|
139
|
+
cardLastName: string;
|
|
140
|
+
cardNumberLastFourDigits: string;
|
|
141
|
+
cardNumberToken: string;
|
|
142
|
+
cardCVCToken: string;
|
|
143
|
+
cardExpMonth: number;
|
|
144
|
+
cardExpYear: number;
|
|
145
|
+
contactAddressToken: string;
|
|
146
|
+
contactCityToken: string;
|
|
147
|
+
contactProvinceToken: string;
|
|
148
|
+
contactPostalCodeToken: string;
|
|
149
|
+
contactCountryCode: string;
|
|
150
|
+
contactEmail: string;
|
|
151
|
+
contactPhoneToken: string;
|
|
152
|
+
updatedAt?: string;
|
|
153
|
+
createdAt?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface SmartRampQuoteRequest {
|
|
156
|
+
countryCode: string;
|
|
157
|
+
niftyswapContractAddress: string;
|
|
158
|
+
tokenIds: Array<string>;
|
|
159
|
+
tokensBoughtAmounts: Array<string>;
|
|
160
|
+
maxCurrency: number;
|
|
161
|
+
}
|
|
162
|
+
export interface SmartRampQuoteDetails {
|
|
163
|
+
quoteId: string;
|
|
164
|
+
smartScriptId: string;
|
|
165
|
+
quoteRequest: SmartRampQuoteRequest;
|
|
166
|
+
recipientAddress: string;
|
|
167
|
+
purchaseAmount: number;
|
|
168
|
+
purchaseFees: number;
|
|
169
|
+
purchaseTotal: number;
|
|
170
|
+
sourceCurrency: string;
|
|
171
|
+
destCurrency: string;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
expiresAt: string;
|
|
174
|
+
}
|
|
175
|
+
export interface SmartRampPurchaseReceipt {
|
|
176
|
+
orderId: string;
|
|
177
|
+
quoteId: string;
|
|
178
|
+
smartScriptId: string;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
status: SmartRampOrderStatus;
|
|
181
|
+
authCodesRequested: boolean;
|
|
182
|
+
authCodesSubmitted: boolean;
|
|
183
|
+
sourceCurrency: string;
|
|
184
|
+
purchaseAmount: number;
|
|
185
|
+
purchaseFees: number;
|
|
186
|
+
purchaseTotal: number;
|
|
187
|
+
}
|
|
188
|
+
export interface SmartRampOrder {
|
|
189
|
+
id: number;
|
|
190
|
+
userAddress: string;
|
|
191
|
+
contractAddress: string;
|
|
192
|
+
payCardId: number;
|
|
193
|
+
orderId: string;
|
|
194
|
+
quoteId: string;
|
|
195
|
+
status: SmartRampOrderStatus;
|
|
196
|
+
authCodesRequested: boolean;
|
|
197
|
+
authCodesSubmitted: boolean;
|
|
198
|
+
countryCode: string;
|
|
199
|
+
email: string;
|
|
200
|
+
sourceCurrency: string;
|
|
201
|
+
destCurrency: string;
|
|
202
|
+
purchaseAmount: number;
|
|
203
|
+
purchaseFees: number;
|
|
204
|
+
purchaseTotal: number;
|
|
205
|
+
smartScriptParams: {
|
|
206
|
+
[key: string]: any;
|
|
207
|
+
};
|
|
208
|
+
updatedAt?: string;
|
|
209
|
+
createdAt?: string;
|
|
210
|
+
}
|
|
211
|
+
export interface PayCardAuth {
|
|
212
|
+
orderId: string;
|
|
213
|
+
smsNeeded: boolean;
|
|
214
|
+
card2faNeeded: boolean;
|
|
215
|
+
authorization3dsUrl: string;
|
|
216
|
+
}
|
|
217
|
+
export interface Page {
|
|
218
|
+
pageSize?: number;
|
|
219
|
+
page?: number;
|
|
220
|
+
totalRecords?: number;
|
|
221
|
+
column?: string;
|
|
222
|
+
before?: any;
|
|
223
|
+
after?: any;
|
|
224
|
+
sort?: Array<SortBy>;
|
|
225
|
+
}
|
|
226
|
+
export interface SortBy {
|
|
227
|
+
column: string;
|
|
228
|
+
order: SortOrder;
|
|
229
|
+
}
|
|
140
230
|
export interface API {
|
|
141
231
|
ping(headers?: object): Promise<PingReturn>;
|
|
142
232
|
version(headers?: object): Promise<VersionReturn>;
|
|
@@ -162,6 +252,15 @@ export interface API {
|
|
|
162
252
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>;
|
|
163
253
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>;
|
|
164
254
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>;
|
|
255
|
+
invalidateOriginToken(args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn>;
|
|
256
|
+
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
|
|
257
|
+
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
|
|
258
|
+
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
|
|
259
|
+
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>;
|
|
260
|
+
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
|
|
261
|
+
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
262
|
+
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
263
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
165
264
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
|
|
166
265
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
|
|
167
266
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
|
|
@@ -326,6 +425,66 @@ export interface GetExchangeRateArgs {
|
|
|
326
425
|
export interface GetExchangeRateReturn {
|
|
327
426
|
exchangeRate: ExchangeRate;
|
|
328
427
|
}
|
|
428
|
+
export interface InvalidateOriginTokenArgs {
|
|
429
|
+
token: Token;
|
|
430
|
+
}
|
|
431
|
+
export interface InvalidateOriginTokenReturn {
|
|
432
|
+
}
|
|
433
|
+
export interface ListPayCardsOnFileArgs {
|
|
434
|
+
}
|
|
435
|
+
export interface ListPayCardsOnFileReturn {
|
|
436
|
+
payCards: Array<PayCard>;
|
|
437
|
+
}
|
|
438
|
+
export interface SavePayCardArgs {
|
|
439
|
+
payCard: PayCard;
|
|
440
|
+
}
|
|
441
|
+
export interface SavePayCardReturn {
|
|
442
|
+
ok: boolean;
|
|
443
|
+
payCard: PayCard;
|
|
444
|
+
}
|
|
445
|
+
export interface DeletePayCardArgs {
|
|
446
|
+
payCardId: number;
|
|
447
|
+
}
|
|
448
|
+
export interface DeletePayCardReturn {
|
|
449
|
+
ok: boolean;
|
|
450
|
+
}
|
|
451
|
+
export interface SmartRampQuoteArgs {
|
|
452
|
+
quoteRequest: SmartRampQuoteRequest;
|
|
453
|
+
}
|
|
454
|
+
export interface SmartRampQuoteReturn {
|
|
455
|
+
status: boolean;
|
|
456
|
+
quoteDetails: SmartRampQuoteDetails;
|
|
457
|
+
}
|
|
458
|
+
export interface SmartRampPurchaseArgs {
|
|
459
|
+
quoteDetails: SmartRampQuoteDetails;
|
|
460
|
+
payCardId: number;
|
|
461
|
+
payCardCVC?: string;
|
|
462
|
+
}
|
|
463
|
+
export interface SmartRampPurchaseReturn {
|
|
464
|
+
processing: boolean;
|
|
465
|
+
receipt: SmartRampPurchaseReceipt;
|
|
466
|
+
}
|
|
467
|
+
export interface SmartRampWaitOrderConfirmationArgs {
|
|
468
|
+
orderId: string;
|
|
469
|
+
}
|
|
470
|
+
export interface SmartRampWaitOrderConfirmationReturn {
|
|
471
|
+
done: boolean;
|
|
472
|
+
receipt: SmartRampPurchaseReceipt;
|
|
473
|
+
}
|
|
474
|
+
export interface SmartRampCheckCardAuthorizationArgs {
|
|
475
|
+
orderId: string;
|
|
476
|
+
}
|
|
477
|
+
export interface SmartRampCheckCardAuthorizationReturn {
|
|
478
|
+
cardAuth: PayCardAuth;
|
|
479
|
+
}
|
|
480
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
481
|
+
orderId: string;
|
|
482
|
+
sms?: string;
|
|
483
|
+
card2fa?: string;
|
|
484
|
+
}
|
|
485
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
486
|
+
status: boolean;
|
|
487
|
+
}
|
|
329
488
|
export interface GetInviteInfoArgs {
|
|
330
489
|
}
|
|
331
490
|
export interface GetInviteInfoReturn {
|
|
@@ -381,6 +540,15 @@ export declare class API implements API {
|
|
|
381
540
|
getCoinPrices: (args: GetCoinPricesArgs, headers?: object | undefined) => Promise<GetCoinPricesReturn>;
|
|
382
541
|
getCollectiblePrices: (args: GetCollectiblePricesArgs, headers?: object | undefined) => Promise<GetCollectiblePricesReturn>;
|
|
383
542
|
getExchangeRate: (args: GetExchangeRateArgs, headers?: object | undefined) => Promise<GetExchangeRateReturn>;
|
|
543
|
+
invalidateOriginToken: (args: InvalidateOriginTokenArgs, headers?: object | undefined) => Promise<InvalidateOriginTokenReturn>;
|
|
544
|
+
listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
|
|
545
|
+
savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
|
|
546
|
+
deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
|
|
547
|
+
smartRampQuote: (args: SmartRampQuoteArgs, headers?: object | undefined) => Promise<SmartRampQuoteReturn>;
|
|
548
|
+
smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
|
|
549
|
+
smartRampWaitOrderConfirmation: (args: SmartRampWaitOrderConfirmationArgs, headers?: object | undefined) => Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
550
|
+
smartRampCheckCardAuthorization: (args: SmartRampCheckCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
551
|
+
smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
384
552
|
getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
|
|
385
553
|
isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
|
|
386
554
|
internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>;
|
package/package.json
CHANGED
package/src/api.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 5d5b5ef657b4f6f0a05998c5740874426c04dee6
|
|
3
3
|
// --
|
|
4
4
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
5
5
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -11,12 +11,20 @@ export const WebRPCVersion = "v1"
|
|
|
11
11
|
export const WebRPCSchemaVersion = "v0.4.0"
|
|
12
12
|
|
|
13
13
|
// Schema hash generated from your RIDL schema
|
|
14
|
-
export const WebRPCSchemaHash = "
|
|
14
|
+
export const WebRPCSchemaHash = "5d5b5ef657b4f6f0a05998c5740874426c04dee6"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
19
19
|
//
|
|
20
|
+
export enum SmartRampOrderStatus {
|
|
21
|
+
UNKNOWN = 'UNKNOWN',
|
|
22
|
+
RUNNING_CHECKS = 'RUNNING_CHECKS',
|
|
23
|
+
PROCESSING = 'PROCESSING',
|
|
24
|
+
FAILED = 'FAILED',
|
|
25
|
+
COMPLETE = 'COMPLETE'
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
export enum SortOrder {
|
|
21
29
|
DESC = 'DESC',
|
|
22
30
|
ASC = 'ASC'
|
|
@@ -135,21 +143,6 @@ export interface UserStorage {
|
|
|
135
143
|
value: any
|
|
136
144
|
}
|
|
137
145
|
|
|
138
|
-
export interface Page {
|
|
139
|
-
pageSize?: number
|
|
140
|
-
page?: number
|
|
141
|
-
totalRecords?: number
|
|
142
|
-
column?: string
|
|
143
|
-
before?: any
|
|
144
|
-
after?: any
|
|
145
|
-
sort?: Array<SortBy>
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface SortBy {
|
|
149
|
-
column: string
|
|
150
|
-
order: SortOrder
|
|
151
|
-
}
|
|
152
|
-
|
|
153
146
|
export interface Token {
|
|
154
147
|
chainId: number
|
|
155
148
|
contractAddress: string
|
|
@@ -179,6 +172,108 @@ export interface ExchangeRate {
|
|
|
179
172
|
currencyType: string
|
|
180
173
|
}
|
|
181
174
|
|
|
175
|
+
export interface PayCard {
|
|
176
|
+
id: number
|
|
177
|
+
userAddress: string
|
|
178
|
+
cardType: string
|
|
179
|
+
cardFirstName: string
|
|
180
|
+
cardLastName: string
|
|
181
|
+
cardNumberLastFourDigits: string
|
|
182
|
+
cardNumberToken: string
|
|
183
|
+
cardCVCToken: string
|
|
184
|
+
cardExpMonth: number
|
|
185
|
+
cardExpYear: number
|
|
186
|
+
contactAddressToken: string
|
|
187
|
+
contactCityToken: string
|
|
188
|
+
contactProvinceToken: string
|
|
189
|
+
contactPostalCodeToken: string
|
|
190
|
+
contactCountryCode: string
|
|
191
|
+
contactEmail: string
|
|
192
|
+
contactPhoneToken: string
|
|
193
|
+
updatedAt?: string
|
|
194
|
+
createdAt?: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface SmartRampQuoteRequest {
|
|
198
|
+
countryCode: string
|
|
199
|
+
niftyswapContractAddress: string
|
|
200
|
+
tokenIds: Array<string>
|
|
201
|
+
tokensBoughtAmounts: Array<string>
|
|
202
|
+
maxCurrency: number
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface SmartRampQuoteDetails {
|
|
206
|
+
quoteId: string
|
|
207
|
+
smartScriptId: string
|
|
208
|
+
quoteRequest: SmartRampQuoteRequest
|
|
209
|
+
recipientAddress: string
|
|
210
|
+
purchaseAmount: number
|
|
211
|
+
purchaseFees: number
|
|
212
|
+
purchaseTotal: number
|
|
213
|
+
sourceCurrency: string
|
|
214
|
+
destCurrency: string
|
|
215
|
+
createdAt: string
|
|
216
|
+
expiresAt: string
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface SmartRampPurchaseReceipt {
|
|
220
|
+
orderId: string
|
|
221
|
+
quoteId: string
|
|
222
|
+
smartScriptId: string
|
|
223
|
+
createdAt: string
|
|
224
|
+
status: SmartRampOrderStatus
|
|
225
|
+
authCodesRequested: boolean
|
|
226
|
+
authCodesSubmitted: boolean
|
|
227
|
+
sourceCurrency: string
|
|
228
|
+
purchaseAmount: number
|
|
229
|
+
purchaseFees: number
|
|
230
|
+
purchaseTotal: number
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface SmartRampOrder {
|
|
234
|
+
id: number
|
|
235
|
+
userAddress: string
|
|
236
|
+
contractAddress: string
|
|
237
|
+
payCardId: number
|
|
238
|
+
orderId: string
|
|
239
|
+
quoteId: string
|
|
240
|
+
status: SmartRampOrderStatus
|
|
241
|
+
authCodesRequested: boolean
|
|
242
|
+
authCodesSubmitted: boolean
|
|
243
|
+
countryCode: string
|
|
244
|
+
email: string
|
|
245
|
+
sourceCurrency: string
|
|
246
|
+
destCurrency: string
|
|
247
|
+
purchaseAmount: number
|
|
248
|
+
purchaseFees: number
|
|
249
|
+
purchaseTotal: number
|
|
250
|
+
smartScriptParams: {[key: string]: any}
|
|
251
|
+
updatedAt?: string
|
|
252
|
+
createdAt?: string
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface PayCardAuth {
|
|
256
|
+
orderId: string
|
|
257
|
+
smsNeeded: boolean
|
|
258
|
+
card2faNeeded: boolean
|
|
259
|
+
authorization3dsUrl: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface Page {
|
|
263
|
+
pageSize?: number
|
|
264
|
+
page?: number
|
|
265
|
+
totalRecords?: number
|
|
266
|
+
column?: string
|
|
267
|
+
before?: any
|
|
268
|
+
after?: any
|
|
269
|
+
sort?: Array<SortBy>
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface SortBy {
|
|
273
|
+
column: string
|
|
274
|
+
order: SortOrder
|
|
275
|
+
}
|
|
276
|
+
|
|
182
277
|
export interface API {
|
|
183
278
|
ping(headers?: object): Promise<PingReturn>
|
|
184
279
|
version(headers?: object): Promise<VersionReturn>
|
|
@@ -204,6 +299,15 @@ export interface API {
|
|
|
204
299
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
|
|
205
300
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
|
|
206
301
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
|
|
302
|
+
invalidateOriginToken(args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn>
|
|
303
|
+
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
|
|
304
|
+
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
|
|
305
|
+
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
|
|
306
|
+
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
|
|
307
|
+
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
|
|
308
|
+
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
|
|
309
|
+
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
|
|
310
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
207
311
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
208
312
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
209
313
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -391,6 +495,75 @@ export interface GetExchangeRateArgs {
|
|
|
391
495
|
export interface GetExchangeRateReturn {
|
|
392
496
|
exchangeRate: ExchangeRate
|
|
393
497
|
}
|
|
498
|
+
export interface InvalidateOriginTokenArgs {
|
|
499
|
+
token: Token
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface InvalidateOriginTokenReturn {
|
|
503
|
+
}
|
|
504
|
+
export interface ListPayCardsOnFileArgs {
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export interface ListPayCardsOnFileReturn {
|
|
508
|
+
payCards: Array<PayCard>
|
|
509
|
+
}
|
|
510
|
+
export interface SavePayCardArgs {
|
|
511
|
+
payCard: PayCard
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface SavePayCardReturn {
|
|
515
|
+
ok: boolean
|
|
516
|
+
payCard: PayCard
|
|
517
|
+
}
|
|
518
|
+
export interface DeletePayCardArgs {
|
|
519
|
+
payCardId: number
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface DeletePayCardReturn {
|
|
523
|
+
ok: boolean
|
|
524
|
+
}
|
|
525
|
+
export interface SmartRampQuoteArgs {
|
|
526
|
+
quoteRequest: SmartRampQuoteRequest
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export interface SmartRampQuoteReturn {
|
|
530
|
+
status: boolean
|
|
531
|
+
quoteDetails: SmartRampQuoteDetails
|
|
532
|
+
}
|
|
533
|
+
export interface SmartRampPurchaseArgs {
|
|
534
|
+
quoteDetails: SmartRampQuoteDetails
|
|
535
|
+
payCardId: number
|
|
536
|
+
payCardCVC?: string
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface SmartRampPurchaseReturn {
|
|
540
|
+
processing: boolean
|
|
541
|
+
receipt: SmartRampPurchaseReceipt
|
|
542
|
+
}
|
|
543
|
+
export interface SmartRampWaitOrderConfirmationArgs {
|
|
544
|
+
orderId: string
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface SmartRampWaitOrderConfirmationReturn {
|
|
548
|
+
done: boolean
|
|
549
|
+
receipt: SmartRampPurchaseReceipt
|
|
550
|
+
}
|
|
551
|
+
export interface SmartRampCheckCardAuthorizationArgs {
|
|
552
|
+
orderId: string
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export interface SmartRampCheckCardAuthorizationReturn {
|
|
556
|
+
cardAuth: PayCardAuth
|
|
557
|
+
}
|
|
558
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
559
|
+
orderId: string
|
|
560
|
+
sms?: string
|
|
561
|
+
card2fa?: string
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
565
|
+
status: boolean
|
|
566
|
+
}
|
|
394
567
|
export interface GetInviteInfoArgs {
|
|
395
568
|
}
|
|
396
569
|
|
|
@@ -739,6 +912,118 @@ export class API implements API {
|
|
|
739
912
|
})
|
|
740
913
|
}
|
|
741
914
|
|
|
915
|
+
invalidateOriginToken = (args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn> => {
|
|
916
|
+
return this.fetch(
|
|
917
|
+
this.url('InvalidateOriginToken'),
|
|
918
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
919
|
+
return buildResponse(res).then(_data => {
|
|
920
|
+
return {
|
|
921
|
+
}
|
|
922
|
+
})
|
|
923
|
+
})
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
|
|
927
|
+
return this.fetch(
|
|
928
|
+
this.url('ListPayCardsOnFile'),
|
|
929
|
+
createHTTPRequest({}, headers)
|
|
930
|
+
).then((res) => {
|
|
931
|
+
return buildResponse(res).then(_data => {
|
|
932
|
+
return {
|
|
933
|
+
payCards: <Array<PayCard>>(_data.payCards)
|
|
934
|
+
}
|
|
935
|
+
})
|
|
936
|
+
})
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
savePayCard = (args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn> => {
|
|
940
|
+
return this.fetch(
|
|
941
|
+
this.url('SavePayCard'),
|
|
942
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
943
|
+
return buildResponse(res).then(_data => {
|
|
944
|
+
return {
|
|
945
|
+
ok: <boolean>(_data.ok),
|
|
946
|
+
payCard: <PayCard>(_data.payCard)
|
|
947
|
+
}
|
|
948
|
+
})
|
|
949
|
+
})
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
|
|
953
|
+
return this.fetch(
|
|
954
|
+
this.url('DeletePayCard'),
|
|
955
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
956
|
+
return buildResponse(res).then(_data => {
|
|
957
|
+
return {
|
|
958
|
+
ok: <boolean>(_data.ok)
|
|
959
|
+
}
|
|
960
|
+
})
|
|
961
|
+
})
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
smartRampQuote = (args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn> => {
|
|
965
|
+
return this.fetch(
|
|
966
|
+
this.url('SmartRampQuote'),
|
|
967
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
968
|
+
return buildResponse(res).then(_data => {
|
|
969
|
+
return {
|
|
970
|
+
status: <boolean>(_data.status),
|
|
971
|
+
quoteDetails: <SmartRampQuoteDetails>(_data.quoteDetails)
|
|
972
|
+
}
|
|
973
|
+
})
|
|
974
|
+
})
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
|
|
978
|
+
return this.fetch(
|
|
979
|
+
this.url('SmartRampPurchase'),
|
|
980
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
981
|
+
return buildResponse(res).then(_data => {
|
|
982
|
+
return {
|
|
983
|
+
processing: <boolean>(_data.processing),
|
|
984
|
+
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
985
|
+
}
|
|
986
|
+
})
|
|
987
|
+
})
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
smartRampWaitOrderConfirmation = (args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn> => {
|
|
991
|
+
return this.fetch(
|
|
992
|
+
this.url('SmartRampWaitOrderConfirmation'),
|
|
993
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
994
|
+
return buildResponse(res).then(_data => {
|
|
995
|
+
return {
|
|
996
|
+
done: <boolean>(_data.done),
|
|
997
|
+
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
998
|
+
}
|
|
999
|
+
})
|
|
1000
|
+
})
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
|
|
1004
|
+
return this.fetch(
|
|
1005
|
+
this.url('SmartRampCheckCardAuthorization'),
|
|
1006
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
1007
|
+
return buildResponse(res).then(_data => {
|
|
1008
|
+
return {
|
|
1009
|
+
cardAuth: <PayCardAuth>(_data.cardAuth)
|
|
1010
|
+
}
|
|
1011
|
+
})
|
|
1012
|
+
})
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
|
|
1016
|
+
return this.fetch(
|
|
1017
|
+
this.url('SmartRampSubmitCardAuthorization'),
|
|
1018
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
1019
|
+
return buildResponse(res).then(_data => {
|
|
1020
|
+
return {
|
|
1021
|
+
status: <boolean>(_data.status)
|
|
1022
|
+
}
|
|
1023
|
+
})
|
|
1024
|
+
})
|
|
1025
|
+
}
|
|
1026
|
+
|
|
742
1027
|
getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
|
|
743
1028
|
return this.fetch(
|
|
744
1029
|
this.url('GetInviteInfo'),
|