@mohasinac/appkit 4.60.1 → 4.62.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 (202) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +19 -3
  3. package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +1 -1
  4. package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +1 -1
  5. package/dist/_internal/server/features/auctions/actions.d.ts +1 -1
  6. package/dist/_internal/server/features/auctions/actions.js +12 -1
  7. package/dist/_internal/server/features/blog/actions.d.ts +1 -1
  8. package/dist/_internal/server/features/blog/actions.js +12 -1
  9. package/dist/_internal/server/features/brands/actions.d.ts +1 -1
  10. package/dist/_internal/server/features/brands/actions.js +12 -1
  11. package/dist/_internal/server/features/cart/actions.d.ts +1 -1
  12. package/dist/_internal/server/features/cart/actions.js +12 -1
  13. package/dist/_internal/server/features/checkout/actions.js +0 -1
  14. package/dist/_internal/server/features/events/actions.d.ts +1 -1
  15. package/dist/_internal/server/features/events/actions.js +12 -1
  16. package/dist/_internal/server/features/gateway-events/redact.js +14 -2
  17. package/dist/_internal/server/features/history/actions.d.ts +1 -1
  18. package/dist/_internal/server/features/history/actions.js +12 -1
  19. package/dist/_internal/server/features/lottery/actions.d.ts +1 -1
  20. package/dist/_internal/server/features/lottery/actions.js +12 -1
  21. package/dist/_internal/server/features/orders/actions.d.ts +1 -1
  22. package/dist/_internal/server/features/orders/actions.js +12 -1
  23. package/dist/_internal/server/features/orders/cancellation-refund.js +0 -1
  24. package/dist/_internal/server/features/orders/service.js +31 -1
  25. package/dist/_internal/server/features/payouts/actions.d.ts +1 -1
  26. package/dist/_internal/server/features/payouts/actions.js +12 -1
  27. package/dist/_internal/server/features/points/award.js +9 -1
  28. package/dist/_internal/server/features/pre-orders/actions.d.ts +1 -1
  29. package/dist/_internal/server/features/pre-orders/actions.js +12 -1
  30. package/dist/_internal/server/features/prize-draws/actions.d.ts +1 -1
  31. package/dist/_internal/server/features/prize-draws/actions.js +12 -1
  32. package/dist/_internal/server/features/products/actions.d.ts +1 -1
  33. package/dist/_internal/server/features/products/actions.js +12 -1
  34. package/dist/_internal/server/features/promotions/actions.d.ts +1 -1
  35. package/dist/_internal/server/features/promotions/actions.js +12 -1
  36. package/dist/_internal/server/features/protection-claims/actions.d.ts +2 -2
  37. package/dist/_internal/server/features/protection-claims/actions.js +21 -12
  38. package/dist/_internal/server/features/raffle/actions.d.ts +1 -1
  39. package/dist/_internal/server/features/raffle/actions.js +12 -1
  40. package/dist/_internal/server/features/refunds/actions.d.ts +1 -3
  41. package/dist/_internal/server/features/refunds/actions.js +14 -2
  42. package/dist/_internal/server/features/reviews/actions.d.ts +1 -1
  43. package/dist/_internal/server/features/reviews/actions.js +12 -1
  44. package/dist/_internal/server/features/wishlist/actions.d.ts +1 -1
  45. package/dist/_internal/server/features/wishlist/actions.js +12 -1
  46. package/dist/_internal/server/jobs/core/obligationSweep.js +0 -1
  47. package/dist/_internal/server/jobs/core/paymentReconcile.js +93 -76
  48. package/dist/_internal/server/jobs/core/testDataCleanup.d.ts +1 -1
  49. package/dist/_internal/server/jobs/core/testDataCleanup.js +22 -1
  50. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +16 -4
  51. package/dist/_internal/shared/actions/action-registry.js +149 -9
  52. package/dist/_internal/shared/features/promotions/schema.d.ts +66 -0
  53. package/dist/_internal/shared/features/promotions/schema.js +7 -0
  54. package/dist/_internal/shared/media/limits.d.ts +10 -0
  55. package/dist/_internal/shared/media/limits.js +10 -0
  56. package/dist/_internal/shared/obligations/deadlines.js +11 -1
  57. package/dist/_internal/shared/tester/window.d.ts +25 -0
  58. package/dist/_internal/shared/tester/window.js +66 -0
  59. package/dist/_internal/shared/types/action-result.js +15 -1
  60. package/dist/client/api/surface-error.js +16 -2
  61. package/dist/client/api/useApiMutation.js +17 -1
  62. package/dist/client.d.ts +1 -1
  63. package/dist/client.js +1 -1
  64. package/dist/constants/api-endpoints.d.ts +3 -0
  65. package/dist/constants/api-endpoints.js +1 -0
  66. package/dist/constants/field-names.d.ts +17 -0
  67. package/dist/constants/field-names.js +23 -0
  68. package/dist/core/server-action.js +19 -3
  69. package/dist/core/unit-of-work.js +15 -1
  70. package/dist/errors/error-mapping.js +26 -1
  71. package/dist/errors/firestore-codes.d.ts +37 -0
  72. package/dist/errors/firestore-codes.js +52 -0
  73. package/dist/errors/index.d.ts +0 -1
  74. package/dist/errors/index.js +12 -2
  75. package/dist/features/account/components/UserOffersPanel.js +5 -3
  76. package/dist/features/admin/components/AdminActionIndexView.js +100 -5
  77. package/dist/features/admin/components/AdminAddressClustersView.js +21 -2
  78. package/dist/features/admin/components/AdminBlogEditorView.js +8 -8
  79. package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
  80. package/dist/features/admin/components/AdminCarouselView.js +96 -4
  81. package/dist/features/admin/components/AdminCouponEditorView.js +8 -0
  82. package/dist/features/admin/components/AdminFulfillmentView.js +3 -2
  83. package/dist/features/admin/components/AdminGatewayEventsView.js +2 -2
  84. package/dist/features/admin/components/AdminMediaView.js +36 -3
  85. package/dist/features/admin/components/AdminNavigationView.js +4 -1
  86. package/dist/features/admin/components/AdminOffersView.js +2 -1
  87. package/dist/features/admin/components/AdminPaymentClustersView.js +19 -2
  88. package/dist/features/admin/components/AdminProductEditorView.js +2 -2
  89. package/dist/features/admin/components/AdminSectionsView.d.ts +10 -0
  90. package/dist/features/admin/components/AdminSectionsView.js +486 -224
  91. package/dist/features/admin/components/DataListingView.js +2 -0
  92. package/dist/features/admin/components/ReferenceRecordEditor.js +1 -1
  93. package/dist/features/admin/components/analytics/AdminStatCard.js +4 -1
  94. package/dist/features/admin/hooks/useOptimisticRowFlag.d.ts +33 -0
  95. package/dist/features/admin/hooks/useOptimisticRowFlag.js +87 -0
  96. package/dist/features/admin/repository/notification.repository.d.ts +15 -0
  97. package/dist/features/admin/repository/notification.repository.js +32 -0
  98. package/dist/features/admin/repository/site-settings.repository.d.ts +2 -1
  99. package/dist/features/admin/repository/site-settings.repository.js +7 -0
  100. package/dist/features/admin/schemas/action-index-form.d.ts +34 -0
  101. package/dist/features/admin/schemas/action-index-form.js +115 -0
  102. package/dist/features/auctions/components/MarketplaceAuctionCard.js +1 -1
  103. package/dist/features/auth/components/RegisterForm.js +2 -1
  104. package/dist/features/catalogue/actions/approve-catalogue-listing.d.ts +1 -1
  105. package/dist/features/catalogue/actions/approve-catalogue-listing.js +12 -1
  106. package/dist/features/catalogue/actions/list-from-catalogue.d.ts +1 -1
  107. package/dist/features/catalogue/actions/list-from-catalogue.js +12 -1
  108. package/dist/features/catalogue/actions/submit-for-approval.d.ts +1 -1
  109. package/dist/features/catalogue/actions/submit-for-approval.js +12 -1
  110. package/dist/features/catalogue/components/CatalogueItemEditorView.js +3 -3
  111. package/dist/features/categories/repository/price-observation.repository.d.ts +19 -0
  112. package/dist/features/categories/repository/price-observation.repository.js +21 -2
  113. package/dist/features/events/actions/event-actions.js +4 -1
  114. package/dist/features/events/components/AdminEventEditorView.js +79 -50
  115. package/dist/features/events/components/EventsListPageView.js +2 -1
  116. package/dist/features/events/schemas/firestore.d.ts +17 -0
  117. package/dist/features/events/schemas/firestore.js +1 -0
  118. package/dist/features/events/utils/sort-pinned.d.ts +33 -0
  119. package/dist/features/events/utils/sort-pinned.js +46 -0
  120. package/dist/features/gateway-events/repository/gateway-events.repository.js +3 -40
  121. package/dist/features/gateway-events/schemas/index.d.ts +2 -2
  122. package/dist/features/inventory/components/AdminStorageBoxesView.js +55 -39
  123. package/dist/features/inventory/components/ReceiveStationView.js +61 -17
  124. package/dist/features/inventory/repository/storage-boxes.repository.d.ts +3 -1
  125. package/dist/features/inventory/repository/storage-boxes.repository.js +36 -3
  126. package/dist/features/layout/hooks/useFormBottomActions.js +20 -1
  127. package/dist/features/obligations/repository/obligations.repository.js +10 -1
  128. package/dist/features/orders/components/EmiInstallmentsPanel.js +25 -7
  129. package/dist/features/orders/components/RefundRequestView.js +4 -4
  130. package/dist/features/orders/schemas/firestore.d.ts +19 -0
  131. package/dist/features/orders/schemas/firestore.js +19 -0
  132. package/dist/features/orders/schemas/index.d.ts +6 -6
  133. package/dist/features/payment-cases/repository/payment-cases.repository.d.ts +1 -0
  134. package/dist/features/payment-cases/repository/payment-cases.repository.js +3 -14
  135. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
  136. package/dist/features/products/components/GroupMemberPicker.js +4 -1
  137. package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
  138. package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -1
  139. package/dist/features/products/components/PrizeDrawEntryActions.js +2 -1
  140. package/dist/features/products/components/ProductDetailActions.js +2 -1
  141. package/dist/features/products/components/ProductForm.js +2 -2
  142. package/dist/features/products/components/ProductGrid.js +1 -1
  143. package/dist/features/promotions/repository/claimed-coupons.repository.js +31 -1
  144. package/dist/features/promotions/schemas/firestore.d.ts +22 -0
  145. package/dist/features/promotions/schemas/firestore.js +22 -0
  146. package/dist/features/promotions/schemas/index.d.ts +479 -6
  147. package/dist/features/promotions/schemas/index.js +153 -0
  148. package/dist/features/protection-claims/repository/protection-claims.repository.js +22 -15
  149. package/dist/features/seller/components/FulfillmentView.js +3 -2
  150. package/dist/features/seller/components/SellerAddressesView.js +32 -4
  151. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +62 -3
  152. package/dist/features/seller/components/SellerBundlesView.js +53 -14
  153. package/dist/features/seller/components/SellerGroupedListingsView.js +23 -3
  154. package/dist/features/seller/components/SellerListingTypeView.js +56 -10
  155. package/dist/features/seller/components/SellerPayoutMethodsView.js +33 -1
  156. package/dist/features/seller/components/SellerPayoutSettingsView.js +48 -9
  157. package/dist/features/seller/components/SellerProductsView.js +5 -1
  158. package/dist/features/seller/components/SellerShippingConfigsView.js +33 -1
  159. package/dist/features/seller/components/SellerShippingView.js +2 -1
  160. package/dist/features/seller/components/SellerStoreCategoriesView.js +33 -1
  161. package/dist/features/seller/components/SellerSupportView.js +69 -2
  162. package/dist/features/seller/schemas/coupon-form.d.ts +5 -0
  163. package/dist/features/seller/schemas/coupon-form.js +18 -0
  164. package/dist/features/shell/SectionForm.js +35 -9
  165. package/dist/features/shell/build-sections.js +14 -1
  166. package/dist/features/shipments/components/AdminShipmentLotItemsView.js +54 -1
  167. package/dist/features/shipments/components/AdminShipmentProjectionsView.js +3 -2
  168. package/dist/features/sticker-trace/components/StickerCommitPanel.js +2 -1
  169. package/dist/features/sticker-trace/components/StickerPrintPanel.js +2 -1
  170. package/dist/features/sticker-trace/components/StickerRetryPanel.js +24 -4
  171. package/dist/features/sticker-trace/components/StickerTraceStudio.js +2 -1
  172. package/dist/features/sticker-trace/server.d.ts +2 -0
  173. package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +3 -2
  174. package/dist/http/api-handler.js +4 -1
  175. package/dist/index.d.ts +8 -4
  176. package/dist/index.js +6 -4
  177. package/dist/next/routing/route-map.d.ts +4 -2
  178. package/dist/next/routing/route-map.js +19 -1
  179. package/dist/schemas/registry.d.ts +15 -10
  180. package/dist/schemas/sieve.d.ts +3 -3
  181. package/dist/server.d.ts +1 -2
  182. package/dist/server.js +6 -4
  183. package/dist/styles.css +51 -0
  184. package/dist/ui/components/Checkbox.js +10 -2
  185. package/dist/ui/components/DateInput.js +8 -1
  186. package/dist/ui/components/Input.js +22 -2
  187. package/dist/ui/components/PaginatedSelect.d.ts +8 -19
  188. package/dist/ui/components/PaginatedSelect.js +0 -0
  189. package/dist/ui/components/Radio.js +8 -1
  190. package/dist/ui/components/Select.js +10 -2
  191. package/dist/ui/components/TagInput.d.ts +8 -1
  192. package/dist/ui/components/TagInput.js +4 -3
  193. package/dist/ui/components/Textarea.js +10 -2
  194. package/dist/ui/forms/FieldCheckbox.js +1 -1
  195. package/dist/ui/forms/FormErrorList.d.ts +0 -16
  196. package/dist/ui/forms/FormErrorList.js +34 -1
  197. package/dist/ui/forms/apply-zod-issues.d.ts +19 -1
  198. package/dist/ui/forms/apply-zod-issues.js +23 -1
  199. package/package.json +1 -1
  200. package/scripts/seed-cli.mjs +1822 -1812
  201. package/dist/features/tester/utils/phases.d.ts +0 -48
  202. package/dist/features/tester/utils/phases.js +0 -139
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "stampVersion": 1,
3
- "version": "4.60.1",
4
- "head": "ac867a7431db3bc6e19b100623e0be5979b1033a",
3
+ "version": "4.62.0",
4
+ "head": "2ffd384e9122be6b68eba81be0eb152e5d1f6a3e",
5
5
  "branch": "main",
