@gusto/embedded-react-sdk 0.56.6 → 0.56.7-rc.1

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 (89) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  3. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  4. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  5. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  6. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  7. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  8. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  9. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  10. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  11. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  12. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  13. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  14. package/dist/components/Company/Industry/Context.js +6 -7
  15. package/dist/components/Company/Industry/Context.js.map +1 -1
  16. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  17. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  18. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  19. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  20. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  21. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  22. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js +70 -0
  23. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js.map +1 -0
  24. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +30 -32
  25. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -1
  26. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +35 -27
  27. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -1
  28. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +52 -31
  29. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -1
  30. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +106 -66
  31. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -1
  32. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +36 -30
  33. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -1
  34. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js +7 -0
  35. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js.map +1 -0
  36. package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js +81 -0
  37. package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js.map +1 -0
  38. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +46 -18
  39. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
  40. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  41. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  42. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  43. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  44. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
  45. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  46. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  47. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  48. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js +13 -13
  49. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  50. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  51. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  52. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +49 -48
  53. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  54. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js +49 -47
  55. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js.map +1 -1
  56. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  57. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  58. package/dist/contexts/ApiProvider/ApiProvider.js +13 -12
  59. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  60. package/dist/contexts/ApiProvider/createSdkQueryClient.js +4 -3
  61. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
  62. package/dist/contexts/ApiProvider/payrollDeductionAmountHook.js +36 -0
  63. package/dist/contexts/ApiProvider/payrollDeductionAmountHook.js.map +1 -0
  64. package/dist/helpers/validations.js +1 -1
  65. package/dist/helpers/validations.js.map +1 -1
  66. package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
  67. package/dist/i18n/en/Company.Management.PaySchedule.json.js +24 -14
  68. package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -1
  69. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +12 -10
  70. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -1
  71. package/dist/package.json.js +1 -1
  72. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.d.ts +15 -0
  73. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +3 -3
  74. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +7 -3
  75. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +20 -4
  76. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.d.ts +3 -0
  77. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +10 -1
  78. package/dist/src/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.d.ts +25 -0
  79. package/dist/src/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.test.d.ts +1 -0
  80. package/dist/src/components/Payroll/PayrollList/__fixtures__/payrollListMocks.d.ts +67 -0
  81. package/dist/src/contexts/ApiProvider/createSdkQueryClient.d.ts +2 -0
  82. package/dist/src/contexts/ApiProvider/createSdkQueryClient.test.d.ts +1 -0
  83. package/dist/src/contexts/ApiProvider/payrollDeductionAmountHook.d.ts +12 -0
  84. package/dist/src/contexts/ApiProvider/payrollDeductionAmountHook.test.d.ts +1 -0
  85. package/dist/src/helpers/validations.test.d.ts +1 -0
  86. package/dist/src/i18n/types.d.ts +38 -2
  87. package/dist/src/models/external.d.ts +7 -6
  88. package/docs/guides/endpoint-inventory.json +15 -0
  89. package/package.json +14 -14
@@ -1,14 +1,15 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { QueryClientProvider as E } from "@tanstack/react-query";
3
- import { GustoEmbeddedProvider as R } from "@gusto/embedded-api/react-query/_context";
4
- import { GustoEmbeddedCore as g } from "@gusto/embedded-api/core";
3
+ import { GustoEmbeddedProvider as g } from "@gusto/embedded-api/react-query/_context";
4
+ import { GustoEmbeddedCore as R } from "@gusto/embedded-api/core";
5
5
  import { SDKHooks as q } from "@gusto/embedded-api/hooks/hooks";
6
6
  import { useMemo as m } from "react";
7
- import { apiVersionHook as C } from "./apiVersionHook.js";
7
+ import { apiVersionHook as l } from "./apiVersionHook.js";
8
8
  import { apiVersionMismatchHook as a } from "./apiVersionMismatchHook.js";
