@osovitny/core 4.0.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.
@@ -0,0 +1,823 @@
1
+ import { HTMLBeautifyOptions } from 'js-beautify';
2
+ import { Subscription } from 'rxjs';
3
+
4
+ /*!
5
+ * @osovitny/core
6
+ * Copyright (c) 2016-2026 Osovitny
7
+ * SPDX-License-Identifier: MIT
8
+ */
9
+ declare function getAppSettings(): any;
10
+ declare function resetAppSettings(): void;
11
+ declare function getAppSettingsById(id: any): any;
12
+ declare function getAppSettingsByName(name: any): any;
13
+ interface ICurrentApp {
14
+ id: number;
15
+ root: string;
16
+ one: any;
17
+ oneUrl: string;
18
+ }
19
+ declare function getCurrentApp(): ICurrentApp;
20
+ declare let AppSettings: any;
21
+ declare let AppVersion: any;
22
+ declare let IsDevMode: boolean;
23
+ declare let IsProdMode: boolean;
24
+ declare let ClientApps: any;
25
+ declare const AppName: any;
26
+ declare const LibName: any;
27
+ declare const ApiUrl: any;
28
+
29
+ /*!
30
+ * @osovitny/core
31
+ * Copyright (c) 2016-2026 Osovitny
32
+ * SPDX-License-Identifier: MIT
33
+ */
34
+ declare enum AssetGroupType {
35
+ App = 1,
36
+ Lib = 2,
37
+ External = 3
38
+ }
39
+ declare function formatAssetsUrl(assetGroupType: AssetGroupType, url: string): string;
40
+ declare function formatUrl(url: string): string;
41
+
42
+ /*!
43
+ * @osovitny/core
44
+ * Copyright (c) 2016-2026 Osovitny
45
+ * SPDX-License-Identifier: MIT
46
+ */
47
+ declare const dateTimeFormats: {
48
+ medium: string;
49
+ };
50
+ declare const dateFormats: {
51
+ medium: string;
52
+ short: string;
53
+ };
54
+ declare const timeFormats: {
55
+ medium: string;
56
+ short: string;
57
+ };
58
+
59
+ /*!
60
+ * @osovitny/core
61
+ * Copyright (c) 2016-2026 Osovitny
62
+ * SPDX-License-Identifier: MIT
63
+ */
64
+ declare const GAEvents: {
65
+ login: {
66
+ signin: string;
67
+ signin_success: string;
68
+ signup: string;
69
+ signup_success: string;
70
+ };
71
+ };
72
+ declare const GABillingEvents: {
73
+ payment: string;
74
+ };
75
+
76
+ /*!
77
+ * @osovitny/core
78
+ * Copyright (c) 2016-2026 Osovitny
79
+ * SPDX-License-Identifier: MIT
80
+ */
81
+ declare const SessionStorageKeys: {
82
+ appSettings: string;
83
+ appMSALSettings: string;
84
+ };
85
+ declare const AppContextStorageKeys: {
86
+ version: string;
87
+ currency: string;
88
+ countries: string;
89
+ languages: string;
90
+ timezones: string;
91
+ usStates: string;
92
+ };
93
+
94
+ /*!
95
+ * @osovitny/core
96
+ * Copyright (c) 2016-2026 Osovitny
97
+ * SPDX-License-Identifier: MIT
98
+ */
99
+ declare class Convert {
100
+ private static pad;
101
+ static enumToString(enumeration: any, value: any): string;
102
+ static enumToArray(enumeration: any, valueAsInt?: boolean, notIncludes?: any): {
103
+ value: number;
104
+ text: any;
105
+ }[] | {
106
+ value: string;
107
+ text: any;
108
+ }[];
109
+ static stringToArray(str: string, separator?: string): string[];
110
+ static stringToIntArray(str: string, separator?: string): number[];
111
+ static company2String(comp: any): string;
112
+ static address2String(adr: any): string;
113
+ static stringToBoolean(value: any): boolean;
114
+ }
115
+
116
+ /*!
117
+ * @osovitny/core
118
+ * Copyright (c) 2016-2026 Osovitny
119
+ * SPDX-License-Identifier: MIT
120
+ */
121
+ declare class DateConvert {
122
+ static toDate(date: Date | number | string): Date;
123
+ static toFormattedDate(date: Date | number | string, formatStr?: string): string;
124
+ static utcToLocal(dirtyDate: any): Date;
125
+ }
126
+
127
+ /*!
128
+ * @osovitny/core
129
+ * Copyright (c) 2016-2026 Osovitny
130
+ * SPDX-License-Identifier: MIT
131
+ */
132
+
133
+ declare class XmlFormatter {
134
+ static toPrettyXML(s: string, options?: HTMLBeautifyOptions): string;
135
+ }
136
+
137
+ /*!
138
+ * @osovitny/core
139
+ * Copyright (c) 2016-2026 Osovitny
140
+ * SPDX-License-Identifier: MIT
141
+ */
142
+ declare enum DiscountCodeType {
143
+ Standard = 1,
144
+ UseOnce = 2
145
+ }
146
+ declare enum DiscountCodeStatus {
147
+ Exist = 1,
148
+ NotFound = 2,
149
+ AlreadyUsed = 3
150
+ }
151
+ declare enum PaymentType {
152
+ FullPayment = 1,
153
+ WeeklyPayment = 2,
154
+ BiWeeklyPayment = 3,
155
+ MonthlyPayment = 4
156
+ }
157
+ declare enum PaymentMethod {
158
+ None = 1,
159
+ Wallet = 2,
160
+ CreditCard = 3,
161
+ PayPal = 4,
162
+ Stripe = 5,
163
+ Venmo = 6,
164
+ ApplePay = 7,
165
+ GooglePay = 8
166
+ }
167
+ declare enum PaymentStage {
168
+ External = 1,
169
+ Internal = 2
170
+ }
171
+ declare enum SubscriptionProvider {
172
+ Product = 1,
173
+ PayPal = 2,
174
+ Stripe = 3
175
+ }
176
+
177
+ /*!
178
+ * @osovitny/core
179
+ * Copyright (c) 2016-2026 Osovitny
180
+ * SPDX-License-Identifier: MIT
181
+ */
182
+ declare enum Mode {
183
+ View = 1,
184
+ Edit = 2,
185
+ Moderation = 3
186
+ }
187
+ declare enum DataViewType {
188
+ Grid = "grid",
189
+ List = "list",
190
+ Table = "table"
191
+ }
192
+ declare enum PublishStatus {
193
+ Draft = 1,//viewable by owner ONLY
194
+ PendingReview = 2,//via RequestPublishing
195
+ Published = 3,//viewable by everyone
196
+ Archived = 4
197
+ }
198
+ declare enum ModerationStatus {
199
+ Draft = 1,//item is saved
200
+ PendingReview = 2,//item is in review
201
+ Approved = 3,//item is approved by Moderator
202
+ Rejected = 4
203
+ }
204
+
205
+ /*!
206
+ * @osovitny/core
207
+ * Copyright (c) 2016-2026 Osovitny
208
+ * SPDX-License-Identifier: MIT
209
+ */
210
+ declare function throwIfAlreadyLoaded(parentModule: any, moduleName: string): void;
211
+
212
+ /*!
213
+ * @osovitny/core
214
+ * Copyright (c) 2016-2026 Osovitny
215
+ * SPDX-License-Identifier: MIT
216
+ */
217
+ interface Localizer {
218
+ getLocalizedValue(key: string, params?: any[], defaultKey?: string): string;
219
+ }
220
+ declare function setLocalizer(localizer: Localizer): void;
221
+ declare function getLocalizer(): Localizer;
222
+
223
+ /*!
224
+ * @osovitny/core
225
+ * Copyright (c) 2016-2026 Osovitny
226
+ * SPDX-License-Identifier: MIT
227
+ */
228
+ interface Logger {
229
+ debug(info: any, ...optionalParams: any[]): void;
230
+ info(info: any, ...optionalParams: any[]): void;
231
+ warn(info: any, ...optionalParams: any[]): void;
232
+ error(error: any, ...optionalParams: any[]): void;
233
+ }
234
+ declare function setLogger(logger: Logger): void;
235
+ declare function getLogger(): Logger;
236
+
237
+ /*!
238
+ * @osovitny/core
239
+ * Copyright (c) 2016-2026 Osovitny
240
+ * SPDX-License-Identifier: MIT
241
+ */
242
+ interface IQueryParam {
243
+ name: string;
244
+ value: string;
245
+ }
246
+
247
+ /*!
248
+ * @osovitny/core
249
+ * Copyright (c) 2016-2026 Osovitny
250
+ * SPDX-License-Identifier: MIT
251
+ */
252
+ declare class Alerts {
253
+ static areYouSure(text: any, title?: any, confirmButtonText?: any, cancelButtonText?: any, successAction?: any, cancelAction?: any): void;
254
+ static info(text: any, params?: any[], title?: any): void;
255
+ static warning(text: any, params?: any[], title?: any): void;
256
+ static error(text?: any, params?: any[], title?: any): void;
257
+ static success(text?: any, params?: any[], title?: any, successAction?: any): void;
258
+ static cancel(text?: any, params?: any[], title?: any): void;
259
+ static notImplemented(): void;
260
+ static authenticationRequired(): void;
261
+ }
262
+
263
+ /*!
264
+ * @osovitny/core
265
+ * Copyright (c) 2016-2026 Osovitny
266
+ * SPDX-License-Identifier: MIT
267
+ */
268
+ interface INotification {
269
+ id?: string;
270
+ isNew: boolean;
271
+ isSession: boolean;
272
+ text?: string;
273
+ type?: string;
274
+ component?: string;
275
+ operation?: string;
276
+ createdDate?: string;
277
+ }
278
+
279
+ /*!
280
+ * @osovitny/core
281
+ * Copyright (c) 2016-2026 Osovitny
282
+ * SPDX-License-Identifier: MIT
283
+ */
284
+ declare class Stopwatch {
285
+ private name;
286
+ private startTime;
287
+ private stopTime;
288
+ private running;
289
+ private performance;
290
+ constructor(name: any);
291
+ private currentTime;
292
+ start(): void;
293
+ stop(): void;
294
+ getElapsedMilliseconds(): number;
295
+ getElapsedSeconds(): number;
296
+ printElapsedAsMilliseconds(): void;
297
+ }
298
+
299
+ /*!
300
+ * @osovitny/core
301
+ * Copyright (c) 2016-2026 Osovitny
302
+ * SPDX-License-Identifier: MIT
303
+ */
304
+ declare class DOM {
305
+ private static dir;
306
+ static first(elements: HTMLElement[]): HTMLElement;
307
+ static any(elements: HTMLElement[]): boolean;
308
+ static parent(elem: HTMLElement): HTMLElement;
309
+ static parents(elem: HTMLElement, selector?: any): any[];
310
+ static findInDocument(selector: string): HTMLElement[];
311
+ static find(elem: any, selector: string): HTMLElement[];
312
+ static remove(nodes: any): void;
313
+ static findAndRemove(element: any, selector: any): void;
314
+ static show(elem: any): void;
315
+ static hide(elem: any): void;
316
+ static each(selector: any, action: any): void;
317
+ static addClass(elem: Node | Element, classNames: any): void;
318
+ static removeClass(elem: Node | Element, classNames: any): void;
319
+ static hasClass(elem: Node | Element, className: any): void;
320
+ }
321
+
322
+ /*!
323
+ * @osovitny/core
324
+ * Copyright (c) 2016-2026 Osovitny
325
+ * SPDX-License-Identifier: MIT
326
+ */
327
+ declare class Guid {
328
+ static newGuid(): string;
329
+ }
330
+
331
+ /*!
332
+ * @osovitny/core
333
+ * Copyright (c) 2016-2026 Osovitny
334
+ * SPDX-License-Identifier: MIT
335
+ */
336
+ declare class is {
337
+ /**
338
+ * @name isDate
339
+ * @summary Is the given value a date?
340
+ */
341
+ static date(value: any): boolean;
342
+ /**
343
+ * @name isDateValid
344
+ * @summary Is the given date valid?
345
+ */
346
+ static dateValid(date: any): boolean;
347
+ static dateInvalid(date: any): boolean;
348
+ static objectNullOrEmpty(obj: any): boolean;
349
+ static string(value: any): value is string | String;
350
+ static emptyString(value: any): boolean;
351
+ static notEmptyString(value: any): boolean;
352
+ static number(value: any): value is number;
353
+ static boolean(value: any): value is boolean;
354
+ static array(value: any): value is any[];
355
+ static emptyArray(value: any): boolean;
356
+ static notEmptyArray(value: any): boolean;
357
+ static undefined(value: any): value is undefined;
358
+ }
359
+
360
+ /*!
361
+ * @osovitny/core
362
+ * Copyright (c) 2016-2026 Osovitny
363
+ * SPDX-License-Identifier: MIT
364
+ */
365
+
366
+ declare class Subs {
367
+ private subs;
368
+ constructor();
369
+ add(...subscriptions: Subscription[]): void;
370
+ set sink(subscription: Subscription);
371
+ unsubscribe(): void;
372
+ }
373
+
374
+ /*!
375
+ * @osovitny/core
376
+ * Copyright (c) 2016-2026 Osovitny
377
+ * SPDX-License-Identifier: MIT
378
+ */
379
+ declare class QSUtils {
380
+ private static getValue;
381
+ static getValueByName(name: any): string;
382
+ static exists(name: any): boolean;
383
+ static idExists(): boolean;
384
+ static clear(): void;
385
+ static clearKey(name: any, reload?: boolean, clearStorage?: boolean): void;
386
+ static getUrlSlug(): string;
387
+ static isSSOinProgress(): boolean;
388
+ static clearSSO(): void;
389
+ }
390
+
391
+ /*!
392
+ * @osovitny/core
393
+ * Copyright (c) 2016-2026 Osovitny
394
+ * SPDX-License-Identifier: MIT
395
+ */
396
+ declare class Utils {
397
+ static copyToClipBoard(event: any, val: string): void;
398
+ static downloadFile(name: string, url: string): void;
399
+ static downloadBlobFile(value: Blob, fileName: string): void;
400
+ static slugify(text: string, prefix?: string, postfix?: string): string;
401
+ static generateRandom(start: number, end: number): number;
402
+ static sortArray(items: any): any;
403
+ }
404
+
405
+ /*!
406
+ * @osovitny/core
407
+ * Copyright (c) 2016-2026 Osovitny
408
+ * SPDX-License-Identifier: MIT
409
+ */
410
+ declare class MSALB2C {
411
+ static getAuthorityByType(type: any): any;
412
+ static getPolicyByType(type: any): any;
413
+ }
414
+
415
+ /*!
416
+ * @osovitny/core
417
+ * Copyright (c) 2016-2026 Osovitny
418
+ * SPDX-License-Identifier: MIT
419
+ */
420
+ declare const PolicyType: {
421
+ signUpSignIn: string;
422
+ signUp: string;
423
+ editProfile: string;
424
+ resetPassword: string;
425
+ };
426
+
427
+ /*!
428
+ * @osovitny/core
429
+ * Copyright (c) 2016-2026 Osovitny
430
+ * SPDX-License-Identifier: MIT
431
+ */
432
+ declare function getMsalSettings(): any;
433
+ declare function resetMsalSettings(): void;
434
+ declare let MSALConfig: any;
435
+ declare let MSALApiConfig: any;
436
+ declare let MSALB2CConfig: any;
437
+
438
+ /*!
439
+ * @osovitny/core
440
+ * Copyright (c) 2016-2026 Osovitny
441
+ * SPDX-License-Identifier: MIT
442
+ */
443
+ declare class MSALRedirect {
444
+ static handle(router: any, calledBy: string): void;
445
+ }
446
+
447
+ /*!
448
+ * @osovitny/core
449
+ * Copyright (c) 2016-2026 Osovitny
450
+ * SPDX-License-Identifier: MIT
451
+ */
452
+ declare const MSALStorageKeys: {
453
+ redirectTo: string;
454
+ };
455
+ declare class MSALStorage {
456
+ private static hasRedirectValue;
457
+ static saveRedirectState(redirectTo: string | null | undefined, calledBy: string): void;
458
+ static getRedirectState(calledBy: string): string;
459
+ static clearRedirectState(calledBy: string): void;
460
+ }
461
+
462
+ /*!
463
+ * @osovitny/core
464
+ * Copyright (c) 2016-2026 Osovitny
465
+ * SPDX-License-Identifier: MIT
466
+ */
467
+ declare class MSALUtils {
468
+ static isB2C(): boolean;
469
+ static initialNavigation(): "enabledNonBlocking" | "disabled";
470
+ static getApiScopes(): any[];
471
+ }
472
+
473
+ /*!
474
+ * @osovitny/core
475
+ * Copyright (c) 2016-2026 Osovitny
476
+ * SPDX-License-Identifier: MIT
477
+ */
478
+
479
+ interface IPayPalConfig {
480
+ /**
481
+ * Currency - Defaults to USD if not provided
482
+ */
483
+ currency?: string;
484
+ /**
485
+ * Use when creating order on client
486
+ */
487
+ createOrderOnClient?: (data: any) => ICreateOrderRequest;
488
+ /**
489
+ * Use when creating subscription on client
490
+ */
491
+ createSubscriptionOnClient?: (data: any) => ICreateSubscriptionRequest;
492
+ /**
493
+ * Use for creating orders on server. PayPal expects you to return 'orderId' in this method
494
+ */
495
+ createOrderOnServer?: (data: any) => Promise<string>;
496
+ /**
497
+ * Advanced configuration
498
+ */
499
+ advanced?: IAdvancedConfiguration;
500
+ /**
501
+ * Client id
502
+ */
503
+ clientId: string;
504
+ /**
505
+ * Shipping callback
506
+ * see https://developer.paypal.com/docs/checkout/integration-features/shipping-callback/
507
+ */
508
+ onShippingChange?: OnShippingChangeCallback;
509
+ /**
510
+ * Called when 'onApprove' event occurs
511
+ */
512
+ onApprove?: (data: IOnApproveCallbackData, actions: any) => void;
513
+ /**
514
+ * Called when authorization on client succeeds
515
+ */
516
+ onClientAuthorization?: (authorization: IClientAuthorizeCallbackData) => void;
517
+ /**
518
+ * Implement for authorizing on server side
519
+ */
520
+ authorizeOnServer?: (data: IOnApproveCallbackData, actions: any) => Promise<any>;
521
+ /**
522
+ * Button style configuration
523
+ */
524
+ style?: IPayPalButtonStyle;
525
+ /**
526
+ * Error handler
527
+ */
528
+ onError?: (err: any) => void;
529
+ /**
530
+ * Click handler
531
+ */
532
+ onClick?: (data: any, actions: IOnClickCallbackActions) => void;
533
+ /**
534
+ * Cancel handler
535
+ */
536
+ onCancel?: (data: ICancelCallbackData, actions: any) => void;
537
+ /**
538
+ * Init handler.
539
+ * can be used for validation, see: https://developer.paypal.com/docs/checkout/integration-features/validation/#
540
+ */
541
+ onInit?: (data: IInitCallbackData, actions: IOnInitCallbackActions) => void;
542
+ /**
543
+ * Create subscription handler
544
+ * https://developer.paypal.com/docs/subscriptions/integrate/
545
+ *
546
+ * Note: the vault property in the advanced configuration also has to be set to true
547
+ */
548
+ createSubscription?: (data: any) => ICreateSubscriptionRequest;
549
+ /**
550
+ * Vault - must be set to true when creating subscriptions
551
+ */
552
+ vault?: TrueFalse;
553
+ intent?: OrderIntent;
554
+ fundingSource?: "PAYPAL" | "CARD" | "PAYLATER" | "CREDIT" | "VENMO";
555
+ debug?: boolean;
556
+ }
557
+ type TrueFalse = "true" | "false";
558
+ interface IPayPalUrlConfig {
559
+ clientId: string;
560
+ currency?: string;
561
+ funding?: boolean;
562
+ commit?: TrueFalse;
563
+ vault?: TrueFalse;
564
+ intent?: OrderIntent;
565
+ locale?: string;
566
+ extraParams?: IQueryParam[];
567
+ debug?: boolean;
568
+ }
569
+ interface IOrderDetails {
570
+ create_time: string;
571
+ update_time: string;
572
+ id: string;
573
+ intent: OrderIntent;
574
+ payer: IPayer;
575
+ status: OrderStatus;
576
+ links: ILinkDescription[];
577
+ purchase_units: IPurchaseUnit[];
578
+ }
579
+ interface IClientAuthorizeCallbackData extends IOrderDetails {
580
+ links: ILinkDescription[];
581
+ }
582
+ interface ILinkDescription {
583
+ href: string;
584
+ rel: String;
585
+ method?: LinkMethod;
586
+ }
587
+ type OnShippingChangeCallback = (data: IOnShippingChangeData, actions: IOnShippingChangeActions) => any;
588
+ interface IOnShippingChangeData {
589
+ paymentToken: string;
590
+ shipping_address: any;
591
+ selected_shipping_method?: any;
592
+ }
593
+ interface IOnShippingChangeActions {
594
+ resolve: () => any;
595
+ reject: () => any;
596
+ patch: () => any;
597
+ }
598
+ type LinkMethod = "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "CONNECT" | "OPTIONS" | "PATCH";
599
+ interface IAdvancedConfiguration {
600
+ commit?: TrueFalse;
601
+ locale?: string;
602
+ extraQueryParams?: IQueryParam[];
603
+ }
604
+ interface IOnApproveCallbackData {
605
+ orderID: string;
606
+ payerID: string;
607
+ subscriptionID: string;
608
+ }
609
+ interface ICreateOrderCallbackActions {
610
+ order: {
611
+ create: (order: ICreateOrderRequest) => Promise<any>;
612
+ };
613
+ }
614
+ interface ICancelCallbackData {
615
+ orderID: string;
616
+ }
617
+ interface IOnApproveCallbackActions {
618
+ redirect: () => void;
619
+ restart: () => void;
620
+ order: {
621
+ authorize: () => Promise<any>;
622
+ capture: () => Promise<any>;
623
+ get: () => Promise<IOrderDetails>;
624
+ patch: () => Promise<any>;
625
+ };
626
+ }
627
+ interface IOnInitCallbackActions {
628
+ enable: () => void;
629
+ disable: () => void;
630
+ }
631
+ interface ICreateSubscriptionCallbackActions {
632
+ subscription: {
633
+ create: (subscription: ICreateSubscriptionRequest) => Promise<any>;
634
+ revise: (subscriptionId: string, subscription: ICreateSubscriptionRequest) => Promise<any>;
635
+ };
636
+ }
637
+ interface IInitCallbackData {
638
+ }
639
+ interface ICreateSubscriptionCallbackData {
640
+ }
641
+ interface IOnClickCallbackActions {
642
+ resolve: () => void;
643
+ reject: () => void;
644
+ }
645
+ interface IPayPalButtonStyle {
646
+ label?: "paypal" | "checkout" | "pay" | "installment" | "buynow" | "subscribe";
647
+ shape?: "pill" | "rect";
648
+ color?: "gold" | "blue" | "silver" | "white" | "black";
649
+ layout?: "horizontal" | "vertical";
650
+ tagline?: boolean;
651
+ height?: number;
652
+ fundingicons?: boolean;
653
+ }
654
+ interface ICreateOrderRequest {
655
+ intent: OrderIntent;
656
+ purchase_units: IPurchaseUnit[];
657
+ payer?: IPayer;
658
+ application_context?: IApplicationContext;
659
+ }
660
+ interface ICreateSubscriptionRequest {
661
+ plan_id: string;
662
+ quantity?: number;
663
+ custom_id: string;
664
+ application_context?: IApplicationContext;
665
+ }
666
+ interface IPayer {
667
+ name?: IPartyName;
668
+ email_address?: string;
669
+ payer_id?: string;
670
+ birth_date?: string;
671
+ tax_info?: ITaxInfo;
672
+ address?: IAddressPortable;
673
+ phone?: IPhone;
674
+ }
675
+ interface IApplicationContext {
676
+ brand_name?: string;
677
+ locale?: string;
678
+ landing_page?: PaypalLandingPage;
679
+ shipping_preference?: ShippingPreference;
680
+ user_action?: PayPalUserAction;
681
+ payment_method?: IPaymentMethod;
682
+ return_url?: string;
683
+ cancel_url?: string;
684
+ }
685
+ interface IPaymentMethod {
686
+ payer_selected?: PayerSelected;
687
+ payee_preferred?: PayeePreferred;
688
+ }
689
+ type PayeePreferred = "UNRESTRICTED" | "IMMEDIATE_PAYMENT_REQUIRED";
690
+ type PayerSelected = "PAYPAL_CREDIT" | "PAYPAL";
691
+ type PayPalUserAction = "CONTINUE" | "PAY_NOW";
692
+ type ShippingPreference = "GET_FROM_FILE" | "NO_SHIPPING" | "SET_PROVIDED_ADDRESS";
693
+ type PaypalLandingPage = "LOGIN" | "BILLING";
694
+ type OrderIntent = "capture" | "authorize" | "subscription" | "tokenize";
695
+ type DisbursementMode = "INSTANT" | "DELAYED";
696
+ type ItemCategory = "DIGITAL_GOODS" | "PHYSICAL_GOODS";
697
+ type PhoneType = "FAX" | "HOME" | "MOBILE" | "OTHER" | "PAGER";
698
+ type TaxIdType = "BR_CPF" | "BR_CNPJ";
699
+ interface IPhone {
700
+ phone_type?: PhoneType;
701
+ phone_number?: IPhoneNumber;
702
+ }
703
+ interface ITaxInfo {
704
+ tax_id: string;
705
+ tax_id_type: TaxIdType;
706
+ }
707
+ interface IPhoneNumber {
708
+ national_number: string;
709
+ }
710
+ interface IPurchaseUnit {
711
+ amount: IUnitAmount;
712
+ reference_id?: string;
713
+ payee?: IPayee;
714
+ payment_instruction?: IPaymentInstructions;
715
+ description?: string;
716
+ custom_id?: string;
717
+ invoice_id?: string;
718
+ soft_descriptor?: string;
719
+ items: ITransactionItem[];
720
+ shipping?: IShipping;
721
+ }
722
+ interface IPayee {
723
+ email_address?: string;
724
+ merchant_id?: string;
725
+ }
726
+ interface IPaymentInstructions {
727
+ platform_fees?: IPlatformFee[];
728
+ disbursement_mode?: DisbursementMode;
729
+ }
730
+ interface IPlatformFee {
731
+ amount: IUnitAmount;
732
+ payee?: IPayee;
733
+ }
734
+ interface ITransactionItem {
735
+ name: string;
736
+ unit_amount: IUnitAmount;
737
+ quantity: string;
738
+ description?: string;
739
+ sku?: string;
740
+ category?: ItemCategory;
741
+ tax?: ITax;
742
+ }
743
+ interface ITax {
744
+ currency_code: string;
745
+ value: string;
746
+ }
747
+ interface IUnitAmount {
748
+ currency_code: string;
749
+ value: string;
750
+ breakdown?: IUnitBreakdown;
751
+ }
752
+ interface IMoney {
753
+ currency_code: string;
754
+ value: string;
755
+ }
756
+ interface IUnitBreakdown {
757
+ item_total?: IUnitAmount;
758
+ shipping?: IUnitAmount;
759
+ handling?: IUnitAmount;
760
+ tax_total?: IUnitAmount;
761
+ insurance?: IUnitAmount;
762
+ shipping_discount?: IUnitAmount;
763
+ discount?: IMoney;
764
+ }
765
+ interface IPartyName {
766
+ prefix?: string;
767
+ given_name?: string;
768
+ surname?: string;
769
+ middle_name?: string;
770
+ suffix?: string;
771
+ alternate_full_name?: string;
772
+ full_name?: string;
773
+ }
774
+ interface IAddressPortable {
775
+ country_code: string;
776
+ address_line_1?: string;
777
+ address_line_2?: string;
778
+ admin_area_2?: string;
779
+ admin_area_1?: string;
780
+ postal_code?: string;
781
+ }
782
+ interface IShipping {
783
+ name?: IPartyName;
784
+ address?: IAddressPortable;
785
+ }
786
+ type OrderStatus = "APPROVED" | "SAVED" | "CREATED" | "VOIDED" | "COMPLETED";
787
+
788
+ /*!
789
+ * @osovitny/core
790
+ * Copyright (c) 2016-2026 Osovitny
791
+ * SPDX-License-Identifier: MIT
792
+ */
793
+ declare class BillingUtils {
794
+ private static readonly CURRENCY_SYMBOLS;
795
+ static convert2AmountWithCurrency(amount: number | string, currency: string): string;
796
+ }
797
+
798
+ /*!
799
+ * @osovitny/core
800
+ * Copyright (c) 2016-2026 Osovitny
801
+ * SPDX-License-Identifier: MIT
802
+ */
803
+ declare const DefaultEditorOptions: Object;
804
+
805
+ /*!
806
+ * @osovitny/core
807
+ * Copyright (c) 2016-2026 Osovitny
808
+ * SPDX-License-Identifier: MIT
809
+ */
810
+ declare const Spinkit: {
811
+ skChasingDots: string;
812
+ skCubeGrid: string;
813
+ skDoubleBounce: string;
814
+ skRotatingPlane: string;
815
+ skSpinnerPulse: string;
816
+ skThreeBounce: string;
817
+ skWanderingCubes: string;
818
+ skWave: string;
819
+ skLine: string;
820
+ };
821
+
822
+ export { Alerts, ApiUrl, AppContextStorageKeys, AppName, AppSettings, AppVersion, AssetGroupType, BillingUtils, ClientApps, Convert, DOM, DataViewType, DateConvert, DefaultEditorOptions, DiscountCodeStatus, DiscountCodeType, GABillingEvents, GAEvents, Guid, IsDevMode, IsProdMode, LibName, MSALApiConfig, MSALB2C, MSALB2CConfig, MSALConfig, MSALRedirect, MSALStorage, MSALStorageKeys, MSALUtils, Mode, ModerationStatus, PaymentMethod, PaymentStage, PaymentType, PolicyType, PublishStatus, QSUtils, SessionStorageKeys, Spinkit, Stopwatch, Subs, SubscriptionProvider, Utils, XmlFormatter, dateFormats, dateTimeFormats, formatAssetsUrl, formatUrl, getAppSettings, getAppSettingsById, getAppSettingsByName, getCurrentApp, getLocalizer, getLogger, getMsalSettings, is, resetAppSettings, resetMsalSettings, setLocalizer, setLogger, throwIfAlreadyLoaded, timeFormats };
823
+ export type { DisbursementMode, IAddressPortable, IAdvancedConfiguration, IApplicationContext, ICancelCallbackData, IClientAuthorizeCallbackData, ICreateOrderCallbackActions, ICreateOrderRequest, ICreateSubscriptionCallbackActions, ICreateSubscriptionCallbackData, ICreateSubscriptionRequest, ICurrentApp, IInitCallbackData, ILinkDescription, IMoney, INotification, IOnApproveCallbackActions, IOnApproveCallbackData, IOnClickCallbackActions, IOnInitCallbackActions, IOnShippingChangeActions, IOnShippingChangeData, IOrderDetails, IPartyName, IPayPalButtonStyle, IPayPalConfig, IPayPalUrlConfig, IPayee, IPayer, IPaymentInstructions, IPaymentMethod, IPhone, IPhoneNumber, IPlatformFee, IPurchaseUnit, IQueryParam, IShipping, ITax, ITaxInfo, ITransactionItem, IUnitAmount, IUnitBreakdown, ItemCategory, LinkMethod, Localizer, Logger, OnShippingChangeCallback, OrderIntent, OrderStatus, PayPalUserAction, PayeePreferred, PayerSelected, PaypalLandingPage, PhoneType, ShippingPreference, TaxIdType, TrueFalse };