6
6
  "dirty": false,
7
- "builtAt": "2026-10-22T00:08:17.154Z"
7
+ "builtAt": "2026-10-22T11:28:37.098Z"
8
8
  }
@@ -96,6 +96,15 @@ export function LotteryAdminEditView({ eventId, initialData, onSubmit, }) {
96
96
  * `audit-code-quality`'s DEEP_NESTING rule exists to stop.
97
97
  */
98
98
  function SlotTable({ slots, showPrice, onSlotsChange, }) {
99
+ /*
100
+ * Read the form context directly. `SlotTable` is its own component, so the
101
+ * `shellCtx` the parent destructures is out of scope here — but the parent
102
+ * mounts `FormShellContext.Provider` above this, so the errors are
103
+ * reachable. `useContext` rather than `useFormShell()`: this table is
104
+ * also usable outside a form and must not require a provider.
105
+ */
106
+ const formCtx = React.useContext(FormShellContext);
107
+ const slotError = (idx, field) => formCtx?.errors[`slots.${idx}.${field}`];
99
108
  /**
100
109
  * Next number is max+1, not length+1.
101
110
  *
@@ -146,19 +155,26 @@ function SlotTable({ slots, showPrice, onSlotsChange, }) {
146
155
  {
147
156
  key: "name",
148
157
  header: "Prize name",
149
- render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: `Prize for slot ${s.slotNumber}`, value: s.name, onChange: (e) => updateSlot(s._idx, "name", e.target.value), "aria-label": `Slot ${s.slotNumber} prize name` })),
158
+ /*
159
+ * These inputs live in DataTable COLUMN renderers, which get no
160
+ * `errors` argument — a section render would. They read the context
161
+ * this component itself mounts, with the dotted INDEXED key
162
+ * `applyZodIssues` produces (`slots.2.price`), so a rejected slot marks
163
+ * its own row rather than the first one.
164
+ */
165
+ render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: `Prize for slot ${s.slotNumber}`, value: s.name, error: slotError(s._idx, "name"), onChange: (e) => updateSlot(s._idx, "name", e.target.value), "aria-label": `Slot ${s.slotNumber} prize name` })),
150
166
  },