9
- import { informationRequestEnumHook as b } from "./informationRequestEnumHook.js";
10
- import { createSdkQueryClient as l } from "./createSdkQueryClient.js";
11
- function P({
9
+ import { informationRequestEnumHook as A } from "./informationRequestEnumHook.js";
10
+ import { payrollDeductionAmountHook as C } from "./payrollDeductionAmountHook.js";
11
+ import { createSdkQueryClient as S } from "./createSdkQueryClient.js";
12
+ function Q({
12
13
  url: s,
13
14
  headers: i,
14
15
  hooks: r,
@@ -16,12 +17,12 @@ function P({
16
17
  queryClient: f
17
18
  }) {
18
19
  const p = m(() => {
19
- const t = new g({
20
+ const t = new R({
20
21
  serverURL: s
21
22
  }), e = t._options.hooks || new q();
22
- if (e.registerBeforeRequestHook(C), e.registerAfterSuccessHook(a), e.registerAfterErrorHook(a), e.registerAfterSuccessHook(b), i) {
23
+ if (e.registerBeforeRequestHook(l), e.registerAfterSuccessHook(a), e.registerAfterErrorHook(a), e.registerAfterSuccessHook(A), e.registerAfterSuccessHook(C), i) {
23
24
  const o = {
24
- beforeRequest: (S, n) => (new Headers(i).forEach((c, k) => {
25
+ beforeRequest: (b, n) => (new Headers(i).forEach((c, k) => {
25
26
  c && n.headers.set(k, c);
26
27
  }), n)
27
28
  };
@@ -36,10 +37,10 @@ function P({
36
37
  }), r?.afterError && r.afterError.forEach((o) => {
37
38
  e.registerAfterErrorHook(o);
38
39
  }), t._options.hooks || (t._options.hooks = e), t;
39
- }, [s, i, r]), d = m(() => f ?? l(), [f]);
40
- return /* @__PURE__ */ u(E, { client: d, children: /* @__PURE__ */ u(R, { client: p, children: H }) });
40
+ }, [s, i, r]), d = m(() => f ?? S(), [f]);
41
+ return /* @__PURE__ */ u(E, { client: d, children: /* @__PURE__ */ u(g, { client: p, children: H }) });
41
42
  }
42
43
  export {
43
- P as ApiProvider
44
+ Q as ApiProvider
44
45
  };
45
46
  //# sourceMappingURL=ApiProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { apiVersionMismatchHook } from './apiVersionMismatchHook'\nimport { informationRequestEnumHook } from './informationRequestEnumHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\n/**\n * Props for {@link ApiProvider}.\n *\n * @internal\n */\nexport interface ApiProviderProps {\n /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-06-15` requests. */\n url: string\n /** Default headers applied to every SDK request, in addition to the `X-Gusto-API-Version` header set automatically. */\n headers?: HeadersInit\n /** Lifecycle hooks for intercepting and modifying SDK requests and responses. */\n hooks?: SDKHooks\n /** Subtree that renders inside the API + React Query providers. */\n children: React.ReactNode\n /** Optional React Query client. When omitted, a client is created with the SDK's defaults (auto-invalidation on mutation success). */\n queryClient?: QueryClient\n}\n\n/**\n * Wires the `@gusto/embedded-api-v-2026-06-15` client and a React Query client into the React tree.\n *\n * @remarks\n * Registers the SDK's `X-Gusto-API-Version` header on every request, warns via `console.warn` if a\n * response reports a different `X-Gusto-API-Version` than was requested (e.g. a proxy rewriting the\n * header), applies any default `headers`, and registers user-supplied lifecycle hooks\n * (`beforeCreateRequest`, `beforeRequest`, `afterSuccess`, `afterError`). When no `queryClient` is\n * supplied, one is created with the SDK's defaults so\n * successful mutations under the `['@gusto/embedded-api-v-2026-06-15']` key invalidate every SDK\n * query automatically. Partners who supply their own `QueryClient` are responsible for matching that\n * contract.\n *\n * Typically wrapped by {@link GustoProvider}; use directly only when composing the provider stack\n * manually.\n *\n * @param props - See {@link ApiProviderProps}.\n * @returns A React subtree wrapped in `QueryClientProvider` and the embedded API context.\n * @internal\n */\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n sdkHooks.registerAfterSuccessHook(apiVersionMismatchHook)\n sdkHooks.registerAfterErrorHook(apiVersionMismatchHook)\n sdkHooks.registerAfterSuccessHook(informationRequestEnumHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","apiVersionMismatchHook","informationRequestEnumHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;;;AAiDO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAO9C,QALAD,EAAS,0BAA0BE,CAAc,GACjDF,EAAS,yBAAyBG,CAAsB,GACxDH,EAAS,uBAAuBG,CAAsB,GACtDH,EAAS,yBAAyBI,CAA0B,GAExDZ,GAAS;AACX,YAAMa,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQf,CAAO,EAC3B,QAAQ,CAACgB,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAP,EAAS,0BAA0BK,CAAiB;AAAA,IACtD;AAEA,WAAIZ,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAiB,MAAQ;AACxC,MAAAV,EAAS,gCAAgCU,CAAI;AAAA,IAC/C,CAAC,GAGCjB,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAiB,MAAQ;AAClC,MAAAV,EAAS,0BAA0BU,CAAI;AAAA,IACzC,CAAC,GAGCjB,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAiB,MAAQ;AACjC,MAAAV,EAAS,yBAAyBU,CAAI;AAAA,IACxC,CAAC,GAGCjB,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAiB,MAAQ;AAC/B,MAAAV,EAAS,uBAAuBU,CAAI;AAAA,IACtC,CAAC,GAGEZ,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBkB,IAAcd,EAAQ,MACnBF,KAAwBiB,EAAA,GAC9B,CAACjB,CAAoB,CAAC;AAEzB,SACE,gBAAAkB,EAACC,KAAoB,QAAQH,GAC3B,4BAACI,GAAA,EAAsB,QAAQnB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
1
+ {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { apiVersionMismatchHook } from './apiVersionMismatchHook'\nimport { informationRequestEnumHook } from './informationRequestEnumHook'\nimport { payrollDeductionAmountHook } from './payrollDeductionAmountHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\n/**\n * Props for {@link ApiProvider}.\n *\n * @internal\n */\nexport interface ApiProviderProps {\n /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-06-15` requests. */\n url: string\n /** Default headers applied to every SDK request, in addition to the `X-Gusto-API-Version` header set automatically. */\n headers?: HeadersInit\n /** Lifecycle hooks for intercepting and modifying SDK requests and responses. */\n hooks?: SDKHooks\n /** Subtree that renders inside the API + React Query providers. */\n children: React.ReactNode\n /** Optional React Query client. When omitted, a client is created with the SDK's defaults (auto-invalidation on mutation success). */\n queryClient?: QueryClient\n}\n\n/**\n * Wires the `@gusto/embedded-api-v-2026-06-15` client and a React Query client into the React tree.\n *\n * @remarks\n * Registers the SDK's `X-Gusto-API-Version` header on every request, warns via `console.warn` if a\n * response reports a different `X-Gusto-API-Version` than was requested (e.g. a proxy rewriting the\n * header), applies any default `headers`, and registers user-supplied lifecycle hooks\n * (`beforeCreateRequest`, `beforeRequest`, `afterSuccess`, `afterError`). When no `queryClient` is\n * supplied, one is created with the SDK's defaults so\n * successful mutations under the `['@gusto/embedded-api-v-2026-06-15']` key invalidate every SDK\n * query automatically. Partners who supply their own `QueryClient` are responsible for matching that\n * contract.\n *\n * Typically wrapped by {@link GustoProvider}; use directly only when composing the provider stack\n * manually.\n *\n * @param props - See {@link ApiProviderProps}.\n * @returns A React subtree wrapped in `QueryClientProvider` and the embedded API context.\n * @internal\n */\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n sdkHooks.registerAfterSuccessHook(apiVersionMismatchHook)\n sdkHooks.registerAfterErrorHook(apiVersionMismatchHook)\n sdkHooks.registerAfterSuccessHook(informationRequestEnumHook)\n sdkHooks.registerAfterSuccessHook(payrollDeductionAmountHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","apiVersionMismatchHook","informationRequestEnumHook","payrollDeductionAmountHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;;;;AAkDO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAQ9C,QANAD,EAAS,0BAA0BE,CAAc,GACjDF,EAAS,yBAAyBG,CAAsB,GACxDH,EAAS,uBAAuBG,CAAsB,GACtDH,EAAS,yBAAyBI,CAA0B,GAC5DJ,EAAS,yBAAyBK,CAA0B,GAExDb,GAAS;AACX,YAAMc,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQhB,CAAO,EAC3B,QAAQ,CAACiB,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAR,EAAS,0BAA0BM,CAAiB;AAAA,IACtD;AAEA,WAAIb,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAkB,MAAQ;AACxC,MAAAX,EAAS,gCAAgCW,CAAI;AAAA,IAC/C,CAAC,GAGClB,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAkB,MAAQ;AAClC,MAAAX,EAAS,0BAA0BW,CAAI;AAAA,IACzC,CAAC,GAGClB,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAkB,MAAQ;AACjC,MAAAX,EAAS,yBAAyBW,CAAI;AAAA,IACxC,CAAC,GAGClB,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAkB,MAAQ;AAC/B,MAAAX,EAAS,uBAAuBW,CAAI;AAAA,IACtC,CAAC,GAGEb,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBmB,IAAcf,EAAQ,MACnBF,KAAwBkB,EAAA,GAC9B,CAAClB,CAAoB,CAAC;AAEzB,SACE,gBAAAmB,EAACC,KAAoB,QAAQH,GAC3B,4BAACI,GAAA,EAAsB,QAAQpB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
@@ -1,15 +1,16 @@
1
1
  import { QueryClient as r } from "@tanstack/react-query";
2
2
  import { API_QUERY_NAMESPACE as t } from "./apiVersion.js";
3
- function i() {
3
+ function o() {
4
4
  const e = new r();
5
- return e.setQueryDefaults([t], { retry: !1 }), e.setMutationDefaults([t], {
5
+ return e.setQueryDefaults([t], { retry: !1, networkMode: "always" }), e.setMutationDefaults([t], {
6
6
  retry: !1,
7
+ networkMode: "always",
7
8
  onSuccess: async () => {
8
9
  await e.invalidateQueries({ queryKey: [t] });
9
10
  }
10
11
  }), e;
11
12
  }
12
13
  export {
13
- i as createSdkQueryClient
14
+ o as createSdkQueryClient
14
15
  };
15
16
  //# sourceMappingURL=createSdkQueryClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createSdkQueryClient.js","sources":["../../../src/contexts/ApiProvider/createSdkQueryClient.ts"],"sourcesContent":["import { QueryClient } from '@tanstack/react-query'\nimport { API_QUERY_NAMESPACE } from './apiVersion'\n\n/**\n * Creates a `QueryClient` pre-configured with the SDK's defaults for queries and mutations under the {@link API_QUERY_NAMESPACE} key.\n *\n * @remarks\n * Defaults applied:\n * - `retry: false` on both queries and mutations.\n * - On any successful mutation, every SDK query under the namespace is invalidated so the next read refetches fresh data.\n *\n * {@link ApiProvider} uses this when no `queryClient` prop is supplied, and `GustoTestProvider` uses it so tests faithfully replicate production\n * mutation/refetch behavior. Partners who supply their own `QueryClient` to {@link ApiProvider} are responsible for configuring equivalent\n * defaults if they want mutations to invalidate cached reads.\n *\n * @returns A new `QueryClient` with the SDK's query and mutation defaults applied.\n * @internal\n */\nexport function createSdkQueryClient(): QueryClient {\n const client = new QueryClient()\n client.setQueryDefaults([API_QUERY_NAMESPACE], { retry: false })\n client.setMutationDefaults([API_QUERY_NAMESPACE], {\n retry: false,\n onSuccess: async () => {\n await client.invalidateQueries({ queryKey: [API_QUERY_NAMESPACE] })\n },\n })\n return client\n}\n"],"names":["createSdkQueryClient","client","QueryClient","API_QUERY_NAMESPACE"],"mappings":";;AAkBO,SAASA,IAAoC;AAClD,QAAMC,IAAS,IAAIC,EAAA;AACnB,SAAAD,EAAO,iBAAiB,CAACE,CAAmB,GAAG,EAAE,OAAO,IAAO,GAC/DF,EAAO,oBAAoB,CAACE,CAAmB,GAAG;AAAA,IAChD,OAAO;AAAA,IACP,WAAW,YAAY;AACrB,YAAMF,EAAO,kBAAkB,EAAE,UAAU,CAACE,CAAmB,GAAG;AAAA,IACpE;AAAA,EAAA,CACD,GACMF;AACT;"}
1
+ {"version":3,"file":"createSdkQueryClient.js","sources":["../../../src/contexts/ApiProvider/createSdkQueryClient.ts"],"sourcesContent":["import { QueryClient } from '@tanstack/react-query'\nimport { API_QUERY_NAMESPACE } from './apiVersion'\n\n/**\n * Creates a `QueryClient` pre-configured with the SDK's defaults for queries and mutations under the {@link API_QUERY_NAMESPACE} key.\n *\n * @remarks\n * Defaults applied:\n * - `retry: false` on both queries and mutations.\n * - `networkMode: 'always'` on both queries and mutations, so requests made while the browser reports offline fail with an error instead of\n * staying paused (and showing an indefinite loading state) until connectivity returns.\n * - On any successful mutation, every SDK query under the namespace is invalidated so the next read refetches fresh data.\n *\n * {@link ApiProvider} uses this when no `queryClient` prop is supplied, and `GustoTestProvider` uses it so tests faithfully replicate production\n * mutation/refetch behavior. Partners who supply their own `QueryClient` to {@link ApiProvider} are responsible for configuring equivalent\n * defaults if they want mutations to invalidate cached reads.\n *\n * @returns A new `QueryClient` with the SDK's query and mutation defaults applied.\n * @internal\n */\nexport function createSdkQueryClient(): QueryClient {\n const client = new QueryClient()\n client.setQueryDefaults([API_QUERY_NAMESPACE], { retry: false, networkMode: 'always' })\n client.setMutationDefaults([API_QUERY_NAMESPACE], {\n retry: false,\n networkMode: 'always',\n onSuccess: async () => {\n await client.invalidateQueries({ queryKey: [API_QUERY_NAMESPACE] })\n },\n })\n return client\n}\n"],"names":["createSdkQueryClient","client","QueryClient","API_QUERY_NAMESPACE"],"mappings":";;AAoBO,SAASA,IAAoC;AAClD,QAAMC,IAAS,IAAIC,EAAA;AACnB,SAAAD,EAAO,iBAAiB,CAACE,CAAmB,GAAG,EAAE,OAAO,IAAO,aAAa,UAAU,GACtFF,EAAO,oBAAoB,CAACE,CAAmB,GAAG;AAAA,IAChD,OAAO;AAAA,IACP,aAAa;AAAA,IACb,WAAW,YAAY;AACrB,YAAMF,EAAO,kBAAkB,EAAE,UAAU,CAACE,CAAmB,GAAG;AAAA,IACpE;AAAA,EAAA,CACD,GACMF;AACT;"}
@@ -0,0 +1,36 @@
1
+ const u = /* @__PURE__ */ new Set([
2
+ "put-v1-companies-company_id-payrolls-payroll_id-prepare",
3
+ "put-v1-companies-company_id-payrolls",
4
+ "post-v1-companies-company_id-payrolls"
5
+ ]), r = (o) => o !== null && typeof o == "object" && !Array.isArray(o), y = {
6
+ afterSuccess: async (o, t) => {
7
+ if (!u.has(o.operationID)) return t;
8
+ let n;
9
+ try {
10
+ n = await t.clone().json();
11
+ } catch {
12
+ return t;
13
+ }
14
+ if (!r(n) || !Array.isArray(n.employee_compensations)) return t;
15
+ let s = !1;
16
+ for (const a of n.employee_compensations)
17
+ if (!(!r(a) || !Array.isArray(a.deductions)))
18
+ for (const e of a.deductions) {
19
+ if (!r(e) || typeof e.amount != "string" || !/^-?\d+(?:\.\d+)?$/.test(e.amount))
20
+ continue;
21
+ const c = Number(e.amount);
22
+ Number.isFinite(c) && (e.amount = c, s = !0);
23
+ }
24
+ if (!s) return t;
25
+ const i = new Headers(t.headers);
26
+ return i.delete("content-length"), new Response(JSON.stringify(n), {
27
+ status: t.status,
28
+ statusText: t.statusText,
29
+ headers: i
30
+ });
31
+ }
32
+ };
33
+ export {
34
+ y as payrollDeductionAmountHook
35
+ };
36
+ //# sourceMappingURL=payrollDeductionAmountHook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payrollDeductionAmountHook.js","sources":["../../../src/contexts/ApiProvider/payrollDeductionAmountHook.ts"],"sourcesContent":["import type { AfterSuccessHook } from '@/types/hooks'\n\nconst PAYROLL_OPERATIONS = new Set([\n 'put-v1-companies-company_id-payrolls-payroll_id-prepare',\n 'put-v1-companies-company_id-payrolls',\n 'post-v1-companies-company_id-payrolls',\n])\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n value !== null && typeof value === 'object' && !Array.isArray(value)\n\n/**\n * Normalizes string deduction amounts for payroll responses whose generated schema expects numbers.\n *\n * @remarks\n * API version 2026-06-15 returns decimal strings, including percentage deductions. The generated\n * prepare, update, and off-cycle response schemas still require numbers. Remove this compatibility\n * hook once those schemas match the API. Invalid amounts remain unchanged so validation rejects them.\n *\n * @internal\n */\nexport const payrollDeductionAmountHook: AfterSuccessHook = {\n afterSuccess: async (context, response) => {\n if (!PAYROLL_OPERATIONS.has(context.operationID)) return response\n\n let body: unknown\n try {\n body = await response.clone().json()\n } catch {\n return response\n }\n\n if (!isRecord(body) || !Array.isArray(body.employee_compensations)) return response\n\n let hasChanges = false\n for (const compensation of body.employee_compensations) {\n if (!isRecord(compensation) || !Array.isArray(compensation.deductions)) continue\n\n for (const deduction of compensation.deductions) {\n if (\n !isRecord(deduction) ||\n typeof deduction.amount !== 'string' ||\n !/^-?\\d+(?:\\.\\d+)?$/.test(deduction.amount)\n ) {\n continue\n }\n\n const amount = Number(deduction.amount)\n if (!Number.isFinite(amount)) continue\n\n deduction.amount = amount\n hasChanges = true\n }\n }\n\n if (!hasChanges) return response\n\n const headers = new Headers(response.headers)\n headers.delete('content-length')\n return new Response(JSON.stringify(body), {\n status: response.status,\n statusText: response.statusText,\n headers,\n })\n },\n}\n"],"names":["PAYROLL_OPERATIONS","isRecord","value","payrollDeductionAmountHook","context","response","body","hasChanges","compensation","deduction","amount","headers"],"mappings":"AAEA,MAAMA,wBAAyB,IAAI;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEKC,IAAW,CAACC,MAChBA,MAAU,QAAQ,OAAOA,KAAU,YAAY,CAAC,MAAM,QAAQA,CAAK,GAYxDC,IAA+C;AAAA,EAC1D,cAAc,OAAOC,GAASC,MAAa;AACzC,QAAI,CAACL,EAAmB,IAAII,EAAQ,WAAW,EAAG,QAAOC;AAEzD,QAAIC;AACJ,QAAI;AACF,MAAAA,IAAO,MAAMD,EAAS,MAAA,EAAQ,KAAA;AAAA,IAChC,QAAQ;AACN,aAAOA;AAAA,IACT;AAEA,QAAI,CAACJ,EAASK,CAAI,KAAK,CAAC,MAAM,QAAQA,EAAK,sBAAsB,EAAG,QAAOD;AAE3E,QAAIE,IAAa;AACjB,eAAWC,KAAgBF,EAAK;AAC9B,UAAI,GAACL,EAASO,CAAY,KAAK,CAAC,MAAM,QAAQA,EAAa,UAAU;AAErE,mBAAWC,KAAaD,EAAa,YAAY;AAC/C,cACE,CAACP,EAASQ,CAAS,KACnB,OAAOA,EAAU,UAAW,YAC5B,CAAC,oBAAoB,KAAKA,EAAU,MAAM;AAE1C;AAGF,gBAAMC,IAAS,OAAOD,EAAU,MAAM;AACtC,UAAK,OAAO,SAASC,CAAM,MAE3BD,EAAU,SAASC,GACnBH,IAAa;AAAA,QACf;AAGF,QAAI,CAACA,EAAY,QAAOF;AAExB,UAAMM,IAAU,IAAI,QAAQN,EAAS,OAAO;AAC5C,WAAAM,EAAQ,OAAO,gBAAgB,GACxB,IAAI,SAAS,KAAK,UAAUL,CAAI,GAAG;AAAA,MACxC,QAAQD,EAAS;AAAA,MACjB,YAAYA,EAAS;AAAA,MACrB,SAAAM;AAAA,IAAA,CACD;AAAA,EACH;AACF;"}
@@ -1,7 +1,7 @@
1
1
  import { z as n } from "zod";
2
2
  import { formatWithMask as o, commonMasks as i } from "./mask.js";
3
3
  import { removeNonDigits as r } from "./formattedStrings.js";
4
- const s = /^([a-zA-Z\xC0-\uFFFF]+([ \-']{0,1}[a-zA-Z\xC0-\uFFFF]+)*[.]{0,1}){1,2}$/, g = n.string().min(1).regex(s), N = n.string().refine((t) => /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(t)), F = /^(?!(000|666|9))\d{3}(?!00)\d{2}(?!0000)\d{4}$/, R = /^\d{2}-\d{7}$/, f = n.string().transform((t) => o(t, i.phoneMask)).refine((t) => r(t).length === 10), e = /^[0-9]{9}$/, p = n.string().regex(e), a = /^[0-9]{1,17}$/, u = n.string().regex(a);
4
+ const s = /^([a-zA-Z\xC0-\uFFFF]+([ \-']{0,1}[a-zA-Z\xC0-\uFFFF]+)*[.]{0,1}){1,2}$/, g = n.string().trim().min(1).regex(s), N = n.string().refine((t) => /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(t)), F = /^(?!(000|666|9))\d{3}(?!00)\d{2}(?!0000)\d{4}$/, R = /^\d{2}-\d{7}$/, f = n.string().transform((t) => o(t, i.phoneMask)).refine((t) => r(t).length === 10), e = /^[0-9]{9}$/, p = n.string().regex(e), a = /^[0-9]{1,17}$/, u = n.string().regex(a);
5
5
  export {
6
6
  a as ACCOUNT_NUMBER_REGEX,
7
7
  R as EIN_REGEX,
@@ -1 +1 @@
1
- {"version":3,"file":"validations.js","sources":["../../src/helpers/validations.ts"],"sourcesContent":["import { z } from 'zod'\nimport { commonMasks, formatWithMask } from './mask'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\n/**\n * Regex matching personal names: one or two words composed of Latin or extended-Latin letters,\n * with optional internal spaces, hyphens, or apostrophes, and an optional trailing period.\n *\n * @internal\n */\nexport const NAME_REGEX = /^([a-zA-Z\\xC0-\\uFFFF]+([ \\-']{0,1}[a-zA-Z\\xC0-\\uFFFF]+)*[.]{0,1}){1,2}$/\n\n/**\n * Zod schema validating a non-empty personal name against {@link NAME_REGEX}.\n *\n * @internal\n */\nexport const nameValidation = z.string().min(1).regex(NAME_REGEX)\n\n/**\n * Zod schema validating a US ZIP code in either 5-digit (`12345`) or ZIP+4 (`12345-6789`) form.\n *\n * @internal\n */\nexport const zipValidation = z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip))\n\n/**\n * Regex matching a valid US Social Security Number. Rejects reserved area numbers (000, 666, 9xx),\n * a group number of 00, and a serial number of 0000.\n *\n * @internal\n */\nexport const SSN_REGEX = /^(?!(000|666|9))\\d{3}(?!00)\\d{2}(?!0000)\\d{4}$/\n\n/**\n * Regex matching a federal EIN in the canonical display format `NN-NNNNNNN`\n * (two digits, a hyphen, then seven digits). Pair with `normalizeEin` to format\n * raw input before testing.\n *\n * @internal\n */\nexport const EIN_REGEX = /^\\d{2}-\\d{7}$/\n\n/**\n * Zod schema validating a US phone number. Formats the input with the phone mask and accepts it\n * only when the digit-only form is exactly ten digits.\n *\n * @internal\n */\nexport const phoneValidation = z\n .string()\n .transform(value => formatWithMask(value, commonMasks.phoneMask))\n .refine(phone => {\n const digits = removeNonDigits(phone)\n return digits.length === 10\n })\n\n/**\n * Regex matching a bank routing number (exactly nine digits).\n *\n * @internal\n */\nexport const ROUTING_NUMBER_REGEX = /^[0-9]{9}$/\n\n/**\n * Zod schema validating a bank routing number (exactly nine digits).\n *\n * @internal\n */\nexport const routingNumberValidation = z.string().regex(ROUTING_NUMBER_REGEX)\n\n/**\n * Regex matching a bank account number (one to seventeen digits).\n *\n * @internal\n */\nexport const ACCOUNT_NUMBER_REGEX = /^[0-9]{1,17}$/\n\n/**\n * Zod schema validating a bank account number (one to seventeen digits).\n *\n * @internal\n */\nexport const accountNumberValidation = z.string().regex(ACCOUNT_NUMBER_REGEX)\n"],"names":["NAME_REGEX","nameValidation","z","zipValidation","zip","SSN_REGEX","EIN_REGEX","phoneValidation","value","formatWithMask","commonMasks","phone","removeNonDigits","ROUTING_NUMBER_REGEX","routingNumberValidation","ACCOUNT_NUMBER_REGEX","accountNumberValidation"],"mappings":";;;AAUO,MAAMA,IAAa,2EAObC,IAAiBC,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAMF,CAAU,GAOnDG,IAAgBD,EAAE,SAAS,OAAO,CAAAE,MAAO,4BAA4B,KAAKA,CAAG,CAAC,GAQ9EC,IAAY,kDASZC,IAAY,iBAQZC,IAAkBL,EAC5B,OAAA,EACA,UAAU,CAAAM,MAASC,EAAeD,GAAOE,EAAY,SAAS,CAAC,EAC/D,OAAO,CAAAC,MACSC,EAAgBD,CAAK,EACtB,WAAW,EAC1B,GAOUE,IAAuB,cAOvBC,IAA0BZ,EAAE,OAAA,EAAS,MAAMW,CAAoB,GAO/DE,IAAuB,iBAOvBC,IAA0Bd,EAAE,OAAA,EAAS,MAAMa,CAAoB;"}
1
+ {"version":3,"file":"validations.js","sources":["../../src/helpers/validations.ts"],"sourcesContent":["import { z } from 'zod'\nimport { commonMasks, formatWithMask } from './mask'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\n/**\n * Regex matching personal names: one or two words composed of Latin or extended-Latin letters,\n * with optional internal spaces, hyphens, or apostrophes, and an optional trailing period.\n *\n * @internal\n */\nexport const NAME_REGEX = /^([a-zA-Z\\xC0-\\uFFFF]+([ \\-']{0,1}[a-zA-Z\\xC0-\\uFFFF]+)*[.]{0,1}){1,2}$/\n\n/**\n * Zod schema validating a non-empty personal name against {@link NAME_REGEX}.\n *\n * @internal\n */\nexport const nameValidation = z.string().trim().min(1).regex(NAME_REGEX)\n\n/**\n * Zod schema validating a US ZIP code in either 5-digit (`12345`) or ZIP+4 (`12345-6789`) form.\n *\n * @internal\n */\nexport const zipValidation = z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip))\n\n/**\n * Regex matching a valid US Social Security Number. Rejects reserved area numbers (000, 666, 9xx),\n * a group number of 00, and a serial number of 0000.\n *\n * @internal\n */\nexport const SSN_REGEX = /^(?!(000|666|9))\\d{3}(?!00)\\d{2}(?!0000)\\d{4}$/\n\n/**\n * Regex matching a federal EIN in the canonical display format `NN-NNNNNNN`\n * (two digits, a hyphen, then seven digits). Pair with `normalizeEin` to format\n * raw input before testing.\n *\n * @internal\n */\nexport const EIN_REGEX = /^\\d{2}-\\d{7}$/\n\n/**\n * Zod schema validating a US phone number. Formats the input with the phone mask and accepts it\n * only when the digit-only form is exactly ten digits.\n *\n * @internal\n */\nexport const phoneValidation = z\n .string()\n .transform(value => formatWithMask(value, commonMasks.phoneMask))\n .refine(phone => {\n const digits = removeNonDigits(phone)\n return digits.length === 10\n })\n\n/**\n * Regex matching a bank routing number (exactly nine digits).\n *\n * @internal\n */\nexport const ROUTING_NUMBER_REGEX = /^[0-9]{9}$/\n\n/**\n * Zod schema validating a bank routing number (exactly nine digits).\n *\n * @internal\n */\nexport const routingNumberValidation = z.string().regex(ROUTING_NUMBER_REGEX)\n\n/**\n * Regex matching a bank account number (one to seventeen digits).\n *\n * @internal\n */\nexport const ACCOUNT_NUMBER_REGEX = /^[0-9]{1,17}$/\n\n/**\n * Zod schema validating a bank account number (one to seventeen digits).\n *\n * @internal\n */\nexport const accountNumberValidation = z.string().regex(ACCOUNT_NUMBER_REGEX)\n"],"names":["NAME_REGEX","nameValidation","z","zipValidation","zip","SSN_REGEX","EIN_REGEX","phoneValidation","value","formatWithMask","commonMasks","phone","removeNonDigits","ROUTING_NUMBER_REGEX","routingNumberValidation","ACCOUNT_NUMBER_REGEX","accountNumberValidation"],"mappings":";;;AAUO,MAAMA,IAAa,2EAObC,IAAiBC,EAAE,SAAS,KAAA,EAAO,IAAI,CAAC,EAAE,MAAMF,CAAU,GAO1DG,IAAgBD,EAAE,SAAS,OAAO,CAAAE,MAAO,4BAA4B,KAAKA,CAAG,CAAC,GAQ9EC,IAAY,kDASZC,IAAY,iBAQZC,IAAkBL,EAC5B,OAAA,EACA,UAAU,CAAAM,MAASC,EAAeD,GAAOE,EAAY,SAAS,CAAC,EAC/D,OAAO,CAAAC,MACSC,EAAgBD,CAAK,EACtB,WAAW,EAC1B,GAOUE,IAAuB,cAOvBC,IAA0BZ,EAAE,OAAA,EAAS,MAAMW,CAAoB,GAO/DE,IAAuB,iBAOvBC,IAA0Bd,EAAE,OAAA,EAAS,MAAMa,CAAoB;"}
@@ -1,4 +1,4 @@
1
- const e = "Assign a company signatory", t = `The company signatory is responsible for electronically signing all government forms Gusto creates and is generally a member of the business or partnership. Each time a signatory is updated, we'll file a new Form 8655 with the IRS to give Gusto the "Reporting Agent Authorization" we need to file and pay your taxes. Your signatory must be authorized by the IRS.`, i = { label: "Signing options", selfSign: "I'm authorized to sign official documents for the company.", appointOther: "I'll appoint another person to sign official documents." }, s = { title: "Signatory person details", description: "Make sure this information is accurate. We'll use it to submit IRS Form 8655 so we can file and pay your federal taxes. If you don't know who your authorized signatory is, please call the IRS at (800) 829-4933.", firstName: "First name", lastName: "Last name", email: "Email address", phone: "Phone number", ssn: "Social security number", birthday: "Date of birth", titleSelect: { label: "Title", placeholder: "Select title..." } }, a = { title: "Signatory home address", description: "To verify your identity, please enter your home address. If you're unsure what address to use, use the one listed on your driver's license.", street1: "Street 1", street2: "Street 2", city: "City", state: "State", statePlaceholder: "Select state...", zip: "Zip" }, o = { title: "Invite a signatory", description: "Make sure this information is accurate. We'll use it to submit IRS Form 8655 so we can file and pay your federal taxes. If you don't know who your authorized signatory is, please call the IRS at (800) 829-4933.", signatoryEmail: "Signatory email", confirmEmail: "Confirm signatory email", firstName: "First name", lastName: "Last name" }, r = { signDocuments: "Sign documents", inviteSignatory: "Invite signatory" }, n = { dob: "Date of birth is required", email: "Email address is required and must be valid", emailMismatch: "Email addresses must match", firstName: "First name is required", lastName: "Last name is required", phone: "Phone number must be 10 digits", title: "Title is required", address: { street1: "Street address is required", city: "City is required", state: "State is required", zip: "ZIP code must be 5 digits" } }, l = {
1
+ const e = "Assign a company signatory", t = `The company signatory is responsible for electronically signing all government forms Gusto creates and is generally a member of the business or partnership. Each time a signatory is updated, we'll file a new Form 8655 with the IRS to give Gusto the "Reporting Agent Authorization" we need to file and pay your taxes. Your signatory must be authorized by the IRS.`, i = { label: "Signing options", selfSign: "I'm authorized to sign official documents for the company.", appointOther: "I'll appoint another person to sign official documents." }, s = { title: "Signatory person details", description: "Make sure this information is accurate. We'll use it to submit IRS Form 8655 so we can file and pay your federal taxes. If you don't know who your authorized signatory is, please call the IRS at (800) 829-4933.", firstName: "First name", lastName: "Last name", email: "Email address", phone: "Phone number", ssn: "Social security number", birthday: "Date of birth", titleSelect: { label: "Title", placeholder: "Select title..." } }, a = { title: "Signatory home address", description: "To verify your identity, please enter your home address. If you're unsure what address to use, use the one listed on your driver's license.", street1: "Street 1", street2: "Street 2", city: "City", state: "State", statePlaceholder: "Select state...", zip: "Zip" }, o = { title: "Invite a signatory", description: "Make sure this information is accurate. We'll use it to submit IRS Form 8655 so we can file and pay your federal taxes. If you don't know who your authorized signatory is, please call the IRS at (800) 829-4933.", signatoryEmail: "Signatory email", confirmEmail: "Confirm signatory email", firstName: "First name", lastName: "Last name" }, r = { signDocuments: "Sign documents", inviteSignatory: "Invite signatory" }, n = { dob: "Date of birth is required", email: "Email address is required and must be valid", emailMismatch: "Email addresses must match", firstName: "Enter a valid first name", lastName: "Enter a valid last name", phone: "Phone number must be 10 digits", title: "Title is required", address: { street1: "Street address is required", city: "City is required", state: "State is required", zip: "ZIP code must be 5 digits" } }, l = {
2
2
  title: e,
3
3
  description: t,
4
4
  signingOptions: i,
@@ -1,24 +1,34 @@
1
- const e = "Pay schedule", t = "You have assigned everyone to be on one pay schedule.", a = "Manage", n = "Edit", o = "Edit pay schedule", s = "Edit AutoPilot", d = { name: "Name", frequency: "Frequency" }, l = { label: "AutoPilot", enabled: "Enabled", disabled: "Disabled" }, i = { assignmentUpdated: "Pay schedule assignment updated." }, c = {
1
+ const e = "Pay schedule", t = "You have assigned everyone to be on one pay schedule.", a = "You have assigned employees to pay schedules by compensation type.", s = "Pay schedules by compensation type", o = "Manage", n = "Edit", c = "Edit schedule", l = "Edit pay schedule", d = "Edit AutoPilot", i = "Pay schedule actions", u = { name: "Name", frequency: "Frequency", schedule: "Schedule" }, y = { hourly: "Hourly", salaried: "Salaried" }, p = { label: "AutoPilot", enabled: "Enabled", disabled: "Disabled" }, h = { assignmentUpdated: "Pay schedule assignment updated." }, r = {
2
2
  title: e,
3
3
  description: t,
4
- manageCta: a,
4
+ compensationDescription: a,
5
+ compensationTableLabel: s,
6
+ manageCta: o,
5
7
  editCta: n,
6
- editScheduleAriaLabel: o,
7
- editAutoPilotAriaLabel: s,
8
- labels: d,
9
- autoPilot: l,
10
- alerts: i
8
+ editScheduleCta: c,
9
+ editScheduleAriaLabel: l,
10
+ editAutoPilotAriaLabel: d,
11
+ rowMenuTriggerLabel: i,
12
+ labels: u,
13
+ compensationTypes: y,
14
+ autoPilot: p,
15
+ alerts: h
11
16
  };
12
17
  export {
13
- i as alerts,
14
- l as autoPilot,
15
- c as default,
18
+ h as alerts,
19
+ p as autoPilot,
20
+ a as compensationDescription,
21
+ s as compensationTableLabel,
22
+ y as compensationTypes,
23
+ r as default,
16
24
  t as description,
17
- s as editAutoPilotAriaLabel,
25
+ d as editAutoPilotAriaLabel,
18
26
  n as editCta,
19
- o as editScheduleAriaLabel,
20
- d as labels,
21
- a as manageCta,
27
+ l as editScheduleAriaLabel,
28
+ c as editScheduleCta,
29
+ u as labels,
30
+ o as manageCta,
31
+ i as rowMenuTriggerLabel,
22
32
  e as title
23
33
  };
24
34
  //# sourceMappingURL=Company.Management.PaySchedule.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Company.Management.PaySchedule.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"Company.Management.PaySchedule.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1,18 +1,20 @@
1
- const e = { heading: "Choose schedule type", description: "After you choose, you can create a pay schedule for each group.", options: { single: { label: "Everyone on one schedule", description: "Choose one pay schedule for all your employees" } } }, a = { heading: "Assign employees", payScheduleLabel: "Pay schedule", payScheduleDescription: "The pay schedule to use for all employees.", addPayScheduleCta: "Add pay schedule" }, n = { heading: "Review changes", noChangesHeading: "There are no changes to review.", noChangesDescription: "If you intended to make changes, please go back and make them.", employeeChangesHeading: "Employees affected", nameLabel: "Name", transitionPayPeriodLabel: "Transition pay period", payFrequencyLabel: "New pay frequency", firstPayPeriodLabel: "First pay period", noTransitionNeeded: "No transition needed" }, o = "Back", s = "Continue", t = "Submit", i = {
1
+ const e = { heading: "Choose schedule type", description: "After you choose, you can create a pay schedule for each group.", options: { single: { label: "Everyone on one schedule", description: "Choose one pay schedule for all your employees" }, hourlySalaried: { label: "Separate schedules by compensation type", description: "Choose one pay schedule for hourly employees and another for salaried employees" } } }, a = { heading: "Assign employees", payScheduleLabel: "Pay schedule", payScheduleDescription: "The pay schedule to use for all employees.", addPayScheduleCta: "Add pay schedule" }, o = { heading: "Assign employees", hourlyPayScheduleLabel: "Hourly employees", hourlyPayScheduleDescription: "The pay schedule to use for hourly employees.", salariedPayScheduleLabel: "Salaried employees", salariedPayScheduleDescription: "The pay schedule to use for salaried employees.", addPayScheduleCta: "Add pay schedule" }, s = { heading: "Review changes", noChangesHeading: "There are no changes to review.", noChangesDescription: "If you intended to make changes, please go back and make them.", employeeChangesHeading: "Employees affected", nameLabel: "Name", transitionPayPeriodLabel: "Transition pay period", payFrequencyLabel: "New pay frequency", firstPayPeriodLabel: "First pay period", noTransitionNeeded: "No transition needed" }, n = "Back", l = "Continue", d = "Submit", t = {
2
2
  typeStep: e,
3
3
  scheduleStep: a,
4
- reviewStep: n,
5
- backCta: o,
6
- continueCta: s,
7
- submitCta: t
4
+ compensationStep: o,
5
+ reviewStep: s,
6
+ backCta: n,
7
+ continueCta: l,
8
+ submitCta: d
8
9
  };
9
10
  export {
10
- o as backCta,
11
- s as continueCta,
12
- i as default,
13
- n as reviewStep,
11
+ n as backCta,
12
+ o as compensationStep,
13
+ l as continueCta,
14
+ t as default,
15
+ s as reviewStep,
14
16
  a as scheduleStep,
15
- t as submitCta,
17
+ d as submitCta,
16
18
  e as typeStep
17
19
  };
18
20
  //# sourceMappingURL=Company.Management.PayScheduleAssignment.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Company.Management.PayScheduleAssignment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Company.Management.PayScheduleAssignment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- const e = "@gusto/embedded-react-sdk", o = "0.56.6";
1
+ const e = "@gusto/embedded-react-sdk", o = "0.56.7";
2
2
  export {
3
3
  e as name,
4
4
  o as version
@@ -0,0 +1,15 @@
1
+ import { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow';
2
+ /** @internal */
3
+ export interface AssignmentCompensationStepPresentationProps {
4
+ schedules: PayScheduleShow[];
5
+ hourlyPayScheduleUuid?: string;
6
+ salariedPayScheduleUuid?: string;
7
+ onBack: () => void;
8
+ onAddPaySchedule: () => void;
9
+ onContinue: (selection: {
10
+ hourlyPayScheduleUuid: string;
11
+ salariedPayScheduleUuid: string;
12
+ }) => void;
13
+ }
14
+ /** @internal */
15
+ export declare function AssignmentCompensationStepPresentation({ schedules, hourlyPayScheduleUuid, salariedPayScheduleUuid, onBack, onAddPaySchedule, onContinue, }: AssignmentCompensationStepPresentationProps): import('react').JSX.Element;
@@ -1,9 +1,9 @@
1
- import { PayScheduleAssignmentBodyType } from '@gusto/embedded-api/models/components/payscheduleassignmentbody';
1
+ import { SupportedAssignmentType } from './usePayScheduleAssignment';
2
2
  /** @internal */
3
3
  export interface AssignmentTypeStepPresentationProps {
4
- defaultType?: typeof PayScheduleAssignmentBodyType.Single;
4
+ defaultType?: SupportedAssignmentType;
5
5
  onBack: () => void;
6
- onContinue: (type: PayScheduleAssignmentBodyType) => void;
6
+ onContinue: (type: SupportedAssignmentType) => void;
7
7
  }
8
8
  /** @internal */
9
9
  export declare function AssignmentTypeStepPresentation({ defaultType, onBack, onContinue, }: AssignmentTypeStepPresentationProps): import('react').JSX.Element;
@@ -13,8 +13,12 @@ export interface PayScheduleAssignmentProps extends BaseComponentInterface<'Comp
13
13
  *
14
14
  * @remarks
15
15
  * Walks through choosing an assignment type, picking (or creating) a pay schedule, and reviewing
16
- * the employees and transition payrolls affected before submitting. Only the single-schedule
17
- * assignment type is currently supported. Can be mounted directly or launched from
16
+ * the employees and transition payrolls affected before submitting. Opens on the company's
17
+ * current assignment, so submitting without changing anything is a no-op rather than a
18
+ * reassignment. Two assignment types are
19
+ * supported: one schedule for everyone (`single`), or separate schedules for hourly and salaried
20
+ * employees (`hourly_salaried`). Picking the same schedule for both compensation types is
21
+ * submitted as `single`. Can be mounted directly or launched from
18
22
  * `CompanyManagement.PaySchedule`'s Manage action.
19
23
  *
20
24
  * The internal step-to-step selection events (assignment type chosen, schedule picked) also
@@ -28,7 +32,7 @@ export interface PayScheduleAssignmentProps extends BaseComponentInterface<'Comp
28
32
  * | `paySchedule/create` | The user chose to add a new pay schedule from the picker step | — |
29
33
  * | `paySchedule/created` | A new pay schedule was created from the picker step | `{ paySchedule: PayScheduleShow }` |
30
34
  * | `paySchedule/management/assignment/cancel` | The user backed out of the flow entirely, from the first step | — |
31
- * | `paySchedule/management/assignment/assigned` | The assignment was submitted successfully | `{ type: PayScheduleAssignmentBodyType; defaultPayScheduleUuid: string; employeeChanges: PayScheduleAssignmentEmployeeChange[] }` |
35
+ * | `paySchedule/management/assignment/assigned` | The assignment was submitted successfully | `{ employeeChanges: PayScheduleAssignmentEmployeeChange[] }` plus either `{ type: 'single'; defaultPayScheduleUuid: string }` or `{ type: 'hourly_salaried'; hourlyPayScheduleUuid: string; salariedPayScheduleUuid: string }` |
32
36
  *
33
37
  * @alpha
34
38
  */
@@ -1,21 +1,37 @@
1
1
  import { PayScheduleAssignmentBodyType } from '@gusto/embedded-api/models/components/payscheduleassignmentbody';
2
2
  import { PayScheduleAssignmentEmployeeChange } from '@gusto/embedded-api/models/components/payscheduleassignmentemployeechange';
3
3
  import { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow';
4
+ import { SupportedAssignmentType } from './usePayScheduleAssignment';
4
5
  import { componentEvents } from '../../../../../shared/constants';
6
+ /**
7
+ * The assignment the user built, already collapsed to the type that actually gets submitted.
8
+ * Doubles as the request body and as the `assigned` event payload.
9
+ *
10
+ * @internal
11
+ */
12
+ export type AssignmentSelection = {
13
+ type: typeof PayScheduleAssignmentBodyType.Single;
14
+ defaultPayScheduleUuid: string;
15
+ } | {
16
+ type: typeof PayScheduleAssignmentBodyType.HourlySalaried;
17
+ hourlyPayScheduleUuid: string;
18
+ salariedPayScheduleUuid: string;
19
+ };
5
20
  /** @internal */
6
21
  export type EventPayloads = {
7
22
  [componentEvents.PAY_SCHEDULE_ASSIGNMENT_TYPE_SELECTED]: {
8
- type: PayScheduleAssignmentBodyType;
23
+ type: SupportedAssignmentType;
9
24
  };
10
25
  [componentEvents.PAY_SCHEDULE_ASSIGNMENT_SCHEDULE_SELECTED]: {
11
26
  defaultPayScheduleUuid: string;
27
+ } | {
28
+ hourlyPayScheduleUuid: string;
29
+ salariedPayScheduleUuid: string;
12
30
  };
13
31
  [componentEvents.PAY_SCHEDULE_CREATED]: {
14
32
  paySchedule: PayScheduleShow;
15
33
  };
16
- [componentEvents.PAY_SCHEDULE_ASSIGNED]: {
17
- type: PayScheduleAssignmentBodyType;
18
- defaultPayScheduleUuid: string;
34
+ [componentEvents.PAY_SCHEDULE_ASSIGNED]: AssignmentSelection & {
19
35
  employeeChanges: PayScheduleAssignmentEmployeeChange[];
20
36
  };
21
37
  };
@@ -0,0 +1,3 @@
1
+ import { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow';
2
+ /** @internal */
3
+ export declare function scheduleLabel(schedule: PayScheduleShow): string;
@@ -1,9 +1,18 @@
1
1
  import { PayScheduleAssignmentBodyType } from '@gusto/embedded-api/models/components/payscheduleassignmentbody';
2
2
  import { FlowContextInterface } from '../../../../Flow/useFlow';
3
+ /**
4
+ * The assignment types this flow supports. `by_employee` and `by_department` exist in the API
5
+ * but have no step implementations, so they're unrepresentable here.
6
+ *
7
+ * @internal
8
+ */
9
+ export type SupportedAssignmentType = Extract<PayScheduleAssignmentBodyType, 'single' | 'hourly_salaried'>;
3
10
  /** @internal */
4
11
  export interface PayScheduleAssignmentContextInterface extends FlowContextInterface {
5
12
  companyId: string;
6
- assignmentType?: PayScheduleAssignmentBodyType;
13
+ assignmentType?: SupportedAssignmentType;
7
14
  defaultPayScheduleUuid?: string;
15
+ hourlyPayScheduleUuid?: string;
16
+ salariedPayScheduleUuid?: string;
8
17
  component: React.ComponentType | null;
9
18
  }
@@ -0,0 +1,25 @@
1
+ import { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow';
2
+ /** @internal */
3
+ export type CompensationType = 'hourly' | 'salaried';
4
+ /** @internal */
5
+ export interface PayScheduleCompensationRow {
6
+ compensationType: CompensationType;
7
+ schedule: PayScheduleShow;
8
+ }
9
+ /** @internal */
10
+ export interface PayScheduleCompensationOverviewPresentationProps {
11
+ /** One row per compensation type, in display order. */
12
+ rows: PayScheduleCompensationRow[];
13
+ /** Shows the AutoPilot column and its row action when `true`. */
14
+ enableAutoPilot?: boolean;
15
+ /** Shows the Manage action when `true`. */
16
+ enableMultipleSchedules?: boolean;
17
+ /** Fired when the user chooses Edit schedule from a row menu. */
18
+ onEditSchedule: (schedule: PayScheduleShow) => void;
19
+ /** Fired when the user clicks Manage. */
20
+ onManageAssignment: () => void;
21
+ /** Fired when the user chooses AutoPilot from a row menu. */
22
+ onEditAutoPilot: (schedule: PayScheduleShow) => void;
23
+ }
24
+ /** @internal */
25
+ export declare function PayScheduleCompensationOverviewPresentation({ rows, enableAutoPilot, enableMultipleSchedules, onEditSchedule, onManageAssignment, onEditAutoPilot, }: PayScheduleCompensationOverviewPresentationProps): import('react').JSX.Element;
@@ -0,0 +1,67 @@
1
+ import { HttpHandler, HttpResponseResolver } from 'msw';
2
+ /**
3
+ * Shared, parameterizable mock data + MSW handlers for the PayrollList container tests.
4
+ *
5
+ * All shapes are the snake_case JSON the API returns (the SDK client normalizes
6
+ * to camelCase), so these plug directly into MSW resolvers.
7
+ */
8
+ export declare const COMPANY_ID = "company-123";
9
+ export declare const createListPayroll: (overrides?: Record<string, unknown>) => {
10
+ payroll_uuid: string;
11
+ processed: boolean;
12
+ off_cycle: boolean;
13
+ external: boolean;
14
+ payroll_type: string;
15
+ check_date: string;
16
+ payroll_deadline: string;
17
+ pay_period: {
18
+ start_date: string;
19
+ end_date: string;
20
+ pay_schedule_uuid: string;
21
+ };
22
+ };
23
+ export declare const createOffCyclePayroll: (offCycleReason: string, overrides?: Record<string, unknown>) => {
24
+ payroll_uuid: string;
25
+ processed: boolean;
26
+ off_cycle: boolean;
27
+ external: boolean;
28
+ payroll_type: string;
29
+ check_date: string;
30
+ payroll_deadline: string;
31
+ pay_period: {
32
+ start_date: string;
33
+ end_date: string;
34
+ pay_schedule_uuid: string;
35
+ };
36
+ };
37
+ export declare const createPaySchedule: (overrides?: Record<string, unknown>) => {
38
+ uuid: string;
39
+ frequency: string;
40
+ anchor_pay_date: string;
41
+ anchor_end_of_pay_period: string;
42
+ custom_name: string;
43
+ active: boolean;
44
+ version: string;
45
+ };
46
+ export declare const createTransitionPayPeriod: () => {
47
+ start_date: string;
48
+ end_date: string;
49
+ pay_schedule_uuid: string;
50
+ payroll: {
51
+ processed: boolean;
52
+ payroll_type: string;
53
+ };
54
+ };
55
+ interface PayrollListHandlerOptions {
56
+ payrolls?: Array<Record<string, unknown>>;
57
+ payrollsHeaders?: Record<string, string>;
58
+ payrollsResolver?: HttpResponseResolver;
59
+ paySchedules?: Array<Record<string, unknown>>;
60
+ blockers?: Array<Record<string, unknown>>;
61
+ wireInRequests?: Array<Record<string, unknown>>;
62
+ payPeriods?: Array<Record<string, unknown>>;
63
+ }
64
+ export declare const buildPayrollListHandlers: ({ payrolls, payrollsHeaders, payrollsResolver, paySchedules, blockers, wireInRequests, payPeriods, }?: PayrollListHandlerOptions) => HttpHandler[];
65
+ export declare const handleSkipPayroll: (resolver: HttpResponseResolver) => HttpHandler;
66
+ export declare const handleDeletePayroll: (resolver: HttpResponseResolver) => HttpHandler;
67
+ export {};
@@ -5,6 +5,8 @@ import { QueryClient } from '@tanstack/react-query';
5
5
  * @remarks
6
6
  * Defaults applied:
7
7
  * - `retry: false` on both queries and mutations.
8
+ * - `networkMode: 'always'` on both queries and mutations, so requests made while the browser reports offline fail with an error instead of
9
+ * staying paused (and showing an indefinite loading state) until connectivity returns.
8
10
  * - On any successful mutation, every SDK query under the namespace is invalidated so the next read refetches fresh data.
9
11
  *
10
12
  * {@link ApiProvider} uses this when no `queryClient` prop is supplied, and `GustoTestProvider` uses it so tests faithfully replicate production
@@ -0,0 +1,12 @@
1
+ import { AfterSuccessHook } from '../../types/hooks';
2
+ /**
3
+ * Normalizes string deduction amounts for payroll responses whose generated schema expects numbers.
4
+ *
5
+ * @remarks
6
+ * API version 2026-06-15 returns decimal strings, including percentage deductions. The generated
7
+ * prepare, update, and off-cycle response schemas still require numbers. Remove this compatibility
8
+ * hook once those schemas match the API. Invalid amounts remain unchanged so validation rejects them.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare const payrollDeductionAmountHook: AfterSuccessHook;
@@ -0,0 +1 @@
1
+ export {};