import { MutationKey, UseMutationResult } from "@tanstack/react-query"; import { GustoEmbeddedCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import { GustoEmbeddedError } from "../models/errors/gustoembeddederror.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js"; import { PayrollBatchConflictError } from "../models/errors/payrollbatchconflicterror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { UnprocessableEntityError } from "../models/errors/unprocessableentityerror.js"; import { PostV1PayrollBatchesRequest, PostV1PayrollBatchesResponse, PostV1PayrollBatchesSecurity } from "../models/operations/postv1payrollbatches.js"; import { MutationHookOptions } from "./_types.js"; export type PayrollCancellationsPostV1PayrollBatchesMutationVariables = { security: PostV1PayrollBatchesSecurity; request: PostV1PayrollBatchesRequest; options?: RequestOptions; }; export type PayrollCancellationsPostV1PayrollBatchesMutationData = PostV1PayrollBatchesResponse; export type PayrollCancellationsPostV1PayrollBatchesMutationError = PayrollBatchConflictError | UnprocessableEntityError | GustoEmbeddedError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError; /** * Create a payroll cancellation batch * * @remarks * Cancels up to 100 payrolls across one or more companies the partner is mapped to, asynchronously. * * The batch is processed asynchronously. Use the returned batch UUID to poll `GET /v1/payroll_batches/{payroll_batch_uuid}` for status and per-payroll results. * * Each item carries the payroll `uuid` and the `company_uuid` that owns it. A payroll whose company is not mapped to the partner — or that doesn't exist — is recorded as a `not_found` exclusion rather than a hard error, so every requested UUID lands in either `results` or `exclusions`. * * Idempotency is scoped per `(partner, idempotency_key)`. A duplicate POST with the same `idempotency_key` returns a 409 Conflict referencing the existing batch UUID — no duplicate processing occurs. * * 📘 System Access Authentication * * This endpoint uses the [Bearer Auth scheme with the system-level access token in the HTTP Authorization header](https://docs.gusto.com/embedded-payroll/docs/system-access) * * scope: `payroll_batches:write` */ export declare function usePayrollCancellationsPostV1PayrollBatchesMutation(options?: MutationHookOptions): UseMutationResult; export declare function mutationKeyPayrollCancellationsPostV1PayrollBatches(): MutationKey; export declare function buildPayrollCancellationsPostV1PayrollBatchesMutation(client$: GustoEmbeddedCore, hookOptions?: RequestOptions): { mutationKey: MutationKey; mutationFn: (variables: PayrollCancellationsPostV1PayrollBatchesMutationVariables) => Promise; }; //# sourceMappingURL=payrollCancellationsPostV1PayrollBatches.d.ts.map