monime-package 1.0.5 → 1.0.7
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/README.md +664 -142
- package/dist/index.d.mts +194 -1
- package/dist/index.d.ts +194 -1
- package/dist/index.js +192 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +192 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,193 @@
|
|
|
1
|
+
interface AllCheckout {
|
|
2
|
+
success: boolean;
|
|
3
|
+
messages: string[];
|
|
4
|
+
result: Result$5[];
|
|
5
|
+
pagination: Pagination$5;
|
|
6
|
+
}
|
|
7
|
+
interface Pagination$5 {
|
|
8
|
+
count: number;
|
|
9
|
+
next: string;
|
|
10
|
+
}
|
|
11
|
+
interface OneCheckout {
|
|
12
|
+
success: boolean;
|
|
13
|
+
messages: string[];
|
|
14
|
+
result: Result$5;
|
|
15
|
+
}
|
|
16
|
+
interface CreateCheckout {
|
|
17
|
+
success: boolean;
|
|
18
|
+
messages: string[];
|
|
19
|
+
result: Result$5;
|
|
20
|
+
}
|
|
21
|
+
interface Result$5 {
|
|
22
|
+
id: string;
|
|
23
|
+
status: string;
|
|
24
|
+
name: string;
|
|
25
|
+
orderNumber: string;
|
|
26
|
+
reference: string;
|
|
27
|
+
description: string;
|
|
28
|
+
redirectUrl: string;
|
|
29
|
+
cancelUrl: string;
|
|
30
|
+
successUrl: string;
|
|
31
|
+
lineItems: LineItems;
|
|
32
|
+
financialAccountId: string;
|
|
33
|
+
brandingOptions: BrandingOptions;
|
|
34
|
+
expireTime: string;
|
|
35
|
+
createTime: string;
|
|
36
|
+
ownershipGraph: OwnershipGraph$4;
|
|
37
|
+
}
|
|
38
|
+
interface Result$5 {
|
|
39
|
+
id: string;
|
|
40
|
+
status: string;
|
|
41
|
+
name: string;
|
|
42
|
+
orderNumber: string;
|
|
43
|
+
reference: string;
|
|
44
|
+
description: string;
|
|
45
|
+
redirectUrl: string;
|
|
46
|
+
cancelUrl: string;
|
|
47
|
+
successUrl: string;
|
|
48
|
+
lineItems: LineItems;
|
|
49
|
+
financialAccountId: string;
|
|
50
|
+
brandingOptions: BrandingOptions;
|
|
51
|
+
expireTime: string;
|
|
52
|
+
createTime: string;
|
|
53
|
+
ownershipGraph: OwnershipGraph$4;
|
|
54
|
+
}
|
|
55
|
+
interface Result$5 {
|
|
56
|
+
id: string;
|
|
57
|
+
status: string;
|
|
58
|
+
name: string;
|
|
59
|
+
orderNumber: string;
|
|
60
|
+
reference: string;
|
|
61
|
+
description: string;
|
|
62
|
+
redirectUrl: string;
|
|
63
|
+
cancelUrl: string;
|
|
64
|
+
successUrl: string;
|
|
65
|
+
lineItems: LineItems;
|
|
66
|
+
financialAccountId: string;
|
|
67
|
+
brandingOptions: BrandingOptions;
|
|
68
|
+
expireTime: string;
|
|
69
|
+
createTime: string;
|
|
70
|
+
ownershipGraph: OwnershipGraph$4;
|
|
71
|
+
}
|
|
72
|
+
interface OwnershipGraph$4 {
|
|
73
|
+
owner: Owner2$4;
|
|
74
|
+
}
|
|
75
|
+
interface OwnershipGraph$4 {
|
|
76
|
+
owner: Owner2$4;
|
|
77
|
+
}
|
|
78
|
+
interface OwnershipGraph$4 {
|
|
79
|
+
owner: Owner2$4;
|
|
80
|
+
}
|
|
81
|
+
interface Owner2$4 {
|
|
82
|
+
id: string;
|
|
83
|
+
type: string;
|
|
84
|
+
owner: Owner$4;
|
|
85
|
+
}
|
|
86
|
+
interface Owner2$4 {
|
|
87
|
+
id: string;
|
|
88
|
+
type: string;
|
|
89
|
+
owner: Owner$4;
|
|
90
|
+
}
|
|
91
|
+
interface Owner2$4 {
|
|
92
|
+
id: string;
|
|
93
|
+
type: string;
|
|
94
|
+
owner: Owner$4;
|
|
95
|
+
}
|
|
96
|
+
interface Owner$4 {
|
|
97
|
+
id: string;
|
|
98
|
+
type: string;
|
|
99
|
+
}
|
|
100
|
+
interface Owner$4 {
|
|
101
|
+
id: string;
|
|
102
|
+
type: string;
|
|
103
|
+
}
|
|
104
|
+
interface Owner$4 {
|
|
105
|
+
id: string;
|
|
106
|
+
type: string;
|
|
107
|
+
}
|
|
108
|
+
interface BrandingOptions {
|
|
109
|
+
primaryColor: string;
|
|
110
|
+
}
|
|
111
|
+
interface BrandingOptions {
|
|
112
|
+
primaryColor: string;
|
|
113
|
+
}
|
|
114
|
+
interface BrandingOptions {
|
|
115
|
+
primaryColor: string;
|
|
116
|
+
}
|
|
117
|
+
interface LineItems {
|
|
118
|
+
data: Datum[];
|
|
119
|
+
}
|
|
120
|
+
interface LineItems {
|
|
121
|
+
data: Datum[];
|
|
122
|
+
}
|
|
123
|
+
interface LineItems {
|
|
124
|
+
data: Datum[];
|
|
125
|
+
}
|
|
126
|
+
interface Datum {
|
|
127
|
+
type: string;
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
price: Price;
|
|
131
|
+
quantity: number;
|
|
132
|
+
reference: string;
|
|
133
|
+
description: string;
|
|
134
|
+
images: string[];
|
|
135
|
+
}
|
|
136
|
+
interface Datum {
|
|
137
|
+
type: string;
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
price: Price;
|
|
141
|
+
quantity: number;
|
|
142
|
+
reference: string;
|
|
143
|
+
description: string;
|
|
144
|
+
images: string[];
|
|
145
|
+
}
|
|
146
|
+
interface Datum {
|
|
147
|
+
type: string;
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
price: Price;
|
|
151
|
+
quantity: number;
|
|
152
|
+
reference: string;
|
|
153
|
+
description: string;
|
|
154
|
+
images: string[];
|
|
155
|
+
}
|
|
156
|
+
interface Price {
|
|
157
|
+
currency: string;
|
|
158
|
+
value: number;
|
|
159
|
+
}
|
|
160
|
+
interface Price {
|
|
161
|
+
currency: string;
|
|
162
|
+
value: number;
|
|
163
|
+
}
|
|
164
|
+
interface Price {
|
|
165
|
+
currency: string;
|
|
166
|
+
value: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare function CheckoutSessionAPI(client: MonimeClient): {
|
|
170
|
+
create: (name: string, amount: number, quantity: number, successUrl: string, cancelUrl: string, description?: string, financialAccountId?: string, primaryColor?: string, images?: string[]) => Promise<{
|
|
171
|
+
success: boolean;
|
|
172
|
+
error?: Error;
|
|
173
|
+
data: CreateCheckout;
|
|
174
|
+
}>;
|
|
175
|
+
get: () => Promise<{
|
|
176
|
+
success: boolean;
|
|
177
|
+
error?: Error;
|
|
178
|
+
data: AllCheckout;
|
|
179
|
+
}>;
|
|
180
|
+
getOne: (checkoutId: string) => Promise<{
|
|
181
|
+
success: boolean;
|
|
182
|
+
error?: Error;
|
|
183
|
+
data: OneCheckout;
|
|
184
|
+
}>;
|
|
185
|
+
delete: (checkoutId: string) => Promise<{
|
|
186
|
+
success: boolean;
|
|
187
|
+
error?: Error;
|
|
188
|
+
}>;
|
|
189
|
+
};
|
|
190
|
+
|
|
1
191
|
interface CreateFinancialAccount {
|
|
2
192
|
success: boolean;
|
|
3
193
|
messages: string[];
|
|
@@ -563,8 +753,10 @@ interface Amount$1 {
|
|
|
563
753
|
value: number;
|
|
564
754
|
}
|
|
565
755
|
|
|
756
|
+
type Currency = "USD" | "SLE";
|
|
757
|
+
|
|
566
758
|
declare function FinancialAccountAPI(client: MonimeClient): {
|
|
567
|
-
create: (name: string) => Promise<{
|
|
759
|
+
create: (name: string, currency: Currency) => Promise<{
|
|
568
760
|
success: boolean;
|
|
569
761
|
data?: CreateFinancialAccount;
|
|
570
762
|
error?: Error;
|
|
@@ -770,6 +962,7 @@ declare class MonimeClient {
|
|
|
770
962
|
paymentCode: ReturnType<typeof PaymentCodeAPI>;
|
|
771
963
|
payout: ReturnType<typeof PayoutAPI>;
|
|
772
964
|
financialTransaction: ReturnType<typeof FinancialTransactionAPI>;
|
|
965
|
+
checkoutSession: ReturnType<typeof CheckoutSessionAPI>;
|
|
773
966
|
constructor(options: ClientOptions);
|
|
774
967
|
_getConfig(): {
|
|
775
968
|
monimeSpaceId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,193 @@
|
|
|
1
|
+
interface AllCheckout {
|
|
2
|
+
success: boolean;
|
|
3
|
+
messages: string[];
|
|
4
|
+
result: Result$5[];
|
|
5
|
+
pagination: Pagination$5;
|
|
6
|
+
}
|
|
7
|
+
interface Pagination$5 {
|
|
8
|
+
count: number;
|
|
9
|
+
next: string;
|
|
10
|
+
}
|
|
11
|
+
interface OneCheckout {
|
|
12
|
+
success: boolean;
|
|
13
|
+
messages: string[];
|
|
14
|
+
result: Result$5;
|
|
15
|
+
}
|
|
16
|
+
interface CreateCheckout {
|
|
17
|
+
success: boolean;
|
|
18
|
+
messages: string[];
|
|
19
|
+
result: Result$5;
|
|
20
|
+
}
|
|
21
|
+
interface Result$5 {
|
|
22
|
+
id: string;
|
|
23
|
+
status: string;
|
|
24
|
+
name: string;
|
|
25
|
+
orderNumber: string;
|
|
26
|
+
reference: string;
|
|
27
|
+
description: string;
|
|
28
|
+
redirectUrl: string;
|
|
29
|
+
cancelUrl: string;
|
|
30
|
+
successUrl: string;
|
|
31
|
+
lineItems: LineItems;
|
|
32
|
+
financialAccountId: string;
|
|
33
|
+
brandingOptions: BrandingOptions;
|
|
34
|
+
expireTime: string;
|
|
35
|
+
createTime: string;
|
|
36
|
+
ownershipGraph: OwnershipGraph$4;
|
|
37
|
+
}
|
|
38
|
+
interface Result$5 {
|
|
39
|
+
id: string;
|
|
40
|
+
status: string;
|
|
41
|
+
name: string;
|
|
42
|
+
orderNumber: string;
|
|
43
|
+
reference: string;
|
|
44
|
+
description: string;
|
|
45
|
+
redirectUrl: string;
|
|
46
|
+
cancelUrl: string;
|
|
47
|
+
successUrl: string;
|
|
48
|
+
lineItems: LineItems;
|
|
49
|
+
financialAccountId: string;
|
|
50
|
+
brandingOptions: BrandingOptions;
|
|
51
|
+
expireTime: string;
|
|
52
|
+
createTime: string;
|
|
53
|
+
ownershipGraph: OwnershipGraph$4;
|
|
54
|
+
}
|
|
55
|
+
interface Result$5 {
|
|
56
|
+
id: string;
|
|
57
|
+
status: string;
|
|
58
|
+
name: string;
|
|
59
|
+
orderNumber: string;
|
|
60
|
+
reference: string;
|
|
61
|
+
description: string;
|
|
62
|
+
redirectUrl: string;
|
|
63
|
+
cancelUrl: string;
|
|
64
|
+
successUrl: string;
|
|
65
|
+
lineItems: LineItems;
|
|
66
|
+
financialAccountId: string;
|
|
67
|
+
brandingOptions: BrandingOptions;
|
|
68
|
+
expireTime: string;
|
|
69
|
+
createTime: string;
|
|
70
|
+
ownershipGraph: OwnershipGraph$4;
|
|
71
|
+
}
|
|
72
|
+
interface OwnershipGraph$4 {
|
|
73
|
+
owner: Owner2$4;
|
|
74
|
+
}
|
|
75
|
+
interface OwnershipGraph$4 {
|
|
76
|
+
owner: Owner2$4;
|
|
77
|
+
}
|
|
78
|
+
interface OwnershipGraph$4 {
|
|
79
|
+
owner: Owner2$4;
|
|
80
|
+
}
|
|
81
|
+
interface Owner2$4 {
|
|
82
|
+
id: string;
|
|
83
|
+
type: string;
|
|
84
|
+
owner: Owner$4;
|
|
85
|
+
}
|
|
86
|
+
interface Owner2$4 {
|
|
87
|
+
id: string;
|
|
88
|
+
type: string;
|
|
89
|
+
owner: Owner$4;
|
|
90
|
+
}
|
|
91
|
+
interface Owner2$4 {
|
|
92
|
+
id: string;
|
|
93
|
+
type: string;
|
|
94
|
+
owner: Owner$4;
|
|
95
|
+
}
|
|
96
|
+
interface Owner$4 {
|
|
97
|
+
id: string;
|
|
98
|
+
type: string;
|
|
99
|
+
}
|
|
100
|
+
interface Owner$4 {
|
|
101
|
+
id: string;
|
|
102
|
+
type: string;
|
|
103
|
+
}
|
|
104
|
+
interface Owner$4 {
|
|
105
|
+
id: string;
|
|
106
|
+
type: string;
|
|
107
|
+
}
|
|
108
|
+
interface BrandingOptions {
|
|
109
|
+
primaryColor: string;
|
|
110
|
+
}
|
|
111
|
+
interface BrandingOptions {
|
|
112
|
+
primaryColor: string;
|
|
113
|
+
}
|
|
114
|
+
interface BrandingOptions {
|
|
115
|
+
primaryColor: string;
|
|
116
|
+
}
|
|
117
|
+
interface LineItems {
|
|
118
|
+
data: Datum[];
|
|
119
|
+
}
|
|
120
|
+
interface LineItems {
|
|
121
|
+
data: Datum[];
|
|
122
|
+
}
|
|
123
|
+
interface LineItems {
|
|
124
|
+
data: Datum[];
|
|
125
|
+
}
|
|
126
|
+
interface Datum {
|
|
127
|
+
type: string;
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
price: Price;
|
|
131
|
+
quantity: number;
|
|
132
|
+
reference: string;
|
|
133
|
+
description: string;
|
|
134
|
+
images: string[];
|
|
135
|
+
}
|
|
136
|
+
interface Datum {
|
|
137
|
+
type: string;
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
price: Price;
|
|
141
|
+
quantity: number;
|
|
142
|
+
reference: string;
|
|
143
|
+
description: string;
|
|
144
|
+
images: string[];
|
|
145
|
+
}
|
|
146
|
+
interface Datum {
|
|
147
|
+
type: string;
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
price: Price;
|
|
151
|
+
quantity: number;
|
|
152
|
+
reference: string;
|
|
153
|
+
description: string;
|
|
154
|
+
images: string[];
|
|
155
|
+
}
|
|
156
|
+
interface Price {
|
|
157
|
+
currency: string;
|
|
158
|
+
value: number;
|
|
159
|
+
}
|
|
160
|
+
interface Price {
|
|
161
|
+
currency: string;
|
|
162
|
+
value: number;
|
|
163
|
+
}
|
|
164
|
+
interface Price {
|
|
165
|
+
currency: string;
|
|
166
|
+
value: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare function CheckoutSessionAPI(client: MonimeClient): {
|
|
170
|
+
create: (name: string, amount: number, quantity: number, successUrl: string, cancelUrl: string, description?: string, financialAccountId?: string, primaryColor?: string, images?: string[]) => Promise<{
|
|
171
|
+
success: boolean;
|
|
172
|
+
error?: Error;
|
|
173
|
+
data: CreateCheckout;
|
|
174
|
+
}>;
|
|
175
|
+
get: () => Promise<{
|
|
176
|
+
success: boolean;
|
|
177
|
+
error?: Error;
|
|
178
|
+
data: AllCheckout;
|
|
179
|
+
}>;
|
|
180
|
+
getOne: (checkoutId: string) => Promise<{
|
|
181
|
+
success: boolean;
|
|
182
|
+
error?: Error;
|
|
183
|
+
data: OneCheckout;
|
|
184
|
+
}>;
|
|
185
|
+
delete: (checkoutId: string) => Promise<{
|
|
186
|
+
success: boolean;
|
|
187
|
+
error?: Error;
|
|
188
|
+
}>;
|
|
189
|
+
};
|
|
190
|
+
|
|
1
191
|
interface CreateFinancialAccount {
|
|
2
192
|
success: boolean;
|
|
3
193
|
messages: string[];
|
|
@@ -563,8 +753,10 @@ interface Amount$1 {
|
|
|
563
753
|
value: number;
|
|
564
754
|
}
|
|
565
755
|
|
|
756
|
+
type Currency = "USD" | "SLE";
|
|
757
|
+
|
|
566
758
|
declare function FinancialAccountAPI(client: MonimeClient): {
|
|
567
|
-
create: (name: string) => Promise<{
|
|
759
|
+
create: (name: string, currency: Currency) => Promise<{
|
|
568
760
|
success: boolean;
|
|
569
761
|
data?: CreateFinancialAccount;
|
|
570
762
|
error?: Error;
|
|
@@ -770,6 +962,7 @@ declare class MonimeClient {
|
|
|
770
962
|
paymentCode: ReturnType<typeof PaymentCodeAPI>;
|
|
771
963
|
payout: ReturnType<typeof PayoutAPI>;
|
|
772
964
|
financialTransaction: ReturnType<typeof FinancialTransactionAPI>;
|
|
965
|
+
checkoutSession: ReturnType<typeof CheckoutSessionAPI>;
|
|
773
966
|
constructor(options: ClientOptions);
|
|
774
967
|
_getConfig(): {
|
|
775
968
|
monimeSpaceId: string;
|