@adiba-banking-cloud/backoffice-console-ob-api-sdk 0.1.1

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.
Files changed (36) hide show
  1. package/README.md +129 -0
  2. package/dist/index.cjs.js +549 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.esm.js +527 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/types/features/applications/api.d.ts +6 -0
  7. package/dist/types/features/applications/types.d.ts +166 -0
  8. package/dist/types/features/consents/api.d.ts +6 -0
  9. package/dist/types/features/consents/types.d.ts +85 -0
  10. package/dist/types/features/customers/api.d.ts +12 -0
  11. package/dist/types/features/customers/types.d.ts +185 -0
  12. package/dist/types/features/dashboard/api.d.ts +6 -0
  13. package/dist/types/features/dashboard/types.d.ts +67 -0
  14. package/dist/types/features/health/api.d.ts +2 -0
  15. package/dist/types/features/health/types.d.ts +1 -0
  16. package/dist/types/features/merchants/api.d.ts +7 -0
  17. package/dist/types/features/merchants/types.d.ts +115 -0
  18. package/dist/types/features/providers/api.d.ts +8 -0
  19. package/dist/types/features/providers/types.d.ts +136 -0
  20. package/dist/types/features/purposes/api.d.ts +8 -0
  21. package/dist/types/features/purposes/types.d.ts +135 -0
  22. package/dist/types/index.d.ts +20 -0
  23. package/dist/types/shared/api/client.d.ts +2 -0
  24. package/dist/types/shared/api/endpoints/applications.endpoints.d.ts +7 -0
  25. package/dist/types/shared/api/endpoints/consents.endpoints.d.ts +7 -0
  26. package/dist/types/shared/api/endpoints/customers.endpoints.d.ts +13 -0
  27. package/dist/types/shared/api/endpoints/dashboard.endpoints.d.ts +7 -0
  28. package/dist/types/shared/api/endpoints/health.endpoints.d.ts +3 -0
  29. package/dist/types/shared/api/endpoints/index.d.ts +66 -0
  30. package/dist/types/shared/api/endpoints/merchants.endpoints.d.ts +8 -0
  31. package/dist/types/shared/api/endpoints/providers.endpoints.d.ts +9 -0
  32. package/dist/types/shared/api/endpoints/purposes.endpoints.d.ts +9 -0
  33. package/dist/types/shared/api/endpoints.d.ts +1 -0
  34. package/dist/types/shared/config/api.config.d.ts +22 -0
  35. package/dist/types/shared/types/index.d.ts +37 -0
  36. package/package.json +29 -0
