@0xsequence/api 0.0.0-20220601185217 → 0.0.0-20220609204505
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 +2 -96
- package/dist/0xsequence-api.cjs.prod.js +2 -96
- package/dist/0xsequence-api.esm.js +3 -97
- package/dist/declarations/src/api.gen.d.ts +14 -172
- package/package.json +1 -1
- package/src/api.gen.ts +17 -281
|
@@ -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 4d2479b7b4da1f3902a2593f729835aa16931146
|
|
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,20 +36,10 @@ 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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
|
|
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
|
-
|
|
53
43
|
exports.SortOrder = void 0;
|
|
54
44
|
|
|
55
45
|
(function (SortOrder) {
|
|
@@ -313,90 +303,6 @@ class API {
|
|
|
313
303
|
});
|
|
314
304
|
};
|
|
315
305
|
|
|
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
|
-
|
|
400
306
|
this.getInviteInfo = headers => {
|
|
401
307
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
402
308
|
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 4d2479b7b4da1f3902a2593f729835aa16931146
|
|
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,20 +36,10 @@ 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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
|
|
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
|
-
|
|
53
43
|
exports.SortOrder = void 0;
|
|
54
44
|
|
|
55
45
|
(function (SortOrder) {
|
|
@@ -313,90 +303,6 @@ class API {
|
|
|
313
303
|
});
|
|
314
304
|
};
|
|
315
305
|
|
|
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
|
-
|
|
400
306
|
this.getInviteInfo = headers => {
|
|
401
307
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
402
308
|
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 4d2479b7b4da1f3902a2593f729835aa16931146
|
|
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,20 +28,10 @@ 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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
|
|
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
|
-
|
|
45
35
|
let SortOrder;
|
|
46
36
|
|
|
47
37
|
(function (SortOrder) {
|
|
@@ -305,90 +295,6 @@ class API {
|
|
|
305
295
|
});
|
|
306
296
|
};
|
|
307
297
|
|
|
308
|
-
this.listPayCardsOnFile = headers => {
|
|
309
|
-
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
310
|
-
return buildResponse(res).then(_data => {
|
|
311
|
-
return {
|
|
312
|
-
payCards: _data.payCards
|
|
313
|
-
};
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
this.savePayCard = (args, headers) => {
|
|
319
|
-
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
320
|
-
return buildResponse(res).then(_data => {
|
|
321
|
-
return {
|
|
322
|
-
ok: _data.ok,
|
|
323
|
-
payCard: _data.payCard
|
|
324
|
-
};
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
this.deletePayCard = (args, headers) => {
|
|
330
|
-
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
331
|
-
return buildResponse(res).then(_data => {
|
|
332
|
-
return {
|
|
333
|
-
ok: _data.ok
|
|
334
|
-
};
|
|
335
|
-
});
|
|
336
|
-
});
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
this.smartRampQuote = (args, headers) => {
|
|
340
|
-
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
341
|
-
return buildResponse(res).then(_data => {
|
|
342
|
-
return {
|
|
343
|
-
status: _data.status,
|
|
344
|
-
quoteDetails: _data.quoteDetails
|
|
345
|
-
};
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
this.smartRampPurchase = (args, headers) => {
|
|
351
|
-
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
352
|
-
return buildResponse(res).then(_data => {
|
|
353
|
-
return {
|
|
354
|
-
processing: _data.processing,
|
|
355
|
-
receipt: _data.receipt
|
|
356
|
-
};
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
362
|
-
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
363
|
-
return buildResponse(res).then(_data => {
|
|
364
|
-
return {
|
|
365
|
-
done: _data.done,
|
|
366
|
-
receipt: _data.receipt
|
|
367
|
-
};
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
373
|
-
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
374
|
-
return buildResponse(res).then(_data => {
|
|
375
|
-
return {
|
|
376
|
-
cardAuth: _data.cardAuth
|
|
377
|
-
};
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
383
|
-
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
384
|
-
return buildResponse(res).then(_data => {
|
|
385
|
-
return {
|
|
386
|
-
status: _data.status
|
|
387
|
-
};
|
|
388
|
-
});
|
|
389
|
-
});
|
|
390
|
-
};
|
|
391
|
-
|
|
392
298
|
this.getInviteInfo = headers => {
|
|
393
299
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
394
300
|
return buildResponse(res).then(_data => {
|
|
@@ -495,4 +401,4 @@ class SequenceAPIClient extends API {
|
|
|
495
401
|
|
|
496
402
|
}
|
|
497
403
|
|
|
498
|
-
export { API, SequenceAPIClient,
|
|
404
|
+
export { API, SequenceAPIClient, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
4
|
-
export declare enum SmartRampOrderStatus {
|
|
5
|
-
UNKNOWN = "UNKNOWN",
|
|
6
|
-
RUNNING_CHECKS = "RUNNING_CHECKS",
|
|
7
|
-
PROCESSING = "PROCESSING",
|
|
8
|
-
FAILED = "FAILED",
|
|
9
|
-
COMPLETE = "COMPLETE"
|
|
10
|
-
}
|
|
3
|
+
export declare const WebRPCSchemaHash = "4d2479b7b4da1f3902a2593f729835aa16931146";
|
|
11
4
|
export declare enum SortOrder {
|
|
12
5
|
DESC = "DESC",
|
|
13
6
|
ASC = "ASC"
|
|
@@ -106,6 +99,19 @@ export interface UserStorage {
|
|
|
106
99
|
key: string;
|
|
107
100
|
value: any;
|
|
108
101
|
}
|
|
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
|
+
}
|
|
109
115
|
export interface Token {
|
|
110
116
|
chainId: number;
|
|
111
117
|
contractAddress: string;
|
|
@@ -131,100 +137,6 @@ export interface ExchangeRate {
|
|
|
131
137
|
vsCurrency: string;
|
|
132
138
|
currencyType: string;
|
|
133
139
|
}
|
|
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<number>;
|
|
159
|
-
tokensBoughtAmounts: Array<number>;
|
|
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
|
-
}
|
|
173
|
-
export interface SmartRampPurchaseReceipt {
|
|
174
|
-
orderId: string;
|
|
175
|
-
quoteId: string;
|
|
176
|
-
smartScriptId: string;
|
|
177
|
-
createdAt: string;
|
|
178
|
-
status: SmartRampOrderStatus;
|
|
179
|
-
authCodesRequested: boolean;
|
|
180
|
-
authCodesSubmitted: boolean;
|
|
181
|
-
sourceCurrency: string;
|
|
182
|
-
purchaseAmount: number;
|
|
183
|
-
purchaseFees: number;
|
|
184
|
-
purchaseTotal: number;
|
|
185
|
-
}
|
|
186
|
-
export interface SmartRampOrder {
|
|
187
|
-
id: number;
|
|
188
|
-
userAddress: string;
|
|
189
|
-
contractAddress: string;
|
|
190
|
-
payCardId: number;
|
|
191
|
-
orderId: string;
|
|
192
|
-
quoteId: string;
|
|
193
|
-
status: SmartRampOrderStatus;
|
|
194
|
-
authCodesRequested: boolean;
|
|
195
|
-
authCodesSubmitted: boolean;
|
|
196
|
-
countryCode: string;
|
|
197
|
-
email: string;
|
|
198
|
-
sourceCurrency: string;
|
|
199
|
-
destCurrency: string;
|
|
200
|
-
purchaseAmount: number;
|
|
201
|
-
purchaseFees: number;
|
|
202
|
-
purchaseTotal: number;
|
|
203
|
-
smartScriptParams: {
|
|
204
|
-
[key: string]: any;
|
|
205
|
-
};
|
|
206
|
-
updatedAt?: string;
|
|
207
|
-
createdAt?: string;
|
|
208
|
-
}
|
|
209
|
-
export interface PayCardAuth {
|
|
210
|
-
orderId: string;
|
|
211
|
-
smsNeeded: boolean;
|
|
212
|
-
card2faNeeded: boolean;
|
|
213
|
-
authorization3dsUrl: string;
|
|
214
|
-
}
|
|
215
|
-
export interface Page {
|
|
216
|
-
pageSize?: number;
|
|
217
|
-
page?: number;
|
|
218
|
-
totalRecords?: number;
|
|
219
|
-
column?: string;
|
|
220
|
-
before?: any;
|
|
221
|
-
after?: any;
|
|
222
|
-
sort?: Array<SortBy>;
|
|
223
|
-
}
|
|
224
|
-
export interface SortBy {
|
|
225
|
-
column: string;
|
|
226
|
-
order: SortOrder;
|
|
227
|
-
}
|
|
228
140
|
export interface API {
|
|
229
141
|
ping(headers?: object): Promise<PingReturn>;
|
|
230
142
|
version(headers?: object): Promise<VersionReturn>;
|
|
@@ -250,14 +162,6 @@ export interface API {
|
|
|
250
162
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>;
|
|
251
163
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>;
|
|
252
164
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>;
|
|
253
|
-
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
|
|
254
|
-
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
|
|
255
|
-
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
|
|
256
|
-
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>;
|
|
257
|
-
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
|
|
258
|
-
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
259
|
-
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
260
|
-
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
261
165
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
|
|
262
166
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
|
|
263
167
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
|
|
@@ -422,60 +326,6 @@ export interface GetExchangeRateArgs {
|
|
|
422
326
|
export interface GetExchangeRateReturn {
|
|
423
327
|
exchangeRate: ExchangeRate;
|
|
424
328
|
}
|
|
425
|
-
export interface ListPayCardsOnFileArgs {
|
|
426
|
-
}
|
|
427
|
-
export interface ListPayCardsOnFileReturn {
|
|
428
|
-
payCards: Array<PayCard>;
|
|
429
|
-
}
|
|
430
|
-
export interface SavePayCardArgs {
|
|
431
|
-
payCard: PayCard;
|
|
432
|
-
}
|
|
433
|
-
export interface SavePayCardReturn {
|
|
434
|
-
ok: boolean;
|
|
435
|
-
payCard: PayCard;
|
|
436
|
-
}
|
|
437
|
-
export interface DeletePayCardArgs {
|
|
438
|
-
payCardId: number;
|
|
439
|
-
}
|
|
440
|
-
export interface DeletePayCardReturn {
|
|
441
|
-
ok: boolean;
|
|
442
|
-
}
|
|
443
|
-
export interface SmartRampQuoteArgs {
|
|
444
|
-
quoteRequest: SmartRampQuoteRequest;
|
|
445
|
-
}
|
|
446
|
-
export interface SmartRampQuoteReturn {
|
|
447
|
-
status: boolean;
|
|
448
|
-
quoteDetails: SmartRampQuoteDetails;
|
|
449
|
-
}
|
|
450
|
-
export interface SmartRampPurchaseArgs {
|
|
451
|
-
quoteDetails: SmartRampQuoteDetails;
|
|
452
|
-
payCardId: number;
|
|
453
|
-
}
|
|
454
|
-
export interface SmartRampPurchaseReturn {
|
|
455
|
-
processing: boolean;
|
|
456
|
-
receipt: SmartRampPurchaseReceipt;
|
|
457
|
-
}
|
|
458
|
-
export interface SmartRampWaitOrderConfirmationArgs {
|
|
459
|
-
orderId: string;
|
|
460
|
-
}
|
|
461
|
-
export interface SmartRampWaitOrderConfirmationReturn {
|
|
462
|
-
done: boolean;
|
|
463
|
-
receipt: SmartRampPurchaseReceipt;
|
|
464
|
-
}
|
|
465
|
-
export interface SmartRampCheckCardAuthorizationArgs {
|
|
466
|
-
orderId: string;
|
|
467
|
-
}
|
|
468
|
-
export interface SmartRampCheckCardAuthorizationReturn {
|
|
469
|
-
cardAuth: PayCardAuth;
|
|
470
|
-
}
|
|
471
|
-
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
472
|
-
orderId: string;
|
|
473
|
-
sms?: string;
|
|
474
|
-
card2fa?: string;
|
|
475
|
-
}
|
|
476
|
-
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
477
|
-
status: boolean;
|
|
478
|
-
}
|
|
479
329
|
export interface GetInviteInfoArgs {
|
|
480
330
|
}
|
|
481
331
|
export interface GetInviteInfoReturn {
|
|
@@ -531,14 +381,6 @@ export declare class API implements API {
|
|
|
531
381
|
getCoinPrices: (args: GetCoinPricesArgs, headers?: object | undefined) => Promise<GetCoinPricesReturn>;
|
|
532
382
|
getCollectiblePrices: (args: GetCollectiblePricesArgs, headers?: object | undefined) => Promise<GetCollectiblePricesReturn>;
|
|
533
383
|
getExchangeRate: (args: GetExchangeRateArgs, headers?: object | undefined) => Promise<GetExchangeRateReturn>;
|
|
534
|
-
listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
|
|
535
|
-
savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
|
|
536
|
-
deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
|
|
537
|
-
smartRampQuote: (args: SmartRampQuoteArgs, headers?: object | undefined) => Promise<SmartRampQuoteReturn>;
|
|
538
|
-
smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
|
|
539
|
-
smartRampWaitOrderConfirmation: (args: SmartRampWaitOrderConfirmationArgs, headers?: object | undefined) => Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
540
|
-
smartRampCheckCardAuthorization: (args: SmartRampCheckCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
541
|
-
smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
542
384
|
getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
|
|
543
385
|
isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
|
|
544
386
|
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 4d2479b7b4da1f3902a2593f729835aa16931146
|
|
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,20 +11,12 @@ 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 = "4d2479b7b4da1f3902a2593f729835aa16931146"
|
|
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
|
-
|
|
28
20
|
export enum SortOrder {
|
|
29
21
|
DESC = 'DESC',
|
|
30
22
|
ASC = 'ASC'
|
|
@@ -143,6 +135,21 @@ export interface UserStorage {
|
|
|
143
135
|
value: any
|
|
144
136
|
}
|
|
145
137
|
|
|
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
|
+
|
|
146
153
|
export interface Token {
|
|
147
154
|
chainId: number
|
|
148
155
|
contractAddress: string
|
|
@@ -172,106 +179,6 @@ export interface ExchangeRate {
|
|
|
172
179
|
currencyType: string
|
|
173
180
|
}
|
|
174
181
|
|
|
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<number>
|
|
201
|
-
tokensBoughtAmounts: Array<number>
|
|
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
|
-
}
|
|
216
|
-
|
|
217
|
-
export interface SmartRampPurchaseReceipt {
|
|
218
|
-
orderId: string
|
|
219
|
-
quoteId: string
|
|
220
|
-
smartScriptId: string
|
|
221
|
-
createdAt: string
|
|
222
|
-
status: SmartRampOrderStatus
|
|
223
|
-
authCodesRequested: boolean
|
|
224
|
-
authCodesSubmitted: boolean
|
|
225
|
-
sourceCurrency: string
|
|
226
|
-
purchaseAmount: number
|
|
227
|
-
purchaseFees: number
|
|
228
|
-
purchaseTotal: number
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface SmartRampOrder {
|
|
232
|
-
id: number
|
|
233
|
-
userAddress: string
|
|
234
|
-
contractAddress: string
|
|
235
|
-
payCardId: number
|
|
236
|
-
orderId: string
|
|
237
|
-
quoteId: string
|
|
238
|
-
status: SmartRampOrderStatus
|
|
239
|
-
authCodesRequested: boolean
|
|
240
|
-
authCodesSubmitted: boolean
|
|
241
|
-
countryCode: string
|
|
242
|
-
email: string
|
|
243
|
-
sourceCurrency: string
|
|
244
|
-
destCurrency: string
|
|
245
|
-
purchaseAmount: number
|
|
246
|
-
purchaseFees: number
|
|
247
|
-
purchaseTotal: number
|
|
248
|
-
smartScriptParams: {[key: string]: any}
|
|
249
|
-
updatedAt?: string
|
|
250
|
-
createdAt?: string
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export interface PayCardAuth {
|
|
254
|
-
orderId: string
|
|
255
|
-
smsNeeded: boolean
|
|
256
|
-
card2faNeeded: boolean
|
|
257
|
-
authorization3dsUrl: string
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export interface Page {
|
|
261
|
-
pageSize?: number
|
|
262
|
-
page?: number
|
|
263
|
-
totalRecords?: number
|
|
264
|
-
column?: string
|
|
265
|
-
before?: any
|
|
266
|
-
after?: any
|
|
267
|
-
sort?: Array<SortBy>
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export interface SortBy {
|
|
271
|
-
column: string
|
|
272
|
-
order: SortOrder
|
|
273
|
-
}
|
|
274
|
-
|
|
275
182
|
export interface API {
|
|
276
183
|
ping(headers?: object): Promise<PingReturn>
|
|
277
184
|
version(headers?: object): Promise<VersionReturn>
|
|
@@ -297,14 +204,6 @@ export interface API {
|
|
|
297
204
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
|
|
298
205
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
|
|
299
206
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
|
|
300
|
-
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
|
|
301
|
-
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
|
|
302
|
-
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
|
|
303
|
-
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
|
|
304
|
-
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
|
|
305
|
-
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
|
|
306
|
-
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
|
|
307
|
-
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
308
207
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
309
208
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
310
209
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -492,68 +391,6 @@ export interface GetExchangeRateArgs {
|
|
|
492
391
|
export interface GetExchangeRateReturn {
|
|
493
392
|
exchangeRate: ExchangeRate
|
|
494
393
|
}
|
|
495
|
-
export interface ListPayCardsOnFileArgs {
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
export interface ListPayCardsOnFileReturn {
|
|
499
|
-
payCards: Array<PayCard>
|
|
500
|
-
}
|
|
501
|
-
export interface SavePayCardArgs {
|
|
502
|
-
payCard: PayCard
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export interface SavePayCardReturn {
|
|
506
|
-
ok: boolean
|
|
507
|
-
payCard: PayCard
|
|
508
|
-
}
|
|
509
|
-
export interface DeletePayCardArgs {
|
|
510
|
-
payCardId: number
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
export interface DeletePayCardReturn {
|
|
514
|
-
ok: boolean
|
|
515
|
-
}
|
|
516
|
-
export interface SmartRampQuoteArgs {
|
|
517
|
-
quoteRequest: SmartRampQuoteRequest
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
export interface SmartRampQuoteReturn {
|
|
521
|
-
status: boolean
|
|
522
|
-
quoteDetails: SmartRampQuoteDetails
|
|
523
|
-
}
|
|
524
|
-
export interface SmartRampPurchaseArgs {
|
|
525
|
-
quoteDetails: SmartRampQuoteDetails
|
|
526
|
-
payCardId: number
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
export interface SmartRampPurchaseReturn {
|
|
530
|
-
processing: boolean
|
|
531
|
-
receipt: SmartRampPurchaseReceipt
|
|
532
|
-
}
|
|
533
|
-
export interface SmartRampWaitOrderConfirmationArgs {
|
|
534
|
-
orderId: string
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
export interface SmartRampWaitOrderConfirmationReturn {
|
|
538
|
-
done: boolean
|
|
539
|
-
receipt: SmartRampPurchaseReceipt
|
|
540
|
-
}
|
|
541
|
-
export interface SmartRampCheckCardAuthorizationArgs {
|
|
542
|
-
orderId: string
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export interface SmartRampCheckCardAuthorizationReturn {
|
|
546
|
-
cardAuth: PayCardAuth
|
|
547
|
-
}
|
|
548
|
-
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
549
|
-
orderId: string
|
|
550
|
-
sms?: string
|
|
551
|
-
card2fa?: string
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
555
|
-
status: boolean
|
|
556
|
-
}
|
|
557
394
|
export interface GetInviteInfoArgs {
|
|
558
395
|
}
|
|
559
396
|
|
|
@@ -902,107 +739,6 @@ export class API implements API {
|
|
|
902
739
|
})
|
|
903
740
|
}
|
|
904
741
|
|
|
905
|
-
listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
|
|
906
|
-
return this.fetch(
|
|
907
|
-
this.url('ListPayCardsOnFile'),
|
|
908
|
-
createHTTPRequest({}, headers)
|
|
909
|
-
).then((res) => {
|
|
910
|
-
return buildResponse(res).then(_data => {
|
|
911
|
-
return {
|
|
912
|
-
payCards: <Array<PayCard>>(_data.payCards)
|
|
913
|
-
}
|
|
914
|
-
})
|
|
915
|
-
})
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
savePayCard = (args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn> => {
|
|
919
|
-
return this.fetch(
|
|
920
|
-
this.url('SavePayCard'),
|
|
921
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
922
|
-
return buildResponse(res).then(_data => {
|
|
923
|
-
return {
|
|
924
|
-
ok: <boolean>(_data.ok),
|
|
925
|
-
payCard: <PayCard>(_data.payCard)
|
|
926
|
-
}
|
|
927
|
-
})
|
|
928
|
-
})
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
|
|
932
|
-
return this.fetch(
|
|
933
|
-
this.url('DeletePayCard'),
|
|
934
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
935
|
-
return buildResponse(res).then(_data => {
|
|
936
|
-
return {
|
|
937
|
-
ok: <boolean>(_data.ok)
|
|
938
|
-
}
|
|
939
|
-
})
|
|
940
|
-
})
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
smartRampQuote = (args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn> => {
|
|
944
|
-
return this.fetch(
|
|
945
|
-
this.url('SmartRampQuote'),
|
|
946
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
947
|
-
return buildResponse(res).then(_data => {
|
|
948
|
-
return {
|
|
949
|
-
status: <boolean>(_data.status),
|
|
950
|
-
quoteDetails: <SmartRampQuoteDetails>(_data.quoteDetails)
|
|
951
|
-
}
|
|
952
|
-
})
|
|
953
|
-
})
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
|
|
957
|
-
return this.fetch(
|
|
958
|
-
this.url('SmartRampPurchase'),
|
|
959
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
960
|
-
return buildResponse(res).then(_data => {
|
|
961
|
-
return {
|
|
962
|
-
processing: <boolean>(_data.processing),
|
|
963
|
-
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
964
|
-
}
|
|
965
|
-
})
|
|
966
|
-
})
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
smartRampWaitOrderConfirmation = (args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn> => {
|
|
970
|
-
return this.fetch(
|
|
971
|
-
this.url('SmartRampWaitOrderConfirmation'),
|
|
972
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
973
|
-
return buildResponse(res).then(_data => {
|
|
974
|
-
return {
|
|
975
|
-
done: <boolean>(_data.done),
|
|
976
|
-
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
977
|
-
}
|
|
978
|
-
})
|
|
979
|
-
})
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
|
|
983
|
-
return this.fetch(
|
|
984
|
-
this.url('SmartRampCheckCardAuthorization'),
|
|
985
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
986
|
-
return buildResponse(res).then(_data => {
|
|
987
|
-
return {
|
|
988
|
-
cardAuth: <PayCardAuth>(_data.cardAuth)
|
|
989
|
-
}
|
|
990
|
-
})
|
|
991
|
-
})
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
|
|
995
|
-
return this.fetch(
|
|
996
|
-
this.url('SmartRampSubmitCardAuthorization'),
|
|
997
|
-
createHTTPRequest(args, headers)).then((res) => {
|
|
998
|
-
return buildResponse(res).then(_data => {
|
|
999
|
-
return {
|
|
1000
|
-
status: <boolean>(_data.status)
|
|
1001
|
-
}
|
|
1002
|
-
})
|
|
1003
|
-
})
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
742
|
getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
|
|
1007
743
|
return this.fetch(
|
|
1008
744
|
this.url('GetInviteInfo'),
|