@accounter/server
Version:
Accounter GraphQL server
370 lines (369 loc) • 14.5 kB
TypeScript
import z from 'zod';
declare const invoiceSchema: z.ZodObject<{
id: z.ZodString;
amount: z.ZodString;
contract_id: z.ZodNullable<z.ZodString>;
created_at: z.ZodISODateTime;
currency: z.ZodString;
deel_fee: z.ZodLiteral<"0.00">;
due_date: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
is_overdue: z.ZodBoolean;
issued_at: z.ZodISODateTime;
label: z.ZodString;
paid_at: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
status: z.ZodEnum<{
pending: "pending";
paid: "paid";
processing: "processing";
canceled: "canceled";
skipped: "skipped";
failed: "failed";
refunded: "refunded";
processed: "processed";
}>;
total: z.ZodString;
vat_id: z.ZodLiteral<"">;
vat_percentage: z.ZodLiteral<"">;
vat_total: z.ZodLiteral<"0.00">;
recipient_legal_entity_id: z.ZodLiteral<"1dee10b1-105b-4dc7-bcdb-5ed5c52ba868">;
}, z.core.$strict>;
export type Invoice = z.infer<typeof invoiceSchema>;
export declare const retrieveInvoicesSchema: z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
id: z.ZodString;
amount: z.ZodString;
contract_id: z.ZodNullable<z.ZodString>;
created_at: z.ZodISODateTime;
currency: z.ZodString;
deel_fee: z.ZodLiteral<"0.00">;
due_date: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
is_overdue: z.ZodBoolean;
issued_at: z.ZodISODateTime;
label: z.ZodString;
paid_at: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
status: z.ZodEnum<{
pending: "pending";
paid: "paid";
processing: "processing";
canceled: "canceled";
skipped: "skipped";
failed: "failed";
refunded: "refunded";
processed: "processed";
}>;
total: z.ZodString;
vat_id: z.ZodLiteral<"">;
vat_percentage: z.ZodLiteral<"">;
vat_total: z.ZodLiteral<"0.00">;
recipient_legal_entity_id: z.ZodLiteral<"1dee10b1-105b-4dc7-bcdb-5ed5c52ba868">;
}, z.core.$strict>>;
page: z.ZodObject<{
total_rows: z.ZodNumber;
items_per_page: z.ZodNumber;
offset: z.ZodNumber;
}, z.core.$strict>;
}, z.core.$strict>;
export type RetrieveInvoices = z.infer<typeof retrieveInvoicesSchema>;
export declare const downloadInvoicePdfSchema: z.ZodObject<{
data: z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
url: z.ZodNullable<z.ZodString>;
expires_at: z.ZodOptional<z.ZodISODateTime>;
}, z.core.$strict>;
}, z.core.$strict>;
export type DownloadInvoicePdf = z.infer<typeof downloadInvoicePdfSchema>;
export declare const workerSchema: z.ZodObject<{
id: z.ZodString;
contract_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
name: z.ZodOptional<z.ZodString>;
picUrl: z.ZodNullable<z.ZodString>;
public_id: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
export type DeelWorker = z.infer<typeof workerSchema>;
export declare const paymentReceiptsSchema: z.ZodObject<{
id: z.ZodString;
created_at: z.ZodISODateTime;
label: z.ZodString;
paid_at: z.ZodNullable<z.ZodISODateTime>;
payment_currency: z.ZodString;
payment_method: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
total: z.ZodString;
status: z.ZodEnum<{
paid: "paid";
}>;
workers: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
contract_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
name: z.ZodOptional<z.ZodString>;
picUrl: z.ZodNullable<z.ZodString>;
public_id: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>>;
invoices: z.ZodArray<z.ZodObject<{
id: z.ZodString;
}, z.core.$strict>>;
timezone: z.ZodNullable<z.ZodString>;
deel_reference: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;
export type PaymentReceipts = z.infer<typeof paymentReceiptsSchema>;
export declare const retrievePaymentReceiptsSchema: z.ZodObject<{
data: z.ZodObject<{
rows: z.ZodArray<z.ZodObject<{
id: z.ZodString;
created_at: z.ZodISODateTime;
label: z.ZodString;
paid_at: z.ZodNullable<z.ZodISODateTime>;
payment_currency: z.ZodString;
payment_method: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
total: z.ZodString;
status: z.ZodEnum<{
paid: "paid";
}>;
workers: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
contract_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
name: z.ZodOptional<z.ZodString>;
picUrl: z.ZodNullable<z.ZodString>;
public_id: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>>;
invoices: z.ZodArray<z.ZodObject<{
id: z.ZodString;
}, z.core.$strict>>;
timezone: z.ZodNullable<z.ZodString>;
deel_reference: z.ZodNullable<z.ZodString>;
}, z.core.$strict>>;
total: z.ZodNumber;
next_cursor: z.ZodNullable<z.ZodString>;
has_more: z.ZodNullable<z.ZodBoolean>;
total_count: z.ZodNullable<z.ZodNumber>;
}, z.core.$strict>;
}, z.core.$strict>;
export type RetrievePaymentReceipts = z.infer<typeof retrievePaymentReceiptsSchema>;
declare const paymentBreakdownRecordSchema: z.ZodObject<{
adjustment: z.ZodLiteral<"0.00">;
approve_date: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
approvers: z.ZodString;
bonus: z.ZodLiteral<"0.00">;
commissions: z.ZodLiteral<"0.00">;
contract_country: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
contract_start_date: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodLiteral<"">]>;
contract_type: z.ZodString;
contractor_email: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodEmail]>;
contractor_employee_name: z.ZodString;
contractor_unique_identifier: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodUUID]>;
currency: z.ZodString;
date: z.ZodISODateTime;
deductions: z.ZodLiteral<"0.00">;
expenses: z.ZodString;
frequency: z.ZodEnum<{
"": "";
custom: "custom";
hourly: "hourly";
daily: "daily";
monthly: "monthly";
}>;
general_ledger_account: z.ZodLiteral<"">;
group_id: z.ZodString;
invoice_id: z.ZodString;
others: z.ZodString;
overtime: z.ZodLiteral<"0.00">;
payment_currency: z.ZodString;
payment_date: z.ZodISODateTime;
pro_rata: z.ZodString;
processing_fee: z.ZodString;
work: z.ZodString;
total: z.ZodString;
total_payment_currency: z.ZodString;
}, z.core.$strict>;
export type PaymentBreakdownRecord = z.infer<typeof paymentBreakdownRecordSchema>;
export declare const retrievePaymentBreakdownSchema: z.ZodObject<{
data: z.ZodArray<z.ZodObject<{
adjustment: z.ZodLiteral<"0.00">;
approve_date: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodISODateTime]>;
approvers: z.ZodString;
bonus: z.ZodLiteral<"0.00">;
commissions: z.ZodLiteral<"0.00">;
contract_country: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
contract_start_date: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodLiteral<"">]>;
contract_type: z.ZodString;
contractor_email: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodEmail]>;
contractor_employee_name: z.ZodString;
contractor_unique_identifier: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodUUID]>;
currency: z.ZodString;
date: z.ZodISODateTime;
deductions: z.ZodLiteral<"0.00">;
expenses: z.ZodString;
frequency: z.ZodEnum<{
"": "";
custom: "custom";
hourly: "hourly";
daily: "daily";
monthly: "monthly";
}>;
general_ledger_account: z.ZodLiteral<"">;
group_id: z.ZodString;
invoice_id: z.ZodString;
others: z.ZodString;
overtime: z.ZodLiteral<"0.00">;
payment_currency: z.ZodString;
payment_date: z.ZodISODateTime;
pro_rata: z.ZodString;
processing_fee: z.ZodString;
work: z.ZodString;
total: z.ZodString;
total_payment_currency: z.ZodString;
}, z.core.$strict>>;
}, z.core.$strict>;
export type RetrievePaymentBreakdown = z.infer<typeof retrievePaymentBreakdownSchema>;
export declare const ContractSchema: z.ZodObject<{
data: z.ZodObject<{
client: z.ZodObject<{
email: z.ZodEmail;
full_name: z.ZodString;
id: z.ZodUUID;
legal_entity: z.ZodObject<{
email: z.ZodLiteral<"">;
id: z.ZodUUID;
name: z.ZodString;
registration_number: z.ZodString;
subtype: z.ZodLiteral<"private-liability-company">;
type: z.ZodLiteral<"company">;
vat_number: z.ZodString;
}, z.core.$strict>;
team: z.ZodObject<{
id: z.ZodUUID;
name: z.ZodString;
}, z.core.$strict>;
}, z.core.$strict>;
compensation_details: z.ZodObject<{
amount: z.ZodNullable<z.ZodString>;
currency_code: z.ZodString;
cycle_end: z.ZodNullable<z.ZodNumber>;
cycle_end_type: z.ZodNullable<z.ZodEnum<{
DAY_OF_MONTH: "DAY_OF_MONTH";
DAY_OF_WEEK: "DAY_OF_WEEK";
DAY_OF_LAST_WEEK: "DAY_OF_LAST_WEEK";
}>>;
first_payment: z.ZodPreprocess<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
first_payment_date: z.ZodUnion<[z.ZodISODateTime, z.ZodLiteral<"">]>;
frequency: z.ZodEnum<{
"": "";
monthly: "monthly";
weekly: "weekly";
biweekly: "biweekly";
semimonthly: "semimonthly";
"calendar-month": "calendar-month";
}>;
gross_annual_salary: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"">]>;
gross_signing_bonus: z.ZodLiteral<"">;
gross_variable_bonus: z.ZodLiteral<"">;
scale: z.ZodEnum<{
"": "";
custom: "custom";
hourly: "hourly";
daily: "daily";
monthly: "monthly";
}>;
variable_compensations: z.ZodArray<z.ZodNever>;
}, z.core.$strict>;
contract_template: z.ZodNull;
created_at: z.ZodISODateTime;
custom_fields: z.ZodArray<z.ZodNever>;
employment_details: z.ZodObject<{
days_per_week: z.ZodLiteral<0>;
hours_per_day: z.ZodLiteral<0>;
paid_vacation_days: z.ZodLiteral<0>;
probation_period: z.ZodNumber;
probation_period_metadata: z.ZodNullable<z.ZodObject<{
display_value: z.ZodLiteral<90>;
time_unit: z.ZodLiteral<"DAY">;
}, z.core.$strict>>;
type: z.ZodEnum<{
ongoing_time_based: "ongoing_time_based";
eor: "eor";
pay_as_you_go_time_based: "pay_as_you_go_time_based";
}>;
}, z.core.$strict>;
employment_type: z.ZodNullable<z.ZodEnum<{
FULL_TIME: "FULL_TIME";
}>>;
external_id: z.ZodNull;
id: z.ZodString;
invitations: z.ZodObject<{
client_email: z.ZodEmail;
worker_email: z.ZodUnion<[z.ZodEmail, z.ZodLiteral<"">]>;
}, z.core.$strict>;
is_archived: z.ZodBoolean;
job_title: z.ZodOptional<z.ZodString>;
notice_period: z.ZodNumber;
scope_of_work: z.ZodOptional<z.ZodString>;
seniority: z.ZodNull;
signatures: z.ZodObject<{
client_signature: z.ZodString;
client_signed_at: z.ZodISODateTime;
signed_at: z.ZodISODateTime;
worker_signature: z.ZodString;
worker_signed_at: z.ZodISODateTime;
}, z.core.$strict>;
special_clause: z.ZodLiteral<"">;
start_date: z.ZodISODateTime;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
cancelled: "cancelled";
user_cancelled: "user_cancelled";
}>;
termination_date: z.ZodUnion<[z.ZodISODateTime, z.ZodLiteral<"">]>;
title: z.ZodString;
type: z.ZodEnum<{
ongoing_time_based: "ongoing_time_based";
eor: "eor";
pay_as_you_go_time_based: "pay_as_you_go_time_based";
}>;
updated_at: z.ZodISODateTime;
who_reports: z.ZodOptional<z.ZodEnum<{
both: "both";
}>>;
work_schedule: z.ZodNullable<z.ZodObject<{
country: z.ZodString;
days: z.ZodArray<z.ZodObject<{
day: z.ZodEnum<{
MONDAY: "MONDAY";
TUESDAY: "TUESDAY";
WEDNESDAY: "WEDNESDAY";
THURSDAY: "THURSDAY";
FRIDAY: "FRIDAY";
SATURDAY: "SATURDAY";
SUNDAY: "SUNDAY";
}>;
end: z.ZodISOTime;
start: z.ZodISOTime;
work_hours: z.ZodNumber;
}, z.core.$strict>>;
employment_type: z.ZodEnum<{
FULL_TIME: "FULL_TIME";
}>;
name: z.ZodString;
work_hours_per_week: z.ZodNumber;
work_schedule_type: z.ZodString;
worker_types: z.ZodArray<z.ZodEnum<{
HOURLY_EOR_EMPLOYEE: "HOURLY_EOR_EMPLOYEE";
SALARIED_EOR_EMPLOYEE: "SALARIED_EOR_EMPLOYEE";
}>>;
}, z.core.$strict>>;
work_statement_id: z.ZodOptional<z.ZodUUID>;
worker: z.ZodObject<{
alternate_email: z.ZodArray<z.ZodNever>;
country: z.ZodString;
date_of_birth: z.ZodISODate;
email: z.ZodEmail;
expected_email: z.ZodEmail;
first_name: z.ZodString;
full_name: z.ZodString;
id: z.ZodUUID;
last_name: z.ZodString;
nationality: z.ZodNullable<z.ZodString>;
}, z.core.$strict>;
}, z.core.$strict>;
}, z.core.$strict>;
export type Contract = z.infer<typeof ContractSchema>;
export {};