@evenicanpm/storefront-graphql-codegen 1.1.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.
Files changed (138) hide show
  1. package/README.md +9 -0
  2. package/codegen.ts +26 -0
  3. package/documents/Account/index.ts +1 -0
  4. package/documents/Account/interfaces.ts +124 -0
  5. package/documents/Account/read.ts +22 -0
  6. package/documents/Account/readList.ts +28 -0
  7. package/documents/Account/update.ts +12 -0
  8. package/documents/Address/addressType.ts +12 -0
  9. package/documents/Address/countries.ts +27 -0
  10. package/documents/Address/create.ts +12 -0
  11. package/documents/Address/delete.ts +7 -0
  12. package/documents/Address/fragments.ts +56 -0
  13. package/documents/Address/index.ts +2 -0
  14. package/documents/Address/interfaces.ts +41 -0
  15. package/documents/Address/update.ts +12 -0
  16. package/documents/Cart/add.ts +64 -0
  17. package/documents/Cart/checkoutRead.ts +88 -0
  18. package/documents/Cart/checkoutSubmit.ts +18 -0
  19. package/documents/Cart/createCartAddress.ts +12 -0
  20. package/documents/Cart/deleteLine.ts +64 -0
  21. package/documents/Cart/fragments.ts +204 -0
  22. package/documents/Cart/interfaces.ts +56 -0
  23. package/documents/Cart/read.ts +44 -0
  24. package/documents/Cart/setOrderEmail.ts +9 -0
  25. package/documents/Cart/shippingMethodRead.ts +44 -0
  26. package/documents/Cart/shippingMethodUpdate.ts +64 -0
  27. package/documents/Cart/submit.ts +18 -0
  28. package/documents/Cart/updateCartAddress.ts +9 -0
  29. package/documents/Cart/updateLine.ts +64 -0
  30. package/documents/Catalog/create.ts +15 -0
  31. package/documents/Catalog/delete.ts +9 -0
  32. package/documents/Catalog/deleteProducts.ts +10 -0
  33. package/documents/Catalog/fragments.ts +80 -0
  34. package/documents/Catalog/interfaces.ts +34 -0
  35. package/documents/Catalog/linkMedia/create.ts +20 -0
  36. package/documents/Catalog/linkMedia/delete.ts +9 -0
  37. package/documents/Catalog/linkMedia/update.ts +11 -0
  38. package/documents/Catalog/linkProduct.ts +12 -0
  39. package/documents/Catalog/list.ts +23 -0
  40. package/documents/Catalog/read.ts +56 -0
  41. package/documents/Catalog/removeProduct.ts +11 -0
  42. package/documents/Catalog/save.ts +17 -0
  43. package/documents/Catalog/statusList.ts +12 -0
  44. package/documents/Catalog/update.ts +15 -0
  45. package/documents/Category/fragments.ts +54 -0
  46. package/documents/Category/interfaces.ts +18 -0
  47. package/documents/Category/list.ts +55 -0
  48. package/documents/MediaLibrary/File/create.ts +44 -0
  49. package/documents/MediaLibrary/File/delete.ts +12 -0
  50. package/documents/MediaLibrary/File/read.ts +36 -0
  51. package/documents/MediaLibrary/File/update.ts +43 -0
  52. package/documents/MediaLibrary/Folder/create.ts +24 -0
  53. package/documents/MediaLibrary/Folder/delete.ts +11 -0
  54. package/documents/MediaLibrary/Folder/read.ts +101 -0
  55. package/documents/MediaLibrary/Folder/update.ts +10 -0
  56. package/documents/MediaLibrary/move.ts +44 -0
  57. package/documents/MediaLibrary/search.ts +84 -0
  58. package/documents/Order/fragments.ts +116 -0
  59. package/documents/Order/index.ts +2 -0
  60. package/documents/Order/interfaces.ts +30 -0
  61. package/documents/Order/list.ts +129 -0
  62. package/documents/Order/read.ts +44 -0
  63. package/documents/Product/facets.ts +34 -0
  64. package/documents/Product/fragments.ts +167 -0
  65. package/documents/Product/getAll.ts +77 -0
  66. package/documents/Product/interfaces.ts +45 -0
  67. package/documents/Product/list.ts +248 -0
  68. package/documents/Product/read.ts +70 -0
  69. package/documents/Product/search.ts +170 -0
  70. package/documents/Review/create.ts +22 -0
  71. package/documents/ServerCache/productIndex.ts +11 -0
  72. package/documents/Session/Customer/init.ts +12 -0
  73. package/documents/Session/Customer/logout.ts +11 -0
  74. package/documents/Session/Customer/read.ts +15 -0
  75. package/documents/Session/fragments.ts +69 -0
  76. package/documents/Session/index.ts +8 -0
  77. package/documents/Session/interfaces.ts +11 -0
  78. package/documents/Session/login.ts +36 -0
  79. package/documents/Session/logout.ts +11 -0
  80. package/documents/Session/read.ts +43 -0
  81. package/documents/Settings/ClearCache/clearcache.ts +10 -0
  82. package/documents/Settings/SystemInformation/index.ts +1 -0
  83. package/documents/Settings/SystemInformation/interfaces.ts +16 -0
  84. package/documents/Settings/SystemInformation/system-information.ts +20 -0
  85. package/documents/Settings/aliases.ts +96 -0
  86. package/documents/Settings/claims.ts +124 -0
  87. package/documents/Settings/contacts.ts +133 -0
  88. package/documents/Settings/index.ts +12 -0
  89. package/documents/Settings/indexes.ts +73 -0
  90. package/documents/Settings/roles.ts +93 -0
  91. package/documents/Settings/settingsGroup.ts +266 -0
  92. package/documents/Settings/users.ts +19 -0
  93. package/documents/Settings/words.ts +115 -0
  94. package/documents/Theme/create.ts +46 -0
  95. package/documents/Theme/delete.ts +9 -0
  96. package/documents/Theme/interfaces.ts +63 -0
  97. package/documents/Theme/read.ts +83 -0
  98. package/documents/User/changePassword.ts +11 -0
  99. package/documents/User/counts.ts +8 -0
  100. package/documents/User/fragments.ts +61 -0
  101. package/documents/User/index.ts +2 -0
  102. package/documents/User/interfaces.ts +29 -0
  103. package/documents/User/read.ts +44 -0
  104. package/documents/User/register.ts +11 -0
  105. package/documents/User/resetPassword.ts +11 -0
  106. package/documents/User/update.ts +44 -0
  107. package/documents/WishList/add.ts +10 -0
  108. package/documents/WishList/create.ts +12 -0
  109. package/documents/WishList/delete.ts +7 -0
  110. package/documents/WishList/deleteLine.ts +7 -0
  111. package/documents/WishList/fragments.ts +98 -0
  112. package/documents/WishList/index.ts +2 -0
  113. package/documents/WishList/interfaces.ts +68 -0
  114. package/documents/WishList/list.ts +136 -0
  115. package/documents/WishList/read.ts +44 -0
  116. package/documents/base/interfaces.ts +34 -0
  117. package/documents/base/logger.ts +20 -0
  118. package/documents/base/pageInfoFragments.ts +25 -0
  119. package/documents/base/refresh-token.ts +15 -0
  120. package/documents/core/Logger/create.ts +64 -0
  121. package/documents/core/Logger/delete.ts +14 -0
  122. package/documents/core/Logger/fragments.ts +55 -0
  123. package/documents/core/Logger/index.ts +2 -0
  124. package/documents/core/Logger/interfaces.ts +39 -0
  125. package/documents/core/Logger/list.ts +56 -0
  126. package/documents/core/Logger/read.ts +44 -0
  127. package/documents/core/Logger/update.ts +64 -0
  128. package/documents/core/SampleData/create.ts +76 -0
  129. package/documents/core/SampleData/delete.ts +14 -0
  130. package/documents/core/SampleData/fragments.ts +48 -0
  131. package/documents/core/SampleData/index.ts +7 -0
  132. package/documents/core/SampleData/interfaces.ts +11 -0
  133. package/documents/core/SampleData/list.ts +233 -0
  134. package/documents/core/SampleData/read.ts +44 -0
  135. package/documents/core/SampleData/update.ts +76 -0
  136. package/documents/core/index.ts +2 -0
  137. package/documents/messages/messages.ts +21 -0
  138. package/package.json +22 -0
