squarefi-bff-api-module 1.10.4 → 1.10.8
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/api/types.d.ts +7 -12
- package/dist/api/wallets.d.ts +1 -1
- package/dist/api/wallets.js +14 -2
- package/package.json +1 -1
- package/src/api/types.ts +7 -12
- package/src/api/wallets.ts +2 -1
package/dist/api/types.d.ts
CHANGED
|
@@ -352,10 +352,10 @@ export declare namespace API {
|
|
|
352
352
|
namespace Counterparties {
|
|
353
353
|
interface Counterparty {
|
|
354
354
|
id: string;
|
|
355
|
-
email
|
|
356
|
-
phone
|
|
355
|
+
email?: string;
|
|
356
|
+
phone?: string;
|
|
357
357
|
name: string;
|
|
358
|
-
nickname
|
|
358
|
+
nickname?: string;
|
|
359
359
|
type: CounterpartyType | string;
|
|
360
360
|
created_at: string;
|
|
361
361
|
}
|
|
@@ -499,21 +499,16 @@ export declare namespace API {
|
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
namespace Create {
|
|
502
|
-
|
|
503
|
-
email: string;
|
|
504
|
-
phone: string;
|
|
502
|
+
type Request = Omit<Counterparty, 'id' | 'created_at'> & {
|
|
505
503
|
wallet_id: string;
|
|
506
|
-
|
|
507
|
-
type: CounterpartyType;
|
|
508
|
-
}
|
|
504
|
+
};
|
|
509
505
|
type Response = Counterparty;
|
|
510
506
|
}
|
|
511
507
|
namespace Update {
|
|
512
|
-
|
|
508
|
+
type Request = Partial<Omit<Counterparty, 'id' | 'created_at'>> & {
|
|
513
509
|
wallet_id: string;
|
|
514
510
|
counterparty_account_id: string;
|
|
515
|
-
|
|
516
|
-
}
|
|
511
|
+
};
|
|
517
512
|
type Response = Counterparty;
|
|
518
513
|
}
|
|
519
514
|
}
|
package/dist/api/wallets.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const wallets: {
|
|
|
14
14
|
};
|
|
15
15
|
transactions: {
|
|
16
16
|
byWalletUuid: {
|
|
17
|
-
getAll: ({ wallet_uuid, limit, offset, }: API.Wallets.WalletTransactions.TransactionList.Request) => Promise<API.Wallets.WalletTransactions.TransactionList.Response>;
|
|
17
|
+
getAll: ({ wallet_uuid, limit, offset, ...params }: API.Wallets.WalletTransactions.TransactionList.Request) => Promise<API.Wallets.WalletTransactions.TransactionList.Response>;
|
|
18
18
|
getByUuid: ({ wallet_uuid, uuid }: API.Wallets.WalletTransactions.GetByUuid.Request) => Promise<API.Wallets.WalletTransactions.DetailedTransaction>;
|
|
19
19
|
};
|
|
20
20
|
};
|
package/dist/api/wallets.js
CHANGED
|
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
11
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
23
|
exports.wallets = void 0;
|
|
13
24
|
const apiClientFactory_1 = require("../utils/apiClientFactory");
|
|
@@ -28,9 +39,10 @@ exports.wallets = {
|
|
|
28
39
|
},
|
|
29
40
|
transactions: {
|
|
30
41
|
byWalletUuid: {
|
|
31
|
-
getAll: (_a) => __awaiter(void 0,
|
|
42
|
+
getAll: (_a) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
var { wallet_uuid, limit = constants_1.defaultPaginationParams.limit, offset = constants_1.defaultPaginationParams.offset } = _a, params = __rest(_a, ["wallet_uuid", "limit", "offset"]);
|
|
32
44
|
return apiClientFactory_1.apiClientV2.getRequest(`/wallets/${wallet_uuid}/transactions`, {
|
|
33
|
-
params: { limit, offset },
|
|
45
|
+
params: Object.assign({ limit, offset }, params),
|
|
34
46
|
});
|
|
35
47
|
}),
|
|
36
48
|
getByUuid: ({ wallet_uuid, uuid }) => apiClientFactory_1.apiClientV2.getRequest(`/wallets/${wallet_uuid}/transactions/${uuid}`),
|
package/package.json
CHANGED
package/src/api/types.ts
CHANGED
|
@@ -411,10 +411,10 @@ export namespace API {
|
|
|
411
411
|
export namespace Counterparties {
|
|
412
412
|
export interface Counterparty {
|
|
413
413
|
id: string;
|
|
414
|
-
email
|
|
415
|
-
phone
|
|
414
|
+
email?: string;
|
|
415
|
+
phone?: string;
|
|
416
416
|
name: string;
|
|
417
|
-
nickname
|
|
417
|
+
nickname?: string;
|
|
418
418
|
type: CounterpartyType | string;
|
|
419
419
|
created_at: string;
|
|
420
420
|
}
|
|
@@ -596,23 +596,18 @@ export namespace API {
|
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
export namespace Create {
|
|
599
|
-
export
|
|
600
|
-
email: string;
|
|
601
|
-
phone: string;
|
|
599
|
+
export type Request = Omit<Counterparty, 'id' | 'created_at'> & {
|
|
602
600
|
wallet_id: string;
|
|
603
|
-
|
|
604
|
-
type: CounterpartyType;
|
|
605
|
-
}
|
|
601
|
+
};
|
|
606
602
|
|
|
607
603
|
export type Response = Counterparty;
|
|
608
604
|
}
|
|
609
605
|
|
|
610
606
|
export namespace Update {
|
|
611
|
-
export
|
|
607
|
+
export type Request = Partial<Omit<Counterparty, 'id' | 'created_at'>> & {
|
|
612
608
|
wallet_id: string;
|
|
613
609
|
counterparty_account_id: string;
|
|
614
|
-
|
|
615
|
-
}
|
|
610
|
+
};
|
|
616
611
|
|
|
617
612
|
export type Response = Counterparty;
|
|
618
613
|
}
|
package/src/api/wallets.ts
CHANGED
|
@@ -26,11 +26,12 @@ export const wallets = {
|
|
|
26
26
|
wallet_uuid,
|
|
27
27
|
limit = defaultPaginationParams.limit,
|
|
28
28
|
offset = defaultPaginationParams.offset,
|
|
29
|
+
...params
|
|
29
30
|
}: API.Wallets.WalletTransactions.TransactionList.Request) =>
|
|
30
31
|
apiClientV2.getRequest<API.Wallets.WalletTransactions.TransactionList.Response>(
|
|
31
32
|
`/wallets/${wallet_uuid}/transactions`,
|
|
32
33
|
{
|
|
33
|
-
params: { limit, offset },
|
|
34
|
+
params: { limit, offset, ...params },
|
|
34
35
|
}
|
|
35
36
|
),
|
|
36
37
|
getByUuid: ({ wallet_uuid, uuid }: API.Wallets.WalletTransactions.GetByUuid.Request) =>
|