bitsnap-react 1.3.10 → 1.3.12
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/errors.d.mts +0 -2
- package/dist/errors.d.ts +0 -2
- package/dist/index.d.mts +0 -310
- package/dist/index.d.ts +0 -310
- package/dist/internal.d.mts +0 -2
- package/dist/internal.d.ts +0 -2
- package/dist/models.d.mts +0 -231
- package/dist/models.d.ts +0 -231
package/package.json
CHANGED
package/dist/errors.d.mts
DELETED
package/dist/errors.d.ts
DELETED
package/dist/index.d.mts
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import z__default from 'zod';
|
|
4
|
-
|
|
5
|
-
type AppleButtonType = "plain" | "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up";
|
|
6
|
-
type ColorType = "black" | "white" | "white-outline";
|
|
7
|
-
type Props$2 = {
|
|
8
|
-
style?: {
|
|
9
|
-
width?: string;
|
|
10
|
-
height?: string;
|
|
11
|
-
borderRadius?: string;
|
|
12
|
-
padding?: string;
|
|
13
|
-
boxSizing?: string;
|
|
14
|
-
};
|
|
15
|
-
buttonType?: AppleButtonType;
|
|
16
|
-
colorType?: ColorType;
|
|
17
|
-
items: {
|
|
18
|
-
name: string;
|
|
19
|
-
id: string;
|
|
20
|
-
price: number;
|
|
21
|
-
quantity: number;
|
|
22
|
-
isDeliverable?: boolean;
|
|
23
|
-
metadata?: {
|
|
24
|
-
[key: string]: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
}[];
|
|
27
|
-
onClick?: () => Promise<void>;
|
|
28
|
-
};
|
|
29
|
-
declare function Wrapper$2(props: Props$2): react_jsx_runtime.JSX.Element;
|
|
30
|
-
|
|
31
|
-
type Props$1 = {
|
|
32
|
-
test?: boolean;
|
|
33
|
-
buttonSizeMode?: "static" | "fill";
|
|
34
|
-
buttonColor?: "white" | "black";
|
|
35
|
-
style?: {
|
|
36
|
-
width?: string;
|
|
37
|
-
};
|
|
38
|
-
items: {
|
|
39
|
-
name: string;
|
|
40
|
-
id: string;
|
|
41
|
-
price: number;
|
|
42
|
-
quantity: number;
|
|
43
|
-
isDeliverable?: boolean;
|
|
44
|
-
metadata?: {
|
|
45
|
-
[key: string]: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
declare function Wrapper$1(props: Props$1): react_jsx_runtime.JSX.Element;
|
|
50
|
-
|
|
51
|
-
type BitsnapCartProps = {
|
|
52
|
-
projectID: string;
|
|
53
|
-
children?: React.ReactNode;
|
|
54
|
-
onVisibleChange?: (isVisible: boolean) => void;
|
|
55
|
-
className?: string;
|
|
56
|
-
numberOfProductsInCartOptions?: {
|
|
57
|
-
style?: React.CSSProperties;
|
|
58
|
-
isVisible?: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
declare function BitsnapCart({ projectID, children, onVisibleChange, className, numberOfProductsInCartOptions, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
62
|
-
|
|
63
|
-
type PublicNotificationGroup = {
|
|
64
|
-
id: string;
|
|
65
|
-
isOn?: boolean;
|
|
66
|
-
};
|
|
67
|
-
type NotificationGroup = {
|
|
68
|
-
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
description?: string;
|
|
71
|
-
howOften?: string;
|
|
72
|
-
isOn?: boolean;
|
|
73
|
-
};
|
|
74
|
-
interface CustomizationTexts {
|
|
75
|
-
title?: string | null;
|
|
76
|
-
description?: string | null;
|
|
77
|
-
managingDescription?: string;
|
|
78
|
-
formTitle?: string;
|
|
79
|
-
formEmailLabel?: string;
|
|
80
|
-
formPhoneLabel?: string;
|
|
81
|
-
formPhoneOptional?: string;
|
|
82
|
-
formEmailPlaceholder?: string;
|
|
83
|
-
formPhonePlaceholder?: string;
|
|
84
|
-
formSubmitButton?: string;
|
|
85
|
-
formSuccessMessage?: string;
|
|
86
|
-
agreementText?: string | ReactNode;
|
|
87
|
-
qrCodeTitle?: string;
|
|
88
|
-
qrCodeSubtitle?: string;
|
|
89
|
-
qrCodeScanText?: string;
|
|
90
|
-
groupsNoSelectionWarning?: string;
|
|
91
|
-
groupsTitle?: string;
|
|
92
|
-
groupsSelectAllButton?: string;
|
|
93
|
-
groupsUpdateButton?: string;
|
|
94
|
-
groupsUpdateSuccess?: string;
|
|
95
|
-
manageDataTitle?: string;
|
|
96
|
-
manageDataDescription?: string;
|
|
97
|
-
manageDataUnsubscribeButton?: string;
|
|
98
|
-
manageDataUnsubscribeDescription?: string;
|
|
99
|
-
manageDataUpdatedMessage?: string;
|
|
100
|
-
loginEmailLabel?: string;
|
|
101
|
-
loginEmailPlaceholder?: string;
|
|
102
|
-
loginSendCodeButton?: string;
|
|
103
|
-
loginIHaveCode?: string;
|
|
104
|
-
loginSendingButton?: string;
|
|
105
|
-
loginCodeLabel?: string;
|
|
106
|
-
loginCodeSentMessage?: string;
|
|
107
|
-
loginChangeEmailButton?: string;
|
|
108
|
-
loginResendCodeButton?: string;
|
|
109
|
-
loginInvalidEmailError?: string;
|
|
110
|
-
loginSlugRequiredError?: string;
|
|
111
|
-
loginVerificationFailedError?: string;
|
|
112
|
-
loginInvalidCodeError?: string;
|
|
113
|
-
loginSendEmailError?: string;
|
|
114
|
-
loginVerifyCodeError?: string;
|
|
115
|
-
loginResendEmailError?: string;
|
|
116
|
-
loginTitle?: string;
|
|
117
|
-
loginDescription?: string;
|
|
118
|
-
}
|
|
119
|
-
interface ComponentClassNames {
|
|
120
|
-
container?: string;
|
|
121
|
-
header?: string;
|
|
122
|
-
headerTitle?: string;
|
|
123
|
-
headerLogo?: string;
|
|
124
|
-
headerDescription?: string;
|
|
125
|
-
groupsContainer?: string;
|
|
126
|
-
groupsList?: string;
|
|
127
|
-
groupItem?: string;
|
|
128
|
-
qrCodeSection?: string;
|
|
129
|
-
qrCodeTitle?: string;
|
|
130
|
-
qrCodeContainer?: string;
|
|
131
|
-
formSection?: string;
|
|
132
|
-
formTitle?: string;
|
|
133
|
-
formContainer?: string;
|
|
134
|
-
manageDataSection?: string;
|
|
135
|
-
manageDataTitle?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Props for the NotificationsComponentPublic component.
|
|
139
|
-
*/
|
|
140
|
-
interface NotificationsComponentPublicProps {
|
|
141
|
-
/**
|
|
142
|
-
* Unique identifier for the project (if not provided, productID will be used via CartProvider).
|
|
143
|
-
*/
|
|
144
|
-
slug?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Unique identifier for the user.
|
|
147
|
-
*/
|
|
148
|
-
userID?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Project ID (alternative to slug, used if slug is not provided).
|
|
151
|
-
*/
|
|
152
|
-
productID?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Name of the project, displayed in the component.
|
|
155
|
-
*/
|
|
156
|
-
projectName?: string;
|
|
157
|
-
/**
|
|
158
|
-
* URL or path to the project's logo (light mode).
|
|
159
|
-
*/
|
|
160
|
-
projectLogo?: string;
|
|
161
|
-
/**
|
|
162
|
-
* URL or path to the project's logo (dark mode).
|
|
163
|
-
*/
|
|
164
|
-
projectLogoDark?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Array of notification groups that the user can subscribe to. If you will provide group, we will not show all possible public groups from dashboard.
|
|
167
|
-
*/
|
|
168
|
-
groups?: PublicNotificationGroup[];
|
|
169
|
-
/**
|
|
170
|
-
* If true, the component is rendered in "manage my notifications" mode.
|
|
171
|
-
*/
|
|
172
|
-
isManaging?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Custom texts used throughout the component for i18n or personalisation.
|
|
175
|
-
*/
|
|
176
|
-
texts?: CustomizationTexts;
|
|
177
|
-
/**
|
|
178
|
-
* If true, show the QR code section that allows users to get a mobile app.
|
|
179
|
-
*/
|
|
180
|
-
showQRCode?: boolean;
|
|
181
|
-
/**
|
|
182
|
-
* If true, show the phone input in the notification form.
|
|
183
|
-
*/
|
|
184
|
-
showPhoneInput?: boolean;
|
|
185
|
-
/**
|
|
186
|
-
* List of group IDs to hide from the selection interface.
|
|
187
|
-
*/
|
|
188
|
-
hiddenGroupIds?: string[];
|
|
189
|
-
/**
|
|
190
|
-
* Custom CSS class names for various component sections (for easier styling).
|
|
191
|
-
*/
|
|
192
|
-
className?: ComponentClassNames;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
type Props = NotificationsComponentPublicProps;
|
|
196
|
-
declare function Wrapper({ slug, userID, productID, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props): react_jsx_runtime.JSX.Element;
|
|
197
|
-
|
|
198
|
-
type ErrTypes = 'internal' | 'badInput' | 'notFound';
|
|
199
|
-
type Err = {
|
|
200
|
-
ERR: true;
|
|
201
|
-
error: unknown;
|
|
202
|
-
type?: ErrTypes;
|
|
203
|
-
};
|
|
204
|
-
declare function Err(message: string, type?: ErrTypes): Err;
|
|
205
|
-
|
|
206
|
-
declare function setProjectID(projectID: string): void;
|
|
207
|
-
|
|
208
|
-
declare function setCustomHost(host: string): void;
|
|
209
|
-
|
|
210
|
-
declare enum BillingPeriod {
|
|
211
|
-
DAILY = "daily",
|
|
212
|
-
WEEKLY = "weekly",
|
|
213
|
-
MONTHLY = "monthly",
|
|
214
|
-
QUARTERLY = "quarterly",
|
|
215
|
-
SEMI_ANNUALLY = "semi-annually",
|
|
216
|
-
ANNUALLY = "annually"
|
|
217
|
-
}
|
|
218
|
-
type LinkRequest = z__default.infer<typeof linkRequestSchema>;
|
|
219
|
-
declare const linkRequestSchema: z__default.ZodObject<{
|
|
220
|
-
askForAddress: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
221
|
-
askForPhone: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
222
|
-
askForNote: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
223
|
-
askForNip: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
224
|
-
delivery: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
225
|
-
name: z__default.ZodString;
|
|
226
|
-
desc: z__default.ZodOptional<z__default.ZodString>;
|
|
227
|
-
min: z__default.ZodNumber;
|
|
228
|
-
max: z__default.ZodNumber;
|
|
229
|
-
price: z__default.ZodPipe<z__default.ZodNumber, z__default.ZodTransform<number, number>>;
|
|
230
|
-
}, z__default.core.$strip>>>;
|
|
231
|
-
deliveryMethod: z__default.ZodOptional<z__default.ZodString>;
|
|
232
|
-
details: z__default.ZodOptional<z__default.ZodObject<{
|
|
233
|
-
email: z__default.ZodOptional<z__default.ZodString>;
|
|
234
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
235
|
-
lastName: z__default.ZodOptional<z__default.ZodString>;
|
|
236
|
-
phone: z__default.ZodOptional<z__default.ZodString>;
|
|
237
|
-
address: z__default.ZodOptional<z__default.ZodObject<{
|
|
238
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
239
|
-
line1: z__default.ZodOptional<z__default.ZodString>;
|
|
240
|
-
line2: z__default.ZodOptional<z__default.ZodString>;
|
|
241
|
-
city: z__default.ZodOptional<z__default.ZodString>;
|
|
242
|
-
zipCode: z__default.ZodOptional<z__default.ZodString>;
|
|
243
|
-
country: z__default.ZodOptional<z__default.ZodString>;
|
|
244
|
-
}, z__default.core.$strip>>;
|
|
245
|
-
billingAddress: z__default.ZodOptional<z__default.ZodObject<{
|
|
246
|
-
nip: z__default.ZodOptional<z__default.ZodString>;
|
|
247
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
248
|
-
line1: z__default.ZodOptional<z__default.ZodString>;
|
|
249
|
-
line2: z__default.ZodOptional<z__default.ZodString>;
|
|
250
|
-
city: z__default.ZodOptional<z__default.ZodString>;
|
|
251
|
-
zipCode: z__default.ZodOptional<z__default.ZodString>;
|
|
252
|
-
}, z__default.core.$strip>>;
|
|
253
|
-
}, z__default.core.$strip>>;
|
|
254
|
-
countries: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
255
|
-
items: z__default.ZodArray<z__default.ZodObject<{
|
|
256
|
-
id: z__default.ZodString;
|
|
257
|
-
quantity: z__default.ZodNumber;
|
|
258
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
259
|
-
description: z__default.ZodOptional<z__default.ZodString>;
|
|
260
|
-
imageURL: z__default.ZodOptional<z__default.ZodString>;
|
|
261
|
-
price: z__default.ZodOptional<z__default.ZodNumber>;
|
|
262
|
-
currency: z__default.ZodOptional<z__default.ZodString>;
|
|
263
|
-
recurring: z__default.ZodOptional<z__default.ZodObject<{
|
|
264
|
-
billingPeriod: z__default.ZodEnum<{
|
|
265
|
-
daily: BillingPeriod.DAILY;
|
|
266
|
-
weekly: BillingPeriod.WEEKLY;
|
|
267
|
-
monthly: BillingPeriod.MONTHLY;
|
|
268
|
-
quarterly: BillingPeriod.QUARTERLY;
|
|
269
|
-
"semi-annually": BillingPeriod.SEMI_ANNUALLY;
|
|
270
|
-
annually: BillingPeriod.ANNUALLY;
|
|
271
|
-
}>;
|
|
272
|
-
trialDays: z__default.ZodOptional<z__default.ZodNumber>;
|
|
273
|
-
subscriptionSchedule: z__default.ZodOptional<z__default.ZodNumber>;
|
|
274
|
-
}, z__default.core.$strip>>;
|
|
275
|
-
}, z__default.core.$strip>>;
|
|
276
|
-
metadata: z__default.ZodOptional<z__default.ZodRecord<z__default.ZodString, z__default.ZodString>>;
|
|
277
|
-
additionalAgreements: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
278
|
-
id: z__default.ZodOptional<z__default.ZodString>;
|
|
279
|
-
name: z__default.ZodString;
|
|
280
|
-
description: z__default.ZodOptional<z__default.ZodString>;
|
|
281
|
-
required: z__default.ZodDefault<z__default.ZodBoolean>;
|
|
282
|
-
answer: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
283
|
-
}, z__default.core.$strip>>>;
|
|
284
|
-
blikCode: z__default.ZodOptional<z__default.ZodString>;
|
|
285
|
-
couponCode: z__default.ZodOptional<z__default.ZodString>;
|
|
286
|
-
redirect: z__default.ZodOptional<z__default.ZodObject<{
|
|
287
|
-
successURL: z__default.ZodOptional<z__default.ZodString>;
|
|
288
|
-
cancelURL: z__default.ZodOptional<z__default.ZodString>;
|
|
289
|
-
}, z__default.core.$strip>>;
|
|
290
|
-
}, z__default.core.$strip>;
|
|
291
|
-
|
|
292
|
-
declare namespace Bitsnap {
|
|
293
|
-
function addProductToCart(id: string, quantity?: number, metadata?: Record<string, string | undefined>): Promise<Err | undefined>;
|
|
294
|
-
function showCart(): void;
|
|
295
|
-
function hideCart(): void;
|
|
296
|
-
}
|
|
297
|
-
declare function createPaymentURL(request: LinkRequest): Promise<Err | {
|
|
298
|
-
url: string;
|
|
299
|
-
}>;
|
|
300
|
-
declare function createCheckout(request: LinkRequest & {
|
|
301
|
-
apiKey?: string;
|
|
302
|
-
testMode?: boolean;
|
|
303
|
-
}): Promise<{
|
|
304
|
-
status: string;
|
|
305
|
-
redirectURL: string;
|
|
306
|
-
}>;
|
|
307
|
-
declare function getReferenceIfPossible(): string | undefined;
|
|
308
|
-
declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkRequest;
|
|
309
|
-
|
|
310
|
-
export { Wrapper$2 as ApplePayButton, type Props$2 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, type ComponentClassNames, type CustomizationTexts, Wrapper$1 as GooglePayButton, type Props$1 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props as NotificationsComponentProps, type NotificationsComponentPublicProps, type PublicNotificationGroup, createCheckout, createPaymentURL, getReferenceIfPossible, injectReferenceToRequestIfNeeded, setCustomHost, setProjectID };
|
package/dist/index.d.ts
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import z__default from 'zod';
|
|
4
|
-
|
|
5
|
-
type AppleButtonType = "plain" | "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "reload" | "rent" | "set-up" | "subscribe" | "support" | "tip" | "top-up";
|
|
6
|
-
type ColorType = "black" | "white" | "white-outline";
|
|
7
|
-
type Props$2 = {
|
|
8
|
-
style?: {
|
|
9
|
-
width?: string;
|
|
10
|
-
height?: string;
|
|
11
|
-
borderRadius?: string;
|
|
12
|
-
padding?: string;
|
|
13
|
-
boxSizing?: string;
|
|
14
|
-
};
|
|
15
|
-
buttonType?: AppleButtonType;
|
|
16
|
-
colorType?: ColorType;
|
|
17
|
-
items: {
|
|
18
|
-
name: string;
|
|
19
|
-
id: string;
|
|
20
|
-
price: number;
|
|
21
|
-
quantity: number;
|
|
22
|
-
isDeliverable?: boolean;
|
|
23
|
-
metadata?: {
|
|
24
|
-
[key: string]: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
}[];
|
|
27
|
-
onClick?: () => Promise<void>;
|
|
28
|
-
};
|
|
29
|
-
declare function Wrapper$2(props: Props$2): react_jsx_runtime.JSX.Element;
|
|
30
|
-
|
|
31
|
-
type Props$1 = {
|
|
32
|
-
test?: boolean;
|
|
33
|
-
buttonSizeMode?: "static" | "fill";
|
|
34
|
-
buttonColor?: "white" | "black";
|
|
35
|
-
style?: {
|
|
36
|
-
width?: string;
|
|
37
|
-
};
|
|
38
|
-
items: {
|
|
39
|
-
name: string;
|
|
40
|
-
id: string;
|
|
41
|
-
price: number;
|
|
42
|
-
quantity: number;
|
|
43
|
-
isDeliverable?: boolean;
|
|
44
|
-
metadata?: {
|
|
45
|
-
[key: string]: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
declare function Wrapper$1(props: Props$1): react_jsx_runtime.JSX.Element;
|
|
50
|
-
|
|
51
|
-
type BitsnapCartProps = {
|
|
52
|
-
projectID: string;
|
|
53
|
-
children?: React.ReactNode;
|
|
54
|
-
onVisibleChange?: (isVisible: boolean) => void;
|
|
55
|
-
className?: string;
|
|
56
|
-
numberOfProductsInCartOptions?: {
|
|
57
|
-
style?: React.CSSProperties;
|
|
58
|
-
isVisible?: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
declare function BitsnapCart({ projectID, children, onVisibleChange, className, numberOfProductsInCartOptions, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
62
|
-
|
|
63
|
-
type PublicNotificationGroup = {
|
|
64
|
-
id: string;
|
|
65
|
-
isOn?: boolean;
|
|
66
|
-
};
|
|
67
|
-
type NotificationGroup = {
|
|
68
|
-
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
description?: string;
|
|
71
|
-
howOften?: string;
|
|
72
|
-
isOn?: boolean;
|
|
73
|
-
};
|
|
74
|
-
interface CustomizationTexts {
|
|
75
|
-
title?: string | null;
|
|
76
|
-
description?: string | null;
|
|
77
|
-
managingDescription?: string;
|
|
78
|
-
formTitle?: string;
|
|
79
|
-
formEmailLabel?: string;
|
|
80
|
-
formPhoneLabel?: string;
|
|
81
|
-
formPhoneOptional?: string;
|
|
82
|
-
formEmailPlaceholder?: string;
|
|
83
|
-
formPhonePlaceholder?: string;
|
|
84
|
-
formSubmitButton?: string;
|
|
85
|
-
formSuccessMessage?: string;
|
|
86
|
-
agreementText?: string | ReactNode;
|
|
87
|
-
qrCodeTitle?: string;
|
|
88
|
-
qrCodeSubtitle?: string;
|
|
89
|
-
qrCodeScanText?: string;
|
|
90
|
-
groupsNoSelectionWarning?: string;
|
|
91
|
-
groupsTitle?: string;
|
|
92
|
-
groupsSelectAllButton?: string;
|
|
93
|
-
groupsUpdateButton?: string;
|
|
94
|
-
groupsUpdateSuccess?: string;
|
|
95
|
-
manageDataTitle?: string;
|
|
96
|
-
manageDataDescription?: string;
|
|
97
|
-
manageDataUnsubscribeButton?: string;
|
|
98
|
-
manageDataUnsubscribeDescription?: string;
|
|
99
|
-
manageDataUpdatedMessage?: string;
|
|
100
|
-
loginEmailLabel?: string;
|
|
101
|
-
loginEmailPlaceholder?: string;
|
|
102
|
-
loginSendCodeButton?: string;
|
|
103
|
-
loginIHaveCode?: string;
|
|
104
|
-
loginSendingButton?: string;
|
|
105
|
-
loginCodeLabel?: string;
|
|
106
|
-
loginCodeSentMessage?: string;
|
|
107
|
-
loginChangeEmailButton?: string;
|
|
108
|
-
loginResendCodeButton?: string;
|
|
109
|
-
loginInvalidEmailError?: string;
|
|
110
|
-
loginSlugRequiredError?: string;
|
|
111
|
-
loginVerificationFailedError?: string;
|
|
112
|
-
loginInvalidCodeError?: string;
|
|
113
|
-
loginSendEmailError?: string;
|
|
114
|
-
loginVerifyCodeError?: string;
|
|
115
|
-
loginResendEmailError?: string;
|
|
116
|
-
loginTitle?: string;
|
|
117
|
-
loginDescription?: string;
|
|
118
|
-
}
|
|
119
|
-
interface ComponentClassNames {
|
|
120
|
-
container?: string;
|
|
121
|
-
header?: string;
|
|
122
|
-
headerTitle?: string;
|
|
123
|
-
headerLogo?: string;
|
|
124
|
-
headerDescription?: string;
|
|
125
|
-
groupsContainer?: string;
|
|
126
|
-
groupsList?: string;
|
|
127
|
-
groupItem?: string;
|
|
128
|
-
qrCodeSection?: string;
|
|
129
|
-
qrCodeTitle?: string;
|
|
130
|
-
qrCodeContainer?: string;
|
|
131
|
-
formSection?: string;
|
|
132
|
-
formTitle?: string;
|
|
133
|
-
formContainer?: string;
|
|
134
|
-
manageDataSection?: string;
|
|
135
|
-
manageDataTitle?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Props for the NotificationsComponentPublic component.
|
|
139
|
-
*/
|
|
140
|
-
interface NotificationsComponentPublicProps {
|
|
141
|
-
/**
|
|
142
|
-
* Unique identifier for the project (if not provided, productID will be used via CartProvider).
|
|
143
|
-
*/
|
|
144
|
-
slug?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Unique identifier for the user.
|
|
147
|
-
*/
|
|
148
|
-
userID?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Project ID (alternative to slug, used if slug is not provided).
|
|
151
|
-
*/
|
|
152
|
-
productID?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Name of the project, displayed in the component.
|
|
155
|
-
*/
|
|
156
|
-
projectName?: string;
|
|
157
|
-
/**
|
|
158
|
-
* URL or path to the project's logo (light mode).
|
|
159
|
-
*/
|
|
160
|
-
projectLogo?: string;
|
|
161
|
-
/**
|
|
162
|
-
* URL or path to the project's logo (dark mode).
|
|
163
|
-
*/
|
|
164
|
-
projectLogoDark?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Array of notification groups that the user can subscribe to. If you will provide group, we will not show all possible public groups from dashboard.
|
|
167
|
-
*/
|
|
168
|
-
groups?: PublicNotificationGroup[];
|
|
169
|
-
/**
|
|
170
|
-
* If true, the component is rendered in "manage my notifications" mode.
|
|
171
|
-
*/
|
|
172
|
-
isManaging?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Custom texts used throughout the component for i18n or personalisation.
|
|
175
|
-
*/
|
|
176
|
-
texts?: CustomizationTexts;
|
|
177
|
-
/**
|
|
178
|
-
* If true, show the QR code section that allows users to get a mobile app.
|
|
179
|
-
*/
|
|
180
|
-
showQRCode?: boolean;
|
|
181
|
-
/**
|
|
182
|
-
* If true, show the phone input in the notification form.
|
|
183
|
-
*/
|
|
184
|
-
showPhoneInput?: boolean;
|
|
185
|
-
/**
|
|
186
|
-
* List of group IDs to hide from the selection interface.
|
|
187
|
-
*/
|
|
188
|
-
hiddenGroupIds?: string[];
|
|
189
|
-
/**
|
|
190
|
-
* Custom CSS class names for various component sections (for easier styling).
|
|
191
|
-
*/
|
|
192
|
-
className?: ComponentClassNames;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
type Props = NotificationsComponentPublicProps;
|
|
196
|
-
declare function Wrapper({ slug, userID, productID, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props): react_jsx_runtime.JSX.Element;
|
|
197
|
-
|
|
198
|
-
type ErrTypes = 'internal' | 'badInput' | 'notFound';
|
|
199
|
-
type Err = {
|
|
200
|
-
ERR: true;
|
|
201
|
-
error: unknown;
|
|
202
|
-
type?: ErrTypes;
|
|
203
|
-
};
|
|
204
|
-
declare function Err(message: string, type?: ErrTypes): Err;
|
|
205
|
-
|
|
206
|
-
declare function setProjectID(projectID: string): void;
|
|
207
|
-
|
|
208
|
-
declare function setCustomHost(host: string): void;
|
|
209
|
-
|
|
210
|
-
declare enum BillingPeriod {
|
|
211
|
-
DAILY = "daily",
|
|
212
|
-
WEEKLY = "weekly",
|
|
213
|
-
MONTHLY = "monthly",
|
|
214
|
-
QUARTERLY = "quarterly",
|
|
215
|
-
SEMI_ANNUALLY = "semi-annually",
|
|
216
|
-
ANNUALLY = "annually"
|
|
217
|
-
}
|
|
218
|
-
type LinkRequest = z__default.infer<typeof linkRequestSchema>;
|
|
219
|
-
declare const linkRequestSchema: z__default.ZodObject<{
|
|
220
|
-
askForAddress: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
221
|
-
askForPhone: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
222
|
-
askForNote: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
223
|
-
askForNip: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
224
|
-
delivery: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
225
|
-
name: z__default.ZodString;
|
|
226
|
-
desc: z__default.ZodOptional<z__default.ZodString>;
|
|
227
|
-
min: z__default.ZodNumber;
|
|
228
|
-
max: z__default.ZodNumber;
|
|
229
|
-
price: z__default.ZodPipe<z__default.ZodNumber, z__default.ZodTransform<number, number>>;
|
|
230
|
-
}, z__default.core.$strip>>>;
|
|
231
|
-
deliveryMethod: z__default.ZodOptional<z__default.ZodString>;
|
|
232
|
-
details: z__default.ZodOptional<z__default.ZodObject<{
|
|
233
|
-
email: z__default.ZodOptional<z__default.ZodString>;
|
|
234
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
235
|
-
lastName: z__default.ZodOptional<z__default.ZodString>;
|
|
236
|
-
phone: z__default.ZodOptional<z__default.ZodString>;
|
|
237
|
-
address: z__default.ZodOptional<z__default.ZodObject<{
|
|
238
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
239
|
-
line1: z__default.ZodOptional<z__default.ZodString>;
|
|
240
|
-
line2: z__default.ZodOptional<z__default.ZodString>;
|
|
241
|
-
city: z__default.ZodOptional<z__default.ZodString>;
|
|
242
|
-
zipCode: z__default.ZodOptional<z__default.ZodString>;
|
|
243
|
-
country: z__default.ZodOptional<z__default.ZodString>;
|
|
244
|
-
}, z__default.core.$strip>>;
|
|
245
|
-
billingAddress: z__default.ZodOptional<z__default.ZodObject<{
|
|
246
|
-
nip: z__default.ZodOptional<z__default.ZodString>;
|
|
247
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
248
|
-
line1: z__default.ZodOptional<z__default.ZodString>;
|
|
249
|
-
line2: z__default.ZodOptional<z__default.ZodString>;
|
|
250
|
-
city: z__default.ZodOptional<z__default.ZodString>;
|
|
251
|
-
zipCode: z__default.ZodOptional<z__default.ZodString>;
|
|
252
|
-
}, z__default.core.$strip>>;
|
|
253
|
-
}, z__default.core.$strip>>;
|
|
254
|
-
countries: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
255
|
-
items: z__default.ZodArray<z__default.ZodObject<{
|
|
256
|
-
id: z__default.ZodString;
|
|
257
|
-
quantity: z__default.ZodNumber;
|
|
258
|
-
name: z__default.ZodOptional<z__default.ZodString>;
|
|
259
|
-
description: z__default.ZodOptional<z__default.ZodString>;
|
|
260
|
-
imageURL: z__default.ZodOptional<z__default.ZodString>;
|
|
261
|
-
price: z__default.ZodOptional<z__default.ZodNumber>;
|
|
262
|
-
currency: z__default.ZodOptional<z__default.ZodString>;
|
|
263
|
-
recurring: z__default.ZodOptional<z__default.ZodObject<{
|
|
264
|
-
billingPeriod: z__default.ZodEnum<{
|
|
265
|
-
daily: BillingPeriod.DAILY;
|
|
266
|
-
weekly: BillingPeriod.WEEKLY;
|
|
267
|
-
monthly: BillingPeriod.MONTHLY;
|
|
268
|
-
quarterly: BillingPeriod.QUARTERLY;
|
|
269
|
-
"semi-annually": BillingPeriod.SEMI_ANNUALLY;
|
|
270
|
-
annually: BillingPeriod.ANNUALLY;
|
|
271
|
-
}>;
|
|
272
|
-
trialDays: z__default.ZodOptional<z__default.ZodNumber>;
|
|
273
|
-
subscriptionSchedule: z__default.ZodOptional<z__default.ZodNumber>;
|
|
274
|
-
}, z__default.core.$strip>>;
|
|
275
|
-
}, z__default.core.$strip>>;
|
|
276
|
-
metadata: z__default.ZodOptional<z__default.ZodRecord<z__default.ZodString, z__default.ZodString>>;
|
|
277
|
-
additionalAgreements: z__default.ZodOptional<z__default.ZodArray<z__default.ZodObject<{
|
|
278
|
-
id: z__default.ZodOptional<z__default.ZodString>;
|
|
279
|
-
name: z__default.ZodString;
|
|
280
|
-
description: z__default.ZodOptional<z__default.ZodString>;
|
|
281
|
-
required: z__default.ZodDefault<z__default.ZodBoolean>;
|
|
282
|
-
answer: z__default.ZodOptional<z__default.ZodBoolean>;
|
|
283
|
-
}, z__default.core.$strip>>>;
|
|
284
|
-
blikCode: z__default.ZodOptional<z__default.ZodString>;
|
|
285
|
-
couponCode: z__default.ZodOptional<z__default.ZodString>;
|
|
286
|
-
redirect: z__default.ZodOptional<z__default.ZodObject<{
|
|
287
|
-
successURL: z__default.ZodOptional<z__default.ZodString>;
|
|
288
|
-
cancelURL: z__default.ZodOptional<z__default.ZodString>;
|
|
289
|
-
}, z__default.core.$strip>>;
|
|
290
|
-
}, z__default.core.$strip>;
|
|
291
|
-
|
|
292
|
-
declare namespace Bitsnap {
|
|
293
|
-
function addProductToCart(id: string, quantity?: number, metadata?: Record<string, string | undefined>): Promise<Err | undefined>;
|
|
294
|
-
function showCart(): void;
|
|
295
|
-
function hideCart(): void;
|
|
296
|
-
}
|
|
297
|
-
declare function createPaymentURL(request: LinkRequest): Promise<Err | {
|
|
298
|
-
url: string;
|
|
299
|
-
}>;
|
|
300
|
-
declare function createCheckout(request: LinkRequest & {
|
|
301
|
-
apiKey?: string;
|
|
302
|
-
testMode?: boolean;
|
|
303
|
-
}): Promise<{
|
|
304
|
-
status: string;
|
|
305
|
-
redirectURL: string;
|
|
306
|
-
}>;
|
|
307
|
-
declare function getReferenceIfPossible(): string | undefined;
|
|
308
|
-
declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkRequest;
|
|
309
|
-
|
|
310
|
-
export { Wrapper$2 as ApplePayButton, type Props$2 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, type ComponentClassNames, type CustomizationTexts, Wrapper$1 as GooglePayButton, type Props$1 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props as NotificationsComponentProps, type NotificationsComponentPublicProps, type PublicNotificationGroup, createCheckout, createPaymentURL, getReferenceIfPossible, injectReferenceToRequestIfNeeded, setCustomHost, setProjectID };
|
package/dist/internal.d.mts
DELETED
package/dist/internal.d.ts
DELETED