151
167
  {
152
168
  key: "image",
153
169
  header: "Image",
154
- render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: "/media/\u2026 or https://\u2026", value: s.image ?? "", onChange: (e) => updateSlot(s._idx, "image", e.target.value), "aria-label": `Slot ${s.slotNumber} prize image URL` })),
170
+ render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: "/media/\u2026 or https://\u2026", value: s.image ?? "", error: slotError(s._idx, "image"), onChange: (e) => updateSlot(s._idx, "image", e.target.value), "aria-label": `Slot ${s.slotNumber} prize image URL` })),
155
171
  },
156
172
  ...(showPrice
157
173
  ? [
158
174
  {
159
175
  key: "price",
160
176
  header: "Price (₹)",
161
- render: (s) => (_jsx(Input, { type: "number", className: "w-24", placeholder: "0", value: s.price, onChange: (e) => updateSlot(s._idx, "price", e.target.value), "aria-label": `Slot ${s.slotNumber} price` })),
177
+ render: (s) => (_jsx(Input, { type: "number", className: "w-24", placeholder: "0", value: s.price, error: slotError(s._idx, "price"), onChange: (e) => updateSlot(s._idx, "price", e.target.value), "aria-label": `Slot ${s.slotNumber} price` })),
162
178
  },
163
179
  ]
164
180
  : []),
