@rebilly/instruments 9.48.0 → 9.50.0
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/CHANGELOG.md +2 -2
- package/dist/index.d.ts +295 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [9.
|
|
1
|
+
## [9.50.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.49.0...instruments/core-v9.50.0) (2024-05-24)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **instruments:** Add TS declaration file generation to instruments core. ([#5473](https://github.com/Rebilly/rebilly/issues/5473)) ([ef75aa7](https://github.com/Rebilly/rebilly/commit/ef75aa7105d8acb527ff025e10d13f796fe37d0b))
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
export interface PlanItem {
|
|
2
|
+
planId: string;
|
|
3
|
+
quantity: number;
|
|
4
|
+
thumbnail?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Item {
|
|
7
|
+
planId: string;
|
|
8
|
+
quantity: number | {
|
|
9
|
+
default?: number;
|
|
10
|
+
minimum?: number;
|
|
11
|
+
maximum?: number;
|
|
12
|
+
multipleOf?: number;
|
|
13
|
+
};
|
|
14
|
+
thumbnail?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Money {
|
|
17
|
+
amount: number;
|
|
18
|
+
currency: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DepositObject {
|
|
21
|
+
currency: string;
|
|
22
|
+
amount?: number;
|
|
23
|
+
buttons?: number[];
|
|
24
|
+
editable?: boolean;
|
|
25
|
+
customAmount?: {
|
|
26
|
+
minimum?: number;
|
|
27
|
+
maximum?: number;
|
|
28
|
+
multipleOf?: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface DepositRequest {
|
|
32
|
+
depositRequestId: string;
|
|
33
|
+
}
|
|
34
|
+
export type Deposit = DepositRequest | DepositObject;
|
|
35
|
+
export interface Payout {
|
|
36
|
+
payoutRequestId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface I18n {
|
|
39
|
+
[key: string]: {
|
|
40
|
+
summary?: object;
|
|
41
|
+
form?: object;
|
|
42
|
+
confirmation?: object;
|
|
43
|
+
result?: object;
|
|
44
|
+
validations?: object;
|
|
45
|
+
paymentMethods?: object;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface ThemeProperties {
|
|
49
|
+
[key: string]: string | undefined;
|
|
50
|
+
colorPrimary?: string;
|
|
51
|
+
colorBackground?: string;
|
|
52
|
+
colorText?: string;
|
|
53
|
+
colorDanger?: string;
|
|
54
|
+
borderRadius?: string;
|
|
55
|
+
labels?: "stacked" | "floating";
|
|
56
|
+
fontFamily?: string;
|
|
57
|
+
fontSizeBase?: string;
|
|
58
|
+
fontWeightBase?: string;
|
|
59
|
+
fontLineHeightBase?: string;
|
|
60
|
+
fontSmooth?: "auto" | "never" | "always";
|
|
61
|
+
headingFontFamily?: string;
|
|
62
|
+
headingFontWeight?: string;
|
|
63
|
+
headingColorText?: string;
|
|
64
|
+
buttonColorBackground?: string;
|
|
65
|
+
buttonColorText?: string;
|
|
66
|
+
buttonFontFamily?: string;
|
|
67
|
+
buttonFontSize?: string;
|
|
68
|
+
buttonFontLineHeight?: string;
|
|
69
|
+
buttonFontWeight?: string;
|
|
70
|
+
buttonBorder?: string;
|
|
71
|
+
buttonBorderColor?: string;
|
|
72
|
+
buttonBorderWidth?: string;
|
|
73
|
+
buttonBorderType?: string;
|
|
74
|
+
buttonBorderRadius?: string;
|
|
75
|
+
buttonBoxShadow?: string;
|
|
76
|
+
buttonSecondaryColorText?: string;
|
|
77
|
+
buttonSecondaryFontFamily?: string;
|
|
78
|
+
buttonSecondaryFontSize?: string;
|
|
79
|
+
buttonSecondaryFontLineHeight?: string;
|
|
80
|
+
buttonSecondaryFontWeight?: string;
|
|
81
|
+
buttonSecondaryBorder?: string;
|
|
82
|
+
buttonSecondaryBorderColor?: string;
|
|
83
|
+
buttonSecondaryBorderWidth?: string;
|
|
84
|
+
buttonSecondaryBorderType?: string;
|
|
85
|
+
buttonSecondaryBorderRadius?: string;
|
|
86
|
+
buttonSecondaryBoxShadow?: string;
|
|
87
|
+
buttonHoverColorBackground?: string;
|
|
88
|
+
buttonHoverColorText?: string;
|
|
89
|
+
buttonHoverFontFamily?: string;
|
|
90
|
+
buttonHoverFontSize?: string;
|
|
91
|
+
buttonHoverFontLineHeight?: string;
|
|
92
|
+
buttonHoverFontWeight?: string;
|
|
93
|
+
buttonHoverBorder?: string;
|
|
94
|
+
buttonHoverBorderColor?: string;
|
|
95
|
+
buttonHoverBorderWidth?: string;
|
|
96
|
+
buttonHoverBorderType?: string;
|
|
97
|
+
buttonHoverBorderRadius?: string;
|
|
98
|
+
buttonHoverBoxShadow?: string;
|
|
99
|
+
buttonSecondaryHoverColorBackground?: string;
|
|
100
|
+
buttonSecondaryHoverColorText?: string;
|
|
101
|
+
buttonSecondaryHoverFontFamily?: string;
|
|
102
|
+
buttonSecondaryHoverFontSize?: string;
|
|
103
|
+
buttonSecondaryHoverFontLineHeight?: string;
|
|
104
|
+
buttonSecondaryHoverFontWeight?: string;
|
|
105
|
+
buttonSecondaryHoverBorder?: string;
|
|
106
|
+
buttonSecondaryHoverBorderColor?: string;
|
|
107
|
+
buttonSecondaryHoverBorderWidth?: string;
|
|
108
|
+
buttonSecondaryHoverBorderType?: string;
|
|
109
|
+
buttonSecondaryHoverBorderRadius?: string;
|
|
110
|
+
buttonSecondaryHoverBoxShadow?: string;
|
|
111
|
+
buttonActiveColorBackground?: string;
|
|
112
|
+
buttonActiveColorText?: string;
|
|
113
|
+
buttonActiveFontFamily?: string;
|
|
114
|
+
buttonActiveFontSize?: string;
|
|
115
|
+
buttonActiveFontLineHeight?: string;
|
|
116
|
+
buttonActiveFontWeight?: string;
|
|
117
|
+
buttonActiveBorder?: string;
|
|
118
|
+
buttonActiveBorderColor?: string;
|
|
119
|
+
buttonActiveBorderWidth?: string;
|
|
120
|
+
buttonActiveBorderType?: string;
|
|
121
|
+
buttonActiveBorderRadius?: string;
|
|
122
|
+
buttonActiveBoxShadow?: string;
|
|
123
|
+
buttonSecondaryActiveColorBackground?: string;
|
|
124
|
+
buttonSecondaryActiveColorText?: string;
|
|
125
|
+
buttonSecondaryActiveFontFamily?: string;
|
|
126
|
+
buttonSecondaryActiveFontSize?: string;
|
|
127
|
+
buttonSecondaryActiveFontLineHeight?: string;
|
|
128
|
+
buttonSecondaryActiveFontWeight?: string;
|
|
129
|
+
buttonSecondaryActiveBorder?: string;
|
|
130
|
+
buttonSecondaryActiveBorderColor?: string;
|
|
131
|
+
buttonSecondaryActiveBorderWidth?: string;
|
|
132
|
+
buttonSecondaryActiveBorderType?: string;
|
|
133
|
+
buttonSecondaryActiveBorderRadius?: string;
|
|
134
|
+
buttonSecondaryActiveBoxShadow?: string;
|
|
135
|
+
inputColorBackground?: string;
|
|
136
|
+
inputColorText?: string;
|
|
137
|
+
inputFontFamily?: string;
|
|
138
|
+
inputFontSize?: string;
|
|
139
|
+
inputFontLineHeight?: string;
|
|
140
|
+
inputFontWeight?: string;
|
|
141
|
+
inputBorder?: string;
|
|
142
|
+
inputBorderRadius?: string;
|
|
143
|
+
inputBoxShadow?: string;
|
|
144
|
+
inputHoverColorBackground?: string;
|
|
145
|
+
inputHoverColorText?: string;
|
|
146
|
+
inputHoverFontFamily?: string;
|
|
147
|
+
inputHoverFontSize?: string;
|
|
148
|
+
inputHoverFontLineHeight?: string;
|
|
149
|
+
inputHoverFontWeight?: string;
|
|
150
|
+
inputHoverBorder?: string;
|
|
151
|
+
inputHoverBorderRadius?: string;
|
|
152
|
+
inputHoverBoxShadow?: string;
|
|
153
|
+
inputFocusColorBackground?: string;
|
|
154
|
+
inputFocusColorText?: string;
|
|
155
|
+
inputFocusFontFamily?: string;
|
|
156
|
+
inputFocusFontSize?: string;
|
|
157
|
+
inputFocusFontLineHeight?: string;
|
|
158
|
+
inputFocusFontWeight?: string;
|
|
159
|
+
inputFocusBorder?: string;
|
|
160
|
+
inputFocusBorderRadius?: string;
|
|
161
|
+
inputFocusBoxShadow?: string;
|
|
162
|
+
inputPlaceholderColorText?: string;
|
|
163
|
+
inputPlaceholderFontFamily?: string;
|
|
164
|
+
inputPlaceholderFontSize?: string;
|
|
165
|
+
inputPlaceholderFontLineHeight?: string;
|
|
166
|
+
inputPlaceholderFontWeight?: string;
|
|
167
|
+
inputSelectionColorText?: string;
|
|
168
|
+
inputSelectionColorBackground?: string;
|
|
169
|
+
inputErrorColorBackground?: string;
|
|
170
|
+
inputErrorColorText?: string;
|
|
171
|
+
inputErrorFontFamily?: string;
|
|
172
|
+
inputErrorFontSize?: string;
|
|
173
|
+
inputErrorFontLineHeight?: string;
|
|
174
|
+
inputErrorFontWeight?: string;
|
|
175
|
+
inputErrorBorder?: string;
|
|
176
|
+
inputErrorBorderRadius?: string;
|
|
177
|
+
inputErrorBoxShadow?: string;
|
|
178
|
+
inputErrorHoverColorBackground?: string;
|
|
179
|
+
inputErrorHoverColorText?: string;
|
|
180
|
+
inputErrorHoverFontFamily?: string;
|
|
181
|
+
inputErrorHoverFontSize?: string;
|
|
182
|
+
inputErrorHoverFontLineHeight?: string;
|
|
183
|
+
inputErrorHoverFontWeight?: string;
|
|
184
|
+
inputErrorHoverBorder?: string;
|
|
185
|
+
inputErrorHoverBorderRadius?: string;
|
|
186
|
+
inputErrorHoverBoxShadow?: string;
|
|
187
|
+
inputErrorFocusColorBackground?: string;
|
|
188
|
+
inputErrorFocusColorText?: string;
|
|
189
|
+
inputErrorFocusFontFamily?: string;
|
|
190
|
+
inputErrorFocusFontSize?: string;
|
|
191
|
+
inputErrorFocusFontLineHeight?: string;
|
|
192
|
+
inputErrorFocusFontWeight?: string;
|
|
193
|
+
inputErrorFocusBorder?: string;
|
|
194
|
+
inputErrorFocusBorderRadius?: string;
|
|
195
|
+
inputErrorFocusBoxShadow?: string;
|
|
196
|
+
inputErrorPlaceholderColorText?: string;
|
|
197
|
+
inputErrorPlaceholderFontFamily?: string;
|
|
198
|
+
inputErrorPlaceholderFontSize?: string;
|
|
199
|
+
inputErrorPlaceholderFontLineHeight?: string;
|
|
200
|
+
inputErrorPlaceholderFontWeight?: string;
|
|
201
|
+
inputErrorSelectionColorText?: string;
|
|
202
|
+
inputErrorSelectionColorBackground?: string;
|
|
203
|
+
}
|
|
204
|
+
export type AddressFields = "email" | "organization" | "phoneNumber" | "city" | "country" | "region" | "postalCode" | "address" | "address2";
|
|
205
|
+
export interface Address {
|
|
206
|
+
name?: "default" | "combined" | "stacked";
|
|
207
|
+
region?: "default" | "split" | "stacked";
|
|
208
|
+
show?: (AddressFields | "all")[];
|
|
209
|
+
hide?: (AddressFields | "all")[];
|
|
210
|
+
require?: AddressFields[];
|
|
211
|
+
}
|
|
212
|
+
export type AdditionalFields = "poNumber";
|
|
213
|
+
export interface DisplayOptions {
|
|
214
|
+
buttonColor?: string;
|
|
215
|
+
buttonHeight?: string;
|
|
216
|
+
buttonType?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface DigitalWalletConfiguration {
|
|
219
|
+
displayOptions?: DisplayOptions;
|
|
220
|
+
}
|
|
221
|
+
export interface PaymentInstrumentsOptionFlags {
|
|
222
|
+
compactExpressInstruments?: boolean;
|
|
223
|
+
allowDeactivate?: boolean;
|
|
224
|
+
allowUpdate?: boolean;
|
|
225
|
+
allowMakeDefault?: boolean;
|
|
226
|
+
}
|
|
227
|
+
export interface PaymentInstrumentsDisplayOptions extends PaymentInstrumentsOptionFlags {
|
|
228
|
+
address?: Address;
|
|
229
|
+
paypal?: {
|
|
230
|
+
buttonHeight?: number;
|
|
231
|
+
};
|
|
232
|
+
googlePay?: DigitalWalletConfiguration;
|
|
233
|
+
applePay?: DigitalWalletConfiguration;
|
|
234
|
+
additionalFields?: {
|
|
235
|
+
show?: AdditionalFields[];
|
|
236
|
+
require?: AdditionalFields[];
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
export interface Features {
|
|
240
|
+
enableTelemetry?: boolean;
|
|
241
|
+
hideConfirmation?: boolean;
|
|
242
|
+
hideResult?: boolean;
|
|
243
|
+
fullPageRedirect?: boolean;
|
|
244
|
+
showCoupons?: string[];
|
|
245
|
+
}
|
|
246
|
+
export interface DevProperties {
|
|
247
|
+
paymentMethodsUrl?: string;
|
|
248
|
+
liveUrl?: string;
|
|
249
|
+
sandboxUrl?: string;
|
|
250
|
+
framePayScriptLink?: string;
|
|
251
|
+
framePayStyleLink?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface Options {
|
|
254
|
+
organizationId?: string;
|
|
255
|
+
publishableKey?: string;
|
|
256
|
+
websiteId?: string;
|
|
257
|
+
addons?: PlanItem[];
|
|
258
|
+
bumpOffer?: PlanItem[];
|
|
259
|
+
items: Item[];
|
|
260
|
+
money: Money;
|
|
261
|
+
invoiceId: string;
|
|
262
|
+
transactionId: string;
|
|
263
|
+
deposit: Deposit;
|
|
264
|
+
payout: Payout;
|
|
265
|
+
form?: string | object;
|
|
266
|
+
summary?: string | object;
|
|
267
|
+
jwt?: string;
|
|
268
|
+
apiMode: "sandbox" | "live";
|
|
269
|
+
transactionType?: "purchase" | "setup";
|
|
270
|
+
css?: string;
|
|
271
|
+
theme?: ThemeProperties;
|
|
272
|
+
i18n?: I18n;
|
|
273
|
+
countryCode?: string;
|
|
274
|
+
locale?: "en" | "es" | "auto";
|
|
275
|
+
paymentInstruments?: PaymentInstrumentsDisplayOptions;
|
|
276
|
+
features?: Features;
|
|
277
|
+
_dev?: DevProperties;
|
|
278
|
+
}
|
|
279
|
+
declare class RebillyInstruments {
|
|
280
|
+
mount: (config: any) => void;
|
|
281
|
+
update: (config: any) => void;
|
|
282
|
+
destroy: () => void;
|
|
283
|
+
purchase: (data: any) => void;
|
|
284
|
+
setup: (data: any) => void;
|
|
285
|
+
on: (eventName: string, callback: Function) => void;
|
|
286
|
+
show: (componentName: string, data: any) => void;
|
|
287
|
+
version: number;
|
|
288
|
+
}
|
|
289
|
+
declare const RebillyInstrumentsInstance: RebillyInstruments;
|
|
290
|
+
|
|
291
|
+
export {
|
|
292
|
+
RebillyInstrumentsInstance as default,
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilly/instruments",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.50.0",
|
|
4
4
|
"author": "Rebilly",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"unpkg": "dist/index.min.js",
|
|
8
9
|
"files": [
|
|
9
10
|
"dist",
|
|
10
11
|
"CHANGELOG.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
|
-
"build": "concurrently yarn:type:check \"vite build\"",
|
|
14
|
+
"build": "concurrently yarn:type:check \"vite build\" yarn:generate:type-declaration",
|
|
14
15
|
"dev": "vite build --watch",
|
|
15
16
|
"test:update-snapshot": "vitest -u",
|
|
16
17
|
"test:unit": "vitest run",
|
|
17
18
|
"test:unit:watch": "vitest",
|
|
18
|
-
"type:check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
|
|
19
|
+
"type:check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
20
|
+
"generate:type-declaration": "dts-bundle-generator --project tsconfig.declaration.json --no-check --no-banner --out-file dist/index.d.ts src/index.d.ts"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
23
|
"@rebilly/api-metadata": "*",
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
"values.js": "^2.0.0",
|
|
38
40
|
"vite": "^5.2.10",
|
|
39
41
|
"vite-plugin-package-version": "^1.1.0",
|
|
42
|
+
"dts-bundle-generator": "^9.5.1",
|
|
40
43
|
"vitest": "^1.6.0",
|
|
41
44
|
"vitest-canvas-mock": "^0.3.3",
|
|
42
45
|
"lodash": "^4.17.21",
|