@@ -0,0 +1,7 @@
1
+ import { BulkMerchantSettlementHoldBody, BulkMerchantSettlementHoldQueryParams, BulkMerchantSettlementHoldSuccessResponse, CreateMerchantBody, CreateMerchantSuccessResponse, InitiateMerchantSettlementBody, InitiateMerchantSettlementSuccessResponse, MerchantDetailSuccessResponse, MerchantsListQueryParams, MerchantsListSuccessResponse, UpdateMerchantStatusBody, UpdateMerchantStatusSuccessResponse } from "./types";
2
+ export declare const listMerchants: (params?: MerchantsListQueryParams) => Promise<MerchantsListSuccessResponse>;
3
+ export declare const createMerchant: (payload: CreateMerchantBody) => Promise<CreateMerchantSuccessResponse>;
4
+ export declare const getMerchantByCode: (code: string) => Promise<MerchantDetailSuccessResponse>;
5
+ export declare const updateMerchantStatus: (code: string, payload: UpdateMerchantStatusBody) => Promise<UpdateMerchantStatusSuccessResponse>;
6
+ export declare const initiateMerchantSettlement: (code: string, payload: InitiateMerchantSettlementBody) => Promise<InitiateMerchantSettlementSuccessResponse>;
7
+ export declare const bulkHoldMerchantSettlements: (payload: BulkMerchantSettlementHoldBody, params?: BulkMerchantSettlementHoldQueryParams) => Promise<BulkMerchantSettlementHoldSuccessResponse>;
@@ -0,0 +1,115 @@
1
+ import { ApiSuccessResponse, PaginatedData, PaginationParams } from "../../shared/types";
2
+ export interface MerchantsListQueryParams extends PaginationParams {
3
+ search?: string;
4
+ merchantStatus?: string;
5
+ kycStatus?: string;
6
+ riskRating?: string;
7
+ businessCategory?: string;
8
+ settlementCycle?: string;
9
+ issueFlag?: string | boolean;
10
+ kycReviewDue?: string;
11
+ }
12
+ export interface MerchantListItem {
13
+ merchantName: string;
14
+ merchantCode: string;
15
+ createdDate: string;
16
+ kycExpiryDate: string;
17
+ merchantStatus: string;
18
+ riskRating: string;
19
+ settlementAccountNumber: number;
20
+ ownerBvn: string;
21
+ tin: string;
22
+ holdSettlement: string;
23
+ issueFlags: boolean;
24
+ }
25
+ export interface CreateMerchantBody {
26
+ merchantName: string;
27
+ merchantCode: string;
28
+ settlementAccountNumber: number;
29
+ ownerBvn: string;
30
+ tin: string;
31
+ businessCategory: string;
32
+ settlementCycle: string;
33
+ riskRating: string;
34
+ merchantStatus: string;
35
+ kycStatus: string;
36
+ }
37
+ export interface MerchantCreatedData {
38
+ merchantCode: string;
39
+ merchantName: string;
40
+ merchantStatus: string;
41
+ kycStatus: string;
42
+ createdDate: string;
43
+ }
44
+ export interface MerchantDetail {
45
+ merchantName: string;
46
+ merchantCode: string;
47
+ businessCategory: string;
48
+ settlementAccountNumber: number;
49
+ settlementCycle: string;
50
+ settlementCurrency: string;
51
+ ownerBvn: string;
52
+ tin: string;
53
+ verifiedMerchant: string;
54
+ merchantStatus: string;
55
+ kycStatus: string;
56
+ kycExpiryDate: string;
57
+ riskRating: string;
58
+ chargebackRatio: string;
59
+ holdSettlement: string;
60
+ issueFlags: boolean;
61
+ monthlyTransactionVolume: number;
62
+ lastSettlementDate: string;
63
+ createdDate: string;
64
+ updatedDate: string;
65
+ }
66
+ export interface UpdateMerchantStatusBody {
67
+ status: string;
68
+ reason: string;
69
+ performedBy: string;
70
+ }
71
+ export interface MerchantStatusUpdateData {
72
+ merchantCode: string;
73
+ merchantStatus: string;
74
+ holdSettlement: string;
75
+ issueFlags: boolean;
76
+ updatedDate: string;
77
+ }
78
+ export interface InitiateMerchantSettlementBody {
79
+ initiatedBy: string;
80
+ note: string;
81
+ }
82
+ export interface InitiateMerchantSettlementData {
83
+ merchantCode: string;
84
+ holdSettlement: string;
85
+ issueFlags: boolean;
86
+ lastSettlementDate: string;
87
+ updatedDate: string;
88
+ }
89
+ export interface BulkMerchantSettlementHoldFilters {
90
+ search?: string;
91
+ merchantStatus?: string;
92
+ kycStatus?: string;
93
+ riskRating?: string;
94
+ businessCategory?: string;
95
+ settlementCycle?: string;
96
+ issueFlag?: boolean;
97
+ kycReviewDue?: string;
98
+ }
99
+ export interface BulkMerchantSettlementHoldBody {
100
+ merchantCodes?: string[];
101
+ filters?: BulkMerchantSettlementHoldFilters;
102
+ }
103
+ export interface BulkMerchantSettlementHoldQueryParams {
104
+ scope?: string;
105
+ }
106
+ export interface BulkMerchantSettlementHoldData {
107
+ affectedCount: number;
108
+ updatedAt: string;
109
+ }
110
+ export type MerchantsListSuccessResponse = ApiSuccessResponse<PaginatedData<MerchantListItem>>;
111
+ export type CreateMerchantSuccessResponse = ApiSuccessResponse<MerchantCreatedData>;
112
+ export type MerchantDetailSuccessResponse = ApiSuccessResponse<MerchantDetail>;
113
+ export type UpdateMerchantStatusSuccessResponse = ApiSuccessResponse<MerchantStatusUpdateData>;
114
+ export type InitiateMerchantSettlementSuccessResponse = ApiSuccessResponse<InitiateMerchantSettlementData>;
115
+ export type BulkMerchantSettlementHoldSuccessResponse = ApiSuccessResponse<BulkMerchantSettlementHoldData>;
@@ -0,0 +1,8 @@
1
+ import { CreateProviderBody, CreateProviderSuccessResponse, ProviderApplicationsQueryParams, ProviderApplicationsSuccessResponse, ProviderDetailSuccessResponse, ProviderDocumentsQueryParams, ProviderDocumentsSuccessResponse, ProviderMerchantsQueryParams, ProviderMerchantsSuccessResponse, ProvidersListQueryParams, ProvidersListSuccessResponse, RotateProviderKeyBody, RotateProviderKeySuccessResponse } from "./types";
2
+ export declare const listProviders: (params?: ProvidersListQueryParams) => Promise<ProvidersListSuccessResponse>;
3
+ export declare const createProvider: (payload: CreateProviderBody) => Promise<CreateProviderSuccessResponse>;
4
+ export declare const getProviderByCode: (code: string) => Promise<ProviderDetailSuccessResponse>;
5
+ export declare const getProviderDocuments: (code: string, params?: ProviderDocumentsQueryParams) => Promise<ProviderDocumentsSuccessResponse>;
6
+ export declare const rotateProviderKey: (code: string, payload: RotateProviderKeyBody) => Promise<RotateProviderKeySuccessResponse>;
7
+ export declare const getProviderMerchants: (code: string, params?: ProviderMerchantsQueryParams) => Promise<ProviderMerchantsSuccessResponse>;
8
+ export declare const getProviderApplications: (code: string, params?: ProviderApplicationsQueryParams) => Promise<ProviderApplicationsSuccessResponse>;
@@ -0,0 +1,136 @@
1
+ import { ApiSuccessResponse, PaginatedData, PaginationParams, PartialPaginatedData } from "../../shared/types";
2
+ export interface ProvidersListQueryParams extends PaginationParams {
3
+ search?: string;
4
+ tppStatus?: string;
5
+ tppType?: string;
6
+ riskRating?: string;
7
+ cbnLicenseStatus?: string;
8
+ technicalStatus?: string;
9
+ onboardingStatus?: string;
10
+ complianceStatus?: string;
11
+ certificationStatus?: string;
12
+ recertificationDue?: string;
13
+ }
14
+ export interface ProviderListItem {
15
+ tppName: string;
16
+ tppCode: string;
17
+ tppType: string;
18
+ activeApplications: string;
19
+ cbnLicenseNumber: string;
20
+ cbnLicenseStatus: string;
21
+ tppStatus: string;
22
+ riskRating: string;
23
+ systemHealthStatus: string;
24
+ onboardingStatus: string;
25
+ complianceStatus: string;
26
+ certificationStatus: string;
27
+ certificationExpiryDate: string;
28
+ }
29
+ export type ProviderOnboardingDocument = string | Blob;
30
+ export interface CreateProviderBodyFields {
31
+ tppName: string;
32
+ tppCode: string;
33
+ clientUuid: string;
34
+ dpoName: string;
35
+ tppType: string;
36
+ cbnLicenseNumber: string;
37
+ cbnLicenseExpiryDate: string;
38
+ complianceStatus: string;
39
+ onboardingDocuments: ProviderOnboardingDocument[];
40
+ }
41
+ export type CreateProviderBody = FormData | CreateProviderBodyFields;
42
+ export interface ProviderCreatedData {
43
+ tppCode: string;
44
+ tppName: string;
45
+ onboardingStatus: string;
46
+ tppStatus: string;
47
+ createdDate: string;
48
+ }
49
+ export interface ProviderDetail {
50
+ tppName: string;
51
+ tppCode: string;
52
+ clientUuid: string;
53
+ tppType: string;
54
+ dpoName: string;
55
+ onboardingStatus: string;
56
+ tppStatus: string;
57
+ riskRating: string;
58
+ highRiskTpp: string;
59
+ cbnLicenseNumber: string;
60
+ cbnLicenseStatus: string;
61
+ cbnLicenseExpiryDate: string;
62
+ kycStatus: string;
63
+ dueDiligenceStatus: string;
64
+ complianceStatus: string;
65
+ certificationStatus: string;
66
+ certificationExpiryDate: string;
67
+ isActive: boolean;
68
+ systemHealthStatus: string;
69
+ averageApiLatencyMs: number;
70
+ todayApiCallCount: number;
71
+ dailyApiQuota: number;
72
+ quotaUtilization: number;
73
+ apiKeyVersion: string;
74
+ lastKeyRotationDate: string;
75
+ createdDate: string;
76
+ updatedDate: string;
77
+ }
78
+ export interface ProviderDocumentsQueryParams {
79
+ category?: string;
80
+ status?: string;
81
+ }
82
+ export interface ProviderDocument {
83
+ documentUuid: string;
84
+ name: string;
85
+ type: string;
86
+ size: string;
87
+ category: string;
88
+ status: string;
89
+ uploadedAt: string;
90
+ downloadUrl?: string;
91
+ }
92
+ export interface ProviderDocumentsData {
93
+ documents: ProviderDocument[];
94
+ }
95
+ export interface RotateProviderKeyBody {
96
+ performedBy: string;
97
+ reason: string;
98
+ }
99
+ export interface RotateProviderKeyData {
100
+ tppCode: string;
101
+ apiKeyVersion: string;
102
+ lastKeyRotationDate: string;
103
+ updatedDate: string;
104
+ }
105
+ export interface ProviderMerchantsQueryParams extends PaginationParams {
106
+ status?: string;
107
+ riskRating?: string;
108
+ }
109
+ export interface ProviderMerchantItem {
110
+ merchantName: string;
111
+ merchantCode: string;
112
+ createdDate: string;
113
+ kycExpiryDate: string;
114
+ merchantStatus: string;
115
+ riskRating: string;
116
+ }
117
+ export interface ProviderApplicationsQueryParams extends PaginationParams {
118
+ status?: string;
119
+ accessLevel?: string;
120
+ }
121
+ export interface ProviderApplicationItem {
122
+ applicationDisplayName: string;
123
+ applicationCode: string;
124
+ applicationCategory: string;
125
+ apiAccessLevel: string;
126
+ applicationStatus: string;
127
+ riskRating: string;
128
+ cbnApproved: string;
129
+ }
130
+ export type ProvidersListSuccessResponse = ApiSuccessResponse<PaginatedData<ProviderListItem>>;
131
+ export type CreateProviderSuccessResponse = ApiSuccessResponse<ProviderCreatedData>;
132
+ export type ProviderDetailSuccessResponse = ApiSuccessResponse<ProviderDetail>;
133
+ export type ProviderDocumentsSuccessResponse = ApiSuccessResponse<ProviderDocumentsData>;
134
+ export type RotateProviderKeySuccessResponse = ApiSuccessResponse<RotateProviderKeyData>;
135
+ export type ProviderMerchantsSuccessResponse = ApiSuccessResponse<PartialPaginatedData<ProviderMerchantItem>>;
136
+ export type ProviderApplicationsSuccessResponse = ApiSuccessResponse<PartialPaginatedData<ProviderApplicationItem>>;
@@ -0,0 +1,8 @@
1
+ import { BulkPurposeStatusUpdateBody, BulkPurposeStatusUpdateSuccessResponse, CreatePurposeBody, CreatePurposeSuccessResponse, PurposeDetailSuccessResponse, PurposeUsageQueryParams, PurposeUsageSuccessResponse, PurposesListQueryParams, PurposesListSuccessResponse, UpdatePurposeBody, UpdatePurposeStatusBody, UpdatePurposeStatusSuccessResponse, UpdatePurposeSuccessResponse } from "./types";
2
+ export declare const listPurposes: (params?: PurposesListQueryParams) => Promise<PurposesListSuccessResponse>;
3
+ export declare const createPurpose: (payload: CreatePurposeBody) => Promise<CreatePurposeSuccessResponse>;
4
+ export declare const getPurposeByCode: (code: string) => Promise<PurposeDetailSuccessResponse>;
5
+ export declare const updatePurpose: (code: string, payload: UpdatePurposeBody) => Promise<UpdatePurposeSuccessResponse>;
6
+ export declare const updatePurposeStatus: (code: string, payload: UpdatePurposeStatusBody) => Promise<UpdatePurposeStatusSuccessResponse>;
7
+ export declare const getPurposeUsage: (code: string, params?: PurposeUsageQueryParams) => Promise<PurposeUsageSuccessResponse>;
8
+ export declare const bulkUpdatePurposeStatus: (payload: BulkPurposeStatusUpdateBody) => Promise<BulkPurposeStatusUpdateSuccessResponse>;
@@ -0,0 +1,135 @@
1
+ import { ApiSuccessResponse, PaginatedData, PaginationParams } from "../../shared/types";
2
+ export interface PurposesListQueryParams extends PaginationParams {
3
+ search?: string;
4
+ purposeStatus?: string;
5
+ amlRiskLevel?: string;
6
+ purposeCategory?: string;
7
+ regulatoryAction?: string;
8
+ applicableChannel?: string;
9
+ systemDefined?: string | boolean;
10
+ }
11
+ export interface PurposeListItem {
12
+ purposeName: string;
13
+ purposeCode: string;
14
+ cbnPurposeCode: string;
15
+ purposeCategory: string;
16
+ purposeType: string;
17
+ purposeStatus: string;
18
+ amlRiskLevel: string;
19
+ applicableChannels: string;
20
+ usageCount30d: number;
21
+ lastUsedAt: string;
22
+ createdDate: string;
23
+ updatedDate: string;
24
+ systemDefined: string;
25
+ requiresDocumentation: string;
26
+ requiresApproval: string;
27
+ requiresEdd: string;
28
+ dailyTransactionLimit: number;
29
+ limitCurrency: number;
30
+ }
31
+ export interface CreatePurposeBody {
32
+ purposeName: string;
33
+ purposeCode: string;
34
+ description: string;
35
+ purposeCategory: string;
36
+ purposeType: string;
37
+ cbnPurposeCode: string;
38
+ amlRiskLevel: string;
39
+ purposeStatus: string;
40
+ requiresDocumentation: string;
41
+ requiresApproval: string;
42
+ requiresEdd: string;
43
+ applicableChannels: string[];
44
+ dailyTransactionLimit: number;
45
+ limitCurrency: number;
46
+ effectiveStartDate: string;
47
+ effectiveEndDate: string;
48
+ systemDefined: string;
49
+ }
50
+ export type UpdatePurposeBody = CreatePurposeBody;
51
+ export interface PurposeCreatedData {
52
+ uuid: string;
53
+ purposeCode: string;
54
+ purposeName: string;
55
+ purposeStatus: string;
56
+ createdDate: string;
57
+ updatedDate: string;
58
+ }
59
+ export interface PurposeDetail {
60
+ purposeName: string;
61
+ purposeCode: string;
62
+ cbnPurposeCode: string;
63
+ purposeCategory: string;
64
+ purposeType: string;
65
+ applicableChannels: string;
66
+ dailyTransactionLimit: number;
67
+ limitCurrency: number;
68
+ description: string;
69
+ purposeStatus: string;
70
+ amlRiskLevel: string;
71
+ systemDefined: string;
72
+ requiresDocumentation: string;
73
+ requiresApproval: string;
74
+ requiresEdd: string;
75
+ effectiveStartDate: string;
76
+ effectiveEndDate: string;
77
+ usageCount30d: number;
78
+ lastUsedAt: string;
79
+ createdDate: string;
80
+ updatedDate: string;
81
+ }
82
+ export interface PurposeUpdatedData {
83
+ purposeCode: string;
84
+ purposeName: string;
85
+ purposeStatus: string;
86
+ amlRiskLevel: string;
87
+ applicableChannels: string;
88
+ updatedDate: string;
89
+ }
90
+ export interface UpdatePurposeStatusBody {
91
+ status: string;
92
+ reason: string;
93
+ performedBy: string;
94
+ }
95
+ export interface PurposeStatusUpdateData {
96
+ purposeCode: string;
97
+ purposeStatus: string;
98
+ updatedDate: string;
99
+ }
100
+ export interface PurposeUsageQueryParams {
101
+ window?: "30d" | "90d";
102
+ }
103
+ export interface PurposeUsageData {
104
+ purposeCode: string;
105
+ usageCount30d: number;
106
+ lastUsedAt: string;
107
+ channelBreakdown?: string;
108
+ applicationBreakdown?: string;
109
+ trendSeries?: string;
110
+ }
111
+ export interface BulkPurposeStatusUpdateFilters {
112
+ search?: string;
113
+ purposeStatus?: string;
114
+ amlRiskLevel?: string;
115
+ purposeCategory?: string;
116
+ regulatoryAction?: string;
117
+ applicableChannel?: string;
118
+ systemDefined?: string | boolean;
119
+ }
120
+ export interface BulkPurposeStatusUpdateBody {
121
+ status: string;
122
+ purposeCodes?: string[];
123
+ filters?: BulkPurposeStatusUpdateFilters;
124
+ }
125
+ export interface BulkPurposeStatusUpdateData {
126
+ affectedCount: number;
127
+ updatedAt: string;
128
+ }
129
+ export type PurposesListSuccessResponse = ApiSuccessResponse<PaginatedData<PurposeListItem>>;
130
+ export type CreatePurposeSuccessResponse = ApiSuccessResponse<PurposeCreatedData>;
131
+ export type PurposeDetailSuccessResponse = ApiSuccessResponse<PurposeDetail>;
132
+ export type UpdatePurposeSuccessResponse = ApiSuccessResponse<PurposeUpdatedData>;
133
+ export type UpdatePurposeStatusSuccessResponse = ApiSuccessResponse<PurposeStatusUpdateData>;
134
+ export type PurposeUsageSuccessResponse = ApiSuccessResponse<PurposeUsageData>;
135
+ export type BulkPurposeStatusUpdateSuccessResponse = ApiSuccessResponse<BulkPurposeStatusUpdateData>;
@@ -0,0 +1,20 @@
1
+ export * from "./shared/config/api.config";
2
+ export * from "./shared/api/client";
3
+ export * from "./shared/api/endpoints";
4
+ export * from "./shared/types";
5
+ export * as ApplicationsApi from "./features/applications/api";
6
+ export * as ConsentsApi from "./features/consents/api";
7
+ export * as CustomersApi from "./features/customers/api";
8
+ export * as DashboardApi from "./features/dashboard/api";
9
+ export * as HealthApi from "./features/health/api";
10
+ export * as MerchantsApi from "./features/merchants/api";
11
+ export * as ProvidersApi from "./features/providers/api";
12
+ export * as PurposesApi from "./features/purposes/api";
13
+ export type * from "./features/applications/types";
14
+ export type * from "./features/consents/types";
15
+ export type * from "./features/customers/types";
16
+ export type * from "./features/dashboard/types";
17
+ export type * from "./features/health/types";
18
+ export type * from "./features/merchants/types";
19
+ export type * from "./features/providers/types";
20
+ export type * from "./features/purposes/types";
@@ -0,0 +1,2 @@
1
+ import { AxiosInstance } from "axios";
2
+ export declare const apiClient: AxiosInstance;
@@ -0,0 +1,7 @@
1
+ export declare const applicationsEndpoints: {
2
+ readonly list: "/ob/applications";
3
+ readonly create: "/ob/applications";
4
+ readonly detail: (code: string) => string;
5
+ readonly updateStatus: (code: string) => string;
6
+ readonly updateConfiguration: (code: string) => string;
7
+ };
@@ -0,0 +1,7 @@
1
+ export declare const consentsEndpoints: {
2
+ readonly list: "/ob/consents";
3
+ readonly detail: (reference: string) => string;
4
+ readonly updateStatus: (reference: string) => string;
5
+ readonly notify: (reference: string) => string;
6
+ readonly bulkRevoke: "/ob/consents/bulk-revoke";
7
+ };
@@ -0,0 +1,13 @@
1
+ export declare const customersEndpoints: {
2
+ readonly list: "/ob/customers";
3
+ readonly create: "/ob/customers";
4
+ readonly detail: (reference: string) => string;
5
+ readonly identification: (reference: string) => string;
6
+ readonly contactAddress: (reference: string) => string;
7
+ readonly employmentBusiness: (reference: string) => string;
8
+ readonly reviewKyc: (reference: string) => string;
9
+ readonly reviewSteps: (reference: string) => string;
10
+ readonly consentHistory: (reference: string) => string;
11
+ readonly revokeConsent: (reference: string) => string;
12
+ readonly interactions: (reference: string) => string;
13
+ };
@@ -0,0 +1,7 @@
1
+ export declare const dashboardEndpoints: {
2
+ readonly summary: "/ob/dashboard/summary";
3
+ readonly apiPerformance: "/ob/dashboard/analytics/api-performance";
4
+ readonly topApis: "/ob/dashboard/analytics/top-apis";
5
+ readonly topTpps: "/ob/dashboard/analytics/top-tpps";
6
+ readonly recentAlarms: "/ob/dashboard/alarms/recent";
7
+ };
@@ -0,0 +1,3 @@
1
+ export declare const healthEndpoints: {
2
+ readonly check: "/healthz";
3
+ };
@@ -0,0 +1,66 @@
1
+ export declare const API_ENDPOINTS: {
2
+ readonly applications: {
3
+ readonly list: "/ob/applications";
4
+ readonly create: "/ob/applications";
5
+ readonly detail: (code: string) => string;
6
+ readonly updateStatus: (code: string) => string;
7
+ readonly updateConfiguration: (code: string) => string;
8
+ };
9
+ readonly consents: {
10
+ readonly list: "/ob/consents";
11
+ readonly detail: (reference: string) => string;
12
+ readonly updateStatus: (reference: string) => string;
13
+ readonly notify: (reference: string) => string;
14
+ readonly bulkRevoke: "/ob/consents/bulk-revoke";
15
+ };
16
+ readonly customers: {
17
+ readonly list: "/ob/customers";
18
+ readonly create: "/ob/customers";
19
+ readonly detail: (reference: string) => string;
20
+ readonly identification: (reference: string) => string;
21
+ readonly contactAddress: (reference: string) => string;
22
+ readonly employmentBusiness: (reference: string) => string;
23
+ readonly reviewKyc: (reference: string) => string;
24
+ readonly reviewSteps: (reference: string) => string;
25
+ readonly consentHistory: (reference: string) => string;
26
+ readonly revokeConsent: (reference: string) => string;
27
+ readonly interactions: (reference: string) => string;
28
+ };
29
+ readonly dashboard: {
30
+ readonly summary: "/ob/dashboard/summary";
31
+ readonly apiPerformance: "/ob/dashboard/analytics/api-performance";
32
+ readonly topApis: "/ob/dashboard/analytics/top-apis";
33
+ readonly topTpps: "/ob/dashboard/analytics/top-tpps";
34
+ readonly recentAlarms: "/ob/dashboard/alarms/recent";
35
+ };
36
+ readonly health: {
37
+ readonly check: "/healthz";
38
+ };
39
+ readonly merchants: {
40
+ readonly list: "/ob/merchants";
41
+ readonly create: "/ob/merchants";
42
+ readonly detail: (code: string) => string;
43
+ readonly updateStatus: (code: string) => string;
44
+ readonly initiateSettlement: (code: string) => string;
45
+ readonly bulkSettlementHold: "/ob/merchants/settlements/hold";
46
+ };
47
+ readonly providers: {
48
+ readonly list: "/ob/providers";
49
+ readonly create: "/ob/providers";
50
+ readonly detail: (code: string) => string;
51
+ readonly documents: (code: string) => string;
52
+ readonly rotateKey: (code: string) => string;
53
+ readonly merchants: (code: string) => string;
54
+ readonly applications: (code: string) => string;
55
+ };
56
+ readonly purposes: {
57
+ readonly list: "/ob/purposes";
58
+ readonly create: "/ob/purposes";
59
+ readonly detail: (code: string) => string;
60
+ readonly update: (code: string) => string;
61
+ readonly updateStatus: (code: string) => string;
62
+ readonly usage: (code: string) => string;
63
+ readonly bulkStatusUpdate: "/ob/purposes/status/bulk";
64
+ };
65
+ };
66
+ export type ApiEndpoints = typeof API_ENDPOINTS;
@@ -0,0 +1,8 @@
1
+ export declare const merchantsEndpoints: {
2
+ readonly list: "/ob/merchants";
3
+ readonly create: "/ob/merchants";
4
+ readonly detail: (code: string) => string;
5
+ readonly updateStatus: (code: string) => string;
6
+ readonly initiateSettlement: (code: string) => string;
7
+ readonly bulkSettlementHold: "/ob/merchants/settlements/hold";
8
+ };
@@ -0,0 +1,9 @@
1
+ export declare const providersEndpoints: {
2
+ readonly list: "/ob/providers";
3
+ readonly create: "/ob/providers";
4
+ readonly detail: (code: string) => string;
5
+ readonly documents: (code: string) => string;
6
+ readonly rotateKey: (code: string) => string;
7
+ readonly merchants: (code: string) => string;
8
+ readonly applications: (code: string) => string;
9
+ };
@@ -0,0 +1,9 @@
1
+ export declare const purposesEndpoints: {
2
+ readonly list: "/ob/purposes";
3
+ readonly create: "/ob/purposes";
4
+ readonly detail: (code: string) => string;
5
+ readonly update: (code: string) => string;
6
+ readonly updateStatus: (code: string) => string;
7
+ readonly usage: (code: string) => string;
8
+ readonly bulkStatusUpdate: "/ob/purposes/status/bulk";
9
+ };
@@ -0,0 +1 @@
1
+ export * from "./endpoints/index";
@@ -0,0 +1,22 @@
1
+ export type AccessTokenProvider = () => string | undefined | Promise<string | undefined>;
2
+ export interface BackofficeOpenBankingSdkConfig {
3
+ baseURL?: string;
4
+ timeout?: number;
5
+ headers?: Record<string, string>;
6
+ getAccessToken?: AccessTokenProvider;
7
+ requireAuth?: boolean;
8
+ onUnauthorized?: (error: unknown) => void | Promise<void>;
9
+ }
10
+ export declare class MissingAccessTokenError extends Error {
11
+ constructor();
12
+ }
13
+ export declare function setApiBaseUrl(url: string): void;
14
+ export declare function setAccessTokenProvider(provider: AccessTokenProvider | undefined): void;
15
+ export declare function configureBackofficeOpenBankingSdk(config: BackofficeOpenBankingSdkConfig): void;
16
+ export declare function getApiBaseUrl(): string;
17
+ export declare function getAccessTokenProvider(): AccessTokenProvider | undefined;
18
+ export declare function getDefaultHeaders(): Record<string, string>;
19
+ export declare function getUnauthorizedHandler(): BackofficeOpenBankingSdkConfig["onUnauthorized"] | undefined;
20
+ export declare function getApiTimeout(): number;
21
+ export declare function shouldRequireAuth(): boolean;
22
+ export declare const API_TIMEOUT: number;
@@ -0,0 +1,37 @@
1
+ export interface PaginationParams {
2
+ page?: number | string;
3
+ limit?: number | string;
4
+ }
5
+ export interface PaginatedData<T> {
6
+ data: T[];
7
+ total: number;
8
+ page: number;
9
+ limit: number;
10
+ }
11
+ export interface PartialPaginatedData<T> {
12
+ data: T[];
13
+ total?: number;
14
+ page?: number;
15
+ limit?: number;
16
+ }
17
+ export type EmptyObject = Record<string, never>;
18
+ export type OpaqueData = Record<string, unknown>;
19
+ export interface ApiSuccessResponse<T> {
20
+ status: "success";
21
+ data: T;
22
+ }
23
+ export interface ApiFailResponse {
24
+ status: "fail";
25
+ data: Record<string, string>;
26
+ }
27
+ export interface ApiErrorResponse {
28
+ status: "error";
29
+ message: string;
30
+ code: string;
31
+ }
32
+ export type ApiResponse<T> = ApiSuccessResponse<T> | ApiFailResponse | ApiErrorResponse;
33
+ export interface ApiError {
34
+ message: string;
35
+ code: string;
36
+ details?: Record<string, unknown>;
37
+ }