@@ -23,7 +23,7 @@ export function AnalysisRunnerView() {
23
23
  });
24
24
  const body = (await res.json());
25
25
  if (!res.ok || !body.ok) {
26
- setError(("error" in body && body.error) || `HTTP ${res.status}`);
26
+ setError(toUserMessage("code" in body ? String(body.code) : undefined, undefined, { fallback: `The analysis run failed (HTTP ${res.status}).` }));
27
27
  setRunning(false);
28
28
  return;
29
29
  }
@@ -32,7 +32,7 @@ export function CloudLogsListView({ title, subtitle, initialEntries, initialNext
32
32
  const res = await fetch(url.toString());
33
33
  const body = (await res.json());
34
34
  if (!res.ok || !body.ok) {
35
- setError(("error" in body && body.error) || `HTTP ${res.status}`);
35
+ setError(toUserMessage("code" in body ? String(body.code) : undefined, undefined, { fallback: `Could not load logs (HTTP ${res.status}).` }));
36
36
  return;
37
37
  }
38
38
  setEntries((prev) => [...prev, ...body.data.entries]);
@@ -1,2 +1,2 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function placeBidAction(input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { safeRead } from "../../../../errors/safe-read.js";
4
15
  import { bidRepository, productRepository, userRepository, siteSettingsRepository } from "../../../../repositories/index.js";
5
16
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function createBlogPostAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function updateBlogPostAction(postId: string, input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function deleteBlogPostAction(postId: string): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { blogRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { blogPostInputSchema, blogPostUpdateSchema } from "../../../shared/features/blog/schema.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function createBrandAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function updateBrandAction(brandId: string, input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function deleteBrandAction(brandId: string): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { categoriesRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { brandInputSchema, brandUpdateSchema } from "../../../shared/features/brands/schema.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function addToCartAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function removeFromCartAction(input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function clearCartAction(): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { cartRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { addToCartSchema, removeFromCartSchema, mergeGuestCartSchema } from "../../../shared/features/cart/schema.js";
@@ -1833,7 +1833,6 @@ async function refundDroppedItemsForPhonePeCheckout(input) {
1833
1833
  : droppedValue;
1834
1834
  const refundResult = await processRefundAction({
1835
1835
  orderId: primaryOrderId,
1836
- type: "partial",
1837
1836
  amount: refundAmount,
1838
1837
  /*
1839
1838
  * A SYSTEM refund, not a buyer claim: items the buyer paid for turned
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function createEventAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function updateEventAction(eventId: string, input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function registerForEventAction(input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { eventRepository, eventEntryRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { eventInputSchema, eventUpdateSchema, registerForEventSchema } from "../../../shared/features/events/schema.js";
@@ -37,6 +37,7 @@
37
37
  * `card` key without anyone having written that path down.
38
38
  */
39
39
  import { GATEWAY_EVENT_PAYLOAD_MAX_BYTES } from "../../../../features/gateway-events/schemas/firestore.js";
40
+ import { normalizeError } from "../../../../errors/normalize.js";
40
41
  /**
41
42
  * Keys dropped wherever they appear, at any depth.
42
43
  *
@@ -130,13 +131,24 @@ export function redactGatewayPayload(body) {
130
131
  try {
131
132
  serialisedLength = JSON.stringify(redacted)?.length ?? 0;
132
133
  }
133
- catch {
134
+ catch (err) {
134
135
  /*
135
136
  * A circular structure cannot come from `JSON.parse`, which is the only
136
137
  * producer here — but this function is exported and a future caller could
137
138
  * hand it something else. Failing to a marker keeps the row writable.
139
+ *
140
+ * 🛑 The reason is CARRIED, not discarded. This was a bare `catch {}`, so
141
+ * the one case the comment above exists to anticipate — a future caller
142
+ * handing it something `JSON.stringify` cannot take — produced a row
143
+ * saying only `redactionFailed: true`, with nothing anywhere to say why.
144
+ * The row is a debugging record; a marker that cannot explain itself is
145
+ * the silent-degrade shape this codebase keeps paying for.
138
146
  */
139
- return { payload: { redactionFailed: true }, truncated: true };
147
+ const n = normalizeError(err);
148
+ return {
149
+ payload: { redactionFailed: true, reason: n.message },
150
+ truncated: true,
151
+ };
140
152
  }
141
153
  if (serialisedLength > GATEWAY_EVENT_PAYLOAD_MAX_BYTES) {
142
154
  return {
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  import { type UserHistoryItem, type HistoryProductType } from "../../../../repositories";
3
3
  export declare function trackProductViewAction(productId: string, productType: HistoryProductType, productSnapshot?: UserHistoryItem["productSnapshot"]): Promise<ActionResult<unknown>>;
4
4
  export declare function mergeGuestHistoryAction(guestItems: Array<{
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
4
15
  import { historyRepository, } from "../../../../repositories/index.js";
5
16
  export async function trackProductViewAction(productId, productType, productSnapshot) {
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  import type { LotteryConfig } from "../../../../features/lottery/types";
3
3
  import type { LotteryEntryDocument } from "../../../../features/lottery/schemas/firestore";
4
4
  /**
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { getAdminDb } from "../../../../providers/db-firebase/index.js";
4
15
  import { eventRepository, productRepository, orderRepository } from "../../../../repositories/index.js";
5
16
  import { serverLogger } from "../../../../monitoring/index.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function createOrderAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  /**
4
4
  * Cancel an order, and give the money back if any was taken (D14).
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { adminNotificationsRepository, orderRepository, storeRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { createOrderSchema, updateOrderStatusSchema, cancelOrderSchema, returnRequestSchema, } from "../../../shared/features/orders/schema.js";
@@ -391,7 +391,6 @@ export async function cancelOrderWithRefund(order, opts) {
391
391
  */
392
392
  const result = await processRefundAction({
393
393
  orderId: order.id,
394
- type: "full",
395
394
  amount,
396
395
  /*
397
396
  * `changed_mind` is the honest default: a cancellation before dispatch is a
@@ -1,6 +1,30 @@
1
1
  import { orderRepository } from "../../../../repositories/index.js";
2
2
  import { OrderNotFoundError, OrderCancelError, OrderOwnershipError, OrderReturnWindowError, } from "../../../shared/features/orders/errors.js";
3
3
  import { ORDER_CANCELLABLE_STATUSES, ORDER_RETURN_WINDOW_MS, } from "../../../shared/features/orders/config.js";
4
+ /**
5
+ * The three shapes `updatedAt` really arrives in, resolved to a `Date`.
6
+ *
7
+ * A Firestore `Timestamp` is duck-typed on `toDate` rather than imported, so
8
+ * this file stays free of a firebase-admin import — the same trade
9
+ * `orders/adapters.ts` makes and for the same reason.
10
+ *
11
+ * Falls back to NOW rather than to an invalid date: the caller measures a
12
+ * return window against it, and `new Date(undefined)` is `NaN`, which makes
13
+ * every comparison false and would silently hold the window open forever.
14
+ */
15
+ function toDateOrNow(value) {
16
+ if (value instanceof Date)
17
+ return Number.isNaN(value.getTime()) ? new Date() : value;
18
+ if (typeof value === "object" && value !== null && typeof value.toDate === "function") {
19
+ const d = value.toDate();
20
+ return d instanceof Date && !Number.isNaN(d.getTime()) ? d : new Date();
21
+ }
22
+ if (typeof value === "string") {
23
+ const d = new Date(value);
24
+ return Number.isNaN(d.getTime()) ? new Date() : d;
25
+ }
26
+ return new Date();
27
+ }
4
28
  export async function assertOrderOwnership(orderId, userId) {
5
29
  const order = await orderRepository.findById(orderId);
6
30
  if (!order)
@@ -97,7 +121,13 @@ export async function assertReturnWindowOpen(orderId, userId) {
97
121
  */
98
122
  const deliveredAt = order.deliveryDate instanceof Date
99
123
  ? order.deliveryDate
100
- : new Date(order.updatedAt ?? Date.now());
124
+ /*
125
+ * Typed, and the `as never` is gone with it. That cast existed only to
126
+ * feed an `unknown` into `new Date()` — it suppressed the one check that
127
+ * would have caught a wrong shape. A Firestore Timestamp is duck-typed on
128
+ * `toDate` rather than imported, the same way `toIsoOrUndefined` does it.
129
+ */
130
+ : toDateOrNow(order.updatedAt);
101
131
  if (Date.now() - deliveredAt.getTime() > ORDER_RETURN_WINDOW_MS)
102
132
  throw new OrderReturnWindowError();
103
133
  return order;
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export type ApplyRefundDeductionInput = {
3
3
  storeId: string;
4
4
  orderId: string;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  /**
4
15
  * applyRefundDeductionAction — deduct a refund from a seller's pending payout.
5
16
  *
@@ -91,7 +91,15 @@ export async function awardPurchasePoints(order) {
91
91
  return { awarded: 0, skipped: "no-buyer" };
92
92
  }
93
93
  const goods = orderTaxableValue(order);
94
- const amount = roundPoints((goods * POINTS_EARN_PERCENT) / 100);
94
+ /*
95
+ * `goods * (PERCENT / 100)`, not `(goods * PERCENT) / 100` — the same value,
96
+ * written the way every fee in `fees/calculator.ts` is
97
+ * (`subtotal * (commissions.platformFeePercent / 100)`). The division
98
+ * belongs to the PERCENT, and grouping it that way is what distinguishes a
99
+ * percentage from the subunit-conversion `/100` that `audit-money-units`
100
+ * exists to catch — which read the old grouping as exactly that.
101
+ */
102
+ const amount = roundPoints(goods * (POINTS_EARN_PERCENT / 100));
95
103
  if (amount <= 0) {
96
104
  /*
97
105
  * A fully-cancelled or zero-value order. Marked as awarded anyway below so
@@ -1,2 +1,2 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function reservePreOrderAction(input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { productRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { reservePreOrderSchema } from "../../../shared/features/pre-orders/schema.js";
@@ -1,2 +1,2 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function enterPrizeDrawAction(input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { productRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { assertPrizeDrawOpen } from "./service.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function createProductAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function createAuctionAction(input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function createPreOrderAction(input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { productRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { isAdminUser } from "../../../../features/auth/role-predicates.js";
@@ -1,4 +1,4 @@
1
- import { type ActionResult } from "@mohasinac/appkit/server";
1
+ import { type ActionResult } from "../../../shared/types/action-result";
2
2
  export declare function applyCouponAction(input: unknown): Promise<ActionResult<unknown>>;
3
3
  export declare function createCouponAction(input: unknown): Promise<ActionResult<unknown>>;
4
4
  export declare function updateCouponAction(couponId: string, input: unknown): Promise<ActionResult<unknown>>;
@@ -1,5 +1,16 @@
1
1
  "use server";
2
- import { wrapAction } from "@mohasinac/appkit/server";
2
+ /*
3
+ * 🛑 From the DEFINING module, never "@mohasinac/appkit/server".
4
+ *
5
+ * appkit importing its own public server barrel is a self-reference that drags
6
+ * the whole server surface in behind it — `dist/server.js` reaches next/og,
7
+ * next/navigation, next/headers and driver.js. Twenty `actions.ts` files did
8
+ * this for two symbols, and because `obligationSweep` reaches one of them, the
9
+ * Firebase Functions tsup bundle (noExternal: appkit) had to resolve Next:
10
+ * it failed on two `react-server-dom-webpack/*` requires and two @vercel/og
11
+ * .wasm files, naming none of the responsible files. Root Cause #18.
12
+ */
13
+ import { wrapAction } from "../../../shared/types/action-result.js";
3
14
  import { couponsRepository } from "../../../../repositories/index.js";
4
15
  import { requireRoleUser } from "../../../../providers/auth-firebase/helpers.js";
5
16
  import { applyCouponSchema, createCouponSchema, updateCouponSchema, } from "../../../shared/features/promotions/schema.js";
@@ -66,7 +66,7 @@ export declare function adjudicateProtectionClaimAction(claimId: string, finding
66
66
  /** A buyer's own claims, for their order detail page. */
67
67
  export declare function getMyProtectionClaimsAction(): Promise<ActionResult<ProtectionClaimDocument[]>>;
68
68
  /** Whether this order can be claimed against right now, for rendering the CTA. */
69
- export declare function canClaimProtection(order: Parameters<typeof deadlinesFor>[0], kind: "shipping" | "sale"): Promise<{
69
+ export declare function canClaimProtection(order: Parameters<typeof deadlinesFor>[0], kind: "shipping" | "sale"): Promise<ActionResult<{
70
70
  can: boolean;
71
71
  reason?: string;
72
- }>;
72
+ }>>;
@@ -213,16 +213,25 @@ export async function getMyProtectionClaimsAction() {
213
213
  }
214
214
  /** Whether this order can be claimed against right now, for rendering the CTA. */
215
215
  export async function canClaimProtection(order, kind) {
216
- const feePaid = kind === "shipping" ? order.shipmentProtectionFee : order.saleProtectionFee;
217
- if (!feePaid || feePaid <= 0)
218
- return { can: false, reason: "not-covered" };
219
- const existing = await protectionClaimsRepository().findById(createProtectionClaimId(order.id, kind));
220
- if (existing)
221
- return { can: false, reason: "already-claimed" };
222
- const obligationKind = kind === "shipping" ? "claim-shipping" : "claim-sale";
223
- const window = deadlinesFor(order).find((d) => d.kind === obligationKind);
224
- if (order.deliveryDate && window && window.dueAt.getTime() <= Date.now()) {
225
- return { can: false, reason: "window-closed" };
226
- }
227
- return { can: true };
216
+ /*
217
+ * 🛑 Wrapped, because this file is `"use server"` — which makes EVERY export
218
+ * in it a client-callable RPC endpoint, read-only predicate included. So it
219
+ * owes the same uniform envelope as its sibling mutations: a caller cannot
220
+ * tell a thrown repository error from a `{can:false}` verdict otherwise, and
221
+ * "the claim window is closed" and "the lookup failed" are opposite answers.
222
+ */
223
+ return wrapAction(async () => {
224
+ const feePaid = kind === "shipping" ? order.shipmentProtectionFee : order.saleProtectionFee;
225
+ if (!feePaid || feePaid <= 0)
226
+ return { can: false, reason: "not-covered" };
227
+ const existing = await protectionClaimsRepository().findById(createProtectionClaimId(order.id, kind));
228
+ if (existing)
229
+ return { can: false, reason: "already-claimed" };
230
+ const obligationKind = kind === "shipping" ? "claim-shipping" : "claim-sale";
231
+ const window = deadlinesFor(order).find((d) => d.kind === obligationKind);
232
+ if (order.deliveryDate && window && window.dueAt.getTime() <= Date.now()) {
233
+ return { can: false, reason: "window-closed" };
234
+ }
235
+ return { can: true };
236
+ });
228
237
  }
@@ -5,7 +5,7 @@
5
5
  * handlers also work in a Vercel lambda (10s cap honoured by raffle pool
6
6
  * size).
7
7
  */
8
- import { type ActionResult } from "@mohasinac/appkit/server";
8
+ import { type ActionResult } from "../../../shared/types/action-result";
9
9
  import { type TriggerEventRaffleInput, type TriggerEventRaffleResult } from "../../jobs/core/triggerEventRaffle";
10
10
  import { type AssignSpinPrizeInput, type AssignSpinPrizeResult } from "../../jobs/core/assignSpinPrize";
11
11
  export declare function triggerEventRaffleAction(input: TriggerEventRaffleInput): Promise<ActionResult<TriggerEventRaffleResult>>;