@tap-payments/apple-pay-button 0.0.82-development → 0.0.83-development

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.
Files changed (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +240 -240
  3. package/build/@types/ApplePayButtonProps.d.ts +129 -129
  4. package/build/@types/ApplePayButtonProps.js +1 -1
  5. package/build/@types/charge.d.ts +57 -57
  6. package/build/@types/charge.js +1 -1
  7. package/build/@types/checkoutProfile.d.ts +216 -195
  8. package/build/@types/checkoutProfile.js +1 -1
  9. package/build/@types/enums.d.ts +65 -65
  10. package/build/@types/enums.js +76 -76
  11. package/build/@types/index.d.ts +6 -6
  12. package/build/@types/index.js +6 -6
  13. package/build/@types/tapLocalisation.d.ts +193 -193
  14. package/build/@types/tapLocalisation.js +1 -1
  15. package/build/@types/tapTheme.d.ts +842 -842
  16. package/build/@types/tapTheme.js +1 -1
  17. package/build/api.d.ts +29 -29
  18. package/build/api.js +244 -244
  19. package/build/constants/index.d.ts +3 -3
  20. package/build/constants/index.js +3 -3
  21. package/build/features/ApplePayButton/ApplePayButton.d.ts +4 -4
  22. package/build/features/ApplePayButton/ApplePayButton.js +49 -49
  23. package/build/features/ApplePayButton/index.d.ts +3 -3
  24. package/build/features/ApplePayButton/index.js +2 -2
  25. package/build/hooks/index.d.ts +1 -1
  26. package/build/hooks/index.js +1 -1
  27. package/build/hooks/useApplePay.d.ts +93 -93
  28. package/build/hooks/useApplePay.js +447 -447
  29. package/build/hooks/useMerchantApplePay.d.ts +20 -20
  30. package/build/hooks/useMerchantApplePay.js +176 -176
  31. package/build/index.d.ts +4 -4
  32. package/build/index.js +13 -13
  33. package/build/utils/config.d.ts +14 -14
  34. package/build/utils/config.js +65 -65
  35. package/build/utils/defaultValues.d.ts +2 -2
  36. package/build/utils/defaultValues.js +27 -27
  37. package/build/utils/html.d.ts +1 -1
  38. package/build/utils/html.js +9 -9
  39. package/build/utils/index.d.ts +4 -4
  40. package/build/utils/index.js +4 -4
  41. package/build/utils/theme.d.ts +12 -12
  42. package/build/utils/theme.js +61 -61
  43. package/package.json +109 -109
@@ -1,129 +1,129 @@
1
- import { CheckoutProfileResponse } from './checkoutProfile';
2
- import { Locale, ThemeMode, Edges, Scope, MerchantCapabilities, SupportedNetworks, ButtonType, ColorStyle } from './enums';
3
- export interface ApplePayRequestData {
4
- countryCode: string;
5
- currencyCode: string;
6
- merchantCapabilities: Array<MerchantCapabilities>;
7
- supportedNetworks: Array<SupportedNetworks>;
8
- billingContact?: {
9
- phoneNumber?: string;
10
- emailAddress?: string;
11
- givenName: string;
12
- familyName: string;
13
- };
14
- total: {
15
- label: string;
16
- amount: number;
17
- };
18
- }
19
- export interface ApplePayDataToLunchSDKFromMerchantSide {
20
- headers: Record<string, any>;
21
- BASE_URL: string;
22
- merchant: Record<string, string>;
23
- applePayRequestData: ApplePayRequestData;
24
- debug?: boolean;
25
- applePaySDKVersion?: number;
26
- }
27
- export interface Interface {
28
- locale?: Locale;
29
- theme?: ThemeMode;
30
- edges?: Edges;
31
- type?: ButtonType;
32
- colorStyle?: ColorStyle;
33
- loader?: boolean;
34
- }
35
- export interface Customer {
36
- id?: string;
37
- name?: {
38
- lang: Locale;
39
- first: string;
40
- last: string;
41
- middle?: string;
42
- }[];
43
- contact?: {
44
- email?: string;
45
- phone?: {
46
- countryCode: string;
47
- number: string;
48
- };
49
- };
50
- }
51
- export interface Acceptance {
52
- supportedSchemes?: Array<SupportedNetworks>;
53
- supportedFundSource?: string[];
54
- supportedPaymentAuthentications?: string[];
55
- }
56
- export interface ApplePayButtonProps {
57
- operator: {
58
- publicKey: string;
59
- hashstring?: string;
60
- };
61
- merchant: {
62
- id: string;
63
- identifier?: string;
64
- };
65
- scope: Scope;
66
- interface?: Interface;
67
- customer?: Customer;
68
- acceptance?: Acceptance;
69
- transaction?: {
70
- authentication?: boolean;
71
- authorize?: {
72
- auto: {
73
- type: string;
74
- time: number;
75
- };
76
- };
77
- metadata?: Record<string, string>;
78
- reference?: string;
79
- paymentAgreement?: {
80
- id: string;
81
- contract?: {
82
- id: string;
83
- };
84
- };
85
- destinations?: Record<string, any>;
86
- };
87
- invoice?: {
88
- id: string;
89
- };
90
- order: {
91
- amount: number;
92
- currency: string;
93
- id?: string;
94
- description?: string;
95
- metadata?: Record<string, string>;
96
- reference?: string;
97
- };
98
- post?: {
99
- url: string;
100
- };
101
- redirect?: {
102
- url: string;
103
- };
104
- onOrderCreated?: (orderId: string) => void;
105
- onCancel?: () => void;
106
- onError?: (error: any) => void;
107
- onSuccess?: (data: Record<string, any>) => Promise<void>;
108
- onClick?: (data?: ApplePayDataToLunchSDKFromMerchantSide) => void;
109
- onReady?: () => void;
110
- metaData?: MetaData;
111
- debug?: boolean;
112
- integration?: 'sdk' | 'iframe';
113
- headers?: {
114
- mdn: string;
115
- application: string;
116
- };
117
- }
118
- export interface MerchantResponse {
119
- id: string;
120
- name: string;
121
- country_code: string;
122
- session_token: string;
123
- [other: string]: string;
124
- }
125
- export interface MetaData {
126
- merchant: MerchantResponse;
127
- payment_options: CheckoutProfileResponse['payment_options'];
128
- headers: Record<string, string>;
129
- }
1
+ import { CheckoutProfileResponse } from './checkoutProfile';
2
+ import { Locale, ThemeMode, Edges, Scope, MerchantCapabilities, SupportedNetworks, ButtonType, ColorStyle } from './enums';
3
+ export interface ApplePayRequestData {
4
+ countryCode: string;
5
+ currencyCode: string;
6
+ merchantCapabilities: Array<MerchantCapabilities>;
7
+ supportedNetworks: Array<SupportedNetworks>;
8
+ billingContact?: {
9
+ phoneNumber?: string;
10
+ emailAddress?: string;
11
+ givenName: string;
12
+ familyName: string;
13
+ };
14
+ total: {
15
+ label: string;
16
+ amount: number;
17
+ };
18
+ }
19
+ export interface ApplePayDataToLunchSDKFromMerchantSide {
20
+ headers: Record<string, any>;
21
+ BASE_URL: string;
22
+ merchant: Record<string, string>;
23
+ applePayRequestData: ApplePayRequestData;
24
+ debug?: boolean;
25
+ applePaySDKVersion?: number;
26
+ }
27
+ export interface Interface {
28
+ locale?: Locale;
29
+ theme?: ThemeMode;
30
+ edges?: Edges;
31
+ type?: ButtonType;
32
+ colorStyle?: ColorStyle;
33
+ loader?: boolean;
34
+ }
35
+ export interface Customer {
36
+ id?: string;
37
+ name?: {
38
+ lang: Locale;
39
+ first: string;
40
+ last: string;
41
+ middle?: string;
42
+ }[];
43
+ contact?: {
44
+ email?: string;
45
+ phone?: {
46
+ countryCode: string;
47
+ number: string;
48
+ };
49
+ };
50
+ }
51
+ export interface Acceptance {
52
+ supportedSchemes?: Array<SupportedNetworks>;
53
+ supportedFundSource?: string[];
54
+ supportedPaymentAuthentications?: string[];
55
+ }
56
+ export interface ApplePayButtonProps {
57
+ operator: {
58
+ publicKey: string;
59
+ hashstring?: string;
60
+ };
61
+ merchant: {
62
+ id: string;
63
+ identifier?: string;
64
+ };
65
+ scope: Scope;
66
+ interface?: Interface;
67
+ customer?: Customer;
68
+ acceptance?: Acceptance;
69
+ transaction?: {
70
+ authentication?: boolean;
71
+ authorize?: {
72
+ auto: {
73
+ type: string;
74
+ time: number;
75
+ };
76
+ };
77
+ metadata?: Record<string, string>;
78
+ reference?: string;
79
+ paymentAgreement?: {
80
+ id: string;
81
+ contract?: {
82
+ id: string;
83
+ };
84
+ };
85
+ destinations?: Record<string, any>;
86
+ };
87
+ invoice?: {
88
+ id: string;
89
+ };
90
+ order: {
91
+ amount: number;
92
+ currency: string;
93
+ id?: string;
94
+ description?: string;
95
+ metadata?: Record<string, string>;
96
+ reference?: string;
97
+ };
98
+ post?: {
99
+ url: string;
100
+ };
101
+ redirect?: {
102
+ url: string;
103
+ };
104
+ onOrderCreated?: (orderId: string) => void;
105
+ onCancel?: () => void;
106
+ onError?: (error: any) => void;
107
+ onSuccess?: (data: Record<string, any>) => Promise<void>;
108
+ onClick?: (data?: ApplePayDataToLunchSDKFromMerchantSide) => void;
109
+ onReady?: () => void;
110
+ metaData?: MetaData;
111
+ debug?: boolean;
112
+ integration?: 'sdk' | 'iframe';
113
+ headers?: {
114
+ mdn: string;
115
+ application: string;
116
+ };
117
+ }
118
+ export interface MerchantResponse {
119
+ id: string;
120
+ name: string;
121
+ country_code: string;
122
+ session_token: string;
123
+ [other: string]: string;
124
+ }
125
+ export interface MetaData {
126
+ merchant: MerchantResponse;
127
+ payment_options: CheckoutProfileResponse['payment_options'];
128
+ headers: Record<string, string>;
129
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,57 +1,57 @@
1
- export interface ChargeRequestBody {
2
- source: {
3
- id: string;
4
- };
5
- ipaddress?: string;
6
- amount: number;
7
- currency: string;
8
- selected_amount?: number;
9
- selected_currency?: string;
10
- product: string;
11
- threeDSecure?: boolean;
12
- save_card: boolean;
13
- fee: number;
14
- customer: {
15
- id?: string;
16
- first_name?: string;
17
- middle_name?: string;
18
- last_name?: string;
19
- email?: string;
20
- phone?: {
21
- country_code: string;
22
- number: string;
23
- };
24
- };
25
- hashstring?: string;
26
- metadata?: Record<string, string>;
27
- post?: {
28
- url: string;
29
- };
30
- redirect?: {
31
- url: string;
32
- };
33
- merchant?: {
34
- id: string;
35
- };
36
- order?: {
37
- id: string;
38
- };
39
- payment_agreement?: {
40
- id: string;
41
- contract?: {
42
- id: string;
43
- };
44
- };
45
- destinations?: Record<string, any>;
46
- reference?: {
47
- order?: string;
48
- transaction?: string;
49
- };
50
- description?: string;
51
- }
52
- export interface AuthorizeRequestBody extends ChargeRequestBody {
53
- auto?: {
54
- type: string;
55
- time: number;
56
- };
57
- }
1
+ export interface ChargeRequestBody {
2
+ source: {
3
+ id: string;
4
+ };
5
+ ipaddress?: string;
6
+ amount: number;
7
+ currency: string;
8
+ selected_amount?: number;
9
+ selected_currency?: string;
10
+ product: string;
11
+ threeDSecure?: boolean;
12
+ save_card: boolean;
13
+ fee: number;
14
+ customer: {
15
+ id?: string;
16
+ first_name?: string;
17
+ middle_name?: string;
18
+ last_name?: string;
19
+ email?: string;
20
+ phone?: {
21
+ country_code: string;
22
+ number: string;
23
+ };
24
+ };
25
+ hashstring?: string;
26
+ metadata?: Record<string, string>;
27
+ post?: {
28
+ url: string;
29
+ };
30
+ redirect?: {
31
+ url: string;
32
+ };
33
+ merchant?: {
34
+ id: string;
35
+ };
36
+ order?: {
37
+ id: string;
38
+ };
39
+ payment_agreement?: {
40
+ id: string;
41
+ contract?: {
42
+ id: string;
43
+ };
44
+ };
45
+ destinations?: Record<string, any>;
46
+ reference?: {
47
+ order?: string;
48
+ transaction?: string;
49
+ };
50
+ description?: string;
51
+ }
52
+ export interface AuthorizeRequestBody extends ChargeRequestBody {
53
+ auto?: {
54
+ type: string;
55
+ time: number;
56
+ };
57
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};