@gem-sdk/adapter-common 1.0.0 → 1.11.1-staging-ecd90c73

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,110 +1,110 @@
1
- export interface Address {
2
- id: string;
3
- mask: string;
4
- }
5
- export interface AddressFields {
6
- type: string;
7
- firstName: string;
8
- lastName: string;
9
- company: string;
10
- streetNumber: string;
11
- apartments: string;
12
- zipCode: string;
13
- city: string;
14
- country: string;
15
- }
16
- export type CustomerAddressTypes = {
17
- address?: Address;
18
- fields: AddressFields;
19
- };
20
- export type GetAddressesHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
21
- data: T['address'][] | null;
22
- input: {};
23
- fetcherInput: {
24
- cartId?: string;
25
- };
26
- swrState: {
27
- isEmpty: boolean;
28
- };
29
- };
30
- export type AddItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
31
- data: T['address'];
32
- input?: T['fields'];
33
- fetcherInput: T['fields'];
34
- body: {
35
- item: T['fields'];
36
- };
37
- actionInput: T['fields'];
38
- };
39
- export type UpdateItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
40
- data: T['address'] | null;
41
- input: {
42
- item?: T['fields'];
43
- wait?: number;
44
- };
45
- fetcherInput: {
46
- itemId: string;
47
- item: T['fields'];
48
- };
49
- body: {
50
- itemId: string;
51
- item: T['fields'];
52
- };
53
- actionInput: T['fields'] & {
54
- id: string;
55
- };
56
- };
57
- export type RemoveItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
58
- data: T['address'] | null;
59
- input: {
60
- item?: T['address'];
61
- };
62
- fetcherInput: {
63
- itemId: string;
64
- };
65
- body: {
66
- itemId: string;
67
- };
68
- actionInput: {
69
- id: string;
70
- };
71
- };
72
- export type CustomerAddressHooks<T extends CustomerAddressTypes = CustomerAddressTypes> = {
73
- getAddresses: GetAddressesHook<T>;
74
- addItem: AddItemHook<T>;
75
- updateItem: UpdateItemHook<T>;
76
- removeItem: RemoveItemHook<T>;
77
- };
78
- export type AddressHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = GetAddressesHook<T> & {
79
- body: {
80
- cartId?: string;
81
- };
82
- };
83
- export type AddItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = AddItemHook<T> & {
84
- body: {
85
- cartId: string;
86
- };
87
- };
88
- export type UpdateItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = UpdateItemHook<T> & {
89
- data: T['address'];
90
- body: {
91
- cartId: string;
92
- };
93
- };
94
- export type RemoveItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = RemoveItemHook<T> & {
95
- body: {
96
- cartId: string;
97
- };
98
- };
99
- export type CustomerAddressHandlers<T extends CustomerAddressTypes = CustomerAddressTypes> = {
100
- getAddresses: GetAddressesHook<T>;
101
- addItem: AddItemHandler<T>;
102
- updateItem: UpdateItemHandler<T>;
103
- removeItem: RemoveItemHandler<T>;
104
- };
105
- export type CustomerAddressSchema<T extends CustomerAddressTypes = CustomerAddressTypes> = {
106
- endpoint: {
107
- options: {};
108
- handlers: CustomerAddressHandlers<T>;
109
- };
110
- };
1
+ export interface Address {
2
+ id: string;
3
+ mask: string;
4
+ }
5
+ export interface AddressFields {
6
+ type: string;
7
+ firstName: string;
8
+ lastName: string;
9
+ company: string;
10
+ streetNumber: string;
11
+ apartments: string;
12
+ zipCode: string;
13
+ city: string;
14
+ country: string;
15
+ }
16
+ export type CustomerAddressTypes = {
17
+ address?: Address;
18
+ fields: AddressFields;
19
+ };
20
+ export type GetAddressesHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
21
+ data: T['address'][] | null;
22
+ input: {};
23
+ fetcherInput: {
24
+ cartId?: string;
25
+ };
26
+ swrState: {
27
+ isEmpty: boolean;
28
+ };
29
+ };
30
+ export type AddItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
31
+ data: T['address'];
32
+ input?: T['fields'];
33
+ fetcherInput: T['fields'];
34
+ body: {
35
+ item: T['fields'];
36
+ };
37
+ actionInput: T['fields'];
38
+ };
39
+ export type UpdateItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
40
+ data: T['address'] | null;
41
+ input: {
42
+ item?: T['fields'];
43
+ wait?: number;
44
+ };
45
+ fetcherInput: {
46
+ itemId: string;
47
+ item: T['fields'];
48
+ };
49
+ body: {
50
+ itemId: string;
51
+ item: T['fields'];
52
+ };
53
+ actionInput: T['fields'] & {
54
+ id: string;
55
+ };
56
+ };
57
+ export type RemoveItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
58
+ data: T['address'] | null;
59
+ input: {
60
+ item?: T['address'];
61
+ };
62
+ fetcherInput: {
63
+ itemId: string;
64
+ };
65
+ body: {
66
+ itemId: string;
67
+ };
68
+ actionInput: {
69
+ id: string;
70
+ };
71
+ };
72
+ export type CustomerAddressHooks<T extends CustomerAddressTypes = CustomerAddressTypes> = {
73
+ getAddresses: GetAddressesHook<T>;
74
+ addItem: AddItemHook<T>;
75
+ updateItem: UpdateItemHook<T>;
76
+ removeItem: RemoveItemHook<T>;
77
+ };
78
+ export type AddressHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = GetAddressesHook<T> & {
79
+ body: {
80
+ cartId?: string;
81
+ };
82
+ };
83
+ export type AddItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = AddItemHook<T> & {
84
+ body: {
85
+ cartId: string;
86
+ };
87
+ };
88
+ export type UpdateItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = UpdateItemHook<T> & {
89
+ data: T['address'];
90
+ body: {
91
+ cartId: string;
92
+ };
93
+ };
94
+ export type RemoveItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = RemoveItemHook<T> & {
95
+ body: {
96
+ cartId: string;
97
+ };
98
+ };
99
+ export type CustomerAddressHandlers<T extends CustomerAddressTypes = CustomerAddressTypes> = {
100
+ getAddresses: GetAddressesHook<T>;
101
+ addItem: AddItemHandler<T>;
102
+ updateItem: UpdateItemHandler<T>;
103
+ removeItem: RemoveItemHandler<T>;
104
+ };
105
+ export type CustomerAddressSchema<T extends CustomerAddressTypes = CustomerAddressTypes> = {
106
+ endpoint: {
107
+ options: {};
108
+ handlers: CustomerAddressHandlers<T>;
109
+ };
110
+ };
@@ -1,113 +1,113 @@
1
- export interface Card {
2
- id: string;
3
- mask: string;
4
- provider: string;
5
- }
6
- export interface CardFields {
7
- cardHolder: string;
8
- cardNumber: string;
9
- cardExpireDate: string;
10
- cardCvc: string;
11
- firstName: string;
12
- lastName: string;
13
- company: string;
14
- streetNumber: string;
15
- zipCode: string;
16
- city: string;
17
- country: string;
18
- }
19
- export type CustomerCardTypes = {
20
- card?: Card;
21
- fields: CardFields;
22
- };
23
- export type GetCardsHook<T extends CustomerCardTypes = CustomerCardTypes> = {
24
- data: T['card'][] | null;
25
- input: {};
26
- fetcherInput: {
27
- cartId?: string;
28
- };
29
- swrState: {
30
- isEmpty: boolean;
31
- };
32
- };
33
- export type AddItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
34
- data: T['card'];
35
- input?: T['fields'];
36
- fetcherInput: T['fields'];
37
- body: {
38
- item: T['fields'];
39
- };
40
- actionInput: T['fields'];
41
- };
42
- export type UpdateItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
43
- data: T['card'] | null;
44
- input: {
45
- item?: T['fields'];
46
- wait?: number;
47
- };
48
- fetcherInput: {
49
- itemId: string;
50
- item: T['fields'];
51
- };
52
- body: {
53
- itemId: string;
54
- item: T['fields'];
55
- };
56
- actionInput: T['fields'] & {
57
- id: string;
58
- };
59
- };
60
- export type RemoveItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
61
- data: T['card'] | null;
62
- input: {
63
- item?: T['card'];
64
- };
65
- fetcherInput: {
66
- itemId: string;
67
- };
68
- body: {
69
- itemId: string;
70
- };
71
- actionInput: {
72
- id: string;
73
- };
74
- };
75
- export type CustomerCardHooks<T extends CustomerCardTypes = CustomerCardTypes> = {
76
- getCards: GetCardsHook<T>;
77
- addItem: AddItemHook<T>;
78
- updateItem: UpdateItemHook<T>;
79
- removeItem: RemoveItemHook<T>;
80
- };
81
- export type CardsHandler<T extends CustomerCardTypes = CustomerCardTypes> = GetCardsHook<T> & {
82
- body: {
83
- cartId?: string;
84
- };
85
- };
86
- export type AddItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = AddItemHook<T> & {
87
- body: {
88
- cartId: string;
89
- };
90
- };
91
- export type UpdateItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = UpdateItemHook<T> & {
92
- data: T['card'];
93
- body: {
94
- cartId: string;
95
- };
96
- };
97
- export type RemoveItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = RemoveItemHook<T> & {
98
- body: {
99
- cartId: string;
100
- };
101
- };
102
- export type CustomerCardHandlers<T extends CustomerCardTypes = CustomerCardTypes> = {
103
- getCards: GetCardsHook<T>;
104
- addItem: AddItemHandler<T>;
105
- updateItem: UpdateItemHandler<T>;
106
- removeItem: RemoveItemHandler<T>;
107
- };
108
- export type CustomerCardSchema<T extends CustomerCardTypes = CustomerCardTypes> = {
109
- endpoint: {
110
- options: {};
111
- handlers: CustomerCardHandlers<T>;
112
- };
113
- };
1
+ export interface Card {
2
+ id: string;
3
+ mask: string;
4
+ provider: string;
5
+ }
6
+ export interface CardFields {
7
+ cardHolder: string;
8
+ cardNumber: string;
9
+ cardExpireDate: string;
10
+ cardCvc: string;
11
+ firstName: string;
12
+ lastName: string;
13
+ company: string;
14
+ streetNumber: string;
15
+ zipCode: string;
16
+ city: string;
17
+ country: string;
18
+ }
19
+ export type CustomerCardTypes = {
20
+ card?: Card;
21
+ fields: CardFields;
22
+ };
23
+ export type GetCardsHook<T extends CustomerCardTypes = CustomerCardTypes> = {
24
+ data: T['card'][] | null;
25
+ input: {};
26
+ fetcherInput: {
27
+ cartId?: string;
28
+ };
29
+ swrState: {
30
+ isEmpty: boolean;
31
+ };
32
+ };
33
+ export type AddItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
34
+ data: T['card'];
35
+ input?: T['fields'];
36
+ fetcherInput: T['fields'];
37
+ body: {
38
+ item: T['fields'];
39
+ };
40
+ actionInput: T['fields'];
41
+ };
42
+ export type UpdateItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
43
+ data: T['card'] | null;
44
+ input: {
45
+ item?: T['fields'];
46
+ wait?: number;
47
+ };
48
+ fetcherInput: {
49
+ itemId: string;
50
+ item: T['fields'];
51
+ };
52
+ body: {
53
+ itemId: string;
54
+ item: T['fields'];
55
+ };
56
+ actionInput: T['fields'] & {
57
+ id: string;
58
+ };
59
+ };
60
+ export type RemoveItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
61
+ data: T['card'] | null;
62
+ input: {
63
+ item?: T['card'];
64
+ };
65
+ fetcherInput: {
66
+ itemId: string;
67
+ };
68
+ body: {
69
+ itemId: string;
70
+ };
71
+ actionInput: {
72
+ id: string;
73
+ };
74
+ };
75
+ export type CustomerCardHooks<T extends CustomerCardTypes = CustomerCardTypes> = {
76
+ getCards: GetCardsHook<T>;
77
+ addItem: AddItemHook<T>;
78
+ updateItem: UpdateItemHook<T>;
79
+ removeItem: RemoveItemHook<T>;
80
+ };
81
+ export type CardsHandler<T extends CustomerCardTypes = CustomerCardTypes> = GetCardsHook<T> & {
82
+ body: {
83
+ cartId?: string;
84
+ };
85
+ };
86
+ export type AddItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = AddItemHook<T> & {
87
+ body: {
88
+ cartId: string;
89
+ };
90
+ };
91
+ export type UpdateItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = UpdateItemHook<T> & {
92
+ data: T['card'];
93
+ body: {
94
+ cartId: string;
95
+ };
96
+ };
97
+ export type RemoveItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = RemoveItemHook<T> & {
98
+ body: {
99
+ cartId: string;
100
+ };
101
+ };
102
+ export type CustomerCardHandlers<T extends CustomerCardTypes = CustomerCardTypes> = {
103
+ getCards: GetCardsHook<T>;
104
+ addItem: AddItemHandler<T>;
105
+ updateItem: UpdateItemHandler<T>;
106
+ removeItem: RemoveItemHandler<T>;
107
+ };
108
+ export type CustomerCardSchema<T extends CustomerCardTypes = CustomerCardTypes> = {
109
+ endpoint: {
110
+ options: {};
111
+ handlers: CustomerCardHandlers<T>;
112
+ };
113
+ };
@@ -1,24 +1,24 @@
1
- export * as Card from './card';
2
- export * as Address from './address';
3
- export type Customer = any;
4
- export type CustomerTypes = {
5
- customer: Customer;
6
- };
7
- export type CustomerHook<T extends CustomerTypes = CustomerTypes> = {
8
- data: T['customer'] | null;
9
- fetchData: {
10
- customer: T['customer'];
11
- } | null;
12
- };
13
- export type CustomerSchema<T extends CustomerTypes = CustomerTypes> = {
14
- endpoint: {
15
- options: {};
16
- handlers: {
17
- getLoggedInCustomer: {
18
- data: {
19
- customer: T['customer'];
20
- } | null;
21
- };
22
- };
23
- };
24
- };
1
+ export * as Card from './card';
2
+ export * as Address from './address';
3
+ export type Customer = any;
4
+ export type CustomerTypes = {
5
+ customer: Customer;
6
+ };
7
+ export type CustomerHook<T extends CustomerTypes = CustomerTypes> = {
8
+ data: T['customer'] | null;
9
+ fetchData: {
10
+ customer: T['customer'];
11
+ } | null;
12
+ };
13
+ export type CustomerSchema<T extends CustomerTypes = CustomerTypes> = {
14
+ endpoint: {
15
+ options: {};
16
+ handlers: {
17
+ getLoggedInCustomer: {
18
+ data: {
19
+ customer: T['customer'];
20
+ } | null;
21
+ };
22
+ };
23
+ };
24
+ };
@@ -1,32 +1,32 @@
1
- export type TypographyProps = {
2
- fontSize?: string;
3
- fontWeight?: string | number;
4
- fontStyle?: string;
5
- fontFamily?: string;
6
- lineHeight?: string;
7
- letterSpacing?: string;
8
- };
9
- type ColorType = 'brand' | 'text' | 'background' | 'line';
10
- type FuncColorObject = {
11
- info: string;
12
- warn: string;
13
- success: string;
14
- danger: string;
15
- };
16
- type TypographyType = 'heading-1' | 'heading-2' | 'heading-3' | 'subheading-1' | 'subheading-2' | 'subheading-3' | 'paragraph-1' | 'paragraph-2' | 'paragraph-3';
17
- type ObjectDeviceType<T> = {
18
- desktop: T;
19
- tablet?: T;
20
- mobile?: T;
21
- };
22
- type SpacingType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
23
- type RoundedSize = 'small' | 'medium' | 'large';
24
- export type GlobalStyleConfig = {
25
- color: Record<ColorType, Record<string, string>> & {
26
- func: FuncColorObject;
27
- };
28
- typography: Record<TypographyType, ObjectDeviceType<TypographyProps>>;
29
- spacing: Record<SpacingType, ObjectDeviceType<string>>;
30
- radius: Record<RoundedSize, string>;
31
- };
32
- export {};
1
+ export type TypographyProps = {
2
+ fontSize?: string;
3
+ fontWeight?: string | number;
4
+ fontStyle?: string;
5
+ fontFamily?: string;
6
+ lineHeight?: string;
7
+ letterSpacing?: string;
8
+ };
9
+ type ColorType = 'brand' | 'text' | 'background' | 'line';
10
+ type FuncColorObject = {
11
+ info: string;
12
+ warn: string;
13
+ success: string;
14
+ danger: string;
15
+ };
16
+ type TypographyType = 'heading-1' | 'heading-2' | 'heading-3' | 'subheading-1' | 'subheading-2' | 'subheading-3' | 'paragraph-1' | 'paragraph-2' | 'paragraph-3';
17
+ type ObjectDeviceType<T> = {
18
+ desktop: T;
19
+ tablet?: T;
20
+ mobile?: T;
21
+ };
22
+ type SpacingType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
23
+ type RoundedSize = 'small' | 'medium' | 'large';
24
+ export type GlobalStyleConfig = {
25
+ color: Record<ColorType, Record<string, string>> & {
26
+ func: FuncColorObject;
27
+ };
28
+ typography: Record<TypographyType, ObjectDeviceType<TypographyProps>>;
29
+ spacing: Record<SpacingType, ObjectDeviceType<string>>;
30
+ radius: Record<RoundedSize, string>;
31
+ };
32
+ export {};
@@ -1,13 +1,13 @@
1
- import type * as Cart from './cart';
2
- import type * as Checkout from './checkout';
3
- import type * as Common from './common';
4
- import type * as Customer from './customer';
5
- import type * as Login from './login';
6
- import type * as Logout from './logout';
7
- import type * as Page from './page';
8
- import type * as Product from './product';
9
- import type * as Signup from './signup';
10
- import type * as Site from './site';
11
- import type * as Wishlist from './wishlist';
12
- import type { GlobalStyleConfig, TypographyProps } from './global-style';
13
- export type { Cart, Checkout, Common, Customer, Login, Logout, Page, Product, Signup, Site, Wishlist, GlobalStyleConfig, TypographyProps, };
1
+ import type * as Cart from './cart';
2
+ import type * as Checkout from './checkout';
3
+ import type * as Common from './common';
4
+ import type * as Customer from './customer';
5
+ import type * as Login from './login';
6
+ import type * as Logout from './logout';
7
+ import type * as Page from './page';
8
+ import type * as Product from './product';
9
+ import type * as Signup from './signup';
10
+ import type * as Site from './site';
11
+ import type * as Wishlist from './wishlist';
12
+ import type { GlobalStyleConfig, TypographyProps } from './global-style';
13
+ export type { Cart, Checkout, Common, Customer, Login, Logout, Page, Product, Signup, Site, Wishlist, GlobalStyleConfig, TypographyProps, };
@@ -1,27 +1,27 @@
1
- export type LoginBody = {
2
- email: string;
3
- password: string;
4
- };
5
- export type LoginTypes = {
6
- body: LoginBody;
7
- };
8
- export type LoginHook<T extends LoginTypes = LoginTypes> = {
9
- data: null;
10
- actionInput: LoginBody;
11
- fetcherInput: LoginBody;
12
- body: T['body'];
13
- };
14
- export type LoginSchema<T extends LoginTypes = LoginTypes> = {
15
- endpoint: {
16
- options: {};
17
- handlers: {
18
- login: LoginHook<T>;
19
- };
20
- };
21
- };
22
- export type LoginOperation = {
23
- data: {
24
- result?: string;
25
- };
26
- variables: unknown;
27
- };
1
+ export type LoginBody = {
2
+ email: string;
3
+ password: string;
4
+ };
5
+ export type LoginTypes = {
6
+ body: LoginBody;
7
+ };
8
+ export type LoginHook<T extends LoginTypes = LoginTypes> = {
9
+ data: null;
10
+ actionInput: LoginBody;
11
+ fetcherInput: LoginBody;
12
+ body: T['body'];
13
+ };
14
+ export type LoginSchema<T extends LoginTypes = LoginTypes> = {
15
+ endpoint: {
16
+ options: {};
17
+ handlers: {
18
+ login: LoginHook<T>;
19
+ };
20
+ };
21
+ };
22
+ export type LoginOperation = {
23
+ data: {
24
+ result?: string;
25
+ };
26
+ variables: unknown;
27
+ };