@oapiex/sdk-kit 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.
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 ToneFlix Technologies Limited
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # SDK Core
@@ -0,0 +1,2 @@
1
+ import { _ as CountryCodeRestricted, a as InitOptions, c as Response, d as UnifiedResponse, f as UserConfig, g as CountryCode, h as XGenericObject, i as ErrorResponse, l as ResponseStatus, m as ValidationErrorResponse, n as AuthResponse, o as NormalPagination, p as ValidationError, r as CursorPagination, s as PageInfoMeta, t as AuthErrorResponse, u as SuccessResponse, v as CurrencyCode } from "./index-BYtse_Mh.cjs";
2
+ export { AuthErrorResponse, AuthResponse, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, ErrorResponse, InitOptions, NormalPagination, PageInfoMeta, Response, ResponseStatus, SuccessResponse, UnifiedResponse, UserConfig, ValidationError, ValidationErrorResponse, XGenericObject };
@@ -0,0 +1,2 @@
1
+ import { _ as CountryCodeRestricted, a as InitOptions, c as Response, d as UnifiedResponse, f as UserConfig, g as CountryCode, h as XGenericObject, i as ErrorResponse, l as ResponseStatus, m as ValidationErrorResponse, n as AuthResponse, o as NormalPagination, p as ValidationError, r as CursorPagination, s as PageInfoMeta, t as AuthErrorResponse, u as SuccessResponse, v as CurrencyCode } from "./index-sMTTpEJS.js";
2
+ export { AuthErrorResponse, AuthResponse, CountryCode, CountryCodeRestricted, CurrencyCode, CursorPagination, ErrorResponse, InitOptions, NormalPagination, PageInfoMeta, Response, ResponseStatus, SuccessResponse, UnifiedResponse, UserConfig, ValidationError, ValidationErrorResponse, XGenericObject };
@@ -0,0 +1,107 @@
1
+ //#region src/Contracts/Codes.d.ts
2
+ type CurrencyCode = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'AQD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUP' | 'CVE' | 'CYP' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'ECS' | 'EEK' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MTL' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SKK' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMK' | 'ZWD' | 'ZMW' | 'BGN';
3
+ type CountryCode = 'CM' | 'CI' | 'CG' | 'EG' | 'ET' | 'GA' | 'GH' | 'IN' | 'KE' | 'MW' | 'NG' | 'RW' | 'SL' | 'SN' | 'TD' | 'TZ' | 'UG' | 'US' | 'ZA' | 'ZM';
4
+ type CountryCodeRestricted = 'CG' | 'CM' | 'CI' | 'EG' | 'ET' | 'GA' | 'GH' | 'KE' | 'MW' | 'RW' | 'SN' | 'TZ' | 'TD' | 'UG' | 'ZM';
5
+ //#endregion
6
+ //#region src/Contracts/Interfaces.d.ts
7
+ interface XGenericObject {
8
+ [key: string]: any;
9
+ }
10
+ //#endregion
11
+ //#region src/Contracts/Core.d.ts
12
+ type ResponseStatus = 'failed' | 'success';
13
+ interface ValidationError {
14
+ 'field_name': string;
15
+ 'message': string;
16
+ }
17
+ interface ErrorResponse {
18
+ status: ResponseStatus;
19
+ message?: string;
20
+ error: {
21
+ type: string;
22
+ code: string | number;
23
+ message: string;
24
+ };
25
+ }
26
+ interface ValidationErrorResponse {
27
+ status: ResponseStatus;
28
+ message?: string;
29
+ error: {
30
+ type: string;
31
+ code: string | number;
32
+ message: string;
33
+ validation_errors: ValidationError[];
34
+ };
35
+ }
36
+ interface SuccessResponse<T = any> {
37
+ status: ResponseStatus;
38
+ message: string;
39
+ data: T;
40
+ }
41
+ interface AuthResponse {
42
+ access_token: string;
43
+ expires_in: number;
44
+ refresh_expires_in: number;
45
+ token_type: 'Bearer';
46
+ scope: string;
47
+ }
48
+ interface AuthErrorResponse {
49
+ error: 'invalid_request';
50
+ error_description: string;
51
+ }
52
+ type Response<T = any> = SuccessResponse<T> | ErrorResponse;
53
+ interface UnifiedResponse<T = any, M extends XGenericObject = XGenericObject> {
54
+ success: boolean;
55
+ message: string;
56
+ status?: ResponseStatus;
57
+ data: T;
58
+ meta?: M | undefined;
59
+ error?: {
60
+ type: string;
61
+ code: string | number;
62
+ message: string;
63
+ validation_errors: ValidationError[];
64
+ };
65
+ }
66
+ interface CursorPagination {
67
+ next?: string;
68
+ previous?: string;
69
+ limit: number;
70
+ total: number;
71
+ has_more_items: boolean;
72
+ }
73
+ interface NormalPagination {
74
+ total: number;
75
+ current_page: number;
76
+ total_pages: number;
77
+ }
78
+ interface PageInfoMeta {
79
+ page_info: NormalPagination;
80
+ }
81
+ interface InitOptions {
82
+ /**
83
+ * Your Flutterwave Public Key
84
+ */
85
+ clientId: string;
86
+ /**
87
+ * Your Flutterwave Secret Key
88
+ */
89
+ clientSecret: string;
90
+ /**
91
+ * Your Flutterwave Encryption Key
92
+ */
93
+ encryptionKey?: string;
94
+ /**
95
+ * Environment to use
96
+ */
97
+ environment?: 'sandbox' | 'live';
98
+ }
99
+ interface UserConfig {
100
+ environment?: 'sandbox' | 'live';
101
+ urls: {
102
+ live: string;
103
+ sandbox: string;
104
+ };
105
+ }
106
+ //#endregion
107
+ export { CountryCodeRestricted as _, InitOptions as a, Response as c, UnifiedResponse as d, UserConfig as f, CountryCode as g, XGenericObject as h, ErrorResponse as i, ResponseStatus as l, ValidationErrorResponse as m, AuthResponse as n, NormalPagination as o, ValidationError as p, CursorPagination as r, PageInfoMeta as s, AuthErrorResponse as t, SuccessResponse as u, CurrencyCode as v };
@@ -0,0 +1,107 @@
1
+ //#region src/Contracts/Codes.d.ts
2
+ type CurrencyCode = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'AQD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUP' | 'CVE' | 'CYP' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'ECS' | 'EEK' | 'EGP' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MTL' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SKK' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMK' | 'ZWD' | 'ZMW' | 'BGN';
3
+ type CountryCode = 'CM' | 'CI' | 'CG' | 'EG' | 'ET' | 'GA' | 'GH' | 'IN' | 'KE' | 'MW' | 'NG' | 'RW' | 'SL' | 'SN' | 'TD' | 'TZ' | 'UG' | 'US' | 'ZA' | 'ZM';
4
+ type CountryCodeRestricted = 'CG' | 'CM' | 'CI' | 'EG' | 'ET' | 'GA' | 'GH' | 'KE' | 'MW' | 'RW' | 'SN' | 'TZ' | 'TD' | 'UG' | 'ZM';
5
+ //#endregion
6
+ //#region src/Contracts/Interfaces.d.ts
7
+ interface XGenericObject {
8
+ [key: string]: any;
9
+ }
10
+ //#endregion
11
+ //#region src/Contracts/Core.d.ts
12
+ type ResponseStatus = 'failed' | 'success';
13
+ interface ValidationError {
14
+ 'field_name': string;
15
+ 'message': string;
16
+ }
17
+ interface ErrorResponse {
18
+ status: ResponseStatus;
19
+ message?: string;
20
+ error: {
21
+ type: string;
22
+ code: string | number;
23
+ message: string;
24
+ };
25
+ }
26
+ interface ValidationErrorResponse {
27
+ status: ResponseStatus;
28
+ message?: string;
29
+ error: {
30
+ type: string;
31
+ code: string | number;
32
+ message: string;
33
+ validation_errors: ValidationError[];
34
+ };
35
+ }
36
+ interface SuccessResponse<T = any> {
37
+ status: ResponseStatus;
38
+ message: string;
39
+ data: T;
40
+ }
41
+ interface AuthResponse {
42
+ access_token: string;
43
+ expires_in: number;
44
+ refresh_expires_in: number;
45
+ token_type: 'Bearer';
46
+ scope: string;
47
+ }
48
+ interface AuthErrorResponse {
49
+ error: 'invalid_request';
50
+ error_description: string;
51
+ }
52
+ type Response<T = any> = SuccessResponse<T> | ErrorResponse;
53
+ interface UnifiedResponse<T = any, M extends XGenericObject = XGenericObject> {
54
+ success: boolean;
55
+ message: string;
56
+ status?: ResponseStatus;
57
+ data: T;
58
+ meta?: M | undefined;
59
+ error?: {
60
+ type: string;
61
+ code: string | number;
62
+ message: string;
63
+ validation_errors: ValidationError[];
64
+ };
65
+ }
66
+ interface CursorPagination {
67
+ next?: string;
68
+ previous?: string;
69
+ limit: number;
70
+ total: number;
71
+ has_more_items: boolean;
72
+ }
73
+ interface NormalPagination {
74
+ total: number;
75
+ current_page: number;
76
+ total_pages: number;
77
+ }
78
+ interface PageInfoMeta {
79
+ page_info: NormalPagination;
80
+ }
81
+ interface InitOptions {
82
+ /**
83
+ * Your Flutterwave Public Key
84
+ */
85
+ clientId: string;
86
+ /**
87
+ * Your Flutterwave Secret Key
88
+ */
89
+ clientSecret: string;
90
+ /**
91
+ * Your Flutterwave Encryption Key
92
+ */
93
+ encryptionKey?: string;
94
+ /**
95
+ * Environment to use
96
+ */
97
+ environment?: 'sandbox' | 'live';
98
+ }
99
+ interface UserConfig {
100
+ environment?: 'sandbox' | 'live';
101
+ urls: {
102
+ live: string;
103
+ sandbox: string;
104
+ };
105
+ }
106
+ //#endregion
107
+ export { CountryCodeRestricted as _, InitOptions as a, Response as c, UnifiedResponse as d, UserConfig as f, CountryCode as g, XGenericObject as h, ErrorResponse as i, ResponseStatus as l, ValidationErrorResponse as m, AuthResponse as n, NormalPagination as o, ValidationError as p, CursorPagination as r, PageInfoMeta as s, AuthErrorResponse as t, SuccessResponse as u, CurrencyCode as v };