squarefi-bff-api-module 1.24.18 → 1.24.20
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/frontend.d.ts +11 -0
- package/dist/api/frontend.js +14 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/types/types.d.ts +46 -0
- package/package.json +1 -1
- package/src/api/frontend.ts +20 -0
- package/src/api/index.ts +3 -0
- package/src/api/types/types.ts +50 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { API } from './types/types';
|
|
2
|
+
export declare const frontend: {
|
|
3
|
+
access: {
|
|
4
|
+
keys: {
|
|
5
|
+
create: (data: API.Frontend.Access.Keys.Create.Request) => Promise<API.Frontend.Access.Keys.Create.Response>;
|
|
6
|
+
list: () => Promise<API.Frontend.Access.Keys.List.Response>;
|
|
7
|
+
regenerate: (key_id: string) => Promise<API.Frontend.Access.Keys.Regenerate.Response>;
|
|
8
|
+
revoke: (key_id: string) => Promise<API.Frontend.Access.Keys.Revoke.Response>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.frontend = void 0;
|
|
4
|
+
const apiClientFactory_1 = require("../utils/apiClientFactory");
|
|
5
|
+
exports.frontend = {
|
|
6
|
+
access: {
|
|
7
|
+
keys: {
|
|
8
|
+
create: (data) => apiClientFactory_1.apiClientV1.postRequest('/frontend/access/keys', { data }),
|
|
9
|
+
list: () => apiClientFactory_1.apiClientV1.getRequest('/frontend/access/keys'),
|
|
10
|
+
regenerate: (key_id) => apiClientFactory_1.apiClientV1.postRequest(`/frontend/access/keys/${key_id}/regenerate`),
|
|
11
|
+
revoke: (key_id) => apiClientFactory_1.apiClientV1.deleteRequest(`/frontend/access/keys/${key_id}`),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
package/dist/api/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { auth } from './auth';
|
|
|
2
2
|
import { counterparties } from './counterparties';
|
|
3
3
|
import { developer } from './developer';
|
|
4
4
|
import { exchange } from './exchange';
|
|
5
|
+
import { frontend } from './frontend';
|
|
5
6
|
import { issuing } from './issuing';
|
|
6
7
|
import { kyc } from './kyc';
|
|
7
8
|
import { list } from './list';
|
|
@@ -17,6 +18,7 @@ type Api = {
|
|
|
17
18
|
counterparties: typeof counterparties;
|
|
18
19
|
developer: typeof developer;
|
|
19
20
|
exchange: typeof exchange;
|
|
21
|
+
frontend: typeof frontend;
|
|
20
22
|
issuing: typeof issuing;
|
|
21
23
|
kyc: typeof kyc;
|
|
22
24
|
list: typeof list;
|
package/dist/api/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const auth_1 = require("./auth");
|
|
|
5
5
|
const counterparties_1 = require("./counterparties");
|
|
6
6
|
const developer_1 = require("./developer");
|
|
7
7
|
const exchange_1 = require("./exchange");
|
|
8
|
+
const frontend_1 = require("./frontend");
|
|
8
9
|
const issuing_1 = require("./issuing");
|
|
9
10
|
const kyc_1 = require("./kyc");
|
|
10
11
|
const list_1 = require("./list");
|
|
@@ -20,6 +21,7 @@ exports.squarefi_bff_api_client = {
|
|
|
20
21
|
counterparties: counterparties_1.counterparties,
|
|
21
22
|
developer: developer_1.developer,
|
|
22
23
|
exchange: exchange_1.exchange,
|
|
24
|
+
frontend: frontend_1.frontend,
|
|
23
25
|
issuing: issuing_1.issuing,
|
|
24
26
|
kyc: kyc_1.kyc,
|
|
25
27
|
list: list_1.list,
|
|
@@ -643,6 +643,52 @@ export declare namespace API {
|
|
|
643
643
|
onramp_enabled: boolean;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
+
namespace Frontend {
|
|
647
|
+
namespace Access {
|
|
648
|
+
namespace Keys {
|
|
649
|
+
interface Key {
|
|
650
|
+
id: string;
|
|
651
|
+
key: string;
|
|
652
|
+
name: string;
|
|
653
|
+
role: APIKeyRole;
|
|
654
|
+
wallet_id: string;
|
|
655
|
+
created_at: string;
|
|
656
|
+
}
|
|
657
|
+
namespace Create {
|
|
658
|
+
type Request = {
|
|
659
|
+
name: string;
|
|
660
|
+
role: APIKeyRole;
|
|
661
|
+
wallet_id: string;
|
|
662
|
+
};
|
|
663
|
+
type Response = {
|
|
664
|
+
success: boolean;
|
|
665
|
+
data: API.Frontend.Access.Keys.Key;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
namespace List {
|
|
669
|
+
type Response = {
|
|
670
|
+
success: boolean;
|
|
671
|
+
data: API.Frontend.Access.Keys.Key[];
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
namespace Regenerate {
|
|
675
|
+
type Response = {
|
|
676
|
+
success: boolean;
|
|
677
|
+
data: API.Frontend.Access.Keys.Key;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
namespace Revoke {
|
|
681
|
+
type Response = {
|
|
682
|
+
success: boolean;
|
|
683
|
+
data: {
|
|
684
|
+
id: string;
|
|
685
|
+
revoked_at: string;
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
646
692
|
namespace SubAccountsV2 {
|
|
647
693
|
type SubAccountDetails = {
|
|
648
694
|
iban: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { create } from 'domain';
|
|
2
|
+
import { apiClientV1 } from '../utils/apiClientFactory';
|
|
3
|
+
import { API } from './types/types';
|
|
4
|
+
|
|
5
|
+
export const frontend = {
|
|
6
|
+
access: {
|
|
7
|
+
keys: {
|
|
8
|
+
create: (data: API.Frontend.Access.Keys.Create.Request): Promise<API.Frontend.Access.Keys.Create.Response> =>
|
|
9
|
+
apiClientV1.postRequest<API.Frontend.Access.Keys.Create.Response>('/frontend/access/keys', { data }),
|
|
10
|
+
list: (): Promise<API.Frontend.Access.Keys.List.Response> =>
|
|
11
|
+
apiClientV1.getRequest<API.Frontend.Access.Keys.List.Response>('/frontend/access/keys'),
|
|
12
|
+
regenerate: (key_id: string): Promise<API.Frontend.Access.Keys.Regenerate.Response> =>
|
|
13
|
+
apiClientV1.postRequest<API.Frontend.Access.Keys.Regenerate.Response>(
|
|
14
|
+
`/frontend/access/keys/${key_id}/regenerate`
|
|
15
|
+
),
|
|
16
|
+
revoke: (key_id: string): Promise<API.Frontend.Access.Keys.Revoke.Response> =>
|
|
17
|
+
apiClientV1.deleteRequest(`/frontend/access/keys/${key_id}`),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
package/src/api/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { auth } from './auth';
|
|
|
2
2
|
import { counterparties } from './counterparties';
|
|
3
3
|
import { developer } from './developer';
|
|
4
4
|
import { exchange } from './exchange';
|
|
5
|
+
import { frontend } from './frontend';
|
|
5
6
|
import { issuing } from './issuing';
|
|
6
7
|
import { kyc } from './kyc';
|
|
7
8
|
import { list } from './list';
|
|
@@ -19,6 +20,7 @@ type Api = {
|
|
|
19
20
|
counterparties: typeof counterparties;
|
|
20
21
|
developer: typeof developer;
|
|
21
22
|
exchange: typeof exchange;
|
|
23
|
+
frontend: typeof frontend;
|
|
22
24
|
issuing: typeof issuing;
|
|
23
25
|
kyc: typeof kyc;
|
|
24
26
|
list: typeof list;
|
|
@@ -36,6 +38,7 @@ export const squarefi_bff_api_client: Api = {
|
|
|
36
38
|
counterparties,
|
|
37
39
|
developer,
|
|
38
40
|
exchange,
|
|
41
|
+
frontend,
|
|
39
42
|
issuing,
|
|
40
43
|
kyc,
|
|
41
44
|
list,
|
package/src/api/types/types.ts
CHANGED
|
@@ -790,6 +790,56 @@ export namespace API {
|
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
+
export namespace Frontend {
|
|
794
|
+
export namespace Access {
|
|
795
|
+
export namespace Keys {
|
|
796
|
+
export interface Key {
|
|
797
|
+
id: string;
|
|
798
|
+
key: string;
|
|
799
|
+
name: string;
|
|
800
|
+
role: APIKeyRole;
|
|
801
|
+
wallet_id: string;
|
|
802
|
+
created_at: string;
|
|
803
|
+
}
|
|
804
|
+
export namespace Create {
|
|
805
|
+
export type Request = {
|
|
806
|
+
name: string;
|
|
807
|
+
role: APIKeyRole;
|
|
808
|
+
wallet_id: string;
|
|
809
|
+
};
|
|
810
|
+
export type Response = {
|
|
811
|
+
success: boolean;
|
|
812
|
+
data: API.Frontend.Access.Keys.Key;
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export namespace List {
|
|
817
|
+
export type Response = {
|
|
818
|
+
success: boolean;
|
|
819
|
+
data: API.Frontend.Access.Keys.Key[];
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export namespace Regenerate {
|
|
824
|
+
export type Response = {
|
|
825
|
+
success: boolean;
|
|
826
|
+
data: API.Frontend.Access.Keys.Key;
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export namespace Revoke {
|
|
831
|
+
export type Response = {
|
|
832
|
+
success: boolean;
|
|
833
|
+
data: {
|
|
834
|
+
id: string;
|
|
835
|
+
revoked_at: string;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
793
843
|
export namespace SubAccountsV2 {
|
|
794
844
|
export type SubAccountDetails = {
|
|
795
845
|
iban: string;
|