shared-definitions.ts 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248
  1. import {
  2. administratorFragment,
  3. assetFragment,
  4. canceledOrderFragment,
  5. channelFragment,
  6. collectionFragment,
  7. countryFragment,
  8. currentUserFragment,
  9. customerFragment,
  10. customerGroupFragment,
  11. facetValueFragment,
  12. facetWithValuesFragment,
  13. fulfillmentFragment,
  14. globalSettingsFragment,
  15. orderFragment,
  16. orderWithLinesFragment,
  17. orderWithModificationsFragment,
  18. paymentFragment,
  19. productOptionGroupFragment,
  20. productVariantFragment,
  21. productWithOptionsFragment,
  22. productWithVariantsFragment,
  23. promotionFragment,
  24. refundFragment,
  25. roleFragment,
  26. shippingMethodFragment,
  27. taxRateFragment,
  28. variantWithStockFragment,
  29. zoneFragment,
  30. } from './fragments-admin';
  31. import { graphql } from './graphql-admin';
  32. export const getTasksDocument = graphql(`
  33. query GetTasks {
  34. scheduledTasks {
  35. id
  36. description
  37. schedule
  38. scheduleDescription
  39. lastResult
  40. enabled
  41. }
  42. }
  43. `);
  44. export const updateTaskDocument = graphql(`
  45. mutation UpdateTask($input: UpdateScheduledTaskInput!) {
  46. updateScheduledTask(input: $input) {
  47. id
  48. enabled
  49. }
  50. }
  51. `);
  52. export const runTaskDocument = graphql(`
  53. mutation RunTask($id: String!) {
  54. runScheduledTask(id: $id) {
  55. success
  56. }
  57. }
  58. `);
  59. export const createAdministratorDocument = graphql(
  60. `
  61. mutation CreateAdministrator($input: CreateAdministratorInput!) {
  62. createAdministrator(input: $input) {
  63. ...Administrator
  64. }
  65. }
  66. `,
  67. [administratorFragment],
  68. );
  69. export const getAdministratorsDocument = graphql(
  70. `
  71. query GetAdministrators($options: AdministratorListOptions) {
  72. administrators(options: $options) {
  73. items {
  74. ...Administrator
  75. }
  76. totalItems
  77. }
  78. }
  79. `,
  80. [administratorFragment],
  81. );
  82. export const getAdministratorDocument = graphql(
  83. `
  84. query GetAdministrator($id: ID!) {
  85. administrator(id: $id) {
  86. ...Administrator
  87. }
  88. }
  89. `,
  90. [administratorFragment],
  91. );
  92. export const getActiveAdministratorDocument = graphql(
  93. `
  94. query ActiveAdministrator {
  95. activeAdministrator {
  96. ...Administrator
  97. }
  98. }
  99. `,
  100. [administratorFragment],
  101. );
  102. export const updateAdministratorDocument = graphql(
  103. `
  104. mutation UpdateAdministrator($input: UpdateAdministratorInput!) {
  105. updateAdministrator(input: $input) {
  106. ...Administrator
  107. }
  108. }
  109. `,
  110. [administratorFragment],
  111. );
  112. export const updateActiveAdministratorDocument = graphql(
  113. `
  114. mutation UpdateActiveAdministrator($input: UpdateActiveAdministratorInput!) {
  115. updateActiveAdministrator(input: $input) {
  116. ...Administrator
  117. }
  118. }
  119. `,
  120. [administratorFragment],
  121. );
  122. export const deleteAdministratorDocument = graphql(`
  123. mutation DeleteAdministrator($id: ID!) {
  124. deleteAdministrator(id: $id) {
  125. message
  126. result
  127. }
  128. }
  129. `);
  130. export const updateProductDocument = graphql(
  131. `
  132. mutation UpdateProduct($input: UpdateProductInput!) {
  133. updateProduct(input: $input) {
  134. ...ProductWithVariants
  135. }
  136. }
  137. `,
  138. [productWithVariantsFragment],
  139. );
  140. export const updateProductOptionGroupDocument = graphql(`
  141. mutation UpdateOptionGroup($input: UpdateProductOptionGroupInput!) {
  142. updateProductOptionGroup(input: $input) {
  143. id
  144. }
  145. }
  146. `);
  147. export const createProductDocument = graphql(
  148. `
  149. mutation CreateProduct($input: CreateProductInput!) {
  150. createProduct(input: $input) {
  151. ...ProductWithVariants
  152. }
  153. }
  154. `,
  155. [productWithVariantsFragment],
  156. );
  157. export const getProductWithVariantsDocument = graphql(
  158. `
  159. query GetProductWithVariants($id: ID, $slug: String) {
  160. product(slug: $slug, id: $id) {
  161. ...ProductWithVariants
  162. }
  163. }
  164. `,
  165. [productWithVariantsFragment],
  166. );
  167. export const getProductListDocument = graphql(`
  168. query GetProductList($options: ProductListOptions) {
  169. products(options: $options) {
  170. items {
  171. id
  172. languageCode
  173. name
  174. slug
  175. featuredAsset {
  176. id
  177. preview
  178. }
  179. }
  180. totalItems
  181. }
  182. }
  183. `);
  184. export const getProductWithFacetValuesDocument = graphql(`
  185. query GetProductWithFacetValues($id: ID!) {
  186. product(id: $id) {
  187. id
  188. facetValues {
  189. id
  190. name
  191. code
  192. }
  193. variants {
  194. id
  195. facetValues {
  196. id
  197. name
  198. code
  199. }
  200. }
  201. }
  202. }
  203. `);
  204. export const getProductsListWithVariantsDocument = graphql(`
  205. query GetProductListWithVariants {
  206. products {
  207. items {
  208. id
  209. name
  210. variants {
  211. id
  212. name
  213. }
  214. }
  215. totalItems
  216. }
  217. }
  218. `);
  219. export const createProductVariantsDocument = graphql(
  220. `
  221. mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {
  222. createProductVariants(input: $input) {
  223. ...ProductVariant
  224. }
  225. }
  226. `,
  227. [productVariantFragment],
  228. );
  229. export const updateProductVariantsDocument = graphql(
  230. `
  231. mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {
  232. updateProductVariants(input: $input) {
  233. ...ProductVariant
  234. }
  235. }
  236. `,
  237. [productVariantFragment],
  238. );
  239. export const updateTaxRateDocument = graphql(
  240. `
  241. mutation UpdateTaxRate($input: UpdateTaxRateInput!) {
  242. updateTaxRate(input: $input) {
  243. ...TaxRate
  244. }
  245. }
  246. `,
  247. [taxRateFragment],
  248. );
  249. export const createFacetDocument = graphql(
  250. `
  251. mutation CreateFacet($input: CreateFacetInput!) {
  252. createFacet(input: $input) {
  253. ...FacetWithValues
  254. }
  255. }
  256. `,
  257. [facetWithValuesFragment],
  258. );
  259. export const updateFacetDocument = graphql(
  260. `
  261. mutation UpdateFacet($input: UpdateFacetInput!) {
  262. updateFacet(input: $input) {
  263. ...FacetWithValues
  264. }
  265. }
  266. `,
  267. [facetWithValuesFragment],
  268. );
  269. export const createFacetValueDocument = graphql(
  270. `
  271. mutation CreateFacetValue($input: CreateFacetValueInput!) {
  272. createFacetValue(input: $input) {
  273. ...FacetValue
  274. }
  275. }
  276. `,
  277. [facetValueFragment],
  278. );
  279. export const updateFacetValueDocument = graphql(
  280. `
  281. mutation UpdateFacetValue($input: UpdateFacetValueInput!) {
  282. updateFacetValue(input: $input) {
  283. ...FacetValue
  284. }
  285. }
  286. `,
  287. [facetValueFragment],
  288. );
  289. export const createFacetValuesDocument = graphql(
  290. `
  291. mutation CreateFacetValues($input: [CreateFacetValueInput!]!) {
  292. createFacetValues(input: $input) {
  293. ...FacetValue
  294. }
  295. }
  296. `,
  297. [facetValueFragment],
  298. );
  299. export const updateFacetValuesDocument = graphql(
  300. `
  301. mutation UpdateFacetValues($input: [UpdateFacetValueInput!]!) {
  302. updateFacetValues(input: $input) {
  303. ...FacetValue
  304. }
  305. }
  306. `,
  307. [facetValueFragment],
  308. );
  309. export const deleteFacetValuesDocument = graphql(`
  310. mutation DeleteFacetValues($ids: [ID!]!, $force: Boolean) {
  311. deleteFacetValues(ids: $ids, force: $force) {
  312. result
  313. message
  314. }
  315. }
  316. `);
  317. export const deleteFacetDocument = graphql(`
  318. mutation DeleteFacet($id: ID!, $force: Boolean) {
  319. deleteFacet(id: $id, force: $force) {
  320. result
  321. message
  322. }
  323. }
  324. `);
  325. export const getCustomerListDocument = graphql(`
  326. query GetCustomerList($options: CustomerListOptions) {
  327. customers(options: $options) {
  328. items {
  329. id
  330. title
  331. firstName
  332. lastName
  333. emailAddress
  334. phoneNumber
  335. user {
  336. id
  337. identifier
  338. verified
  339. }
  340. }
  341. totalItems
  342. }
  343. }
  344. `);
  345. export const getCustomerIdsDocument = graphql(`
  346. query GetCustomerIds {
  347. customers {
  348. items {
  349. id
  350. }
  351. }
  352. }
  353. `);
  354. export const getAssetListDocument = graphql(
  355. `
  356. query GetAssetList($options: AssetListOptions) {
  357. assets(options: $options) {
  358. items {
  359. ...Asset
  360. }
  361. totalItems
  362. }
  363. }
  364. `,
  365. [assetFragment],
  366. );
  367. export const createRoleDocument = graphql(
  368. `
  369. mutation CreateRole($input: CreateRoleInput!) {
  370. createRole(input: $input) {
  371. ...Role
  372. }
  373. }
  374. `,
  375. [roleFragment],
  376. );
  377. export const createCollectionDocument = graphql(
  378. `
  379. mutation CreateCollection($input: CreateCollectionInput!) {
  380. createCollection(input: $input) {
  381. ...Collection
  382. }
  383. }
  384. `,
  385. [collectionFragment],
  386. );
  387. export const updateCollectionDocument = graphql(
  388. `
  389. mutation UpdateCollection($input: UpdateCollectionInput!) {
  390. updateCollection(input: $input) {
  391. ...Collection
  392. }
  393. }
  394. `,
  395. [collectionFragment],
  396. );
  397. export const getCustomerDocument = graphql(
  398. `
  399. query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {
  400. customer(id: $id) {
  401. ...Customer
  402. orders(options: $orderListOptions) {
  403. items {
  404. id
  405. code
  406. state
  407. total
  408. currencyCode
  409. updatedAt
  410. }
  411. totalItems
  412. }
  413. }
  414. }
  415. `,
  416. [customerFragment],
  417. );
  418. export const attemptLoginDocument = graphql(
  419. `
  420. mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean) {
  421. login(username: $username, password: $password, rememberMe: $rememberMe) {
  422. ...CurrentUser
  423. ... on ErrorResult {
  424. errorCode
  425. message
  426. }
  427. }
  428. }
  429. `,
  430. [currentUserFragment],
  431. );
  432. export const logoutDocument = graphql(`
  433. mutation Logout {
  434. logout {
  435. success
  436. }
  437. }
  438. `);
  439. export const getCountryListDocument = graphql(`
  440. query GetCountryList($options: CountryListOptions) {
  441. countries(options: $options) {
  442. items {
  443. id
  444. code
  445. name
  446. enabled
  447. }
  448. totalItems
  449. }
  450. }
  451. `);
  452. export const updateCountryDocument = graphql(
  453. `
  454. mutation UpdateCountry($input: UpdateCountryInput!) {
  455. updateCountry(input: $input) {
  456. ...Country
  457. }
  458. }
  459. `,
  460. [countryFragment],
  461. );
  462. export const getGlobalSettingsDocument = graphql(
  463. `
  464. query GetGlobalSettings {
  465. globalSettings {
  466. ...GlobalSettings
  467. }
  468. }
  469. `,
  470. [globalSettingsFragment],
  471. );
  472. export const getFacetListDocument = graphql(
  473. `
  474. query GetFacetList($options: FacetListOptions) {
  475. facets(options: $options) {
  476. items {
  477. ...FacetWithValues
  478. }
  479. totalItems
  480. }
  481. }
  482. `,
  483. [facetWithValuesFragment],
  484. );
  485. export const getFacetListSimpleDocument = graphql(`
  486. query GetFacetListSimple($options: FacetListOptions) {
  487. facets(options: $options) {
  488. items {
  489. id
  490. name
  491. }
  492. totalItems
  493. }
  494. }
  495. `);
  496. export const deleteProductDocument = graphql(`
  497. mutation DeleteProduct($id: ID!) {
  498. deleteProduct(id: $id) {
  499. result
  500. }
  501. }
  502. `);
  503. export const getProductSimpleDocument = graphql(`
  504. query GetProductSimple($id: ID, $slug: String) {
  505. product(slug: $slug, id: $id) {
  506. id
  507. slug
  508. }
  509. }
  510. `);
  511. export const getProductIdNameDocument = graphql(`
  512. query GetProductIdName($id: ID!) {
  513. product(id: $id) {
  514. id
  515. name
  516. }
  517. }
  518. `);
  519. export const getStockMovementDocument = graphql(
  520. `
  521. query GetStockMovement($id: ID!) {
  522. product(id: $id) {
  523. id
  524. variants {
  525. ...VariantWithStock
  526. }
  527. }
  528. }
  529. `,
  530. [variantWithStockFragment],
  531. );
  532. export const getStockMovementByTypeDocument = graphql(`
  533. query GetStockMovementByType($id: ID!, $type: StockMovementType!) {
  534. product(id: $id) {
  535. id
  536. variants {
  537. stockMovements(options: { type: $type }) {
  538. items {
  539. ... on StockMovement {
  540. id
  541. type
  542. quantity
  543. }
  544. }
  545. totalItems
  546. }
  547. }
  548. }
  549. }
  550. `);
  551. export const getRunningJobsDocument = graphql(`
  552. query GetRunningJobs($options: JobListOptions) {
  553. jobs(options: $options) {
  554. items {
  555. id
  556. queueName
  557. state
  558. isSettled
  559. duration
  560. }
  561. totalItems
  562. }
  563. }
  564. `);
  565. export const cancelJobDocument = graphql(`
  566. mutation CancelJob($id: ID!) {
  567. cancelJob(jobId: $id) {
  568. id
  569. state
  570. isSettled
  571. settledAt
  572. }
  573. }
  574. `);
  575. export const createPromotionDocument = graphql(
  576. `
  577. mutation CreatePromotion($input: CreatePromotionInput!) {
  578. createPromotion(input: $input) {
  579. ...Promotion
  580. ... on ErrorResult {
  581. errorCode
  582. message
  583. }
  584. }
  585. }
  586. `,
  587. [promotionFragment],
  588. );
  589. export const MeDocument = graphql(
  590. `
  591. query Me {
  592. me {
  593. ...CurrentUser
  594. }
  595. }
  596. `,
  597. [currentUserFragment],
  598. );
  599. export const createChannelDocument = graphql(
  600. `
  601. mutation CreateChannel($input: CreateChannelInput!) {
  602. createChannel(input: $input) {
  603. ...Channel
  604. ... on LanguageNotAvailableError {
  605. errorCode
  606. message
  607. languageCode
  608. }
  609. }
  610. }
  611. `,
  612. [channelFragment],
  613. );
  614. export const deleteProductVariantDocument = graphql(`
  615. mutation DeleteProductVariant($id: ID!) {
  616. deleteProductVariant(id: $id) {
  617. result
  618. message
  619. }
  620. }
  621. `);
  622. export const assignProductToChannelDocument = graphql(
  623. `
  624. mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {
  625. assignProductsToChannel(input: $input) {
  626. ...ProductWithVariants
  627. }
  628. }
  629. `,
  630. [productWithVariantsFragment],
  631. );
  632. export const removeProductFromChannelDocument = graphql(
  633. `
  634. mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {
  635. removeProductsFromChannel(input: $input) {
  636. ...ProductWithVariants
  637. }
  638. }
  639. `,
  640. [productWithVariantsFragment],
  641. );
  642. export const assignProductVariantToChannelDocument = graphql(
  643. `
  644. mutation AssignProductVariantsToChannel($input: AssignProductVariantsToChannelInput!) {
  645. assignProductVariantsToChannel(input: $input) {
  646. ...ProductVariant
  647. }
  648. }
  649. `,
  650. [productVariantFragment],
  651. );
  652. export const removeProductVariantFromChannelDocument = graphql(
  653. `
  654. mutation RemoveProductVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {
  655. removeProductVariantsFromChannel(input: $input) {
  656. ...ProductVariant
  657. }
  658. }
  659. `,
  660. [productVariantFragment],
  661. );
  662. export const assignFacetsToChannelDocument = graphql(`
  663. mutation AssignFacetsToChannel($input: AssignFacetsToChannelInput!) {
  664. assignFacetsToChannel(input: $input) {
  665. id
  666. name
  667. }
  668. }
  669. `);
  670. export const removeFacetsFromChannelDocument = graphql(`
  671. mutation RemoveFacetsFromChannel($input: RemoveFacetsFromChannelInput!) {
  672. removeFacetsFromChannel(input: $input) {
  673. ... on Facet {
  674. id
  675. name
  676. }
  677. ... on FacetInUseError {
  678. errorCode
  679. message
  680. productCount
  681. variantCount
  682. }
  683. }
  684. }
  685. `);
  686. export const getEntityDuplicatorsDocument = graphql(`
  687. query GetEntityDuplicators {
  688. entityDuplicators {
  689. code
  690. description
  691. requiresPermission
  692. forEntities
  693. args {
  694. name
  695. type
  696. defaultValue
  697. }
  698. }
  699. }
  700. `);
  701. export const duplicateEntityDocument = graphql(`
  702. mutation DuplicateEntity($input: DuplicateEntityInput!) {
  703. duplicateEntity(input: $input) {
  704. ... on DuplicateEntitySuccess {
  705. newEntityId
  706. }
  707. ... on DuplicateEntityError {
  708. errorCode
  709. message
  710. duplicationError
  711. }
  712. }
  713. }
  714. `);
  715. export const updateAssetDocument = graphql(
  716. `
  717. mutation UpdateAsset($input: UpdateAssetInput!) {
  718. updateAsset(input: $input) {
  719. ...Asset
  720. ... on Asset {
  721. tags {
  722. id
  723. value
  724. }
  725. focalPoint {
  726. x
  727. y
  728. }
  729. }
  730. }
  731. }
  732. `,
  733. [assetFragment],
  734. );
  735. export const deleteAssetDocument = graphql(`
  736. mutation DeleteAsset($input: DeleteAssetInput!) {
  737. deleteAsset(input: $input) {
  738. result
  739. message
  740. }
  741. }
  742. `);
  743. export const updateChannelDocument = graphql(
  744. `
  745. mutation UpdateChannel($input: UpdateChannelInput!) {
  746. updateChannel(input: $input) {
  747. ...Channel
  748. ... on LanguageNotAvailableError {
  749. errorCode
  750. message
  751. languageCode
  752. }
  753. }
  754. }
  755. `,
  756. [channelFragment],
  757. );
  758. export const getCustomerHistoryDocument = graphql(`
  759. query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {
  760. customer(id: $id) {
  761. id
  762. history(options: $options) {
  763. totalItems
  764. items {
  765. id
  766. administrator {
  767. id
  768. }
  769. type
  770. data
  771. }
  772. }
  773. }
  774. }
  775. `);
  776. export const getOrderDocument = graphql(
  777. `
  778. query GetOrder($id: ID!) {
  779. order(id: $id) {
  780. ...OrderWithLines
  781. }
  782. }
  783. `,
  784. [orderWithLinesFragment],
  785. );
  786. export const createCustomerGroupDocument = graphql(
  787. `
  788. mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
  789. createCustomerGroup(input: $input) {
  790. ...CustomerGroup
  791. }
  792. }
  793. `,
  794. [customerGroupFragment],
  795. );
  796. export const removeCustomersFromGroupDocument = graphql(
  797. `
  798. mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {
  799. removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {
  800. ...CustomerGroup
  801. }
  802. }
  803. `,
  804. [customerGroupFragment],
  805. );
  806. export const createFulfillmentDocument = graphql(
  807. `
  808. mutation CreateFulfillment($input: FulfillOrderInput!) {
  809. addFulfillmentToOrder(input: $input) {
  810. ...Fulfillment
  811. ... on ErrorResult {
  812. errorCode
  813. message
  814. }
  815. ... on CreateFulfillmentError {
  816. fulfillmentHandlerError
  817. }
  818. }
  819. }
  820. `,
  821. [fulfillmentFragment],
  822. );
  823. export const transitFulfillmentDocument = graphql(
  824. `
  825. mutation TransitFulfillment($id: ID!, $state: String!) {
  826. transitionFulfillmentToState(id: $id, state: $state) {
  827. ...Fulfillment
  828. ... on FulfillmentStateTransitionError {
  829. errorCode
  830. message
  831. transitionError
  832. fromState
  833. toState
  834. }
  835. }
  836. }
  837. `,
  838. [fulfillmentFragment],
  839. );
  840. export const getOrderFulfillmentsDocument = graphql(`
  841. query GetOrderFulfillments($id: ID!) {
  842. order(id: $id) {
  843. id
  844. state
  845. fulfillments {
  846. id
  847. state
  848. nextStates
  849. method
  850. summary {
  851. orderLine {
  852. id
  853. }
  854. quantity
  855. }
  856. }
  857. }
  858. }
  859. `);
  860. export const getOrdersListDocument = graphql(
  861. `
  862. query GetOrderListFull($options: OrderListOptions) {
  863. orders(options: $options) {
  864. items {
  865. ...Order
  866. }
  867. totalItems
  868. }
  869. }
  870. `,
  871. [orderFragment],
  872. );
  873. export const createAddressDocument = graphql(`
  874. mutation CreateAddress($id: ID!, $input: CreateAddressInput!) {
  875. createCustomerAddress(customerId: $id, input: $input) {
  876. id
  877. fullName
  878. company
  879. streetLine1
  880. streetLine2
  881. city
  882. province
  883. postalCode
  884. country {
  885. code
  886. name
  887. }
  888. phoneNumber
  889. defaultShippingAddress
  890. defaultBillingAddress
  891. }
  892. }
  893. `);
  894. export const updateAddressDocument = graphql(`
  895. mutation UpdateAddress($input: UpdateAddressInput!) {
  896. updateCustomerAddress(input: $input) {
  897. id
  898. defaultShippingAddress
  899. defaultBillingAddress
  900. country {
  901. code
  902. name
  903. }
  904. }
  905. }
  906. `);
  907. export const createCustomerDocument = graphql(
  908. `
  909. mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {
  910. createCustomer(input: $input, password: $password) {
  911. ...Customer
  912. ... on ErrorResult {
  913. errorCode
  914. message
  915. }
  916. }
  917. }
  918. `,
  919. [customerFragment],
  920. );
  921. export const updateCustomerDocument = graphql(
  922. `
  923. mutation UpdateCustomer($input: UpdateCustomerInput!) {
  924. updateCustomer(input: $input) {
  925. ...Customer
  926. ... on ErrorResult {
  927. errorCode
  928. message
  929. }
  930. }
  931. }
  932. `,
  933. [customerFragment],
  934. );
  935. export const deleteCustomerDocument = graphql(`
  936. mutation DeleteCustomer($id: ID!) {
  937. deleteCustomer(id: $id) {
  938. result
  939. }
  940. }
  941. `);
  942. export const updateCustomerNoteDocument = graphql(`
  943. mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {
  944. updateCustomerNote(input: $input) {
  945. id
  946. data
  947. isPublic
  948. }
  949. }
  950. `);
  951. export const deleteCustomerNoteDocument = graphql(`
  952. mutation DeleteCustomerNote($id: ID!) {
  953. deleteCustomerNote(id: $id) {
  954. result
  955. message
  956. }
  957. }
  958. `);
  959. export const updateCustomerGroupDocument = graphql(
  960. `
  961. mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {
  962. updateCustomerGroup(input: $input) {
  963. ...CustomerGroup
  964. }
  965. }
  966. `,
  967. [customerGroupFragment],
  968. );
  969. export const deleteCustomerGroupDocument = graphql(`
  970. mutation DeleteCustomerGroup($id: ID!) {
  971. deleteCustomerGroup(id: $id) {
  972. result
  973. message
  974. }
  975. }
  976. `);
  977. export const getCustomerGroupsDocument = graphql(`
  978. query GetCustomerGroups($options: CustomerGroupListOptions) {
  979. customerGroups(options: $options) {
  980. items {
  981. id
  982. name
  983. }
  984. totalItems
  985. }
  986. }
  987. `);
  988. export const getCustomerGroupDocument = graphql(`
  989. query GetCustomerGroup($id: ID!, $options: CustomerListOptions) {
  990. customerGroup(id: $id) {
  991. id
  992. name
  993. customers(options: $options) {
  994. items {
  995. id
  996. }
  997. totalItems
  998. }
  999. }
  1000. }
  1001. `);
  1002. export const addCustomersToGroupDocument = graphql(
  1003. `
  1004. mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {
  1005. addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {
  1006. ...CustomerGroup
  1007. }
  1008. }
  1009. `,
  1010. [customerGroupFragment],
  1011. );
  1012. export const getCustomerWithGroupsDocument = graphql(`
  1013. query GetCustomerWithGroups($id: ID!) {
  1014. customer(id: $id) {
  1015. id
  1016. groups {
  1017. id
  1018. name
  1019. }
  1020. }
  1021. }
  1022. `);
  1023. export const adminTransitionToStateDocument = graphql(
  1024. `
  1025. mutation AdminTransition($id: ID!, $state: String!) {
  1026. transitionOrderToState(id: $id, state: $state) {
  1027. ...Order
  1028. ... on OrderStateTransitionError {
  1029. errorCode
  1030. message
  1031. transitionError
  1032. fromState
  1033. toState
  1034. }
  1035. }
  1036. }
  1037. `,
  1038. [orderFragment],
  1039. );
  1040. export const cancelOrderDocument = graphql(
  1041. `
  1042. mutation CancelOrder($input: CancelOrderInput!) {
  1043. cancelOrder(input: $input) {
  1044. ...CanceledOrder
  1045. ... on ErrorResult {
  1046. errorCode
  1047. message
  1048. }
  1049. }
  1050. }
  1051. `,
  1052. [canceledOrderFragment],
  1053. );
  1054. export const updateGlobalSettingsDocument = graphql(
  1055. `
  1056. mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {
  1057. updateGlobalSettings(input: $input) {
  1058. ...GlobalSettings
  1059. ... on ErrorResult {
  1060. errorCode
  1061. message
  1062. }
  1063. }
  1064. }
  1065. `,
  1066. [globalSettingsFragment],
  1067. );
  1068. export const updateRoleDocument = graphql(
  1069. `
  1070. mutation UpdateRole($input: UpdateRoleInput!) {
  1071. updateRole(input: $input) {
  1072. ...Role
  1073. }
  1074. }
  1075. `,
  1076. [roleFragment],
  1077. );
  1078. export const getProductsWithVariantPricesDocument = graphql(`
  1079. query GetProductsWithVariantPrices {
  1080. products {
  1081. items {
  1082. id
  1083. slug
  1084. variants {
  1085. id
  1086. price
  1087. priceWithTax
  1088. currencyCode
  1089. sku
  1090. facetValues {
  1091. id
  1092. code
  1093. }
  1094. }
  1095. }
  1096. }
  1097. }
  1098. `);
  1099. export const createProductOptionGroupDocument = graphql(
  1100. `
  1101. mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {
  1102. createProductOptionGroup(input: $input) {
  1103. ...ProductOptionGroup
  1104. }
  1105. }
  1106. `,
  1107. [productOptionGroupFragment],
  1108. );
  1109. export const addOptionGroupToProductDocument = graphql(
  1110. `
  1111. mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {
  1112. addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {
  1113. ...ProductWithOptions
  1114. }
  1115. }
  1116. `,
  1117. [productWithOptionsFragment],
  1118. );
  1119. export const removeOptionGroupFromProductDocument = graphql(
  1120. `
  1121. mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!, $force: Boolean) {
  1122. removeOptionGroupFromProduct(
  1123. productId: $productId
  1124. optionGroupId: $optionGroupId
  1125. force: $force
  1126. ) {
  1127. ...ProductWithOptions
  1128. ... on ProductOptionInUseError {
  1129. errorCode
  1130. message
  1131. optionGroupCode
  1132. productVariantCount
  1133. }
  1134. }
  1135. }
  1136. `,
  1137. [productWithOptionsFragment],
  1138. );
  1139. export const getOptionGroupDocument = graphql(`
  1140. query GetOptionGroup($id: ID!) {
  1141. productOptionGroup(id: $id) {
  1142. id
  1143. code
  1144. options {
  1145. id
  1146. code
  1147. }
  1148. }
  1149. }
  1150. `);
  1151. export const getProductVariantDocument = graphql(`
  1152. query GetProductVariant($id: ID!) {
  1153. productVariant(id: $id) {
  1154. id
  1155. name
  1156. }
  1157. }
  1158. `);
  1159. export const getProductWithVariantListDocument = graphql(
  1160. `
  1161. query GetProductWithVariantList($id: ID, $variantListOptions: ProductVariantListOptions) {
  1162. product(id: $id) {
  1163. id
  1164. variantList(options: $variantListOptions) {
  1165. items {
  1166. ...ProductVariant
  1167. }
  1168. totalItems
  1169. }
  1170. }
  1171. }
  1172. `,
  1173. [productVariantFragment],
  1174. );
  1175. export const createShippingMethodDocument = graphql(
  1176. `
  1177. mutation CreateShippingMethod($input: CreateShippingMethodInput!) {
  1178. createShippingMethod(input: $input) {
  1179. ...ShippingMethod
  1180. }
  1181. }
  1182. `,
  1183. [shippingMethodFragment],
  1184. );
  1185. export const settlePaymentDocument = graphql(
  1186. `
  1187. mutation SettlePayment($id: ID!) {
  1188. settlePayment(id: $id) {
  1189. ...Payment
  1190. ... on ErrorResult {
  1191. errorCode
  1192. message
  1193. }
  1194. ... on SettlePaymentError {
  1195. paymentErrorMessage
  1196. }
  1197. }
  1198. }
  1199. `,
  1200. [paymentFragment],
  1201. );
  1202. export const getOrderHistoryDocument = graphql(`
  1203. query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {
  1204. order(id: $id) {
  1205. id
  1206. history(options: $options) {
  1207. totalItems
  1208. items {
  1209. id
  1210. type
  1211. administrator {
  1212. id
  1213. }
  1214. data
  1215. }
  1216. }
  1217. }
  1218. }
  1219. `);
  1220. export const updateShippingMethodDocument = graphql(
  1221. `
  1222. mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {
  1223. updateShippingMethod(input: $input) {
  1224. ...ShippingMethod
  1225. }
  1226. }
  1227. `,
  1228. [shippingMethodFragment],
  1229. );
  1230. export const getAssetDocument = graphql(
  1231. `
  1232. query GetAsset($id: ID!) {
  1233. asset(id: $id) {
  1234. ...Asset
  1235. width
  1236. height
  1237. }
  1238. }
  1239. `,
  1240. [assetFragment],
  1241. );
  1242. export const getAssetFragmentFirstDocument = graphql(`
  1243. fragment AssetFragFirst on Asset {
  1244. id
  1245. preview
  1246. }
  1247. query GetAssetFragmentFirst($id: ID!) {
  1248. asset(id: $id) {
  1249. ...AssetFragFirst
  1250. }
  1251. }
  1252. `);
  1253. export const assetWithTagsAndFocalPointFragmentDocument = graphql(
  1254. `
  1255. fragment AssetWithTagsAndFocalPoint on Asset {
  1256. ...Asset
  1257. focalPoint {
  1258. x
  1259. y
  1260. }
  1261. tags {
  1262. id
  1263. value
  1264. }
  1265. }
  1266. `,
  1267. [assetFragment],
  1268. );
  1269. export const createAssetsDocument = graphql(
  1270. `
  1271. mutation CreateAssets($input: [CreateAssetInput!]!) {
  1272. createAssets(input: $input) {
  1273. ...AssetWithTagsAndFocalPoint
  1274. ... on MimeTypeError {
  1275. message
  1276. fileName
  1277. mimeType
  1278. }
  1279. }
  1280. }
  1281. `,
  1282. [assetWithTagsAndFocalPointFragmentDocument],
  1283. );
  1284. export const deleteShippingMethodDocument = graphql(`
  1285. mutation DeleteShippingMethod($id: ID!) {
  1286. deleteShippingMethod(id: $id) {
  1287. result
  1288. message
  1289. }
  1290. }
  1291. `);
  1292. export const assignPromotionsToChannelDocument = graphql(`
  1293. mutation AssignPromotionToChannel($input: AssignPromotionsToChannelInput!) {
  1294. assignPromotionsToChannel(input: $input) {
  1295. id
  1296. name
  1297. }
  1298. }
  1299. `);
  1300. export const removePromotionsFromChannelDocument = graphql(`
  1301. mutation RemovePromotionFromChannel($input: RemovePromotionsFromChannelInput!) {
  1302. removePromotionsFromChannel(input: $input) {
  1303. id
  1304. name
  1305. }
  1306. }
  1307. `);
  1308. export const getTaxRateDocument = graphql(
  1309. `
  1310. query GetTaxRate($id: ID!) {
  1311. taxRate(id: $id) {
  1312. ...TaxRate
  1313. }
  1314. }
  1315. `,
  1316. [taxRateFragment],
  1317. );
  1318. export const createTaxRateDocument = graphql(
  1319. `
  1320. mutation CreateTaxRate($input: CreateTaxRateInput!) {
  1321. createTaxRate(input: $input) {
  1322. ...TaxRate
  1323. }
  1324. }
  1325. `,
  1326. [taxRateFragment],
  1327. );
  1328. export const deleteTaxRateDocument = graphql(`
  1329. mutation DeleteTaxRate($id: ID!) {
  1330. deleteTaxRate(id: $id) {
  1331. result
  1332. message
  1333. }
  1334. }
  1335. `);
  1336. export const getTaxRatesListDocument = graphql(
  1337. `
  1338. query GetTaxRates($options: TaxRateListOptions) {
  1339. taxRates(options: $options) {
  1340. items {
  1341. ...TaxRate
  1342. }
  1343. totalItems
  1344. }
  1345. }
  1346. `,
  1347. [taxRateFragment],
  1348. );
  1349. export const getShippingMethodListDocument = graphql(
  1350. `
  1351. query GetShippingMethodList {
  1352. shippingMethods {
  1353. items {
  1354. ...ShippingMethod
  1355. }
  1356. totalItems
  1357. }
  1358. }
  1359. `,
  1360. [shippingMethodFragment],
  1361. );
  1362. export const getCollectionsDocument = graphql(`
  1363. query GetCollections {
  1364. collections {
  1365. items {
  1366. id
  1367. name
  1368. position
  1369. parent {
  1370. id
  1371. name
  1372. }
  1373. }
  1374. }
  1375. }
  1376. `);
  1377. export const transitionPaymentToStateDocument = graphql(
  1378. `
  1379. mutation TransitionPaymentToState($id: ID!, $state: String!) {
  1380. transitionPaymentToState(id: $id, state: $state) {
  1381. ...Payment
  1382. ... on ErrorResult {
  1383. errorCode
  1384. message
  1385. }
  1386. ... on PaymentStateTransitionError {
  1387. transitionError
  1388. }
  1389. }
  1390. }
  1391. `,
  1392. [paymentFragment],
  1393. );
  1394. export const getProductVariantListDocument = graphql(`
  1395. query GetProductVariantList($options: ProductVariantListOptions, $productId: ID) {
  1396. productVariants(options: $options, productId: $productId) {
  1397. items {
  1398. id
  1399. name
  1400. sku
  1401. price
  1402. priceWithTax
  1403. currencyCode
  1404. prices {
  1405. currencyCode
  1406. price
  1407. }
  1408. }
  1409. totalItems
  1410. }
  1411. }
  1412. `);
  1413. export const deletePromotionDocument = graphql(`
  1414. mutation DeletePromotion($id: ID!) {
  1415. deletePromotion(id: $id) {
  1416. result
  1417. }
  1418. }
  1419. `);
  1420. export const getChannelsDocument = graphql(`
  1421. query GetChannels {
  1422. channels {
  1423. items {
  1424. id
  1425. code
  1426. token
  1427. }
  1428. }
  1429. }
  1430. `);
  1431. export const assignCollectionsToChannelDocument = graphql(
  1432. `
  1433. mutation AssignCollectionsToChannel($input: AssignCollectionsToChannelInput!) {
  1434. assignCollectionsToChannel(input: $input) {
  1435. ...Collection
  1436. }
  1437. }
  1438. `,
  1439. [collectionFragment],
  1440. );
  1441. export const getCollectionDocument = graphql(
  1442. `
  1443. query GetCollection($id: ID, $slug: String, $variantListOptions: ProductVariantListOptions) {
  1444. collection(id: $id, slug: $slug) {
  1445. ...Collection
  1446. productVariants(options: $variantListOptions) {
  1447. items {
  1448. id
  1449. name
  1450. price
  1451. }
  1452. }
  1453. }
  1454. }
  1455. `,
  1456. [collectionFragment],
  1457. );
  1458. export const getFacetWithValuesDocument = graphql(
  1459. `
  1460. query GetFacetWithValues($id: ID!) {
  1461. facet(id: $id) {
  1462. ...FacetWithValues
  1463. }
  1464. }
  1465. `,
  1466. [facetWithValuesFragment],
  1467. );
  1468. export const getFacetWithValueListDocument = graphql(
  1469. `
  1470. query GetFacetWithValueList($id: ID!, $options: FacetValueListOptions) {
  1471. facet(id: $id) {
  1472. id
  1473. languageCode
  1474. isPrivate
  1475. code
  1476. name
  1477. valueList(options: $options) {
  1478. items {
  1479. ...FacetValue
  1480. }
  1481. totalItems
  1482. }
  1483. }
  1484. }
  1485. `,
  1486. [facetValueFragment],
  1487. );
  1488. export const getFacetValuesDocument = graphql(
  1489. `
  1490. query GetFacetValues($options: FacetValueListOptions) {
  1491. facetValues(options: $options) {
  1492. items {
  1493. ...FacetValue
  1494. }
  1495. totalItems
  1496. }
  1497. }
  1498. `,
  1499. [facetValueFragment],
  1500. );
  1501. export const getFacetValueDocument = graphql(
  1502. `
  1503. query GetFacetValue($id: ID!) {
  1504. facetValue(id: $id) {
  1505. ...FacetValue
  1506. }
  1507. }
  1508. `,
  1509. [facetValueFragment],
  1510. );
  1511. export const getPromotionDocument = graphql(
  1512. `
  1513. query GetPromotion($id: ID!) {
  1514. promotion(id: $id) {
  1515. ...Promotion
  1516. }
  1517. }
  1518. `,
  1519. [promotionFragment],
  1520. );
  1521. export const getOrderListDocument = graphql(`
  1522. query GetOrderList($options: OrderListOptions) {
  1523. orders(options: $options) {
  1524. items {
  1525. id
  1526. code
  1527. state
  1528. total
  1529. totalWithTax
  1530. totalQuantity
  1531. customer {
  1532. id
  1533. emailAddress
  1534. lastName
  1535. }
  1536. }
  1537. totalItems
  1538. }
  1539. }
  1540. `);
  1541. export const getOrderWithPaymentsDocument = graphql(`
  1542. query GetOrderWithPayments($id: ID!) {
  1543. order(id: $id) {
  1544. id
  1545. payments {
  1546. id
  1547. errorMessage
  1548. metadata
  1549. refunds {
  1550. id
  1551. total
  1552. }
  1553. }
  1554. }
  1555. }
  1556. `);
  1557. export const getOrderListWithQtyDocument = graphql(`
  1558. query GetOrderListWithQty($options: OrderListOptions) {
  1559. orders(options: $options) {
  1560. items {
  1561. id
  1562. code
  1563. totalQuantity
  1564. lines {
  1565. id
  1566. quantity
  1567. }
  1568. }
  1569. }
  1570. }
  1571. `);
  1572. export const refundOrderDocument = graphql(
  1573. `
  1574. mutation RefundOrder($input: RefundOrderInput!) {
  1575. refundOrder(input: $input) {
  1576. ...Refund
  1577. ... on ErrorResult {
  1578. errorCode
  1579. message
  1580. }
  1581. }
  1582. }
  1583. `,
  1584. [refundFragment],
  1585. );
  1586. export const settleRefundDocument = graphql(
  1587. `
  1588. mutation SettleRefund($input: SettleRefundInput!) {
  1589. settleRefund(input: $input) {
  1590. ...Refund
  1591. ... on ErrorResult {
  1592. errorCode
  1593. message
  1594. }
  1595. }
  1596. }
  1597. `,
  1598. [refundFragment],
  1599. );
  1600. export const addNoteToOrderDocument = graphql(`
  1601. mutation AddNoteToOrder($input: AddNoteToOrderInput!) {
  1602. addNoteToOrder(input: $input) {
  1603. id
  1604. }
  1605. }
  1606. `);
  1607. export const updateOrderNoteDocument = graphql(`
  1608. mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {
  1609. updateOrderNote(input: $input) {
  1610. id
  1611. data
  1612. isPublic
  1613. }
  1614. }
  1615. `);
  1616. export const deleteOrderNoteDocument = graphql(`
  1617. mutation DeleteOrderNote($id: ID!) {
  1618. deleteOrderNote(id: $id) {
  1619. result
  1620. message
  1621. }
  1622. }
  1623. `);
  1624. export const getOrderLineFulfillmentsDocument = graphql(`
  1625. query GetOrderLineFulfillments($id: ID!) {
  1626. order(id: $id) {
  1627. id
  1628. lines {
  1629. id
  1630. fulfillmentLines {
  1631. fulfillment {
  1632. id
  1633. state
  1634. }
  1635. orderLineId
  1636. quantity
  1637. }
  1638. }
  1639. }
  1640. }
  1641. `);
  1642. export const getOrderListFulfillmentsDocument = graphql(`
  1643. query GetOrderListFulfillments {
  1644. orders {
  1645. items {
  1646. id
  1647. state
  1648. fulfillments {
  1649. id
  1650. state
  1651. nextStates
  1652. method
  1653. }
  1654. }
  1655. }
  1656. }
  1657. `);
  1658. export const cancelPaymentDocument = graphql(
  1659. `
  1660. mutation CancelPayment($paymentId: ID!) {
  1661. cancelPayment(id: $paymentId) {
  1662. ...Payment
  1663. ... on ErrorResult {
  1664. errorCode
  1665. message
  1666. }
  1667. ... on PaymentStateTransitionError {
  1668. transitionError
  1669. }
  1670. ... on CancelPaymentError {
  1671. paymentErrorMessage
  1672. }
  1673. }
  1674. }
  1675. `,
  1676. [paymentFragment],
  1677. );
  1678. export const setOrderCustomerDocument = graphql(`
  1679. mutation SetOrderCustomer($input: SetOrderCustomerInput!) {
  1680. setOrderCustomer(input: $input) {
  1681. id
  1682. customer {
  1683. id
  1684. }
  1685. }
  1686. }
  1687. `);
  1688. export const getOrderAssetEdgeCaseDocument = graphql(`
  1689. query OrderAssetEdgeCase($id: ID!) {
  1690. order(id: $id) {
  1691. lines {
  1692. id
  1693. }
  1694. id
  1695. lines {
  1696. id
  1697. featuredAsset {
  1698. preview
  1699. }
  1700. }
  1701. }
  1702. }
  1703. `);
  1704. export const getOrderWithLineCalculatedPropsDocument = graphql(`
  1705. query GetOrderWithLineCalculatedProps($id: ID!) {
  1706. order(id: $id) {
  1707. id
  1708. lines {
  1709. id
  1710. linePriceWithTax
  1711. quantity
  1712. }
  1713. }
  1714. }
  1715. `);
  1716. export const addManualPaymentDocument = graphql(`
  1717. mutation AddManualPaymentToOrder($input: ManualPaymentInput!) {
  1718. addManualPaymentToOrder(input: $input) {
  1719. ... on Order {
  1720. id
  1721. code
  1722. state
  1723. active
  1724. total
  1725. totalWithTax
  1726. lines {
  1727. id
  1728. }
  1729. payments {
  1730. id
  1731. state
  1732. }
  1733. }
  1734. ... on ErrorResult {
  1735. errorCode
  1736. message
  1737. }
  1738. }
  1739. }
  1740. `);
  1741. export const modifyOrderDocument = graphql(
  1742. `
  1743. mutation ModifyOrder($input: ModifyOrderInput!) {
  1744. modifyOrder(input: $input) {
  1745. ...OrderWithModifications
  1746. ... on ErrorResult {
  1747. errorCode
  1748. message
  1749. }
  1750. }
  1751. }
  1752. `,
  1753. [orderWithModificationsFragment],
  1754. );
  1755. export const addManualPaymentToOrderDocument = graphql(
  1756. `
  1757. mutation AddManualPayment($input: ManualPaymentInput!) {
  1758. addManualPaymentToOrder(input: $input) {
  1759. ...OrderWithModifications
  1760. ... on ErrorResult {
  1761. errorCode
  1762. message
  1763. }
  1764. }
  1765. }
  1766. `,
  1767. [orderWithModificationsFragment],
  1768. );
  1769. export const getOrderWithModificationsDocument = graphql(
  1770. `
  1771. query GetOrderWithModifications($id: ID!) {
  1772. order(id: $id) {
  1773. ...OrderWithModifications
  1774. }
  1775. }
  1776. `,
  1777. [orderWithModificationsFragment],
  1778. );
  1779. export const getOrderWithCustomFieldsDocument = graphql(`
  1780. query GetOrderCustomFields($id: ID!) {
  1781. order(id: $id) {
  1782. # Ignore error - customFields are dynamically generated at runtime, not in introspection schema
  1783. customFields {
  1784. points
  1785. }
  1786. lines {
  1787. id
  1788. # Ignore error - customFields are dynamically generated at runtime, not in introspection schema
  1789. customFields {
  1790. color
  1791. }
  1792. }
  1793. }
  1794. }
  1795. `);
  1796. export const getSettingsStoreValueDocument = graphql(`
  1797. query GetSettingsStoreValue($key: String!) {
  1798. getSettingsStoreValue(key: $key)
  1799. }
  1800. `);
  1801. export const getSettingsStoreValuesDocument = graphql(`
  1802. query GetSettingsStoreValues($keys: [String!]!) {
  1803. getSettingsStoreValues(keys: $keys)
  1804. }
  1805. `);
  1806. export const setSettingsStoreValueDocument = graphql(`
  1807. mutation SetSettingsStoreValue($input: SettingsStoreInput!) {
  1808. setSettingsStoreValue(input: $input) {
  1809. key
  1810. result
  1811. error
  1812. }
  1813. }
  1814. `);
  1815. export const setSettingsStoreValuesDocument = graphql(`
  1816. mutation SetSettingsStoreValues($inputs: [SettingsStoreInput!]!) {
  1817. setSettingsStoreValues(inputs: $inputs) {
  1818. key
  1819. result
  1820. error
  1821. }
  1822. }
  1823. `);
  1824. export const getCheckersDocument = graphql(`
  1825. query GetCheckers {
  1826. shippingEligibilityCheckers {
  1827. code
  1828. args {
  1829. defaultValue
  1830. description
  1831. label
  1832. list
  1833. name
  1834. required
  1835. type
  1836. }
  1837. }
  1838. }
  1839. `);
  1840. export const getZonesDocument = graphql(`
  1841. query GetZones($options: ZoneListOptions) {
  1842. zones(options: $options) {
  1843. items {
  1844. id
  1845. name
  1846. }
  1847. totalItems
  1848. }
  1849. }
  1850. `);
  1851. export const getZoneDocument = graphql(
  1852. `
  1853. query GetZone($id: ID!) {
  1854. zone(id: $id) {
  1855. ...Zone
  1856. }
  1857. }
  1858. `,
  1859. [zoneFragment],
  1860. );
  1861. export const getActiveChannelWithZoneMembersDocument = graphql(`
  1862. query GetActiveChannelWithZoneMembers {
  1863. activeChannel {
  1864. id
  1865. defaultShippingZone {
  1866. id
  1867. members {
  1868. name
  1869. }
  1870. }
  1871. }
  1872. }
  1873. `);
  1874. export const createZoneDocument = graphql(
  1875. `
  1876. mutation CreateZone($input: CreateZoneInput!) {
  1877. createZone(input: $input) {
  1878. ...Zone
  1879. }
  1880. }
  1881. `,
  1882. [zoneFragment],
  1883. );
  1884. export const updateZoneDocument = graphql(
  1885. `
  1886. mutation UpdateZone($input: UpdateZoneInput!) {
  1887. updateZone(input: $input) {
  1888. ...Zone
  1889. }
  1890. }
  1891. `,
  1892. [zoneFragment],
  1893. );
  1894. export const deleteZoneDocument = graphql(`
  1895. mutation DeleteZone($id: ID!) {
  1896. deleteZone(id: $id) {
  1897. result
  1898. message
  1899. }
  1900. }
  1901. `);
  1902. export const addMembersToZoneDocument = graphql(
  1903. `
  1904. mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {
  1905. addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {
  1906. ...Zone
  1907. }
  1908. }
  1909. `,
  1910. [zoneFragment],
  1911. );
  1912. export const removeMembersFromZoneDocument = graphql(
  1913. `
  1914. mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {
  1915. removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {
  1916. ...Zone
  1917. }
  1918. }
  1919. `,
  1920. [zoneFragment],
  1921. );
  1922. export const getProductWithCustomFieldsDocument = graphql(`
  1923. query GetProductWithCustomFields($id: ID!) {
  1924. product(id: $id) {
  1925. id
  1926. customFields {
  1927. publicField
  1928. authenticatedField
  1929. updateProductField
  1930. updateProductOrCustomerField
  1931. superadminField
  1932. }
  1933. }
  1934. }
  1935. `);
  1936. export const getProductWithPublicCustomFieldsDocument = graphql(`
  1937. query GetProductWithPublicCustomFields($id: ID!) {
  1938. product(id: $id) {
  1939. id
  1940. customFields {
  1941. publicField
  1942. authenticatedField
  1943. updateProductField
  1944. }
  1945. }
  1946. }
  1947. `);
  1948. export const authenticateDocument = graphql(
  1949. `
  1950. mutation Authenticate($input: AuthenticationInput!) {
  1951. authenticate(input: $input) {
  1952. ...CurrentUser
  1953. ... on InvalidCredentialsError {
  1954. authenticationError
  1955. errorCode
  1956. message
  1957. }
  1958. }
  1959. }
  1960. `,
  1961. [currentUserFragment],
  1962. );
  1963. export const getCustomersDocument = graphql(`
  1964. query GetCustomers {
  1965. customers {
  1966. totalItems
  1967. items {
  1968. id
  1969. emailAddress
  1970. }
  1971. }
  1972. }
  1973. `);
  1974. export const getCustomerUserAuthDocument = graphql(`
  1975. query GetCustomerUserAuth($id: ID!) {
  1976. customer(id: $id) {
  1977. id
  1978. user {
  1979. id
  1980. verified
  1981. authenticationMethods {
  1982. id
  1983. strategy
  1984. }
  1985. }
  1986. }
  1987. }
  1988. `);
  1989. export const updatePromotionDocument = graphql(
  1990. `
  1991. mutation UpdatePromotion($input: UpdatePromotionInput!) {
  1992. updatePromotion(input: $input) {
  1993. ...Promotion
  1994. ... on ErrorResult {
  1995. errorCode
  1996. message
  1997. }
  1998. }
  1999. }
  2000. `,
  2001. [promotionFragment],
  2002. );
  2003. export const getPromotionListDocument = graphql(
  2004. `
  2005. query GetPromotionList($options: PromotionListOptions) {
  2006. promotions(options: $options) {
  2007. items {
  2008. ...Promotion
  2009. }
  2010. totalItems
  2011. }
  2012. }
  2013. `,
  2014. [promotionFragment],
  2015. );
  2016. export const configurableOperationDefFragment = graphql(`
  2017. fragment ConfigurableOperationDef on ConfigurableOperationDefinition {
  2018. args {
  2019. name
  2020. type
  2021. ui
  2022. }
  2023. code
  2024. description
  2025. }
  2026. `);
  2027. export const getAdjustmentOperationsDocument = graphql(
  2028. `
  2029. query GetAdjustmentOperations {
  2030. promotionActions {
  2031. ...ConfigurableOperationDef
  2032. }
  2033. promotionConditions {
  2034. ...ConfigurableOperationDef
  2035. }
  2036. }
  2037. `,
  2038. [configurableOperationDefFragment],
  2039. );
  2040. export const getCustomerWithUserDocument = graphql(`
  2041. query GetCustomerWithUser($id: ID!) {
  2042. customer(id: $id) {
  2043. id
  2044. user {
  2045. id
  2046. identifier
  2047. verified
  2048. }
  2049. }
  2050. }
  2051. `);
  2052. export const getCustomerOrdersDocument = graphql(`
  2053. query GetCustomerOrders($id: ID!) {
  2054. customer(id: $id) {
  2055. orders {
  2056. items {
  2057. id
  2058. }
  2059. totalItems
  2060. }
  2061. }
  2062. }
  2063. `);
  2064. export const addNoteToCustomerDocument = graphql(
  2065. `
  2066. mutation AddNoteToCustomer($input: AddNoteToCustomerInput!) {
  2067. addNoteToCustomer(input: $input) {
  2068. ...Customer
  2069. }
  2070. }
  2071. `,
  2072. [customerFragment],
  2073. );
  2074. export const deleteCustomerAddressDocument = graphql(`
  2075. mutation DeleteCustomerAddress($id: ID!) {
  2076. deleteCustomerAddress(id: $id) {
  2077. success
  2078. }
  2079. }
  2080. `);