@eide/uniformgen 0.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 (299) hide show
  1. package/README.md +356 -0
  2. package/dist/auth/credentials.d.ts +58 -0
  3. package/dist/auth/credentials.d.ts.map +1 -0
  4. package/dist/auth/credentials.js +107 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +563 -0
  8. package/dist/commands/init.d.ts +11 -0
  9. package/dist/commands/init.d.ts.map +1 -0
  10. package/dist/commands/init.js +113 -0
  11. package/dist/commands/login.d.ts +9 -0
  12. package/dist/commands/login.d.ts.map +1 -0
  13. package/dist/commands/login.js +158 -0
  14. package/dist/commands/logout.d.ts +5 -0
  15. package/dist/commands/logout.d.ts.map +1 -0
  16. package/dist/commands/logout.js +13 -0
  17. package/dist/commands/push.d.ts +13 -0
  18. package/dist/commands/push.d.ts.map +1 -0
  19. package/dist/commands/push.js +328 -0
  20. package/dist/commands/scaffold.d.ts +19 -0
  21. package/dist/commands/scaffold.d.ts.map +1 -0
  22. package/dist/commands/scaffold.js +366 -0
  23. package/dist/commands/seed.d.ts +20 -0
  24. package/dist/commands/seed.d.ts.map +1 -0
  25. package/dist/commands/seed.js +380 -0
  26. package/dist/commands/select-project.d.ts +10 -0
  27. package/dist/commands/select-project.d.ts.map +1 -0
  28. package/dist/commands/select-project.js +277 -0
  29. package/dist/commands/setup.d.ts +5 -0
  30. package/dist/commands/setup.d.ts.map +1 -0
  31. package/dist/commands/setup.js +51 -0
  32. package/dist/commands/sync.d.ts +13 -0
  33. package/dist/commands/sync.d.ts.map +1 -0
  34. package/dist/commands/sync.js +318 -0
  35. package/dist/commands/whoami.d.ts +5 -0
  36. package/dist/commands/whoami.d.ts.map +1 -0
  37. package/dist/commands/whoami.js +31 -0
  38. package/dist/config/load-config.d.ts +6 -0
  39. package/dist/config/load-config.d.ts.map +1 -0
  40. package/dist/config/load-config.js +103 -0
  41. package/dist/config/settings.d.ts +20 -0
  42. package/dist/config/settings.d.ts.map +1 -0
  43. package/dist/config/settings.js +64 -0
  44. package/dist/config/types.d.ts +152 -0
  45. package/dist/config/types.d.ts.map +1 -0
  46. package/dist/config/types.js +94 -0
  47. package/dist/fetcher/fetch-schemas.d.ts +140 -0
  48. package/dist/fetcher/fetch-schemas.d.ts.map +1 -0
  49. package/dist/fetcher/fetch-schemas.js +223 -0
  50. package/dist/fetcher/fetch-workflows.d.ts +53 -0
  51. package/dist/fetcher/fetch-workflows.d.ts.map +1 -0
  52. package/dist/fetcher/fetch-workflows.js +164 -0
  53. package/dist/generated/hooks/customer-detail.d.ts +74 -0
  54. package/dist/generated/hooks/customer-detail.d.ts.map +1 -0
  55. package/dist/generated/hooks/customer-detail.js +113 -0
  56. package/dist/generated/hooks/design-system.d.ts +74 -0
  57. package/dist/generated/hooks/design-system.d.ts.map +1 -0
  58. package/dist/generated/hooks/design-system.js +109 -0
  59. package/dist/generated/hooks/index.d.ts +16 -0
  60. package/dist/generated/hooks/index.d.ts.map +1 -0
  61. package/dist/generated/hooks/index.js +14 -0
  62. package/dist/generated/hooks/shopify-collection.d.ts +74 -0
  63. package/dist/generated/hooks/shopify-collection.d.ts.map +1 -0
  64. package/dist/generated/hooks/shopify-collection.js +113 -0
  65. package/dist/generated/hooks/shopify-market.d.ts +74 -0
  66. package/dist/generated/hooks/shopify-market.d.ts.map +1 -0
  67. package/dist/generated/hooks/shopify-market.js +109 -0
  68. package/dist/generated/hooks/shopify-product.d.ts +74 -0
  69. package/dist/generated/hooks/shopify-product.d.ts.map +1 -0
  70. package/dist/generated/hooks/shopify-product.js +113 -0
  71. package/dist/generated/hooks/shopify-variant.d.ts +74 -0
  72. package/dist/generated/hooks/shopify-variant.d.ts.map +1 -0
  73. package/dist/generated/hooks/shopify-variant.js +113 -0
  74. package/dist/generated/hooks/template.d.ts +74 -0
  75. package/dist/generated/hooks/template.d.ts.map +1 -0
  76. package/dist/generated/hooks/template.js +107 -0
  77. package/dist/generated/types/config.d.ts +88 -0
  78. package/dist/generated/types/config.d.ts.map +1 -0
  79. package/dist/generated/types/config.js +14 -0
  80. package/dist/generated/types/data-models/index.d.ts +7 -0
  81. package/dist/generated/types/data-models/index.d.ts.map +1 -0
  82. package/dist/generated/types/data-models/index.js +6 -0
  83. package/dist/generated/types/data-models/test.d.ts +29 -0
  84. package/dist/generated/types/data-models/test.d.ts.map +1 -0
  85. package/dist/generated/types/data-models/test.js +1 -0
  86. package/dist/generated/types/data-models/watch.d.ts +26 -0
  87. package/dist/generated/types/data-models/watch.d.ts.map +1 -0
  88. package/dist/generated/types/data-models/watch.js +1 -0
  89. package/dist/generated/types/field-types.d.ts +255 -0
  90. package/dist/generated/types/field-types.d.ts.map +1 -0
  91. package/dist/generated/types/field-types.js +35 -0
  92. package/dist/generated/types/hooks.d.ts +106 -0
  93. package/dist/generated/types/hooks.d.ts.map +1 -0
  94. package/dist/generated/types/hooks.js +9 -0
  95. package/dist/generated/types/index.d.ts +10 -0
  96. package/dist/generated/types/index.d.ts.map +1 -0
  97. package/dist/generated/types/index.js +9 -0
  98. package/dist/generated/types/models/button-variant.d.ts +16 -0
  99. package/dist/generated/types/models/button-variant.d.ts.map +1 -0
  100. package/dist/generated/types/models/button-variant.js +1 -0
  101. package/dist/generated/types/models/color-palette.d.ts +27 -0
  102. package/dist/generated/types/models/color-palette.d.ts.map +1 -0
  103. package/dist/generated/types/models/color-palette.js +1 -0
  104. package/dist/generated/types/models/color-with-scale.d.ts +15 -0
  105. package/dist/generated/types/models/color-with-scale.d.ts.map +1 -0
  106. package/dist/generated/types/models/color-with-scale.js +1 -0
  107. package/dist/generated/types/models/context.d.ts +53 -0
  108. package/dist/generated/types/models/context.d.ts.map +1 -0
  109. package/dist/generated/types/models/context.js +51 -0
  110. package/dist/generated/types/models/customer-detail.d.ts +32 -0
  111. package/dist/generated/types/models/customer-detail.d.ts.map +1 -0
  112. package/dist/generated/types/models/customer-detail.js +26 -0
  113. package/dist/generated/types/models/design-system-badges.d.ts +16 -0
  114. package/dist/generated/types/models/design-system-badges.d.ts.map +1 -0
  115. package/dist/generated/types/models/design-system-badges.js +1 -0
  116. package/dist/generated/types/models/design-system-buttons.d.ts +17 -0
  117. package/dist/generated/types/models/design-system-buttons.d.ts.map +1 -0
  118. package/dist/generated/types/models/design-system-buttons.js +1 -0
  119. package/dist/generated/types/models/design-system-cards.d.ts +16 -0
  120. package/dist/generated/types/models/design-system-cards.d.ts.map +1 -0
  121. package/dist/generated/types/models/design-system-cards.js +1 -0
  122. package/dist/generated/types/models/design-system-colors.d.ts +12 -0
  123. package/dist/generated/types/models/design-system-colors.d.ts.map +1 -0
  124. package/dist/generated/types/models/design-system-colors.js +1 -0
  125. package/dist/generated/types/models/design-system-dark-mode.d.ts +13 -0
  126. package/dist/generated/types/models/design-system-dark-mode.d.ts.map +1 -0
  127. package/dist/generated/types/models/design-system-dark-mode.js +1 -0
  128. package/dist/generated/types/models/design-system-focus-ring.d.ts +14 -0
  129. package/dist/generated/types/models/design-system-focus-ring.d.ts.map +1 -0
  130. package/dist/generated/types/models/design-system-focus-ring.js +1 -0
  131. package/dist/generated/types/models/design-system-grid.d.ts +18 -0
  132. package/dist/generated/types/models/design-system-grid.d.ts.map +1 -0
  133. package/dist/generated/types/models/design-system-grid.js +1 -0
  134. package/dist/generated/types/models/design-system-inputs.d.ts +26 -0
  135. package/dist/generated/types/models/design-system-inputs.d.ts.map +1 -0
  136. package/dist/generated/types/models/design-system-inputs.js +1 -0
  137. package/dist/generated/types/models/design-system-links.d.ts +16 -0
  138. package/dist/generated/types/models/design-system-links.d.ts.map +1 -0
  139. package/dist/generated/types/models/design-system-links.js +1 -0
  140. package/dist/generated/types/models/design-system-shadows.d.ts +20 -0
  141. package/dist/generated/types/models/design-system-shadows.d.ts.map +1 -0
  142. package/dist/generated/types/models/design-system-shadows.js +1 -0
  143. package/dist/generated/types/models/design-system-spacing.d.ts +13 -0
  144. package/dist/generated/types/models/design-system-spacing.d.ts.map +1 -0
  145. package/dist/generated/types/models/design-system-spacing.js +1 -0
  146. package/dist/generated/types/models/design-system-transitions.d.ts +15 -0
  147. package/dist/generated/types/models/design-system-transitions.d.ts.map +1 -0
  148. package/dist/generated/types/models/design-system-transitions.js +1 -0
  149. package/dist/generated/types/models/design-system-typography.d.ts +21 -0
  150. package/dist/generated/types/models/design-system-typography.d.ts.map +1 -0
  151. package/dist/generated/types/models/design-system-typography.js +1 -0
  152. package/dist/generated/types/models/design-system.d.ts +138 -0
  153. package/dist/generated/types/models/design-system.d.ts.map +1 -0
  154. package/dist/generated/types/models/design-system.js +64 -0
  155. package/dist/generated/types/models/experiment.d.ts +57 -0
  156. package/dist/generated/types/models/experiment.d.ts.map +1 -0
  157. package/dist/generated/types/models/experiment.js +55 -0
  158. package/dist/generated/types/models/font-file.d.ts +16 -0
  159. package/dist/generated/types/models/font-file.d.ts.map +1 -0
  160. package/dist/generated/types/models/font-file.js +1 -0
  161. package/dist/generated/types/models/index.d.ts +38 -0
  162. package/dist/generated/types/models/index.d.ts.map +1 -0
  163. package/dist/generated/types/models/index.js +12 -0
  164. package/dist/generated/types/models/integration.d.ts +32 -0
  165. package/dist/generated/types/models/integration.d.ts.map +1 -0
  166. package/dist/generated/types/models/integration.js +26 -0
  167. package/dist/generated/types/models/route-tree.d.ts +43 -0
  168. package/dist/generated/types/models/route-tree.d.ts.map +1 -0
  169. package/dist/generated/types/models/route-tree.js +39 -0
  170. package/dist/generated/types/models/segment.d.ts +57 -0
  171. package/dist/generated/types/models/segment.d.ts.map +1 -0
  172. package/dist/generated/types/models/segment.js +55 -0
  173. package/dist/generated/types/models/shopify-collection.d.ts +32 -0
  174. package/dist/generated/types/models/shopify-collection.d.ts.map +1 -0
  175. package/dist/generated/types/models/shopify-collection.js +26 -0
  176. package/dist/generated/types/models/shopify-market.d.ts +32 -0
  177. package/dist/generated/types/models/shopify-market.d.ts.map +1 -0
  178. package/dist/generated/types/models/shopify-market.js +26 -0
  179. package/dist/generated/types/models/shopify-product.d.ts +32 -0
  180. package/dist/generated/types/models/shopify-product.d.ts.map +1 -0
  181. package/dist/generated/types/models/shopify-product.js +26 -0
  182. package/dist/generated/types/models/shopify-variant.d.ts +32 -0
  183. package/dist/generated/types/models/shopify-variant.d.ts.map +1 -0
  184. package/dist/generated/types/models/shopify-variant.js +26 -0
  185. package/dist/generated/types/models/template.d.ts +53 -0
  186. package/dist/generated/types/models/template.d.ts.map +1 -0
  187. package/dist/generated/types/models/template.js +40 -0
  188. package/dist/generated/types/models/typography-variant.d.ts +15 -0
  189. package/dist/generated/types/models/typography-variant.d.ts.map +1 -0
  190. package/dist/generated/types/models/typography-variant.js +1 -0
  191. package/dist/generated/types/scalars.d.ts +56 -0
  192. package/dist/generated/types/scalars.d.ts.map +1 -0
  193. package/dist/generated/types/scalars.js +6 -0
  194. package/dist/generators/admin/index.d.ts +32 -0
  195. package/dist/generators/admin/index.d.ts.map +1 -0
  196. package/dist/generators/admin/index.js +219 -0
  197. package/dist/generators/admin/mutations.d.ts +23 -0
  198. package/dist/generators/admin/mutations.d.ts.map +1 -0
  199. package/dist/generators/admin/mutations.js +424 -0
  200. package/dist/generators/admin/queries.d.ts +20 -0
  201. package/dist/generators/admin/queries.d.ts.map +1 -0
  202. package/dist/generators/admin/queries.js +476 -0
  203. package/dist/generators/admin/types.d.ts +28 -0
  204. package/dist/generators/admin/types.d.ts.map +1 -0
  205. package/dist/generators/admin/types.js +254 -0
  206. package/dist/generators/cms/index.d.ts +29 -0
  207. package/dist/generators/cms/index.d.ts.map +1 -0
  208. package/dist/generators/cms/index.js +126 -0
  209. package/dist/generators/cms/route.d.ts +27 -0
  210. package/dist/generators/cms/route.d.ts.map +1 -0
  211. package/dist/generators/cms/route.js +409 -0
  212. package/dist/generators/cms/types.d.ts +15 -0
  213. package/dist/generators/cms/types.d.ts.map +1 -0
  214. package/dist/generators/cms/types.js +137 -0
  215. package/dist/generators/contexts/index.d.ts +25 -0
  216. package/dist/generators/contexts/index.d.ts.map +1 -0
  217. package/dist/generators/contexts/index.js +591 -0
  218. package/dist/generators/documents/data-models.d.ts +6 -0
  219. package/dist/generators/documents/data-models.d.ts.map +1 -0
  220. package/dist/generators/documents/data-models.js +61 -0
  221. package/dist/generators/documents/entity-models.d.ts +7 -0
  222. package/dist/generators/documents/entity-models.d.ts.map +1 -0
  223. package/dist/generators/documents/entity-models.js +87 -0
  224. package/dist/generators/documents/workflows.d.ts +11 -0
  225. package/dist/generators/documents/workflows.d.ts.map +1 -0
  226. package/dist/generators/documents/workflows.js +101 -0
  227. package/dist/generators/filters/index.d.ts +16 -0
  228. package/dist/generators/filters/index.d.ts.map +1 -0
  229. package/dist/generators/filters/index.js +384 -0
  230. package/dist/generators/hooks/agnostic.d.ts +16 -0
  231. package/dist/generators/hooks/agnostic.d.ts.map +1 -0
  232. package/dist/generators/hooks/agnostic.js +248 -0
  233. package/dist/generators/hooks/index.d.ts +9 -0
  234. package/dist/generators/hooks/index.d.ts.map +1 -0
  235. package/dist/generators/hooks/index.js +8 -0
  236. package/dist/generators/hooks/react.d.ts +16 -0
  237. package/dist/generators/hooks/react.d.ts.map +1 -0
  238. package/dist/generators/hooks/react.js +394 -0
  239. package/dist/generators/hooks/remix.d.ts +16 -0
  240. package/dist/generators/hooks/remix.d.ts.map +1 -0
  241. package/dist/generators/hooks/remix.js +349 -0
  242. package/dist/generators/hooks/workflows.d.ts +23 -0
  243. package/dist/generators/hooks/workflows.d.ts.map +1 -0
  244. package/dist/generators/hooks/workflows.js +312 -0
  245. package/dist/generators/resolve/index.d.ts +13 -0
  246. package/dist/generators/resolve/index.d.ts.map +1 -0
  247. package/dist/generators/resolve/index.js +13 -0
  248. package/dist/generators/resolve/platform.d.ts +29 -0
  249. package/dist/generators/resolve/platform.d.ts.map +1 -0
  250. package/dist/generators/resolve/platform.js +479 -0
  251. package/dist/generators/types/config.d.ts +7 -0
  252. package/dist/generators/types/config.d.ts.map +1 -0
  253. package/dist/generators/types/config.js +113 -0
  254. package/dist/generators/types/data-models.d.ts +10 -0
  255. package/dist/generators/types/data-models.d.ts.map +1 -0
  256. package/dist/generators/types/data-models.js +100 -0
  257. package/dist/generators/types/entity-models.d.ts +13 -0
  258. package/dist/generators/types/entity-models.d.ts.map +1 -0
  259. package/dist/generators/types/entity-models.js +241 -0
  260. package/dist/generators/types/field-types.d.ts +9 -0
  261. package/dist/generators/types/field-types.d.ts.map +1 -0
  262. package/dist/generators/types/field-types.js +651 -0
  263. package/dist/generators/types/hooks.d.ts +7 -0
  264. package/dist/generators/types/hooks.d.ts.map +1 -0
  265. package/dist/generators/types/hooks.js +132 -0
  266. package/dist/generators/types/scalars.d.ts +6 -0
  267. package/dist/generators/types/scalars.d.ts.map +1 -0
  268. package/dist/generators/types/scalars.js +68 -0
  269. package/dist/generators/types/user-details.d.ts +6 -0
  270. package/dist/generators/types/user-details.d.ts.map +1 -0
  271. package/dist/generators/types/user-details.js +60 -0
  272. package/dist/generators/types/workflows.d.ts +15 -0
  273. package/dist/generators/types/workflows.d.ts.map +1 -0
  274. package/dist/generators/types/workflows.js +163 -0
  275. package/dist/graphql/generated/gql.d.ts +47 -0
  276. package/dist/graphql/generated/gql.d.ts.map +1 -0
  277. package/dist/graphql/generated/gql.js +10 -0
  278. package/dist/graphql/generated/graphql.d.ts +8455 -0
  279. package/dist/graphql/generated/graphql.d.ts.map +1 -0
  280. package/dist/graphql/generated/graphql.js +573 -0
  281. package/dist/graphql/generated/index.d.ts +2 -0
  282. package/dist/graphql/generated/index.d.ts.map +1 -0
  283. package/dist/graphql/generated/index.js +1 -0
  284. package/dist/index.d.ts +13 -0
  285. package/dist/index.d.ts.map +1 -0
  286. package/dist/index.js +9 -0
  287. package/dist/schema/define-entity-model.d.ts +122 -0
  288. package/dist/schema/define-entity-model.d.ts.map +1 -0
  289. package/dist/schema/define-entity-model.js +59 -0
  290. package/dist/schema/schema-loader.d.ts +10 -0
  291. package/dist/schema/schema-loader.d.ts.map +1 -0
  292. package/dist/schema/schema-loader.js +91 -0
  293. package/dist/utils/field-mapping.d.ts +83 -0
  294. package/dist/utils/field-mapping.d.ts.map +1 -0
  295. package/dist/utils/field-mapping.js +334 -0
  296. package/dist/writer/write-files.d.ts +12 -0
  297. package/dist/writer/write-files.d.ts.map +1 -0
  298. package/dist/writer/write-files.js +35 -0
  299. package/package.json +70 -0
