ui.shipaid.com 0.3.53 → 0.3.55

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.
@@ -1,6 +1,6 @@
1
- import { calculateProtectionTotal, findProtectionVariant } from './protection';
2
- declare const _default: {
3
- calculateProtectionTotal: typeof calculateProtectionTotal;
4
- findProtectionVariant: typeof findProtectionVariant;
5
- };
6
- export default _default;
1
+ import { calculateProtectionTotal, findProtectionVariant } from './protection';
2
+ declare const _default: {
3
+ calculateProtectionTotal: typeof calculateProtectionTotal;
4
+ findProtectionVariant: typeof findProtectionVariant;
5
+ };
6
+ export default _default;
@@ -1,7 +1,7 @@
1
- import { type ShipAidStore } from '../types/ShipAid';
2
- import { type ShopifyCart } from './types/ShopifyCart';
3
- import { type ShopifyProduct, type ShopifyProductVariant } from './types/ShopifyProduct';
4
- /** Given the current cart, it calculates the protection total according to the store protection settings. */
5
- export declare function calculateProtectionTotal(store: ShipAidStore, protectionProduct: ShopifyProduct, cart: ShopifyCart): number;
6
- export declare function findProtectionVariant(store: ShipAidStore, protectionProduct: ShopifyProduct, protectionFee: number): ShopifyProductVariant | undefined;
7
- export declare function getIdFromShopifyGid(gid: string): string | null;
1
+ import { type ShipAidStore } from '../types/ShipAid';
2
+ import { type ShopifyCart } from './types/ShopifyCart';
3
+ import { type ShopifyProduct, type ShopifyProductVariant } from './types/ShopifyProduct';
4
+ /** Given the current cart, it calculates the protection total according to the store protection settings. */
5
+ export declare function calculateProtectionTotal(store: ShipAidStore, protectionProduct: ShopifyProduct, cart: ShopifyCart): number;
6
+ export declare function findProtectionVariant(store: ShipAidStore, protectionProduct: ShopifyProduct, protectionFee: number): ShopifyProductVariant | undefined;
7
+ export declare function getIdFromShopifyGid(gid: string): string | null;
@@ -1,29 +1,29 @@
1
- export interface ShopifyCart {
2
- /** Should be the lowest common denomination */
3
- total_price: number;
4
- item_count: number;
5
- items?: ShopifyCartItem[];
6
- }
7
- export interface ShopifyCartItem {
8
- id: number;
9
- index: number;
10
- position: number;
11
- quantity: number;
12
- variant_id: number;
13
- key: string;
14
- sku: string;
15
- /** Should be the lowest common denomination */
16
- final_line_price: number;
17
- selling_plan_allocation?: any;
18
- }
19
- export interface FeaturedImage {
20
- aspect_ratio: number;
21
- alt: string;
22
- height: number;
23
- url: string;
24
- width: number;
25
- }
26
- export interface OptionsWithValues {
27
- name: string;
28
- value: string;
29
- }
1
+ export interface ShopifyCart {
2
+ /** Should be the lowest common denomination */
3
+ total_price: number;
4
+ item_count: number;
5
+ items?: ShopifyCartItem[];
6
+ }
7
+ export interface ShopifyCartItem {
8
+ id: number;
9
+ index: number;
10
+ position: number;
11
+ quantity: number;
12
+ variant_id: number;
13
+ key: string;
14
+ sku: string;
15
+ /** Should be the lowest common denomination */
16
+ final_line_price: number;
17
+ selling_plan_allocation?: any;
18
+ }
19
+ export interface FeaturedImage {
20
+ aspect_ratio: number;
21
+ alt: string;
22
+ height: number;
23
+ url: string;
24
+ width: number;
25
+ }
26
+ export interface OptionsWithValues {
27
+ name: string;
28
+ value: string;
29
+ }
@@ -1,7 +1,12 @@
1
- export interface ShopifyProduct {
2
- variants?: ShopifyProductVariant[];
3
- }
4
- export interface ShopifyProductVariant {
5
- id: number;
6
- price: string;
7
- }
1
+ export interface ShopifyProduct {
2
+ id?: string;
3
+ image?: {
4
+ src: string;
5
+ };
6
+ title?: string;
7
+ variants?: ShopifyProductVariant[];
8
+ }
9
+ export interface ShopifyProductVariant {
10
+ id: number;
11
+ price: string;
12
+ }
@@ -1,81 +1,81 @@
1
- export interface ProtectionSettingsProductVariant {
2
- id?: string;
3
- sku?: string;
4
- price?: string;
5
- title?: string;
6
- selectedOptions?: Array<{
7
- name?: string;
8
- value?: string;
9
- }>;
10
- }
11
- export interface ProtectionSettingsProduct {
12
- id?: string;
13
- title?: string;
14
- options?: Array<{
15
- name: string;
16
- value: string;
17
- }>;
18
- variants?: {
19
- edges?: Array<{
20
- node?: ProtectionSettingsProductVariant;
21
- }>;
22
- };
23
- }
24
- export interface ProtectionSettings {
25
- product?: ProtectionSettingsProduct;
26
- }
27
- export interface ProtectionSettingsPercentage {
28
- protectionType: 'PERCENTAGE';
29
- percentage: number;
30
- minimumFee: number;
31
- }
32
- export interface ProtectionSettingsFixed {
33
- protectionType: 'FIXED';
34
- defaultFee?: number;
35
- rules?: Array<{
36
- fee?: number;
37
- rangeLower?: number;
38
- rangeUpper?: number;
39
- }>;
40
- }
41
- declare enum Deadline {
42
- THIRTY_MIN = "THIRTY_MIN",
43
- SIXTY_MIN = "SIXTY_MIN",
44
- NINETY_MIN = "NINETY_MIN",
45
- TWO_HOURS = "TWO_HOURS",
46
- THREE_HOURS = "THREE_HOURS",
47
- SIX_HOURS = "SIX_HOURS",
48
- TWELVE_HOURS = "TWELVE_HOURS",
49
- ONE_DAY = "ONE_DAY",
50
- TWO_DAYS = "TWO_DAYS",
51
- THREE_DAYS = "THREE_DAYS",
52
- FIVE_DAYS = "FIVE_DAYS",
53
- TEN_DAYS = "TEN_DAYS"
54
- }
55
- interface OrderSettings {
56
- deadline: {
57
- timing: Deadline;
58
- description: string;
59
- };
60
- shipping: {
61
- allow_customer_to_use_po_boxes: boolean;
62
- allow_customer_to_edit_shipping: boolean;
63
- allow_gmaps_to_verify_addresses: boolean;
64
- };
65
- }
66
- export interface ShipAidStore {
67
- store: string;
68
- currency: string;
69
- widgetAutoOptIn?: boolean;
70
- widgetPollProtection?: boolean;
71
- widgetShowCart?: boolean;
72
- excludedProductSkus?: string[];
73
- excludedProductsVariantsId?: string[];
74
- excludedCustomersIdsAutoOptIn?: string[] | null;
75
- planActive: boolean;
76
- protectionSettings: ProtectionSettingsFixed | ProtectionSettingsPercentage;
77
- widgetConfigurations: any;
78
- orderSettings: OrderSettings;
79
- autoOptInProbability: any;
80
- }
81
- export {};
1
+ export interface ProtectionSettingsProductVariant {
2
+ id?: string;
3
+ sku?: string;
4
+ price?: string;
5
+ title?: string;
6
+ selectedOptions?: Array<{
7
+ name?: string;
8
+ value?: string;
9
+ }>;
10
+ }
11
+ export interface ProtectionSettingsProduct {
12
+ id?: string;
13
+ title?: string;
14
+ options?: Array<{
15
+ name: string;
16
+ value: string;
17
+ }>;
18
+ variants?: {
19
+ edges?: Array<{
20
+ node?: ProtectionSettingsProductVariant;
21
+ }>;
22
+ };
23
+ }
24
+ export interface ProtectionSettings {
25
+ product?: ProtectionSettingsProduct;
26
+ }
27
+ export interface ProtectionSettingsPercentage {
28
+ protectionType: 'PERCENTAGE';
29
+ percentage: number;
30
+ minimumFee: number;
31
+ }
32
+ export interface ProtectionSettingsFixed {
33
+ protectionType: 'FIXED';
34
+ defaultFee?: number;
35
+ rules?: Array<{
36
+ fee?: number;
37
+ rangeLower?: number;
38
+ rangeUpper?: number;
39
+ }>;
40
+ }
41
+ declare enum Deadline {
42
+ THIRTY_MIN = "THIRTY_MIN",
43
+ SIXTY_MIN = "SIXTY_MIN",
44
+ NINETY_MIN = "NINETY_MIN",
45
+ TWO_HOURS = "TWO_HOURS",
46
+ THREE_HOURS = "THREE_HOURS",
47
+ SIX_HOURS = "SIX_HOURS",
48
+ TWELVE_HOURS = "TWELVE_HOURS",
49
+ ONE_DAY = "ONE_DAY",
50
+ TWO_DAYS = "TWO_DAYS",
51
+ THREE_DAYS = "THREE_DAYS",
52
+ FIVE_DAYS = "FIVE_DAYS",
53
+ TEN_DAYS = "TEN_DAYS"
54
+ }
55
+ interface OrderSettings {
56
+ deadline: {
57
+ timing: Deadline;
58
+ description: string;
59
+ };
60
+ shipping: {
61
+ allow_customer_to_use_po_boxes: boolean;
62
+ allow_customer_to_edit_shipping: boolean;
63
+ allow_gmaps_to_verify_addresses: boolean;
64
+ };
65
+ }
66
+ export interface ShipAidStore {
67
+ store: string;
68
+ currency: string;
69
+ widgetAutoOptIn?: boolean;
70
+ widgetPollProtection?: boolean;
71
+ widgetShowCart?: boolean;
72
+ excludedProductSkus?: string[];
73
+ excludedProductsVariantsId?: string[];
74
+ excludedCustomersIdsAutoOptIn?: string[] | null;
75
+ planActive: boolean;
76
+ protectionSettings: ProtectionSettingsFixed | ProtectionSettingsPercentage;
77
+ widgetConfigurations: any;
78
+ orderSettings: OrderSettings;
79
+ autoOptInProbability: any;
80
+ }
81
+ export {};
@@ -1,2 +1,2 @@
1
- declare const styles: import("lit").CSSResult;
2
- export default styles;
1
+ declare const styles: import("lit").CSSResult;
2
+ export default styles;
@@ -1,8 +1,8 @@
1
- export declare const CheckmarkIcon: import("lit").TemplateResult<1>;
2
- export declare const ShipAidLogo: import("lit").TemplateResult<1>;
3
- export declare const ShipAidLogoText: import("lit").TemplateResult<1>;
4
- export declare const ShipAidLogoPopUp: import("lit").TemplateResult<1>;
5
- export declare const CheckmarkRibbon: import("lit").TemplateResult<1>;
6
- export declare const MapIcon: import("lit").TemplateResult<1>;
7
- export declare const BoxIcon: import("lit").TemplateResult<1>;
8
- export declare const BellIcon: import("lit").TemplateResult<1>;
1
+ export declare const CheckmarkIcon: import("lit").TemplateResult<1>;
2
+ export declare const ShipAidLogo: import("lit").TemplateResult<1>;
3
+ export declare const ShipAidLogoText: import("lit").TemplateResult<1>;
4
+ export declare const ShipAidLogoPopUp: import("lit").TemplateResult<1>;
5
+ export declare const CheckmarkRibbon: import("lit").TemplateResult<1>;
6
+ export declare const MapIcon: import("lit").TemplateResult<1>;
7
+ export declare const BoxIcon: import("lit").TemplateResult<1>;
8
+ export declare const BellIcon: import("lit").TemplateResult<1>;
@@ -1,2 +1,2 @@
1
- declare const styles: import("lit").CSSResult;
2
- export default styles;
1
+ declare const styles: import("lit").CSSResult;
2
+ export default styles;
@@ -1,2 +1,2 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -1,9 +1,9 @@
1
- import { LitElement } from 'lit';
2
- declare class ConfirmationPopup extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- active: boolean;
5
- handleClosePopup(): void;
6
- handleRemoveProtection(): void;
7
- render(): import("lit").TemplateResult<1>;
8
- }
9
- export default ConfirmationPopup;
1
+ import { LitElement } from 'lit';
2
+ declare class ConfirmationPopup extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ active: boolean;
5
+ handleClosePopup(): void;
6
+ handleRemoveProtection(): void;
7
+ render(): import("lit").TemplateResult<1>;
8
+ }
9
+ export default ConfirmationPopup;
@@ -1,8 +1,8 @@
1
- import { LitElement } from 'lit';
2
- declare class LearnMorePopup extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- active: boolean;
5
- handleClosePopup(): void;
6
- render(): import("lit").TemplateResult<1>;
7
- }
8
- export default LearnMorePopup;
1
+ import { LitElement } from 'lit';
2
+ declare class LearnMorePopup extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ active: boolean;
5
+ handleClosePopup(): void;
6
+ render(): import("lit").TemplateResult<1>;
7
+ }
8
+ export default LearnMorePopup;
@@ -1,15 +1,15 @@
1
- import { LitElement } from 'lit'
2
- declare class ShipAidCartConfirmation extends LitElement {
3
- static styles: import('lit').CSSResult
4
- open: boolean
5
- product: null
6
- imageUrl: null
7
- priceOfVariant: null
8
- quantity: number
9
- handleDismiss(): void
10
- handleDontShowAgain(ev: any): void
11
- handleConfirm(): void
12
- private dontShowAgain
13
- render(): import('lit-html').TemplateResult<1>
14
- }
15
- export default ShipAidCartConfirmation
1
+ import { LitElement } from 'lit';
2
+ declare class ShipAidCartConfirmation extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ open: boolean;
5
+ product: null;
6
+ imageUrl: null;
7
+ priceOfVariant: null;
8
+ quantity: number;
9
+ handleDismiss(): void;
10
+ handleDontShowAgain(ev: any): void;
11
+ handleConfirm(): void;
12
+ dontShowAgain: boolean;
13
+ render(): import("lit").TemplateResult<1>;
14
+ }
15
+ export default ShipAidCartConfirmation;