@@ -0,0 +1,44 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import {
4
+ USER_FRAGMENT_XS,
5
+ USER_FRAGMENT_SM,
6
+ USER_FRAGMENT_MD,
7
+ USER_FRAGMENT_LG,
8
+ } from "./fragments";
9
+
10
+ const USER_READ_XS = gql`
11
+ ${USER_FRAGMENT_XS}
12
+ query e4UserReadXS {
13
+ me {
14
+ ...UserFragmentXS
15
+ }
16
+ }
17
+ `;
18
+
19
+ const USER_READ_SM = gql`
20
+ ${USER_FRAGMENT_SM}
21
+ query e4UserReadSM {
22
+ me {
23
+ ...UserFragmentSM
24
+ }
25
+ }
26
+ `;
27
+
28
+ const USER_READ_MD = gql`
29
+ ${USER_FRAGMENT_MD}
30
+ query e4UserReadMD {
31
+ me {
32
+ ...UserFragmentMD
33
+ }
34
+ }
35
+ `;
36
+
37
+ const USER_READ_LG = gql`
38
+ ${USER_FRAGMENT_LG}
39
+ query e4UserReadLG {
40
+ me {
41
+ ...UserFragmentLG
42
+ }
43
+ }
44
+ `;
@@ -0,0 +1,11 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const USER_REGISTER = gql`
4
+ mutation register($user: RegistrationInput!) {
5
+ register(user: $user) {
6
+ userName
7
+ firstName
8
+ lastName
9
+ }
10
+ }
11
+ `;
@@ -0,0 +1,11 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const USER_RESET_PASSWORD = gql`
4
+ mutation requestResetPassword($email: String!) {
5
+ requestResetPassword(email: $email) {
6
+ code
7
+ message
8
+ success
9
+ }
10
+ }
11
+ `;
@@ -0,0 +1,44 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import {
4
+ USER_FRAGMENT_XS,
5
+ USER_FRAGMENT_SM,
6
+ USER_FRAGMENT_MD,
7
+ USER_FRAGMENT_LG,
8
+ } from "./fragments";
9
+
10
+ const USER_UPDATE_XS = gql`
11
+ ${USER_FRAGMENT_XS}
12
+ mutation e4UserUpdateXS($user: UserInput) {
13
+ updateUser(user: $user) {
14
+ ...UserFragmentXS
15
+ }
16
+ }
17
+ `;
18
+
19
+ const USER_UPDATE_SM = gql`
20
+ ${USER_FRAGMENT_SM}
21
+ mutation e4UserUpdateSM($user: UserInput) {
22
+ updateUser(user: $user) {
23
+ ...UserFragmentSM
24
+ }
25
+ }
26
+ `;
27
+
28
+ const USER_UPDATE_MD = gql`
29
+ ${USER_FRAGMENT_MD}
30
+ mutation e4UserUpdateMD($user: UserInput) {
31
+ updateUser(user: $user) {
32
+ ...UserFragmentMD
33
+ }
34
+ }
35
+ `;
36
+
37
+ const USER_UPDATE_LG = gql`
38
+ ${USER_FRAGMENT_LG}
39
+ mutation e4UserUpdateLG($user: UserInput) {
40
+ updateUser(user: $user) {
41
+ ...UserFragmentLG
42
+ }
43
+ }
44
+ `;
@@ -0,0 +1,10 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const ADD_TO_WISHLIST_XS = gql`
4
+ mutation e4AddToWishlistXS($input: AddToWishlistInput) {
5
+ addItemToWishlist(input: $input) {
6
+ id
7
+ name
8
+ }
9
+ }
10
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const CREATE_WISHLIST = gql`
4
+ mutation upsertWishlist($wishlist: CreateWishListInput!) {
5
+ upsertWishlist(wishList: $wishlist) {
6
+ id
7
+ name
8
+ comment
9
+ isPublic
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,7 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const DELETE_WISHLIST = gql`
4
+ mutation deleteWishList($id: ID!) {
5
+ deleteWishList(id: $id)
6
+ }
7
+ `;
@@ -0,0 +1,7 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const DELETE_WISHLIST_LINE_XS = gql`
4
+ mutation Mutation($input: DeleteWishlistInput) {
5
+ deleteItemFromWishlist(input: $input)
6
+ }
7
+ `;
@@ -0,0 +1,98 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PAGE_INFO } from "../base/pageInfoFragments";
4
+ import { PRODUCT_FRAGMENT_MD, PRODUCT_FRAGMENT_LG } from "../Product/fragments";
5
+
6
+ export const WISHLIST_FRAGMENT_XS = gql`
7
+ fragment WishListFragmentXS on WishList {
8
+ id
9
+ name
10
+ isDefault
11
+ isPublic
12
+ totalProducts
13
+ }
14
+ `;
15
+
16
+ export const WISHLIST_FRAGMENT_SM = gql`
17
+ fragment WishListFragmentSM on WishList {
18
+ id
19
+ name
20
+ isDefault
21
+ isPublic
22
+ totalProducts
23
+ created
24
+ modified
25
+ }
26
+ `;
27
+
28
+ export const WISHLIST_FRAGMENT_MD = gql`
29
+ fragment WishListFragmentMD on WishList {
30
+ id
31
+ name
32
+ products {
33
+ recordCount
34
+ pageInfo {
35
+ top
36
+ sort
37
+ sortDesc
38
+ search
39
+ skip
40
+ currentPage
41
+ }
42
+ nodes {
43
+ ...ProductFragmentMD
44
+ }
45
+ }
46
+ isDefault
47
+ contactCode
48
+ contactName
49
+ isPublic
50
+ comment
51
+ quantity
52
+ totalProducts
53
+ created
54
+ modified
55
+ searchText
56
+ }
57
+ ${PRODUCT_FRAGMENT_MD}
58
+ `;
59
+
60
+ export const WISHLIST_FRAGMENT_LG = gql`
61
+ fragment WishListFragmentLG on WishList {
62
+ id
63
+ name
64
+ products {
65
+ recordCount
66
+ pageInfo {
67
+ top
68
+ sort
69
+ sortDesc
70
+ search
71
+ skip
72
+ currentPage
73
+ }
74
+ nodes {
75
+ ...ProductFragmentLG
76
+ }
77
+ }
78
+ contactId
79
+ isDefault
80
+ listCreatorId
81
+ listCreatorName
82
+ contactCode
83
+ contactName
84
+ accountProductListTypeId
85
+ accountProductListTypeCode
86
+ accountProductListTypeName
87
+ isRemoveAfterPurchase
88
+ isPublic
89
+ comment
90
+ quantity
91
+ totalProducts
92
+ totalPurchased
93
+ created
94
+ modified
95
+ searchText
96
+ }
97
+ ${PRODUCT_FRAGMENT_LG}
98
+ `;
@@ -0,0 +1,2 @@
1
+ export * from "./fragments";
2
+ export * from "./interfaces";
@@ -0,0 +1,68 @@
1
+ import { Product } from "../Product/interfaces";
2
+
3
+ export interface PageInfo {
4
+ top?: number;
5
+ skip?: number;
6
+ search?: string;
7
+ sort?: string;
8
+ sortDesc?: boolean;
9
+ startCursor?: string;
10
+ endCursor?: string;
11
+ hasNextPage?: boolean;
12
+ hasPreviousPage?: boolean;
13
+ currentPage?: number;
14
+ after?: string;
15
+ before?: string;
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ filter?: any;
18
+ }
19
+ export interface AddToWishlistInput {
20
+ wishlistId: string;
21
+ productId: string;
22
+ quantityRequested?: number;
23
+ unitOfMeasureId?: string;
24
+ }
25
+
26
+ export interface deleteItemFromWishlistInput {
27
+ wishlistId: string;
28
+ productId: string;
29
+ quantityRequested?: number;
30
+ unitOfMeasureId?: string;
31
+ }
32
+
33
+ export interface WishListProductConnection {
34
+ pageInfo: PageInfo;
35
+ nodes: Product[];
36
+ recordCount?: number;
37
+ }
38
+
39
+ export interface WishList {
40
+ id: string;
41
+ name?: string;
42
+ account: any;
43
+ products: WishListProductConnection;
44
+ contactId?: string;
45
+ isDefault: boolean;
46
+ listCreatorId?: string;
47
+ listCreatorName?: string;
48
+ contactCode?: number;
49
+ contactName?: string;
50
+ accountProductListTypeId?: number;
51
+ accountProductListTypeCode?: string;
52
+ accountProductListTypeName?: string;
53
+ isRemoveAfterPurchase?: boolean;
54
+ isPublic?: boolean;
55
+ comment?: string;
56
+ quantity?: number;
57
+ totalProducts?: number;
58
+ totalPurchased?: number;
59
+ created: string;
60
+ modified?: string;
61
+ searchText?: string;
62
+ }
63
+
64
+ export interface WishListConnection {
65
+ pageInfo: PageInfo;
66
+ nodes: WishList[];
67
+ recordCount?: number;
68
+ }
@@ -0,0 +1,136 @@
1
+ import { gql } from "graphql-request";
2
+ import {
3
+ WISHLIST_FRAGMENT_XS,
4
+ WISHLIST_FRAGMENT_SM,
5
+ WISHLIST_FRAGMENT_MD,
6
+ WISHLIST_FRAGMENT_LG,
7
+ } from "./fragments";
8
+
9
+ const PAGE_INFO = gql`
10
+ fragment PageInfo on PageInfo {
11
+ top
12
+ sort
13
+ sortDesc
14
+ search
15
+ skip
16
+ currentPage
17
+ }
18
+ `;
19
+
20
+ const SHIPPING_BY_CARRIERS = gql`
21
+ query shippingbyCarrier($id: String) {
22
+ shippingbyCarrier(id: $id) {
23
+ id
24
+ name
25
+ code
26
+ baseAmount
27
+ discount
28
+ total
29
+ shippingRateTypeName
30
+ shippingRateTypeCode
31
+ }
32
+ }
33
+ `;
34
+
35
+ const WISHLIST_LIST_XS = gql`
36
+ query e4WishListListXS($top: Int, $skip: Int) {
37
+ wishlistList(top: $top, skip: $skip) {
38
+ recordCount
39
+ pageInfo {
40
+ ...PageInfo
41
+ }
42
+ nodes {
43
+ ...WishListFragmentXS
44
+ }
45
+ }
46
+ }
47
+ ${PAGE_INFO}
48
+ ${WISHLIST_FRAGMENT_XS}
49
+ `;
50
+
51
+ const WISHLIST_LIST_SM = gql`
52
+ query e4WishListListSM($top: Int, $skip: Int) {
53
+ wishlistList(top: $top, skip: $skip) {
54
+ recordCount
55
+ pageInfo {
56
+ ...PageInfo
57
+ }
58
+ nodes {
59
+ ...WishListFragmentSM
60
+ }
61
+ }
62
+ }
63
+ ${PAGE_INFO}
64
+ ${WISHLIST_FRAGMENT_SM}
65
+ `;
66
+
67
+ const WISHLIST_LIST_MD = gql`
68
+ query e4WishListListMD($top: Int, $skip: Int) {
69
+ wishlistList(top: $top, skip: $skip) {
70
+ recordCount
71
+ pageInfo {
72
+ ...PageInfo
73
+ }
74
+ nodes {
75
+ ...WishListFragmentMD
76
+ }
77
+ }
78
+ }
79
+ ${PAGE_INFO}
80
+ ${WISHLIST_FRAGMENT_MD}
81
+ `;
82
+
83
+ const WISHLIST_LIST_LG = gql`
84
+ query e4WishListListLG($top: Int, $skip: Int) {
85
+ wishlistList(top: $top, skip: $skip) {
86
+ recordCount
87
+ pageInfo {
88
+ ...PageInfo
89
+ }
90
+ nodes {
91
+ ...WishListFragmentLG
92
+ }
93
+ }
94
+ }
95
+ ${PAGE_INFO}
96
+ ${WISHLIST_FRAGMENT_LG}
97
+ `;
98
+
99
+ const GET_WISHLIST = gql`
100
+ query GET_WISHLIST_LIST {
101
+ wishlistList {
102
+ edges {
103
+ node {
104
+ id
105
+
106
+ name
107
+ comment
108
+ isPublic
109
+ created
110
+ isDefault
111
+ totalProducts
112
+ account {
113
+ id
114
+ }
115
+ products {
116
+ edges {
117
+ node {
118
+ id
119
+ name
120
+ price
121
+ listPrice
122
+ created
123
+ img {
124
+ id
125
+ cdnURL
126
+ alt
127
+ }
128
+ seoName
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ `;
@@ -0,0 +1,44 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import {
4
+ WISHLIST_FRAGMENT_XS,
5
+ WISHLIST_FRAGMENT_SM,
6
+ WISHLIST_FRAGMENT_MD,
7
+ WISHLIST_FRAGMENT_LG,
8
+ } from "./fragments";
9
+
10
+ const WISHLIST_READ_XS = gql`
11
+ ${WISHLIST_FRAGMENT_XS}
12
+ query e4WishListReadXS($id: ID!) {
13
+ wishList(id: $id) {
14
+ ...WishListFragmentXS
15
+ }
16
+ }
17
+ `;
18
+
19
+ const WISHLIST_READ_SM = gql`
20
+ ${WISHLIST_FRAGMENT_SM}
21
+ query e4WishListReadSM($id: ID!) {
22
+ wishList(id: $id) {
23
+ ...WishListFragmentSM
24
+ }
25
+ }
26
+ `;
27
+
28
+ const WISHLIST_READ_MD = gql`
29
+ ${WISHLIST_FRAGMENT_MD}
30
+ query e4WishListReadMD($id: ID!) {
31
+ wishList(id: $id) {
32
+ ...WishListFragmentMD
33
+ }
34
+ }
35
+ `;
36
+
37
+ const WISHLIST_READ_LG = gql`
38
+ ${WISHLIST_FRAGMENT_LG}
39
+ query e4WishListReadLG($id: ID!) {
40
+ wishList(id: $id) {
41
+ ...WishListFragmentLG
42
+ }
43
+ }
44
+ `;
@@ -0,0 +1,34 @@
1
+ export interface PageInfo {
2
+ top?: number;
3
+ skip?: number;
4
+ search?: string;
5
+ sort?: string;
6
+ sortDesc?: boolean;
7
+ startCursor?: string;
8
+ endCursor?: string;
9
+ hasNextPage?: boolean;
10
+ hasPreviousPage?: boolean;
11
+ currentPage?: number;
12
+ after?: string;
13
+ before?: string;
14
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
+ filter?: any;
16
+ }
17
+
18
+ export interface SettingsValue {
19
+ displayName: string;
20
+ enumId: number | null;
21
+ id: number;
22
+ isEnum: boolean;
23
+ name: string;
24
+ bigIntValue: string;
25
+ options: SettingsOption[];
26
+ value: string | number;
27
+ attributeEntityValueId?: string;
28
+ }
29
+
30
+ export interface SettingsOption {
31
+ displayName: string;
32
+ code: string;
33
+ id: string | number;
34
+ }
@@ -0,0 +1,20 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const LOGGER_BULK_CREATE_SM = gql`
4
+ mutation e4LoggerBulkCreateSM($logger: [LoggerInputCreate]) {
5
+ loggerBulkCreate(logger: $logger) {
6
+ success
7
+ code
8
+ message
9
+ logger {
10
+ id
11
+ environment
12
+ aspNetUserId
13
+ location
14
+ date
15
+ level
16
+ message
17
+ }
18
+ }
19
+ }
20
+ `;
@@ -0,0 +1,25 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PAGE_INFO = gql`
4
+ fragment PageInfo on PageInfo {
5
+ top
6
+ sort
7
+ sortDesc
8
+ search
9
+ skip
10
+ currentPage
11
+ }
12
+ `;
13
+
14
+ export const PAGE_INFO_ENDLESS = gql`
15
+ fragment PageInfoEndless on PageInfo {
16
+ top
17
+ sort
18
+ sortDesc
19
+ search
20
+ startCursor
21
+ endCursor
22
+ hasPreviousPage
23
+ hasNextPage
24
+ }
25
+ `;
@@ -0,0 +1,15 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const REFRESH_TOKEN = gql`
4
+ mutation refreshToken($accessToken: String!, $refreshToken: String!) {
5
+ refreshToken(accessToken: $accessToken, refreshToken: $refreshToken) {
6
+ token
7
+ session {
8
+ id
9
+ user {
10
+ aspNetUserId
11
+ }
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -0,0 +1,64 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import {
4
+ LOGGER_FRAGMENT_XS,
5
+ LOGGER_FRAGMENT_SM,
6
+ LOGGER_FRAGMENT_MD,
7
+ LOGGER_FRAGMENT_LG,
8
+ } from "./fragments";
9
+
10
+ const LOGGER_CREATE_XS = gql`
11
+ ${LOGGER_FRAGMENT_XS}
12
+ mutation e4LoggerCreateXS($logger: LoggerInputCreate) {
13
+ loggerCreate(logger: $logger) {
14
+ success
15
+ code
16
+ message
17
+ logger {
18
+ ...LoggerFragmentXS
19
+ }
20
+ }
21
+ }
22
+ `;
23
+
24
+ const LOGGER_CREATE_SM = gql`
25
+ ${LOGGER_FRAGMENT_SM}
26
+ mutation e4LoggerCreateSM($logger: LoggerInputCreate) {
27
+ loggerCreate(logger: $logger) {
28
+ success
29
+ code
30
+ message
31
+ logger {
32
+ ...LoggerFragmentSM
33
+ }
34
+ }
35
+ }
36
+ `;
37
+
38
+ const LOGGER_CREATE_MD = gql`
39
+ ${LOGGER_FRAGMENT_MD}
40
+ mutation e4LoggerCreateMD($logger: LoggerInputCreate) {
41
+ loggerCreate(logger: $logger) {
42
+ success
43
+ code
44
+ message
45
+ logger {
46
+ ...LoggerFragmentMD
47
+ }
48
+ }
49
+ }
50
+ `;
51
+
52
+ const LOGGER_CREATE_LG = gql`
53
+ ${LOGGER_FRAGMENT_LG}
54
+ mutation e4LoggerCreateLG($logger: LoggerInputCreate) {
55
+ loggerCreate(logger: $logger) {
56
+ success
57
+ code
58
+ message
59
+ logger {
60
+ ...LoggerFragmentLG
61
+ }
62
+ }
63
+ }
64
+ `;
@@ -0,0 +1,14 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ const LOGGER_DELETE = gql`
4
+ mutation e4LoggerDelete($logger: LoggerInputDelete) {
5
+ loggerDelete(logger: $logger) {
6
+ success
7
+ code
8
+ message
9
+ logger {
10
+ id
11
+ }
12
+ }
13
+ }
14
+ `;