@@ -0,0 +1,164 @@
1
+ import { GraphQLClient, gql } from 'graphql-request';
2
+ /**
3
+ * GraphQL query to fetch workflows with API touchpoint
4
+ */
5
+ const GET_API_WORKFLOWS = gql `
6
+ query GetApiWorkflows {
7
+ workflows(isActive: true, limit: 100) {
8
+ items {
9
+ id
10
+ key
11
+ name
12
+ description
13
+ supportedTouchPoints
14
+ input
15
+ outputs
16
+ isActive
17
+ }
18
+ total
19
+ }
20
+ }
21
+ `;
22
+ /**
23
+ * Get the internal GraphQL endpoint URL from the base API URL
24
+ */
25
+ function getInternalGraphQLEndpoint(apiUrl) {
26
+ const base = apiUrl.replace(/\/$/, '').replace(/\/graphql$/, '');
27
+ return `${base}/graphql`;
28
+ }
29
+ /**
30
+ * Derive output schema from workflow outputs
31
+ * Since outputs define what the workflow produces, we map them to a schema
32
+ */
33
+ function deriveOutputSchema(outputs) {
34
+ const result = [];
35
+ for (const output of outputs) {
36
+ switch (output.type) {
37
+ case 'inline':
38
+ // Inline outputs return the result directly
39
+ result.push({
40
+ key: 'result',
41
+ type: 'json',
42
+ description: 'Workflow result',
43
+ });
44
+ break;
45
+ case 'update-field':
46
+ // Field update outputs indicate what field was updated
47
+ if (output.fieldPath) {
48
+ result.push({
49
+ key: 'updatedField',
50
+ type: 'string',
51
+ description: `Updated field: ${output.fieldPath}`,
52
+ });
53
+ }
54
+ break;
55
+ case 'update-fields':
56
+ // Multiple field updates
57
+ if (output.fieldMapping) {
58
+ result.push({
59
+ key: 'updatedFields',
60
+ type: 'json',
61
+ description: 'Updated fields mapping',
62
+ });
63
+ }
64
+ break;
65
+ case 'create-record':
66
+ // Record creation output
67
+ result.push({
68
+ key: 'createdRecordId',
69
+ type: 'string',
70
+ description: 'ID of created record',
71
+ });
72
+ break;
73
+ case 'create-variant':
74
+ // Variant creation output
75
+ result.push({
76
+ key: 'createdVariantId',
77
+ type: 'string',
78
+ description: 'ID of created variant',
79
+ });
80
+ break;
81
+ case 'webhook':
82
+ // Webhook outputs - response from webhook
83
+ result.push({
84
+ key: 'webhookResponse',
85
+ type: 'json',
86
+ description: 'Webhook response',
87
+ });
88
+ break;
89
+ case 'trigger-workflow':
90
+ // Triggered workflow execution
91
+ result.push({
92
+ key: 'triggeredExecutionId',
93
+ type: 'string',
94
+ description: 'ID of triggered workflow execution',
95
+ });
96
+ break;
97
+ case 'download':
98
+ // Download output
99
+ result.push({
100
+ key: 'downloadUrl',
101
+ type: 'string',
102
+ description: 'URL to download the result',
103
+ });
104
+ break;
105
+ }
106
+ }
107
+ // If no specific outputs were defined, default to generic result
108
+ if (result.length === 0) {
109
+ result.push({
110
+ key: 'result',
111
+ type: 'json',
112
+ description: 'Workflow result',
113
+ });
114
+ }
115
+ return result;
116
+ }
117
+ /**
118
+ * Transform raw workflow to WorkflowDefinition
119
+ */
120
+ function transformWorkflow(raw) {
121
+ return {
122
+ key: raw.key,
123
+ name: raw.name,
124
+ description: raw.description,
125
+ input: {
126
+ type: raw.input?.type || 'form',
127
+ schema: raw.input?.schema,
128
+ },
129
+ outputs: deriveOutputSchema(raw.outputs),
130
+ };
131
+ }
132
+ /**
133
+ * Fetch workflow definitions with API touchpoint from the API
134
+ */
135
+ export async function fetchWorkflows(apiUrl, accessToken, tenantId, projectId) {
136
+ const client = new GraphQLClient(getInternalGraphQLEndpoint(apiUrl), {
137
+ headers: {
138
+ Authorization: `Bearer ${accessToken}`,
139
+ 'x-tenant-id': tenantId,
140
+ 'x-project-id': projectId,
141
+ },
142
+ });
143
+ try {
144
+ const response = await client.request(GET_API_WORKFLOWS);
145
+ // Filter to only workflows with API touchpoint
146
+ const apiWorkflows = response.workflows.items.filter((w) => w.supportedTouchPoints?.includes('API'));
147
+ return apiWorkflows.map(transformWorkflow);
148
+ }
149
+ catch (error) {
150
+ if (error instanceof Error) {
151
+ // Parse GraphQL errors
152
+ if ('response' in error && error.response) {
153
+ const gqlError = error.response;
154
+ if (gqlError.errors && gqlError.errors.length > 0) {
155
+ const firstError = gqlError.errors[0];
156
+ throw new Error(`GraphQL Error: ${firstError.message}\n` +
157
+ `Code: ${firstError.extensions?.code || 'UNKNOWN'}`);
158
+ }
159
+ }
160
+ throw new Error(`Failed to fetch workflows: ${error.message}`);
161
+ }
162
+ throw new Error('Failed to fetch workflows: Unknown error');
163
+ }
164
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Customer Details - React Hooks
3
+ *
4
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
5
+ */
6
+ import { type QueryHookOptions, type MutationHookOptions } from '@apollo/client';
7
+ import type { CustomerDetailData } from '../types/models/customer-detail.js';
8
+ /** Typed Customer Details record */
9
+ export interface CustomerDetailRecord {
10
+ id: string;
11
+ modelKey: 'customer-detail';
12
+ naturalKey?: string;
13
+ data: CustomerDetailData;
14
+ versionNumber: number;
15
+ publishedVersionNumber?: number;
16
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+ /** Typed list result */
21
+ export interface CustomerDetailListResult {
22
+ items: CustomerDetailRecord[];
23
+ total: number;
24
+ hasMore: boolean;
25
+ }
26
+ /** Filter input for list queries */
27
+ export interface FilterInput {
28
+ field: string;
29
+ operator: string;
30
+ value: string | number | boolean;
31
+ }
32
+ /** Sort input for list queries */
33
+ export interface SortInput {
34
+ field: string;
35
+ direction: 'ASC' | 'DESC';
36
+ }
37
+ /**
38
+ * Fetch a single Customer Details by ID
39
+ */
40
+ export declare function useCustomerDetail(id: string, options?: Omit<QueryHookOptions, 'variables'> & {
41
+ preview?: boolean;
42
+ }): any;
43
+ /**
44
+ * Fetch a list of Customer Details records
45
+ */
46
+ export declare function useCustomerDetails(options?: {
47
+ limit?: number;
48
+ offset?: number;
49
+ filters?: FilterInput[];
50
+ sort?: SortInput;
51
+ preview?: boolean;
52
+ queryOptions?: Omit<QueryHookOptions, 'variables'>;
53
+ }): any;
54
+ /**
55
+ * Create a new Customer Details
56
+ */
57
+ export declare function useCreateCustomerDetail(options?: MutationHookOptions): readonly [(data: CustomerDetailData) => Promise<CustomerDetailRecord | undefined>, any];
58
+ /**
59
+ * Update an existing Customer Details
60
+ */
61
+ export declare function useUpdateCustomerDetail(options?: MutationHookOptions): readonly [(id: string, data: Partial<CustomerDetailData>) => Promise<CustomerDetailRecord | undefined>, any];
62
+ /**
63
+ * Delete a Customer Details
64
+ */
65
+ export declare function useDeleteCustomerDetail(options?: MutationHookOptions): readonly [(id: string) => Promise<any>, any];
66
+ /**
67
+ * Publish a Customer Details
68
+ */
69
+ export declare function usePublishCustomerDetail(options?: MutationHookOptions): readonly [(id: string, versionId?: string) => Promise<CustomerDetailRecord | undefined>, any];
70
+ /**
71
+ * Unpublish a Customer Details
72
+ */
73
+ export declare function useUnpublishCustomerDetail(options?: MutationHookOptions): readonly [(id: string) => Promise<CustomerDetailRecord | undefined>, any];
74
+ //# sourceMappingURL=customer-detail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-detail.d.ts","sourceRoot":"","sources":["../../../src/generated/hooks/customer-detail.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,oCAAoC;AACpC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;I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BAAmB,kBAG3B,MAAM,QAAQ,OAAO,CAAC,kBAAkB,CAAC,qDAQlF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,mBAAmB,kBAG3B,MAAM,wBAM/C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,mBAAmB,kBAG3B,MAAM,cAAc,MAAM,qDAQpE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,CAAC,EAAE,mBAAmB,kBAG3B,MAAM,qDAQlD"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Customer Details - React Hooks
3
+ *
4
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
5
+ */
6
+ import { useQuery, useMutation, } from '@apollo/client';
7
+ import { GetCustomerDetailDocument, ListCustomerDetailsDocument, CreateCustomerDetailDocument, UpdateCustomerDetailDocument, DeleteCustomerDetailDocument, PublishCustomerDetailDocument, UnpublishCustomerDetailDocument, } from '../documents/customer-detail.js';
8
+ /** Parse raw entity to typed record */
9
+ function parseCustomerDetail(entity) {
10
+ return {
11
+ ...entity,
12
+ modelKey: 'customer-detail',
13
+ data: entity.data,
14
+ };
15
+ }
16
+ /**
17
+ * Fetch a single Customer Details by ID
18
+ */
19
+ export function useCustomerDetail(id, options) {
20
+ const { preview, ...queryOptions } = options ?? {};
21
+ const result = useQuery(GetCustomerDetailDocument, {
22
+ ...queryOptions,
23
+ variables: { id, preview },
24
+ });
25
+ return {
26
+ ...result,
27
+ customerDetail: result.data?.entity ? parseCustomerDetail(result.data.entity) : undefined,
28
+ };
29
+ }
30
+ /**
31
+ * Fetch a list of Customer Details records
32
+ */
33
+ export function useCustomerDetails(options) {
34
+ const { queryOptions, ...variables } = options ?? {};
35
+ const result = useQuery(ListCustomerDetailsDocument, {
36
+ ...queryOptions,
37
+ variables,
38
+ });
39
+ const typedResult = result.data?.entities
40
+ ? {
41
+ items: result.data.entities.items.map(parseCustomerDetail),
42
+ total: result.data.entities.total,
43
+ hasMore: result.data.entities.hasMore,
44
+ }
45
+ : undefined;
46
+ return {
47
+ ...result,
48
+ customerDetails: typedResult,
49
+ };
50
+ }
51
+ /**
52
+ * Create a new Customer Details
53
+ */
54
+ export function useCreateCustomerDetail(options) {
55
+ const [mutate, result] = useMutation(CreateCustomerDetailDocument, options);
56
+ const createCustomerDetail = async (data) => {
57
+ const response = await mutate({ variables: { data } });
58
+ return response.data?.createEntity
59
+ ? parseCustomerDetail(response.data.createEntity)
60
+ : undefined;
61
+ };
62
+ return [createCustomerDetail, result];
63
+ }
64
+ /**
65
+ * Update an existing Customer Details
66
+ */
67
+ export function useUpdateCustomerDetail(options) {
68
+ const [mutate, result] = useMutation(UpdateCustomerDetailDocument, options);
69
+ const updateCustomerDetail = async (id, data) => {
70
+ const response = await mutate({ variables: { id, data } });
71
+ return response.data?.updateEntity
72
+ ? parseCustomerDetail(response.data.updateEntity)
73
+ : undefined;
74
+ };
75
+ return [updateCustomerDetail, result];
76
+ }
77
+ /**
78
+ * Delete a Customer Details
79
+ */
80
+ export function useDeleteCustomerDetail(options) {
81
+ const [mutate, result] = useMutation(DeleteCustomerDetailDocument, options);
82
+ const deleteCustomerDetail = async (id) => {
83
+ const response = await mutate({ variables: { id } });
84
+ return response.data?.deleteEntity;
85
+ };
86
+ return [deleteCustomerDetail, result];
87
+ }
88
+ /**
89
+ * Publish a Customer Details
90
+ */
91
+ export function usePublishCustomerDetail(options) {
92
+ const [mutate, result] = useMutation(PublishCustomerDetailDocument, options);
93
+ const publishCustomerDetail = async (id, versionId) => {
94
+ const response = await mutate({ variables: { id, versionId } });
95
+ return response.data?.publishEntity
96
+ ? parseCustomerDetail(response.data.publishEntity)
97
+ : undefined;
98
+ };
99
+ return [publishCustomerDetail, result];
100
+ }
101
+ /**
102
+ * Unpublish a Customer Details
103
+ */
104
+ export function useUnpublishCustomerDetail(options) {
105
+ const [mutate, result] = useMutation(UnpublishCustomerDetailDocument, options);
106
+ const unpublishCustomerDetail = async (id) => {
107
+ const response = await mutate({ variables: { id } });
108
+ return response.data?.unpublishEntity
109
+ ? parseCustomerDetail(response.data.unpublishEntity)
110
+ : undefined;
111
+ };
112
+ return [unpublishCustomerDetail, result];
113
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Design System - React Hooks
3
+ *
4
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
5
+ */
6
+ import { type QueryHookOptions, type MutationHookOptions } from '@apollo/client';
7
+ import type { DesignSystemData } from '../types/models/design-system.js';
8
+ /** Typed Design System record */
9
+ export interface DesignSystemRecord {
10
+ id: string;
11
+ modelKey: 'design-system';
12
+ naturalKey?: string;
13
+ data: DesignSystemData;
14
+ versionNumber: number;
15
+ publishedVersionNumber?: number;
16
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+ /** Typed list result */
21
+ export interface DesignSystemListResult {
22
+ items: DesignSystemRecord[];
23
+ total: number;
24
+ hasMore: boolean;
25
+ }
26
+ /** Filter input for list queries */
27
+ export interface FilterInput {
28
+ field: string;
29
+ operator: string;
30
+ value: string | number | boolean;
31
+ }
32
+ /** Sort input for list queries */
33
+ export interface SortInput {
34
+ field: string;
35
+ direction: 'ASC' | 'DESC';
36
+ }
37
+ /**
38
+ * Fetch a single Design System by ID
39
+ */
40
+ export declare function useDesignSystem(id: string, options?: Omit<QueryHookOptions, 'variables'> & {
41
+ preview?: boolean;
42
+ }): any;
43
+ /**
44
+ * Fetch a list of Design System records
45
+ */
46
+ export declare function useDesignSystems(options?: {
47
+ limit?: number;
48
+ offset?: number;
49
+ filters?: FilterInput[];
50
+ sort?: SortInput;
51
+ preview?: boolean;
52
+ queryOptions?: Omit<QueryHookOptions, 'variables'>;
53
+ }): any;
54
+ /**
55
+ * Create a new Design System
56
+ */
57
+ export declare function useCreateDesignSystem(options?: MutationHookOptions): readonly [(data: DesignSystemData) => Promise<DesignSystemRecord | undefined>, any];
58
+ /**
59
+ * Update an existing Design System
60
+ */
61
+ export declare function useUpdateDesignSystem(options?: MutationHookOptions): readonly [(id: string, data: Partial<DesignSystemData>) => Promise<DesignSystemRecord | undefined>, any];
62
+ /**
63
+ * Delete a Design System
64
+ */
65
+ export declare function useDeleteDesignSystem(options?: MutationHookOptions): readonly [(id: string) => Promise<any>, any];
66
+ /**
67
+ * Publish a Design System
68
+ */
69
+ export declare function usePublishDesignSystem(options?: MutationHookOptions): readonly [(id: string, versionId?: string) => Promise<DesignSystemRecord | undefined>, any];
70
+ /**
71
+ * Unpublish a Design System
72
+ */
73
+ export declare function useUnpublishDesignSystem(options?: MutationHookOptions): readonly [(id: string) => Promise<DesignSystemRecord | undefined>, any];
74
+ //# sourceMappingURL=design-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design-system.d.ts","sourceRoot":"","sources":["../../../src/generated/hooks/design-system.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,iCAAiC;AACjC,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAwB;AACxB,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,oCA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mB,kBAG3B,MAAM,mDAQhD"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Design System - React Hooks
3
+ *
4
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
5
+ */
6
+ import { useQuery, useMutation, } from '@apollo/client';
7
+ import { GetDesignSystemDocument, ListDesignSystemsDocument, CreateDesignSystemDocument, UpdateDesignSystemDocument, DeleteDesignSystemDocument, PublishDesignSystemDocument, UnpublishDesignSystemDocument, } from '../documents/design-system.js';
8
+ /** Parse raw entity to typed record */
9
+ function parseDesignSystem(entity) {
10
+ return {
11
+ ...entity,
12
+ modelKey: 'design-system',
13
+ data: entity.data,
14
+ };
15
+ }
16
+ /**
17
+ * Fetch a single Design System by ID
18
+ */
19
+ export function useDesignSystem(id, options) {
20
+ const { preview, ...queryOptions } = options ?? {};
21
+ const result = useQuery(GetDesignSystemDocument, {
22
+ ...queryOptions,
23
+ variables: { id, preview },
24
+ });
25
+ return {
26
+ ...result,
27
+ designSystem: result.data?.entity ? parseDesignSystem(result.data.entity) : undefined,
28
+ };
29
+ }
30
+ /**
31
+ * Fetch a list of Design System records
32
+ */
33
+ export function useDesignSystems(options) {
34
+ const { queryOptions, ...variables } = options ?? {};
35
+ const result = useQuery(ListDesignSystemsDocument, {
36
+ ...queryOptions,
37
+ variables,
38
+ });
39
+ const typedResult = result.data?.entities
40
+ ? {
41
+ items: result.data.entities.items.map(parseDesignSystem),
42
+ total: result.data.entities.total,
43
+ hasMore: result.data.entities.hasMore,
44
+ }
45
+ : undefined;
46
+ return {
47
+ ...result,
48
+ designSystems: typedResult,
49
+ };
50
+ }
51
+ /**
52
+ * Create a new Design System
53
+ */
54
+ export function useCreateDesignSystem(options) {
55
+ const [mutate, result] = useMutation(CreateDesignSystemDocument, options);
56
+ const createDesignSystem = async (data) => {
57
+ const response = await mutate({ variables: { data } });
58
+ return response.data?.createEntity ? parseDesignSystem(response.data.createEntity) : undefined;
59
+ };
60
+ return [createDesignSystem, result];
61
+ }
62
+ /**
63
+ * Update an existing Design System
64
+ */
65
+ export function useUpdateDesignSystem(options) {
66
+ const [mutate, result] = useMutation(UpdateDesignSystemDocument, options);
67
+ const updateDesignSystem = async (id, data) => {
68
+ const response = await mutate({ variables: { id, data } });
69
+ return response.data?.updateEntity ? parseDesignSystem(response.data.updateEntity) : undefined;
70
+ };
71
+ return [updateDesignSystem, result];
72
+ }
73
+ /**
74
+ * Delete a Design System
75
+ */
76
+ export function useDeleteDesignSystem(options) {
77
+ const [mutate, result] = useMutation(DeleteDesignSystemDocument, options);
78
+ const deleteDesignSystem = async (id) => {
79
+ const response = await mutate({ variables: { id } });
80
+ return response.data?.deleteEntity;
81
+ };
82
+ return [deleteDesignSystem, result];
83
+ }
84
+ /**
85
+ * Publish a Design System
86
+ */
87
+ export function usePublishDesignSystem(options) {
88
+ const [mutate, result] = useMutation(PublishDesignSystemDocument, options);
89
+ const publishDesignSystem = async (id, versionId) => {
90
+ const response = await mutate({ variables: { id, versionId } });
91
+ return response.data?.publishEntity
92
+ ? parseDesignSystem(response.data.publishEntity)
93
+ : undefined;
94
+ };
95
+ return [publishDesignSystem, result];
96
+ }
97
+ /**
98
+ * Unpublish a Design System
99
+ */
100
+ export function useUnpublishDesignSystem(options) {
101
+ const [mutate, result] = useMutation(UnpublishDesignSystemDocument, options);
102
+ const unpublishDesignSystem = async (id) => {
103
+ const response = await mutate({ variables: { id } });
104
+ return response.data?.unpublishEntity
105
+ ? parseDesignSystem(response.data.unpublishEntity)
106
+ : undefined;
107
+ };
108
+ return [unpublishDesignSystem, result];
109
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Typed React Hooks
3
+ *
4
+ * Apollo Client hooks with strongly typed entity responses.
5
+ *
6
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
7
+ */
8
+ export { useTemplate, useTemplates, useCreateTemplate, useUpdateTemplate, useDeleteTemplate, usePublishTemplate, useUnpublishTemplate, type TemplateRecord, type TemplateListResult, } from './template.js';
9
+ export { useDesignSystem, useDesignSystems, useCreateDesignSystem, useUpdateDesignSystem, useDeleteDesignSystem, usePublishDesignSystem, useUnpublishDesignSystem, type DesignSystemRecord, type DesignSystemListResult, } from './design-system.js';
10
+ export { useShopifyCollection, useShopifyCollections, useCreateShopifyCollection, useUpdateShopifyCollection, useDeleteShopifyCollection, usePublishShopifyCollection, useUnpublishShopifyCollection, type ShopifyCollectionRecord, type ShopifyCollectionListResult, } from './shopify-collection.js';
11
+ export { useShopifyVariant, useShopifyVariants, useCreateShopifyVariant, useUpdateShopifyVariant, useDeleteShopifyVariant, usePublishShopifyVariant, useUnpublishShopifyVariant, type ShopifyVariantRecord, type ShopifyVariantListResult, } from './shopify-variant.js';
12
+ export { useShopifyProduct, useShopifyProducts, useCreateShopifyProduct, useUpdateShopifyProduct, useDeleteShopifyProduct, usePublishShopifyProduct, useUnpublishShopifyProduct, type ShopifyProductRecord, type ShopifyProductListResult, } from './shopify-product.js';
13
+ export { useShopifyMarket, useShopifyMarkets, useCreateShopifyMarket, useUpdateShopifyMarket, useDeleteShopifyMarket, usePublishShopifyMarket, useUnpublishShopifyMarket, type ShopifyMarketRecord, type ShopifyMarketListResult, } from './shopify-market.js';
14
+ export { useCustomerDetail, useCustomerDetails, useCreateCustomerDetail, useUpdateCustomerDetail, useDeleteCustomerDetail, usePublishCustomerDetail, useUnpublishCustomerDetail, type CustomerDetailRecord, type CustomerDetailListResult, } from './customer-detail.js';
15
+ export type { FilterInput, SortInput } from './template.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Typed React Hooks
3
+ *
4
+ * Apollo Client hooks with strongly typed entity responses.
5
+ *
6
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
7
+ */
8
+ export { useTemplate, useTemplates, useCreateTemplate, useUpdateTemplate, useDeleteTemplate, usePublishTemplate, useUnpublishTemplate, } from './template.js';
9
+ export { useDesignSystem, useDesignSystems, useCreateDesignSystem, useUpdateDesignSystem, useDeleteDesignSystem, usePublishDesignSystem, useUnpublishDesignSystem, } from './design-system.js';
10
+ export { useShopifyCollection, useShopifyCollections, useCreateShopifyCollection, useUpdateShopifyCollection, useDeleteShopifyCollection, usePublishShopifyCollection, useUnpublishShopifyCollection, } from './shopify-collection.js';
11
+ export { useShopifyVariant, useShopifyVariants, useCreateShopifyVariant, useUpdateShopifyVariant, useDeleteShopifyVariant, usePublishShopifyVariant, useUnpublishShopifyVariant, } from './shopify-variant.js';
12
+ export { useShopifyProduct, useShopifyProducts, useCreateShopifyProduct, useUpdateShopifyProduct, useDeleteShopifyProduct, usePublishShopifyProduct, useUnpublishShopifyProduct, } from './shopify-product.js';
13
+ export { useShopifyMarket, useShopifyMarkets, useCreateShopifyMarket, useUpdateShopifyMarket, useDeleteShopifyMarket, usePublishShopifyMarket, useUnpublishShopifyMarket, } from './shopify-market.js';
14
+ export { useCustomerDetail, useCustomerDetails, useCreateCustomerDetail, useUpdateCustomerDetail, useDeleteCustomerDetail, usePublishCustomerDetail, useUnpublishCustomerDetail, } from './customer-detail.js';
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Shopify Collection - React Hooks
3
+ *
4
+ * @generated by UniformGen - DO NOT EDIT MANUALLY
5
+ */
6
+ import { type QueryHookOptions, type MutationHookOptions } from '@apollo/client';
7
+ import type { ShopifyCollectionData } from '../types/models/shopify-collection.js';
8
+ /** Typed Shopify Collection record */
9
+ export interface ShopifyCollectionRecord {
10
+ id: string;
11
+ modelKey: 'shopify-collection';
12
+ naturalKey?: string;
13
+ data: ShopifyCollectionData;
14
+ versionNumber: number;
15
+ publishedVersionNumber?: number;
16
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+ /** Typed list result */
21
+ export interface ShopifyCollectionListResult {
22
+ items: ShopifyCollectionRecord[];
23
+ total: number;
24
+ hasMore: boolean;
25
+ }
26
+ /** Filter input for list queries */
27
+ export interface FilterInput {
28
+ field: string;
29
+ operator: string;
30
+ value: string | number | boolean;
31
+ }
32
+ /** Sort input for list queries */
33
+ export interface SortInput {
34
+ field: string;
35
+ direction: 'ASC' | 'DESC';
36
+ }
37
+ /**
38
+ * Fetch a single Shopify Collection by ID
39
+ */
40
+ export declare function useShopifyCollection(id: string, options?: Omit<QueryHookOptions, 'variables'> & {
41
+ preview?: boolean;
42
+ }): any;
43
+ /**
44
+ * Fetch a list of Shopify Collection records
45
+ */
46
+ export declare function useShopifyCollections(options?: {
47
+ limit?: number;
48
+ offset?: number;
49
+ filters?: FilterInput[];
50
+ sort?: SortInput;
51
+ preview?: boolean;
52
+ queryOptions?: Omit<QueryHookOptions, 'variables'>;
53
+ }): any;
54
+ /**
55
+ * Create a new Shopify Collection
56
+ */
57
+ export declare function useCreateShopifyCollection(options?: MutationHookOptions): readonly [(data: ShopifyCollectionData) => Promise<ShopifyCollectionRecord | undefined>, any];
58
+ /**
59
+ * Update an existing Shopify Collection
60
+ */
61
+ export declare function useUpdateShopifyCollection(options?: MutationHookOptions): readonly [(id: string, data: Partial<ShopifyCollectionData>) => Promise<ShopifyCollectionRecord | undefined>, any];
62
+ /**
63
+ * Delete a Shopify Collection
64
+ */
65
+ export declare function useDeleteShopifyCollection(options?: MutationHookOptions): readonly [(id: string) => Promise<any>, any];
66
+ /**
67
+ * Publish a Shopify Collection
68
+ */
69
+ export declare function usePublishShopifyCollection(options?: MutationHookOptions): readonly [(id: string, versionId?: string) => Promise<ShopifyCollectionRecord | undefined>, any];
70
+ /**
71
+ * Unpublish a Shopify Collection
72
+ */
73
+ export declare function useUnpublishShopifyCollection(options?: MutationHookOptions): readonly [(id: string) => Promise<ShopifyCollectionRecord | undefined>, any];
74
+ //# sourceMappingURL=shopify-collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shopify-collection.d.ts","sourceRoot":"","sources":["../../../src/generated/hooks/shopify-collection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAEnF,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAwB;AACxB,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,kCAAkC;AAClC,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B;AAWD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OA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