@knpkv/clockify-api-client 1.0.1 → 1.0.2

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.
@@ -14,9 +14,9 @@ export const AssignmentPerDayDto = Schema.Struct({ "date": Schema.optionalKey(Sc
14
14
  export const AssignmentUpdateRequestV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "end": Schema.String.annotate({ "description": "Represents an end date in the yyyy-MM-ddThh:mm:ssZ format." }), "hoursPerDay": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents assignment total hours per day.", "format": "double" }).check(Schema.isFinite())), "includeNonWorkingDays": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether to include non-working days or not." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an assignment note." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(100))), "seriesUpdateOption": Schema.optionalKey(Schema.Literals(["THIS_ONE", "THIS_AND_FOLLOWING", "ALL"]).annotate({ "description": "Valid series option" })), "start": Schema.String.annotate({ "description": "Represents start date in yyyy-MM-ddThh:mm:ssZ format." }), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a start time in the hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents task identifier across the system." })) });
15
15
  export const AuthorizationSourceDtoV1 = Schema.Struct({ "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents authorization source identifier across the system." })), "type": Schema.optionalKey(Schema.Literal("USER_GROUP").annotate({ "description": "Represents a valid authorization source type." })) }).annotate({ "description": "Represents an authorization data transfer object." });
16
16
  export const AutomaticAccrualDto = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents automatic accrual's amount", "format": "double" }).check(Schema.isFinite())), "period": Schema.optionalKey(Schema.Literals(["MONTH", "YEAR"]).annotate({ "description": "Represents automatic accrual's period" })), "timeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represents automatic accrual's time unit" })) }).annotate({ "description": "Represents automatic approval settings." });
17
- export const AutomaticAccrualRequest = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents amount of automatic accrual.", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(0)), "period": Schema.optionalKey(Schema.Literals(["MONTH", "YEAR"]).annotate({ "description": "Represents automatic accrual period." })), "timeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represents automatic accrual time unit." })) }).annotate({ "description": "Provide automatic accrual settings." });
17
+ export const AutomaticAccrualRequest = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents amount of automatic accrual.", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(0)), "period": Schema.optionalKey(Schema.Literals(["MONTH", "YEAR"]).annotate({ "description": "Represents automatic accrual period." })) }).annotate({ "description": "Provide automatic accrual settings." });
18
18
  export const AutomaticLockDtoV1 = Schema.Struct({ "changeDay": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a day of the week." })), "dayOfMonth": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents a day of month as integer.", "format": "int32" }).check(Schema.isInt())), "firstDay": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a day of the week." })), "olderThanPeriod": Schema.optionalKey(Schema.Literals(["DAYS", "WEEKS", "MONTHS"]).annotate({ "description": "Represents a time entry automatic lock period enum." })), "olderThanValue": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an integer as the criteria for locking time entries.", "format": "int32" }).check(Schema.isInt())), "type": Schema.optionalKey(Schema.Literals(["WEEKLY", "MONTHLY", "OLDER_THAN"]).annotate({ "description": "Represents a time entry automatic lock type enum." })) }).annotate({ "description": "Represents an automatic lock object." });
19
- export const BalanceDtoV1 = Schema.Struct({ "balance": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the balance amount of the time unit", "format": "double" }).check(Schema.isFinite())), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represent balance identifier across the system." })), "negativeBalanceAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represent negative balance amount.", "format": "double" }).check(Schema.isFinite())), "negativeBalanceLimit": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the negative balance limit is allowed." })), "policyArchived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is archived." })), "policyId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent policy identifier across the system." })), "policyName": Schema.optionalKey(Schema.String.annotate({ "description": "Represent policy name." })), "policyTimeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represent policy time unit." })), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the total amount", "format": "double" }).check(Schema.isFinite())), "used": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the balance used amount", "format": "double" }).check(Schema.isFinite())), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent user identifier across the system." })), "userName": Schema.optionalKey(Schema.String.annotate({ "description": "Represent user's username." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent workspace identifier across the system." })) }).annotate({ "description": "Represent the list of balances." });
19
+ export const BalanceDtoV1 = Schema.Struct({ "balance": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the balance amount of the time unit", "format": "double" }).check(Schema.isFinite())), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represent balance identifier across the system." })), "negativeBalanceAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represent negative balance amount.", "format": "double" }).check(Schema.isFinite())), "negativeBalanceLimit": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the negative balance limit is allowed." })), "negativeBalanceUsed": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the amount of balance used outside of existing balance and validity period", "format": "double" }).check(Schema.isFinite())), "policyArchived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is archived." })), "policyId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent policy identifier across the system." })), "policyName": Schema.optionalKey(Schema.String.annotate({ "description": "Represent policy name." })), "policyTimeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represent policy time unit." })), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the total amount", "format": "double" }).check(Schema.isFinite())), "used": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents the balance used amount", "format": "double" }).check(Schema.isFinite())), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent user identifier across the system." })), "userName": Schema.optionalKey(Schema.String.annotate({ "description": "Represent user's username." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represent workspace identifier across the system." })) }).annotate({ "description": "Represent the list of balances." });
20
20
  export const BaseFilterRequest = Schema.Struct({ "contains": Schema.optionalKey(Schema.Literals(["CONTAINS", "DOES_NOT_CONTAIN", "CONTAINS_ONLY"]).annotate({ "description": "Filter type." })), "ids": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of filter identifiers." })).annotate({ "description": "Represents a list of filter identifiers." }).check(Schema.isUnique())) }).annotate({ "description": "Represents a company filter object. If provided, you'll get a filtered list of invoices that matches the specified company filter." });
21
21
  export const CalculationType = Schema.Never;
22
22
  export const ChangeInvoiceStatusRequestV1 = Schema.Struct({ "invoiceStatus": Schema.optionalKey(Schema.Literals(["UNSENT", "SENT", "PAID", "PARTIALLY_PAID", "VOID", "OVERDUE"]).annotate({ "description": "Represents the invoice status to be set." })) });
@@ -31,7 +31,8 @@ export const ContainsUsersFilterRequestV1 = Schema.Struct({ "contains": Schema.o
31
31
  export const CopyAssignmentRequestV1 = Schema.Struct({ "seriesUpdateOption": Schema.optionalKey(Schema.Literals(["THIS_ONE", "THIS_AND_FOLLOWING", "ALL"]).annotate({ "description": "Represents a series update option." })), "userId": Schema.String.annotate({ "description": "Represents a user identifier across the system." }) });
32
32
  export const CostRateRequest = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0))), "since": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a datetime in yyyy-MM-ddThh:mm:ssZ format." })), "sinceAsInstant": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })) }).annotate({ "description": "Represents a cost rate request object." });
33
33
  export const CostRateRequestV1 = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "since": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date and time in yyyy-MM-ddThh:mm:ssZ format." })) });
34
- export const CreateApprovalRequest = Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["WEEKLY", "SEMI_MONTHLY", "MONTHLY"]).annotate({ "description": "Specifies the approval period. It has to match the workspace approval period setting." })), "periodStart": Schema.String.annotate({ "description": "Specifies an approval period start date in yyyy-MM-ddThh:mm:ssZ format." }).check(Schema.isMinLength(1)) });
34
+ export const CreateApprovalRequest = Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["WEEKLY", "SEMI_MONTHLY", "MONTHLY"]).annotate({ "description": "Specifies the approval period. It has to match the workspace approval period setting." })), "periodStart": Schema.String.annotate({ "description": "Specifies an approval period start date in yyyy-MM-ddThh:mm:ssZ format." }).check(Schema.isMinLength(1)), "type": Schema.optionalKey(Schema.String.check(Schema.isPattern(new RegExp("TIMESHEET|EXPENSE")))) });
35
+ export const CreateApprovalRequestNoType = Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["WEEKLY", "SEMI_MONTHLY", "MONTHLY"]).annotate({ "description": "Specifies the approval period. It has to match the workspace approval period setting." })), "periodStart": Schema.String.annotate({ "description": "Specifies an approval period start date in yyyy-MM-ddThh:mm:ssZ format." }).check(Schema.isMinLength(1)) });
35
36
  export const CreateClientRequestV1 = Schema.Struct({ "address": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client's address." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))), "email": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client email.", "format": "email" })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client name." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(100))), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents additional notes for the client." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))) });
36
37
  export const CreateCustomAttributeRequest = Schema.Struct({ "name": Schema.String.annotate({ "description": "Represents custom attribute name." }).check(Schema.isMinLength(1)), "namespace": Schema.String.annotate({ "description": "Represents custom attribute namespace." }).check(Schema.isMinLength(1)), "value": Schema.String.annotate({ "description": "Represents custom attribute value." }).check(Schema.isMinLength(1)) }).annotate({ "description": "Represents a list of create custom field request objects." });
37
38
  export const CreateExpenseV1Request = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents an expense amount as the double data type.", "format": "double" }).check(Schema.isFinite()).check(Schema.isLessThanOrEqualTo(92233720368547760)), "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether expense is billable or not." })), "categoryId": Schema.String.annotate({ "description": "Represents a category identifier across the system." }), "date": Schema.String.annotate({ "description": "Provides a valid yyyy-MM-ddThh:mm:ssZ format date.", "format": "date-time" }), "file": Schema.String.annotate({ "format": "binary" }), "notes": Schema.optionalKey(Schema.String.annotate({ "description": "Represents notes for an expense." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))), "projectId": Schema.String.annotate({ "description": "Represents a project identifier across the system." }), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "userId": Schema.String.annotate({ "description": "Represents a user identifier across the system." }).check(Schema.isMinLength(1)) });
@@ -40,7 +41,6 @@ export const CreateInvoiceItemRequestV1 = Schema.Struct({ "applyTaxes": Schema.L
40
41
  export const CreateInvoicePaymentRequest = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice payment amount as long.", "format": "int64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an invoice payment note." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(1000))), "paymentDate": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an invoice payment date in yyyy-MM-ddThh:mm:ssZ format." })) });
41
42
  export const CreateInvoiceRequest = Schema.Struct({ "clientId": Schema.String.annotate({ "description": "Represents a client identifier across the system." }).check(Schema.isMinLength(1)), "currency": Schema.String.annotate({ "description": "Represents the currency used by the invoice." }).check(Schema.isMinLength(1)), "dueDate": Schema.String.annotate({ "description": "Represents an invoice due date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "issuedDate": Schema.String.annotate({ "description": "Represents an invoice issued date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "number": Schema.String.annotate({ "description": "Represents an invoice number." }).check(Schema.isMinLength(1)), "timeViewMode": Schema.optionalKey(Schema.Literals(["TIME_SENSITIVE_VIEW", "AGGREGATED_TIME_VIEW"])) });
42
43
  export const CreateProjectFromTemplateV1 = Schema.Struct({ "clientId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client identifier across the system." })), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Color format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "isPublic": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the project is public or not." })), "name": Schema.String.annotate({ "description": "Represents a project name." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(250)), "templateProjectId": Schema.String.annotate({ "description": "Represents a project identifier across the system." }).check(Schema.isMinLength(1)) });
43
- export const CreateRecurringAssignmentRequestV1 = Schema.Struct({ "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is recurring or not." })), "weeks": Schema.Number.annotate({ "description": "Indicates number of weeks for assignment.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(99)) }).annotate({ "description": "Represents a recurring assignment object. This parameter is optional." });
44
44
  export const CreateWebhookRequestV1 = Schema.Struct({ "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a webhook name." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(30))), "triggerSource": Schema.Array(Schema.String.annotate({ "description": "Represents a list of trigger sources." })).annotate({ "description": "Represents a list of trigger sources." }), "triggerSourceType": Schema.Literals(["PROJECT_ID", "USER_ID", "TAG_ID", "TASK_ID", "WORKSPACE_ID", "ASSIGNMENT_ID", "EXPENSE_ID"]).annotate({ "description": "Represents a webhook event trigger source type." }), "url": Schema.String.annotate({ "description": "Represents a webhook target url." }).check(Schema.isMinLength(1)), "webhookEvent": Schema.Literals(["NEW_PROJECT", "NEW_TASK", "NEW_CLIENT", "NEW_TIMER_STARTED", "TIMER_STOPPED", "TIME_ENTRY_UPDATED", "TIME_ENTRY_DELETED", "TIME_ENTRY_SPLIT", "NEW_TIME_ENTRY", "TIME_ENTRY_RESTORED", "NEW_TAG", "USER_DELETED_FROM_WORKSPACE", "USER_JOINED_WORKSPACE", "USER_DEACTIVATED_ON_WORKSPACE", "USER_ACTIVATED_ON_WORKSPACE", "USER_EMAIL_CHANGED", "USER_UPDATED", "NEW_INVOICE", "INVOICE_UPDATED", "NEW_APPROVAL_REQUEST", "APPROVAL_REQUEST_STATUS_UPDATED", "TIME_OFF_REQUESTED", "TIME_OFF_REQUEST_UPDATED", "TIME_OFF_REQUEST_APPROVED", "TIME_OFF_REQUEST_REJECTED", "TIME_OFF_REQUEST_STARTED", "TIME_OFF_REQUEST_WITHDRAWN", "BALANCE_UPDATED", "TAG_UPDATED", "TAG_DELETED", "TASK_UPDATED", "CLIENT_UPDATED", "TASK_DELETED", "CLIENT_DELETED", "EXPENSE_RESTORED", "ASSIGNMENT_CREATED", "ASSIGNMENT_DELETED", "ASSIGNMENT_PUBLISHED", "ASSIGNMENT_UPDATED", "EXPENSE_CREATED", "EXPENSE_DELETED", "EXPENSE_UPDATED", "PROJECT_UPDATED", "PROJECT_DELETED", "USER_GROUP_CREATED", "USER_GROUP_UPDATED", "USER_GROUP_DELETED", "USERS_INVITED_TO_WORKSPACE", "LIMITED_USERS_ADDED_TO_WORKSPACE", "COST_RATE_UPDATED", "BILLABLE_RATE_UPDATED"]).annotate({ "description": "Represents a webhook event type." }) });
45
45
  export const CreateWorkspaceRequestV1 = Schema.Struct({ "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a workspace name." }).check(Schema.isMinLength(1)).check(Schema.isMaxLength(50))), "organizationId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the Cake organization identifier across the system." })) });
46
46
  export const CurrencyWithDefaultInfoDtoV1 = Schema.Struct({ "code": Schema.optionalKey(Schema.String.annotate({ "description": "Represents currency code." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents currency identifier across the system." })), "isDefault": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether curency should be set as default." })) }).annotate({ "description": "Represents currency with default info object." });
@@ -52,9 +52,12 @@ export const CustomFieldValueDto = Schema.Struct({ "customFieldId": Schema.optio
52
52
  export const CustomFieldValueDtoV1 = Schema.Struct({ "customFieldId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field name." })), "timeEntryId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents time entry identifier across the system." })), "type": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a custom field value source type." })), "value": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents custom field value." })) }).annotate({ "description": "Represents a list of custom field value objects." });
53
53
  export const DatePeriod = Schema.Struct({ "endDate": Schema.optionalKey(Schema.String.annotate({ "format": "date" })), "startDate": Schema.optionalKey(Schema.String.annotate({ "format": "date" })) }).annotate({ "description": "Represents startDate and endDate of the holiday. Date is in format yyyy-mm-dd" });
54
54
  export const DatePeriodRequest = Schema.Struct({ "endDate": Schema.String.annotate({ "description": "yyyy-MM-dd format date" }).check(Schema.isMinLength(1)), "startDate": Schema.String.annotate({ "description": "yyyy-MM-dd format date" }).check(Schema.isMinLength(1)) }).annotate({ "description": "Provide startDate and endDate for the holiday." });
55
+ export const DateRange = Schema.Struct({ "end": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })), "start": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })) });
55
56
  export const DateRangeDto = Schema.Struct({ "end": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })), "start": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })) }).annotate({ "description": "Represents date range object." });
57
+ export const DateRangeV1Request = Schema.Struct({ "end": Schema.optionalKey(Schema.String.annotate({ "description": "Provide end date in YYYY-MM-DD format." })), "start": Schema.optionalKey(Schema.String.annotate({ "description": "Provide start date in YYYY-MM-DD format." })) }).annotate({ "description": "Represents the date range when the new balance will be usable. If null, this will default to the current day until the same day next year." });
56
58
  export const DefaultEntitiesDto = Schema.Struct({ "projectId": Schema.optionalKey(Schema.String), "taskId": Schema.optionalKey(Schema.String) });
57
59
  export const DefaultEntitiesRequest = Schema.Struct({ "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Default project for automatically created time entries" })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Default task for automatically created time entries" })) }).annotate({ "description": "Provides information about default project and task for automatically created time entries." });
60
+ export const DeleteBalanceAssignmentV1Request = Schema.Struct({ "note": Schema.String.annotate({ "description": "Represents a note explaining balance deletion" }).check(Schema.isMinLength(1)) });
58
61
  export const EntityCreationPermission = Schema.Never;
59
62
  export const EntityIdNameDto = Schema.Struct({ "id": Schema.optionalKey(Schema.String), "name": Schema.optionalKey(Schema.String) }).annotate({ "description": "Contains names of user groups that are assigned to holiday." });
60
63
  export const EstimateDtoV1 = Schema.Struct({ "estimate": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task duration estimate." })), "type": Schema.optionalKey(Schema.Literals(["AUTO", "MANUAL"]).annotate({ "description": "Represents an estimate type enum." })) }).annotate({ "description": "Represents a project estimate object." });
@@ -72,6 +75,7 @@ export const ExpenseDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Schem
72
75
  export const ExpenseWeeklyTotalsDtoV1 = Schema.Struct({ "date": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-dd format." })), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents expense total.", "format": "double" }).check(Schema.isFinite())) }).annotate({ "description": "Represents a list of expense weekly total data transfer objects." });
73
76
  export const Feature = Schema.Never;
74
77
  export const FeaturePlan = Schema.Never;
78
+ export const GetTimeEntriesByIdsRequest = Schema.Struct({ "hydrated": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether to include additional information of time entries or not." })), "timeEntryIds": Schema.Array(Schema.String.annotate({ "description": "Represents time entry identifiers across the system." })).annotate({ "description": "Represents time entry identifiers across the system." }).check(Schema.isMinLength(1)) });
75
79
  export const GetTimeOffRequestsV1Request = Schema.Struct({ "end": Schema.optionalKey(Schema.String.annotate({ "description": "Provide the end of the filtering period. Used with `start` to filter for time-off requests periods that occur (fully or partially) within this range. Both parameters must be provided for filtering to take effect. Provide end in format YYYY-MM-DDTHH:MM:SS.ssssssZ", "format": "date-time" })), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt()).check(Schema.isLessThanOrEqualTo(1000))), "pageSize": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(200))), "start": Schema.optionalKey(Schema.String.annotate({ "description": "Provide the beginning of the filtering period. Used with `end` to filter for time-off requests periods that occur (fully or partially) within this range. Both parameters must be provided for filtering to take effect. Provide start in format YYYY-MM-DDTHH:MM:SS.ssssssZ", "format": "date-time" })), "statuses": Schema.optionalKey(Schema.Array(Schema.Literals(["PENDING", "APPROVED", "REJECTED", "ALL"]).annotate({ "description": "Filters time off requests by status." })).annotate({ "description": "Filters time off requests by status." }).check(Schema.isUnique())), "userGroups": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Provide the user group ids of time off requests." })).annotate({ "description": "Provide the user group ids of time off requests." }).check(Schema.isUnique())), "users": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Provide the user ids of time off requests. If empty, will return time off requests of all users (with a maximum of 5000 users)." })).annotate({ "description": "Provide the user ids of time off requests. If empty, will return time off requests of all users (with a maximum of 5000 users)." }).check(Schema.isUnique())) });
76
80
  export const GetUsersRequestV1 = Schema.Struct({ "accountStatuses": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "If provided, you'll get a filtered list of users with the corresponding account status filter. If not, this will only filter ACTIVE, PENDING_EMAIL_VERIFICATION, and NOT_REGISTERED Users." })).annotate({ "description": "If provided, you'll get a filtered list of users with the corresponding account status filter. If not, this will only filter ACTIVE, PENDING_EMAIL_VERIFICATION, and NOT_REGISTERED Users." }).check(Schema.isUnique())), "email": Schema.optionalKey(Schema.String.annotate({ "description": "If provided, you'll get a filtered list of users that contain the provided string in their email address." })), "includeRoles": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If you pass along includeRoles=true, you'll get each user's detailed manager role (including projects and members for whom they're managers)" })), "memberships": Schema.optionalKey(Schema.Literals(["ALL", "NONE", "WORKSPACE", "PROJECT", "USERGROUP"]).annotate({ "description": "If provided, you'll get all users along with workspaces, groups, or projects they have access to." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "If provided, you'll get a filtered list of users that contain the provided string in their name." })), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "pageSize": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "If provided, you'll get a list of users that have access to the project." })), "roles": Schema.optionalKey(Schema.Array(Schema.Literals(["WORKSPACE_ADMIN", "OWNER", "TEAM_MANAGER", "PROJECT_MANAGER"]).annotate({ "description": "If provided, you'll get a filtered list of users that have any of the specified roles. Owners are counted as admins when filtering." })).annotate({ "description": "If provided, you'll get a filtered list of users that have any of the specified roles. Owners are counted as admins when filtering." }).check(Schema.isUnique())), "sortColumn": Schema.optionalKey(Schema.Literals(["ID", "EMAIL", "NAME", "NAME_LOWERCASE", "ACCESS", "HOURLYRATE", "COSTRATE"]).annotate({ "description": "Sorting criteria" })), "sortOrder": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"]).annotate({ "description": "Sorting mode" })), "status": Schema.optionalKey(Schema.Literals(["PENDING", "ACTIVE", "DECLINED", "INACTIVE", "ALL"]).annotate({ "description": "If provided, you'll get a filtered list of users with the corresponding status." })), "userGroups": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "If provided, you'll get a list of users that belong to the specified user group IDs." })).annotate({ "description": "If provided, you'll get a list of users that belong to the specified user group IDs." }).check(Schema.isUnique())) });
77
81
  export const HourlyRateDtoV1 = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt())), "currency": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a currency." })) }).annotate({ "description": "Represents an hourly rate object." });
@@ -87,6 +91,7 @@ export const LabelsCustomization = Schema.Struct({ "amount": Schema.optionalKey(
87
91
  export const LabelsCustomizationRequest = Schema.Struct({ "amount": Schema.String.annotate({ "description": "Represents invoice amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "billFrom": Schema.String.annotate({ "description": "Represents invoice bill from label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "billTo": Schema.String.annotate({ "description": "Represents invoice bill to label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "description": Schema.String.annotate({ "description": "Represents invoice description label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "discount": Schema.String.annotate({ "description": "Represents invoice discount amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "dueDate": Schema.String.annotate({ "description": "Represents invoice due date label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "issueDate": Schema.String.annotate({ "description": "Represents invoice issue date label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "itemType": Schema.String.annotate({ "description": "Represents invoice item type label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "notes": Schema.String.annotate({ "description": "Represents invoice notes label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "paid": Schema.String.annotate({ "description": "Represents invoice paid amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "quantity": Schema.String.annotate({ "description": "Represents invoice quantity label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "subtotal": Schema.String.annotate({ "description": "Represents invoice subtotal label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "tax": Schema.String.annotate({ "description": "Represents invoice tax amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "tax2": Schema.String.annotate({ "description": "Represents invoice tax 2 amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "total": Schema.String.annotate({ "description": "Represents invoice total amount label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "totalAmountDue": Schema.String.annotate({ "description": "Represents invoice total amount due label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)), "unitPrice": Schema.String.annotate({ "description": "Represents invoice unit price label." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(20)) }).annotate({ "description": "Represents a label customization object." });
88
92
  export const LogBinDocumentDto = Schema.Struct({ "deletedAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })), "document": Schema.optionalKey(Schema.Struct({})), "documentCode": Schema.optionalKey(Schema.String), "id": Schema.optionalKey(Schema.String) });
89
93
  export const MilestoneDto = Schema.Struct({ "date": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents milestone identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents milestone name." })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) }).annotate({ "description": "Represents a list of milestone objects." });
94
+ export const MonthlyRecurringType = Schema.Never;
90
95
  export const NegativeBalanceDto = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "format": "double" }).check(Schema.isFinite())), "period": Schema.optionalKey(Schema.String), "shouldReset": Schema.optionalKey(Schema.Boolean), "timeUnit": Schema.optionalKey(Schema.String) }).annotate({ "description": "Represents the data about negative balance including amount, time unit and period." });
91
96
  export const NegativeBalanceRequest = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents negative balance amount.", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(0)), "period": Schema.optionalKey(Schema.Literals(["MONTH", "YEAR"]).annotate({ "description": "Represents negative balance period." })), "shouldReset": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether negative balance should be reset at the end of the negative balance period." })) }).annotate({ "description": "Provide the negative balance data you would like to use for updating the policy." });
92
97
  export const PatchProjectTemplateRequest = Schema.Struct({ "isTemplate": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is a template or not." })) });
@@ -100,8 +105,8 @@ export const ProjectTotalsRequestV1 = Schema.Struct({ "end": Schema.String.annot
100
105
  export const RateDto = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt())), "currency": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a currency." })) }).annotate({ "description": "Represents cost rate object." });
101
106
  export const RateDtoV1 = Schema.Struct({ "amount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt())), "currency": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a currency." })) }).annotate({ "description": "Represents cost rate object." });
102
107
  export const RateWithCurrencyRequestV1 = Schema.Struct({ "amount": Schema.Number.annotate({ "description": "Represents an amount as integer.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "currency": Schema.String.annotate({ "description": "Represents a currency." }).check(Schema.isMinLength(1)).check(Schema.isMaxLength(100)), "since": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date and time in yyyy-MM-ddThh:mm:ssZ format." })) });
103
- export const RecurringAssignmentDto = Schema.Struct({ "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is recurring or not." })), "seriesId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents series identifier." })), "weeks": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents number of weeks for thhis assignment.", "format": "int32" }).check(Schema.isInt())) }).annotate({ "description": "Represents recurring assignment object." });
104
- export const RecurringAssignmentRequestV1 = Schema.Struct({ "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is recurring or not." })), "weeks": Schema.Number.annotate({ "description": "Indicates number of weeks for assignment.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(99)) });
108
+ export const RecurringEndType = Schema.Never;
109
+ export const RecurringFrequency = Schema.Never;
105
110
  export const RoleRequestV1 = Schema.Struct({ "entityId": Schema.String.annotate({ "description": "Represents an entity identifier across the system." }).check(Schema.isMinLength(1)), "role": Schema.Literals(["WORKSPACE_ADMIN", "TEAM_MANAGER", "PROJECT_MANAGER"]).annotate({ "description": "Represents a valid role." }), "sourceType": Schema.optionalKey(Schema.Literal("USER_GROUP").annotate({ "description": "Optional field used to indicate that the target of the operation is a\nuser group, in which case the value USER_GROUP should be used, alongside a valid user group\nID for the entityId field. If omitted, a user ID should be used for the entityId field.\n" })) });
106
111
  export const RoundDto = Schema.Struct({ "minutes": Schema.optionalKey(Schema.String), "round": Schema.optionalKey(Schema.String) }).annotate({ "description": "Represents a time rounding object." });
107
112
  export const SchedulingExcludeDay = Schema.Struct({ "date": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a datetimr in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "type": Schema.optionalKey(Schema.Literals(["WEEKEND", "HOLIDAY", "TIME_OFF"]).annotate({ "description": "Represents the scheduling exclude day enum." })) }).annotate({ "description": "Represents a list of excluded days objects" });
@@ -126,7 +131,6 @@ export const TimeOffRequestStatus = Schema.Struct({ "changedAt": Schema.optional
126
131
  export const TimeRangeRequestDtoV1 = Schema.Struct({ "issue-date-end": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-dd format. This is the lower bound of the time range." })), "issue-date-start": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-dd format. This is the lower bound of the time range." })) }).annotate({ "description": "Represents a time range object. If provided, you'll get a filtered list of invoices that has issue date within the time range specified." });
127
132
  export const TotalsPerDayDto = Schema.Struct({ "date": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" })), "totalHours": Schema.optionalKey(Schema.Number.annotate({ "format": "double" }).check(Schema.isFinite())) }).annotate({ "description": "Represents total hours per day object." });
128
133
  export const UpdateApprovalRequest = Schema.Struct({ "note": Schema.optionalKey(Schema.String.annotate({ "description": "Additional notes for the approval request." })), "state": Schema.Literals(["PENDING", "APPROVED", "WITHDRAWN_SUBMISSION", "WITHDRAWN_APPROVAL", "REJECTED"]).annotate({ "description": "Specifies the approval state to set." }) });
129
- export const UpdateBalanceRequestV1 = Schema.Struct({ "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a new balance note value." })), "userIds": Schema.Array(Schema.String.annotate({ "description": "Represents the list of users' identifiers whose balance is to be updated." })).annotate({ "description": "Represents the list of users' identifiers whose balance is to be updated." }).check(Schema.isMinLength(1)).check(Schema.isUnique()), "value": Schema.Number.annotate({ "description": "Represents a new balance value.", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(-10000)).check(Schema.isLessThanOrEqualTo(10000)) });
130
134
  export const UpdateClientRequestV1 = Schema.Struct({ "address": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client's address." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))), "archived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates if client will be archived or not." })), "ccEmails": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "email" })).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3))), "currencyId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a currency identifier across the system." })), "email": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client email.", "format": "email" })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a client name." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(100))), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents additional notes for the client." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))) });
131
135
  export const UpdateCustomFieldRequest = Schema.Struct({ "customFieldId": Schema.String.annotate({ "description": "Represents custom field identifier across the system." }), "sourceType": Schema.optionalKey(Schema.Literals(["WORKSPACE", "PROJECT", "TIMEENTRY"]).annotate({ "description": "Represents a custom field value source type." })), "value": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents a custom field's value." })) }).annotate({ "description": "Represents a list of value objects for user’s custom fields." });
132
136
  export const UpdateCustomFieldRequestV1 = Schema.Struct({ "allowedValues": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of custom field's allowed values." })).annotate({ "description": "Represents a list of custom field's allowed values." })), "description": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a custom field description." })), "name": Schema.String.annotate({ "description": "Represents a custom field name." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(250)), "onlyAdminCanEdit": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether custom field is modifiable only by admin users." })), "placeholder": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a custom field placeholder value." })), "required": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether custom field is mandatory or not." })), "status": Schema.optionalKey(Schema.Literals(["INACTIVE", "VISIBLE", "INVISIBLE"]).annotate({ "description": "Represents a custom field status" })), "type": Schema.Literals(["TXT", "NUMBER", "DROPDOWN_SINGLE", "DROPDOWN_MULTIPLE", "CHECKBOX", "LINK"]).annotate({ "description": "Represents a custom field type." }), "workspaceDefaultValue": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents a custom field's default value in the workspace." })) });
@@ -186,12 +190,14 @@ export const RoleDtoV1 = Schema.Struct({ "id": Schema.optionalKey(Schema.String.
186
190
  export const ImportTimeEntriesAndExpensesRequestV1 = Schema.Struct({ "expenseFieldsForDetailedGroup": Schema.optionalKey(Schema.Array(Schema.Literals(["PROJECT", "TASK", "CATEGORY", "NOTE", "DATE", "USER"]).annotate({ "description": "Represents a set of expense fields to include when using the DETAILED expense grouping type." })).annotate({ "description": "Represents a set of expense fields to include when using the DETAILED expense grouping type." }).check(Schema.isUnique())), "expensesGroupBy": Schema.optionalKey(Schema.Literals(["CATEGORY", "PROJECT", "USER"]).annotate({ "description": "Represents a group field when using the GROUPED expense group type." })), "expensesGroupType": Schema.optionalKey(Schema.Literals(["GROUPED", "DETAILED"]).annotate({ "description": "Represents an expense group type." })), "from": Schema.String.annotate({ "description": "Represents date and time in the yyyy-MM-ddThh:mm:ssZ format." }), "importExpenses": Schema.Boolean.annotate({ "description": "Indicates if billable expenses should be imported alongside time entries." }), "projectFilter": ContainsArchivedFilterRequest, "roundTimeEntryDuration": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates if imported time entry durations should be rounded to the nearest 15 minute interval." })), "timeEntryFieldsForDetailedGroup": Schema.optionalKey(Schema.Array(Schema.Literals(["PROJECT", "TASK", "TAGS", "DESCRIPTION", "DATE", "USER"]).annotate({ "description": "Represents a set of time entry fields to include when using DETAILED time entry grouping type." })).annotate({ "description": "Represents a set of time entry fields to include when using DETAILED time entry grouping type." }).check(Schema.isUnique())), "timeEntryGroupType": Schema.Literals(["SINGLE_ITEM", "GROUPED", "DETAILED"]).annotate({ "description": "Represents a time entry group type." }), "timeEntryPrimaryGroupBy": Schema.optionalKey(Schema.Literals(["USER", "PROJECT", "DATE"]).annotate({ "description": "Represents a primary group field when using the GROUPED time entry grouping type." })), "timeEntrySecondaryGroupBy": Schema.optionalKey(Schema.Literals(["PROJECT", "USER", "TASK", "DATE", "DESCRIPTION", "NONE"]).annotate({ "description": "Represents a secondary group field when using the GROUPED time entry grouping type. Should not have the same grouping type as the primary group field." })), "to": Schema.String.annotate({ "description": "Represents date and time in the yyyy-MM-ddThh:mm:ssZ format." }) });
187
191
  export const GetUserTotalsRequestV1 = Schema.Struct({ "end": Schema.String.annotate({ "description": "Represents an end date in the yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "pageSize": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isLessThanOrEqualTo(200))), "search": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the keyword for searching users by name or email." })), "start": Schema.String.annotate({ "description": "Represents a start date in the yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "statusFilter": Schema.optionalKey(Schema.Literals(["PUBLISHED", "UNPUBLISHED", "ALL"]).annotate({ "description": "Filters assignments by status." })), "userFilter": Schema.optionalKey(ContainsUsersFilterRequestV1), "userGroupFilter": Schema.optionalKey(ContainsUserGroupFilterRequestV1) });
188
192
  export const PublishAssignmentsRequestV1 = Schema.Struct({ "end": Schema.String.annotate({ "description": "Represents end date in yyyy-MM-ddThh:mm:ssZ format." }), "notifyUsers": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether to notify users when assignment is published." })), "search": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a search string." })), "start": Schema.String.annotate({ "description": "Represents start date in yyyy-MM-ddThh:mm:ssZ format." }), "userFilter": Schema.optionalKey(ContainsUsersFilterRequestV1), "userGroupFilter": Schema.optionalKey(ContainsUserGroupFilterRequestV1), "viewType": Schema.optionalKey(Schema.Literals(["PROJECTS", "TEAM", "ALL"]).annotate({ "description": "Represents view type." })) });
189
- export const AssignmentCreateRequestV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "end": Schema.String.annotate({ "description": "Represents an end date in the yyyy-MM-ddThh:mm:ssZ format." }), "hoursPerDay": Schema.Number.annotate({ "description": "Represents assignment total hours per day.", "format": "double" }).check(Schema.isFinite()), "includeNonWorkingDays": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether to include non-working days or not." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an assignment note." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(100))), "projectId": Schema.String.annotate({ "description": "Represents a project identifier across the system." }).check(Schema.isMinLength(1)), "recurringAssignment": Schema.optionalKey(CreateRecurringAssignmentRequestV1), "start": Schema.String.annotate({ "description": "Represents a start date in the yyyy-MM-ddThh:mm:ssZ format." }), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a start time in the hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "userId": Schema.String.annotate({ "description": "Represents a user identifier across the system." }).check(Schema.isMinLength(1)) });
190
193
  export const CustomFieldDtoV1 = Schema.Struct({ "allowedValues": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of custom field's allowed values." })).annotate({ "description": "Represents a list of custom field's allowed values." })), "description": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field description." })), "entityType": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field entity type" })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field name." })), "onlyAdminCanEdit": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether custom field is modifiable only by admin users." })), "placeholder": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field placeholder value." })), "projectDefaultValues": Schema.optionalKey(Schema.Array(CustomFieldDefaultValuesDtoV1).annotate({ "description": "Represents a list of custom field default values data transfer objects." })), "required": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether custom field is mandatory or not." })), "status": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field status" })), "type": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field type." })), "workspaceDefaultValue": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents a custom field's default value in the workspace." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
191
194
  export const UserCustomFieldValueDtoV1 = Schema.Struct({ "customFieldId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field identifier across the system." })), "customFieldName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field name." })), "customFieldType": Schema.optionalKey(CustomFieldType), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "value": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents custom field value." })) }).annotate({ "description": "Represents a list of value objects for user’s custom fields." });
192
195
  export const HolidayDtoV1 = Schema.Struct({ "automaticTimeEntryCreation": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates that time entries will be automatically created for this holiday." })), "datePeriod": Schema.optionalKey(DatePeriod), "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday is shown to new users." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents holiday identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the name of the holiday." })), "occursAnnually": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday occurs annually." })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents projectId for automatic time entry creation." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents taskId for automatic time entry creation." })), "userGroupIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Indicates which user groups are included." })).annotate({ "description": "Indicates which user groups are included." }).check(Schema.isUnique())), "userIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Indicates which users are included." })).annotate({ "description": "Indicates which users are included." }).check(Schema.isUnique())), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
193
- export const ApprovalRequestDtoV1 = Schema.Struct({ "creator": Schema.optionalKey(ApprovalRequestCreatorDtoV1), "dateRange": Schema.optionalKey(DateRangeDto), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents approval request identifier across the workspace." })), "owner": Schema.optionalKey(ApprovalRequestOwnerDtoV1), "status": Schema.optionalKey(ApprovalRequestStatusDtoV1), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) }).annotate({ "description": "Represents a valid approval request data transfer object." });
196
+ export const ApprovalRequestDtoV1 = Schema.Struct({ "creator": Schema.optionalKey(ApprovalRequestCreatorDtoV1), "dateRange": Schema.optionalKey(DateRangeDto), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents approval request identifier across the workspace." })), "owner": Schema.optionalKey(ApprovalRequestOwnerDtoV1), "status": Schema.optionalKey(ApprovalRequestStatusDtoV1), "type": Schema.optionalKey(Schema.String.annotate({ "description": "Represents approval request type." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) }).annotate({ "description": "Represents a valid approval request data transfer object." });
194
197
  export const AssignmentHydratedDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "clientId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents client identifier across the system." })), "clientName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project name." })), "hoursPerDay": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents number of hours per day as double.", "format": "double" }).check(Schema.isFinite())), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment identifier across the system." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment note." })), "period": Schema.optionalKey(DateRangeDto), "projectArchived": Schema.optionalKey(Schema.Boolean), "projectBillable": Schema.optionalKey(Schema.Boolean), "projectColor": Schema.optionalKey(Schema.String.annotate({ "description": "Color format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "projectName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project name." })), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents start time in hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents task identifier across the system." })), "taskName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents task name." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "userName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user name." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
198
+ export const CreateBalanceAssignmentV1Request = Schema.Struct({ "balance": Schema.Number.annotate({ "description": "Represents the amount of balance to be created", "format": "double" }).check(Schema.isFinite()).check(Schema.isLessThanOrEqualTo(10000)), "dateRange": Schema.optionalKey(DateRangeV1Request), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents note attached to updating balance." })), "policyId": Schema.String.annotate({ "description": "Represents the identifier of the policy where the balance assignment will be created" }).check(Schema.isMinLength(1)), "userIds": Schema.Array(Schema.String.annotate({ "description": "Represents list of users' identifiers whose balance is to be updated." })).annotate({ "description": "Represents list of users' identifiers whose balance is to be updated." }).check(Schema.isMinLength(1)).check(Schema.isUnique()) });
199
+ export const UpdateBalanceAssignmentV1Request = Schema.Struct({ "balanceChange": Schema.Number.annotate({ "description": "Represents the change in balance of the balance assignment", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(-10000)).check(Schema.isLessThanOrEqualTo(10000)), "dateRange": Schema.optionalKey(DateRangeV1Request), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents note attached to updating balance." })) });
200
+ export const UpdateBalanceRequestV1 = Schema.Struct({ "dateRange": Schema.optionalKey(DateRangeV1Request), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a new balance note value." })), "sync": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the call should be executed synchronously. By default, call is done asynchronously" })), "userIds": Schema.Array(Schema.String.annotate({ "description": "Represents the list of users' identifiers whose balance is to be updated." })).annotate({ "description": "Represents the list of users' identifiers whose balance is to be updated." }).check(Schema.isMinLength(1)).check(Schema.isUnique()), "value": Schema.Number.annotate({ "description": "Represents the change in balance value.", "format": "double" }).check(Schema.isFinite()).check(Schema.isGreaterThanOrEqualTo(-10000)).check(Schema.isLessThanOrEqualTo(10000)) });
195
201
  export const AutomaticTimeEntryCreationDto = Schema.Struct({ "defaultEntities": Schema.optionalKey(DefaultEntitiesDto), "enabled": Schema.optionalKey(Schema.Boolean) }).annotate({ "description": "Represents automatic time entry creation settings." });
196
202
  export const AutomaticTimeEntryCreationRequest = Schema.Struct({ "defaultEntities": DefaultEntitiesRequest, "enabled": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates that automatic time entry creation is enabled." })) }).annotate({ "description": "Provides automatic time entry creation settings." });
197
203
  export const EntityCreationPermissionsDtoV1 = Schema.Struct({ "whoCanCreateProjectsAndClients": Schema.optionalKey(EntityCreationPermission), "whoCanCreateTags": Schema.optionalKey(EntityCreationPermission), "whoCanCreateTasks": Schema.optionalKey(EntityCreationPermission) }).annotate({ "description": "Represents an entity creation permission object." });
@@ -209,7 +215,9 @@ export const TimeOffRequestPeriodDto = Schema.Struct({ "halfDay": Schema.optiona
209
215
  export const TimeOffRequestPeriodV1Request = Schema.Struct({ "halfDayPeriod": Schema.optionalKey(Schema.Literals(["FIRST_HALF", "SECOND_HALF", "NOT_DEFINED"]).annotate({ "description": "Represents the half day period." })), "isHalfDay": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether time off is half day." })), "period": PeriodV1Request, "timeOffHalfDayPeriod": Schema.optionalKey(Schema.Literals(["FIRST_HALF", "SECOND_HALF", "NOT_DEFINED"])) }).annotate({ "description": "Provide the period you would like to use for creating the time off request. If `timeZone` isn't set, should be aligned with time zone for user in settings. Can be shifted from user time zone with explicit setting of `timeZone`." });
210
216
  export const TemplateRequest = Schema.Struct({ "name": Schema.String.annotate({ "description": "Represents a template name." }).check(Schema.isMinLength(1)), "projectsAndTasks": Schema.Array(ProjectTaskTupleRequest).annotate({ "description": "Represents a list of template's projects and tasks." }), "timeEntryIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a set of template time entry ids." })).annotate({ "description": "Represents a set of template time entry ids." }).check(Schema.isUnique())), "weekStart": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date of the starting day of the week in the yyyy-MM-dd format.", "format": "date" })) });
211
217
  export const MembershipDtoV1 = Schema.Struct({ "costRate": Schema.optionalKey(RateDtoV1), "hourlyRate": Schema.optionalKey(HourlyRateDtoV1), "membershipStatus": Schema.optionalKey(Schema.Literals(["PENDING", "ACTIVE", "DECLINED", "INACTIVE", "ALL"]).annotate({ "description": "Represents a membership status enum." })), "membershipType": Schema.optionalKey(Schema.Literals(["WORKSPACE", "PROJECT", "USERGROUP"]).annotate({ "description": "Represents membership type enum." })), "targetId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents target identifier across the system." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })) }).annotate({ "description": "Represents a list of membership objects." });
212
- export const AssignmentDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "excludeDays": Schema.optionalKey(Schema.Array(SchedulingExcludeDay).annotate({ "description": "Represents a list of excluded days objects" }).check(Schema.isUnique())), "hoursPerDay": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents assignment total hours per day.", "format": "double" }).check(Schema.isFinite())), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment identifier across the system." })), "includeNonWorkingDays": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment should include non-working days or not." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment note." })), "period": Schema.optionalKey(DateRangeDto), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "published": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is published or not." })), "recurring": Schema.optionalKey(RecurringAssignmentDto), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents start time in hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents task identifier across the system." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
218
+ export const CreateRecurringAssignmentRequestV1 = Schema.Struct({ "frequency": Schema.optionalKey(RecurringFrequency), "interval": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents interval for recurring (1 - every week/month, 2 - biweekly).", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(2))), "monthlyRecurringType": Schema.optionalKey(MonthlyRecurringType), "occurrences": Schema.optionalKey(Schema.Number.annotate({ "description": "Indicates number of occurrences for assignment.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(99))), "recurringEndType": Schema.optionalKey(RecurringEndType), "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the assignment is recurring. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `recurringEndType`, `until`, and `occurrences`." })), "until": Schema.optionalKey(Schema.String.annotate({ "description": "Date by which recurring assignments will be created", "format": "date-time" })), "weeks": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents number of weeks for this assignment. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `recurringEndType`, `until`, and `occurrences`.", "format": "int32" }).check(Schema.isInt())) });
219
+ export const RecurringAssignmentDtoV1 = Schema.Struct({ "frequency": RecurringFrequency, "interval": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents interval for recurring (1 - every week/month, 2 - biweekly).", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(2))), "monthlyRecurringType": Schema.optionalKey(MonthlyRecurringType), "occurrences": Schema.optionalKey(Schema.Number.annotate({ "description": "Number of occurrences", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(99))), "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the assignment is recurring. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `until`, and `occurrences`." })), "seriesId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents series identifier." })), "until": Schema.optionalKey(Schema.String.annotate({ "description": "Date by which recurring assignments will be created", "format": "date-time" })), "weeks": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents number of weeks for this assignment. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `until`, and `occurrences`.", "format": "int32" }).check(Schema.isInt())) }).annotate({ "description": "Represents recurring assignment object." });
220
+ export const RecurringAssignmentRequestV1 = Schema.Struct({ "frequency": Schema.optionalKey(RecurringFrequency), "interval": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents interval for recurring (1 - every week/month, 2 - biweekly).", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(2))), "monthlyRecurringType": Schema.optionalKey(MonthlyRecurringType), "occurrences": Schema.optionalKey(Schema.Number.annotate({ "description": "Indicates number of occurrences for assignment.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(99))), "recurringEndType": Schema.optionalKey(RecurringEndType), "repeat": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the assignment is recurring. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `recurringEndType`, `until`, and `occurrences`." })), "until": Schema.optionalKey(Schema.String.annotate({ "description": "Date by which recurring assignments will be created", "format": "date-time" })), "weeks": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents number of weeks for this assignment. This field is deprecated in favor of a more flexible recurrence model. To define recurrence, use the following fields instead: `frequency`, `interval`, `monthlyRecurringType`, `recurringEndType`, `until`, and `occurrences`.", "format": "int32" }).check(Schema.isInt())) });
213
221
  export const UserSettingsDtoV1 = Schema.Struct({ "alerts": Schema.optionalKey(Schema.Boolean), "approval": Schema.optionalKey(Schema.Boolean), "collapseAllProjectLists": Schema.optionalKey(Schema.Boolean), "dashboardPinToTop": Schema.optionalKey(Schema.Boolean), "dashboardSelection": Schema.optionalKey(Schema.Literals(["ME", "TEAM"])), "dashboardViewType": Schema.optionalKey(Schema.Literals(["PROJECT", "BILLABILITY"])), "dateFormat": Schema.String.annotate({ "description": "Represents a date format." }).check(Schema.isMinLength(1)), "groupSimilarEntriesDisabled": Schema.optionalKey(Schema.Boolean), "invoiceReminders": Schema.optionalKey(Schema.Boolean), "isCompactViewOn": Schema.optionalKey(Schema.Boolean), "lang": Schema.optionalKey(Schema.String), "longRunning": Schema.optionalKey(Schema.Boolean), "multiFactorEnabled": Schema.optionalKey(Schema.Boolean), "myStartOfDay": Schema.optionalKey(Schema.String), "onboarding": Schema.optionalKey(Schema.Boolean), "projectListCollapse": Schema.optionalKey(Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt())), "projectPickerTaskFilter": Schema.optionalKey(Schema.Boolean), "pto": Schema.optionalKey(Schema.Boolean), "reminders": Schema.optionalKey(Schema.Boolean), "scheduledReports": Schema.optionalKey(Schema.Boolean), "scheduling": Schema.optionalKey(Schema.Boolean), "sendNewsletter": Schema.optionalKey(Schema.Boolean), "showOnlyWorkingDays": Schema.optionalKey(Schema.Boolean), "summaryReportSettings": Schema.optionalKey(SummaryReportSettingsDtoV1), "theme": Schema.optionalKey(Schema.Literals(["DARK", "DEFAULT"])), "timeFormat": Schema.Literals(["HOUR12", "HOUR24"]).annotate({ "description": "Represents a time format enum." }), "timeTrackingManual": Schema.optionalKey(Schema.Boolean), "timeZone": Schema.String.annotate({ "description": "Represents a valid timezone ID" }).check(Schema.isMinLength(1)), "weekStart": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a day of the week." })), "weeklyUpdates": Schema.optionalKey(Schema.Boolean) }).annotate({ "description": "Represents user settings object." });
214
222
  export const ExpenseHydratedDto = Schema.Struct({ "approvalRequestId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents approval request identifier across the system." })), "approvalStatus": Schema.optionalKey(Schema.Literals(["PENDING", "APPROVED", "UNSUBMITTED", "REJECTED", "WITHDRAWN_APPROVAL", "WITHDRAWN_SUBMISSION"]).annotate({ "description": "Represents the approval status of the expense" })), "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether expense is billable or not." })), "category": Schema.optionalKey(ExpenseCategoryDto), "currency": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a currency." })), "date": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-dd format." })), "detailedApprovalStatus": Schema.optionalKey(Schema.Literals(["PENDING", "APPROVED", "UNSUBMITTED", "REJECTED", "WITHDRAWN_APPROVAL", "WITHDRAWN_SUBMISSION"]).annotate({ "description": "Represents a detailed approval status of the expense" })), "fileId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents file identifier across the system." })), "fileName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents file name." })), "fileUrl": Schema.optionalKey(Schema.String.annotate({ "description": "Represents file URL." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents expense identifier across the system." })), "isLocked": Schema.optionalKey(Schema.Boolean.annotate({ "writeOnly": true })), "locked": Schema.optionalKey(Schema.Boolean), "notes": Schema.optionalKey(Schema.String.annotate({ "description": "Represents notes for an expense." })), "project": Schema.optionalKey(ProjectInfoDto), "quantity": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents expense quantity as double data type.", "format": "double" }).check(Schema.isFinite())), "task": Schema.optionalKey(TaskInfoDto), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents expense total as double data type.", "format": "double" }).check(Schema.isFinite())), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) }).annotate({ "description": "Represents a list of expense hydrated data transfer objects." });
215
223
  export const ExpenseHydratedDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether expense is billable or not." })), "category": Schema.optionalKey(ExpenseCategoryDto), "date": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a date in yyyy-MM-dd format." })), "fileId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents file identifier across the system." })), "fileName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents file name." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents expense identifier across the system." })), "isLocked": Schema.optionalKey(Schema.Boolean.annotate({ "writeOnly": true })), "locked": Schema.optionalKey(Schema.Boolean), "notes": Schema.optionalKey(Schema.String.annotate({ "description": "Represents notes for an expense." })), "project": Schema.optionalKey(ProjectInfoDto), "quantity": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents expense quantity as double data type.", "format": "double" }).check(Schema.isFinite())), "task": Schema.optionalKey(TaskInfoDto), "total": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents expense total as double data type.", "format": "double" }).check(Schema.isFinite())), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) }).annotate({ "description": "Represent a list of hydrated expense objects." });
@@ -224,7 +232,7 @@ export const TimeEntryDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Sch
224
232
  export const TimeEntryWithRatesDtoV1 = Schema.Struct({ "billable": Schema.Boolean.annotate({ "description": "Indicates whether a time entry is billable." }), "costRate": Schema.optionalKey(RateDtoV1), "customFieldValues": Schema.optionalKey(Schema.Array(CustomFieldValueDtoV1).annotate({ "description": "Represents a list of custom field value objects." })), "description": Schema.String.annotate({ "description": "Represents time entry description." }), "hourlyRate": Schema.optionalKey(RateDtoV1), "id": Schema.String.annotate({ "description": "Represents time entry identifier across the system." }), "isLocked": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Represents whether time entry is locked for modification." })), "kioskId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "Represents kiosk identifier across the system." })), "projectId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "Represents project identifier across the system." })), "tagIds": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ "description": "Represents a list of tag identifiers across the system." })), "taskId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "Represents task identifier across the system." })), "timeInterval": TimeIntervalDtoV1, "type": Schema.optionalKey(Schema.Literals(["REGULAR", "BREAK", "HOLIDAY", "TIME_OFF"]).annotate({ "description": "Represents a time entry type enum." })), "userId": Schema.String.annotate({ "description": "Represents user identifier across the system." }), "workspaceId": Schema.String.annotate({ "description": "Represents workspace identifier across the system." }) });
225
233
  export const InvoiceFilterRequestV1 = Schema.Struct({ "clients": Schema.optionalKey(ContainsArchivedFilterRequest), "companies": Schema.optionalKey(BaseFilterRequest), "exactAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice amount. If provided, you'll get a filtered list of invoices that has the equal amount as specified.", "format": "int64" }).check(Schema.isInt())), "exactBalance": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice balance. If provided, you'll get a filtered list of invoices that has the equal balance as specified.", "format": "int64" }).check(Schema.isInt())), "greaterThanAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice amount. If provided, you'll get a filtered list of invoices that has amount greater than specified.", "format": "int64" }).check(Schema.isInt())), "greaterThanBalance": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice balance. If provided, you'll get a filtered list of invoices that has balance greater than specified.", "format": "int64" }).check(Schema.isInt())), "invoiceNumber": Schema.optionalKey(Schema.String.annotate({ "description": "If provided, you'll get a filtered list of invoices that contain the provided string in their invoice number." })), "issueDate": Schema.optionalKey(TimeRangeRequestDtoV1), "lessThanAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice amount. If provided, you'll get a filtered list of invoices that has amount less than specified.", "format": "int64" }).check(Schema.isInt())), "lessThanBalance": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an invoice balance. If provided, you'll get a filtered list of invoices that has balance less than specified.", "format": "int64" }).check(Schema.isInt())), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "pageSize": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt())), "sortColumn": Schema.optionalKey(Schema.Literals(["ID", "CLIENT", "DUE_ON", "ISSUE_DATE", "AMOUNT", "BALANCE"]).annotate({ "description": "Represents the column name to be used as sorting criteria." })), "sortOrder": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"]).annotate({ "description": "Represents the sorting order." })), "statuses": Schema.optionalKey(Schema.Array(Schema.Literals(["UNSENT", "SENT", "PAID", "PARTIALLY_PAID", "VOID", "OVERDUE"]).annotate({ "description": "Represents a list of invoice statuses. If provided, you'll get a filtered list of invoices that matches any of the invoice status provided." })).annotate({ "description": "Represents a list of invoice statuses. If provided, you'll get a filtered list of invoices that matches any of the invoice status provided." })), "strictSearch": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to toggle on/off strict search mode. When set to true, search by invoice number only will return invoices whose number exactly matches the string value given for the 'invoiceNumber' parameter. When set to false, results will also include invoices whose number contain the string value, but could be longer than the string value itself. For example, if there is an invoice with the number '123456', and the search value is '123', setting strict-name-search to true will not return that invoice in the results, whereas setting it to false will." })) });
226
234
  export const SchedulingUsersTotalsDtoV1 = Schema.Struct({ "capacityPerDay": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents capacity per day in seconds. For a 7hr work day, value is 25200.", "format": "double" }).check(Schema.isFinite())), "totalHoursPerDay": Schema.optionalKey(Schema.Array(TotalsPerDayDto).annotate({ "description": "Represents total hours per day object." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "userImage": Schema.optionalKey(Schema.String.annotate({ "description": "Represents url path to user image." })), "userName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user name." })), "userStatus": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user status." })), "workingDays": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents list of days of the week." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
227
- export const CreateTimeEntryRequest = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether a time entry is billable or not." })), "customAttributes": Schema.optionalKey(Schema.Array(CreateCustomAttributeRequest).annotate({ "description": "Represents a list of create custom field request objects." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(10))), "customFields": Schema.optionalKey(Schema.Array(UpdateCustomFieldRequest).annotate({ "description": "Represents a list of value objects for user’s custom fields." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(50))), "description": Schema.String.annotate({ "description": "Represents time entry description." }).check(Schema.isMaxLength(3000)), "end": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an end date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project identifier across the system." })), "start": Schema.String.annotate({ "description": "Represents a start date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "tagIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of tag ids." })).annotate({ "description": "Represents a list of tag ids." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "type": Schema.optionalKey(Schema.Literals(["REGULAR", "BREAK"]).annotate({ "description": "Valid time entry type." })) });
235
+ export const CreateTimeEntryRequest = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether a time entry is billable or not." })), "customAttributes": Schema.optionalKey(Schema.Array(CreateCustomAttributeRequest).annotate({ "description": "Represents a list of create custom field request objects." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(10))), "customFields": Schema.optionalKey(Schema.Array(UpdateCustomFieldRequest).annotate({ "description": "Represents a list of values for time entry custom fields defined in the workspace settings." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(50))), "description": Schema.String.annotate({ "description": "Represents time entry description." }).check(Schema.isMaxLength(3000)), "end": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an end date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project identifier across the system." })), "start": Schema.String.annotate({ "description": "Represents a start date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "tagIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of tag ids." })).annotate({ "description": "Represents a list of tag ids." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "type": Schema.optionalKey(Schema.Literals(["REGULAR", "BREAK"]).annotate({ "description": "Valid time entry type." })) });
228
236
  export const UpdateTimeEntryBulkRequest = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether a time entry is billable or not." })), "customFields": Schema.optionalKey(Schema.Array(UpdateCustomFieldRequest).check(Schema.isMinLength(0)).check(Schema.isMaxLength(50))), "description": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time entry description." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))), "end": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an end date in the yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "id": Schema.String.annotate({ "description": "Represents a time entry identifier across the system." }).check(Schema.isMinLength(1)), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project identifier across the system." })), "start": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a start date in the yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "tagIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of tag ids." })).annotate({ "description": "Represents a list of tag ids." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "type": Schema.optionalKey(Schema.Literals(["REGULAR", "BREAK"])) });
229
237
  export const UpdateTimeEntryRequest = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether a time entry is billable or not." })), "customFields": Schema.optionalKey(Schema.Array(UpdateCustomFieldRequest).annotate({ "description": "Represents a list of value objects for user’s custom fields." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(50))), "description": Schema.optionalKey(Schema.String.annotate({ "description": "Represents time entry description." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(3000))), "end": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an end date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" })), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project identifier across the system." })), "start": Schema.String.annotate({ "description": "Represents a start date in yyyy-MM-ddThh:mm:ssZ format.", "format": "date-time" }), "tagIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents a list of tag ids." })).annotate({ "description": "Represents a list of tag ids." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "type": Schema.optionalKey(Schema.Literals(["REGULAR", "BREAK"])) });
230
238
  export const LimitedUserRequest = Schema.Struct({ "costRate": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents cost rate of user. Example: 12300 for 123", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0))), "hourlyRate": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents hourly rate of user. Example: 12300 for 123", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0))), "name": Schema.String.annotate({ "description": "Represents name of the user." }).check(Schema.isMinLength(1)), "userCustomFields": Schema.optionalKey(Schema.Array(UpsertUserCustomFieldRequest).annotate({ "description": "Represents a list of upsert user custom field request." })), "userGroups": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents the user group names of the user" }).check(Schema.isMinLength(1))).annotate({ "description": "Represents the user group names of the user" }).check(Schema.isUnique())), "weekStart": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a day of the week." })), "workCapacity": Schema.optionalKey(Schema.String.annotate({ "description": "Represents work capacity as a time duration in the ISO-8601 format." })), "workingDays": Schema.optionalKey(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a list of days of the week." })) });
@@ -246,11 +254,11 @@ export const InvoiceOverviewDtoV1 = Schema.Struct({ "amount": Schema.optionalKey
246
254
  export const RoleDetailsDtoV1 = Schema.Struct({ "role": Schema.optionalKey(RoleDtoV1), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
247
255
  export const UserCustomFieldValueFullDtoV1 = Schema.Struct({ "customField": Schema.optionalKey(CustomFieldDtoV1), "customFieldId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents custom field identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user custom field name." })), "sourceType": Schema.optionalKey(Schema.Literals(["WORKSPACE", "USER"]).annotate({ "description": "Represents user custom field source type." })), "type": Schema.optionalKey(Schema.Literals(["TXT", "NUMBER", "DROPDOWN_SINGLE", "DROPDOWN_MULTIPLE", "CHECKBOX", "LINK"]).annotate({ "description": "Represents custom field type." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "value": Schema.optionalKey(Schema.Struct({}).annotate({ "description": "Represents user custom field value." })) }).annotate({ "description": "Represents a list of value objects for user’s custom fields." });
248
256
  export const HolidayDto = Schema.Struct({ "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationDto), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." })), "datePeriod": Schema.optionalKey(DatePeriod), "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday is shown to new users." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents holiday identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the name of the holiday." })), "occursAnnually": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday occurs annually." })), "userGroupIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Indicates which user groups are included." })).annotate({ "description": "Indicates which user groups are included." }).check(Schema.isUnique())), "userGroups": Schema.optionalKey(Schema.Array(EntityIdNameDto).annotate({ "description": "Contains names of user groups that are assigned to holiday." })), "userIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Indicates which users are included." })).annotate({ "description": "Indicates which users are included." }).check(Schema.isUnique())), "users": Schema.optionalKey(Schema.Array(EntityIdNameDto).annotate({ "description": "Contains names of users that are assigned to holiday." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
249
- export const PolicyDtoV1 = Schema.Struct({ "allowHalfDay": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the half day is allowed." })), "allowNegativeBalance": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the negative balance is allowed." })), "approve": Schema.optionalKey(PolicyApprovalDto), "archived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is archived." })), "automaticAccrual": Schema.optionalKey(AutomaticAccrualDto), "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationDto), "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is applied to future new users." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents policy identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the name of the policy." })), "negativeBalance": Schema.optionalKey(NegativeBalanceDto), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "timeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represents the time unit of the policy." })), "userGroupIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents user groups' identifiers across the system. Indicates which user groups are included in the policy." })).annotate({ "description": "Represents user groups' identifiers across the system. Indicates which user groups are included in the policy." }).check(Schema.isUnique())), "userIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents users' identifiers across the system. Indicates which users are included in the policy." })).annotate({ "description": "Represents users' identifiers across the system. Indicates which users are included in the policy." }).check(Schema.isUnique())), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
257
+ export const PolicyDtoV1 = Schema.Struct({ "allowHalfDay": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the half day is allowed." })), "allowNegativeBalance": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the negative balance is allowed." })), "approve": Schema.optionalKey(PolicyApprovalDto), "archived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is archived." })), "automaticAccrual": Schema.optionalKey(AutomaticAccrualDto), "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationDto), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the color assigned to the policy." })), "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is applied to future new users." })), "icon": Schema.optionalKey(Schema.Literals(["UMBRELLA", "SNOWFLAKE", "FAMILY", "PLANE", "STETHOSCOPE", "HEALTH_METRICS", "CHILDCARE", "LUGGAGE", "MONETIZATION", "CALENDAR"]).annotate({ "description": "Represents the icon assigned to the policy." })), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents policy identifier across the system." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents the name of the policy." })), "negativeBalance": Schema.optionalKey(NegativeBalanceDto), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "timeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Represents the time unit of the policy." })), "userGroupIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents user groups' identifiers across the system. Indicates which user groups are included in the policy." })).annotate({ "description": "Represents user groups' identifiers across the system. Indicates which user groups are included in the policy." }).check(Schema.isUnique())), "userIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "description": "Represents users' identifiers across the system. Indicates which users are included in the policy." })).annotate({ "description": "Represents users' identifiers across the system. Indicates which users are included in the policy." }).check(Schema.isUnique())), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
250
258
  export const CreateHolidayRequestV1 = Schema.Struct({ "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationRequest), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "datePeriod": DatePeriodRequest, "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday is shown to new users." })), "name": Schema.String.annotate({ "description": "Provide the name of the holiday." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(100)), "occursAnnually": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday occurs annually." })), "userGroups": Schema.optionalKey(UserGroupIdsSchema), "users": Schema.optionalKey(UserIdsSchema) });
251
259
  export const CreatePolicyRequestV1 = Schema.Struct({ "allowHalfDay": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether policy allows half days." })), "allowNegativeBalance": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether policy allows negative balances." })), "approve": PolicyApprovalDto, "archived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether policy is archived." })), "automaticAccrual": Schema.optionalKey(AutomaticAccrualRequest), "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationRequest), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy is to be applied to future new users." })), "hasExpiration": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the policy balance should have expiration" })), "icon": Schema.optionalKey(Schema.Literals(["UMBRELLA", "SNOWFLAKE", "FAMILY", "PLANE", "STETHOSCOPE", "HEALTH_METRICS", "CHILDCARE", "LUGGAGE", "MONETIZATION", "CALENDAR"]).annotate({ "description": "Provide icon." })), "name": Schema.String.annotate({ "description": "Represents a name of new policy." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(100)), "negativeBalance": Schema.optionalKey(NegativeBalanceRequest), "timeUnit": Schema.optionalKey(Schema.Literals(["DAYS", "HOURS"]).annotate({ "description": "Indicates time unit of the policy. " })), "userGroups": Schema.optionalKey(UserGroupIdsSchema), "users": Schema.optionalKey(UserIdsSchema) });
252
260
  export const UpdateHolidayRequestV1 = Schema.Struct({ "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationRequest), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "datePeriod": DatePeriodRequest, "everyoneIncludingNew": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether the holiday is shown to new users." })), "name": Schema.String.annotate({ "description": "Provide the name you would like to use for updating the holiday." }).check(Schema.isMinLength(1)), "occursAnnually": Schema.Boolean.annotate({ "description": "Indicates whether the holiday occurs annually." }), "userGroups": Schema.optionalKey(ContainsUserGroupFilterRequest), "users": Schema.optionalKey(ContainsUsersFilterRequestForHoliday) });
253
- export const UpdatePolicyRequestV1 = Schema.Struct({ "allowHalfDay": Schema.Boolean.annotate({ "description": "Indicates whether policy allows half day." }), "allowNegativeBalance": Schema.Boolean.annotate({ "description": "Indicates whether policy allows negative balance." }), "approve": PolicyApprovalDto, "archived": Schema.Boolean.annotate({ "description": "Indicates whether policy is archived." }), "automaticAccrual": Schema.optionalKey(AutomaticAccrualRequest), "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationRequest), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "everyoneIncludingNew": Schema.Boolean.annotate({ "description": "Indicates whether the policy is shown to new users." }), "hasExpiration": Schema.Boolean.annotate({ "description": "Indicates whether the policy has expiration." }), "icon": Schema.optionalKey(Schema.Literals(["UMBRELLA", "SNOWFLAKE", "FAMILY", "PLANE", "STETHOSCOPE", "HEALTH_METRICS", "CHILDCARE", "LUGGAGE", "MONETIZATION", "CALENDAR"]).annotate({ "description": "Provide icon." })), "name": Schema.String.annotate({ "description": "Provide the name you would like to use for updating the policy." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(100)), "negativeBalance": Schema.optionalKey(NegativeBalanceRequest), "userGroups": UserGroupIdsSchema, "users": UserIdsSchema });
261
+ export const UpdatePolicyRequestV1 = Schema.Struct({ "allowHalfDay": Schema.Boolean.annotate({ "description": "Indicates whether policy allows half day." }), "allowNegativeBalance": Schema.Boolean.annotate({ "description": "Indicates whether policy allows negative balance." }), "approve": PolicyApprovalDto, "archived": Schema.Boolean.annotate({ "description": "Indicates whether policy is archived." }), "automaticAccrual": Schema.optionalKey(AutomaticAccrualRequest), "automaticTimeEntryCreation": Schema.optionalKey(AutomaticTimeEntryCreationRequest), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Provide color in format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "everyoneIncludingNew": Schema.Boolean.annotate({ "description": "Indicates whether the policy is shown to new users." }), "hasExpiration": Schema.Boolean.annotate({ "description": "Indicates whether the policy has expiration." }), "icon": Schema.optionalKey(Schema.Literals(["UMBRELLA", "SNOWFLAKE", "FAMILY", "PLANE", "STETHOSCOPE", "HEALTH_METRICS", "CHILDCARE", "LUGGAGE", "MONETIZATION", "CALENDAR"]).annotate({ "description": "Provide icon." })), "name": Schema.String.annotate({ "description": "Provide the name you would like to use for updating the policy." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(100)), "negativeBalance": Schema.optionalKey(NegativeBalanceRequest), "userGroups": Schema.optionalKey(UserGroupIdsSchema), "users": Schema.optionalKey(UserIdsSchema) });
254
262
  export const WorkspaceSettingsDtoV1 = Schema.Struct({ "activeBillableHours": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether billable hours is active." })), "adminOnlyPages": Schema.optionalKey(Schema.Literals(["PROJECT", "TEAM", "REPORTS"]).annotate({ "description": "Represents a unique list of protected page enums." })), "automaticLock": Schema.optionalKey(AutomaticLockDtoV1), "canSeeTimeSheet": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether timesheets are visible or not." })), "canSeeTracker": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether time trackers are visible or not." })), "currencyFormat": Schema.optionalKey(Schema.Literals(["CURRENCY_SPACE_VALUE", "VALUE_SPACE_CURRENCY", "CURRENCY_VALUE", "VALUE_CURRENCY"]).annotate({ "description": "Represents a clockify currency format enum." })), "defaultBillableProjects": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether projects are billable by default." })), "durationFormat": Schema.optionalKey(Schema.Literals(["FULL", "COMPACT", "DECIMAL"]).annotate({ "description": "Represents a clockify duration format enum. Used to set Duration format instead of setting decimalFormat and trackTimeDownToSecond." })), "entityCreationPermissions": Schema.optionalKey(EntityCreationPermissionsDtoV1), "forceDescription": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether description are forced or not." })), "forceProjects": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether projects are forced or not." })), "forceTags": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether tags are forced or not." })), "forceTasks": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether tasks are forced or not." })), "isProjectPublicByDefault": Schema.optionalKey(Schema.Boolean), "lockTimeEntries": Schema.optionalKey(Schema.String), "lockTimeZone": Schema.optionalKey(Schema.String), "multiFactorEnabled": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether two-factor authentication is enabled or not." })), "numberFormat": Schema.optionalKey(Schema.Literals(["COMMA_PERIOD", "PERIOD_COMMA", "QUOTATION_MARK_PERIOD", "SPACE_COMMA"]).annotate({ "description": "Represents a clockify number format enum." })), "onlyAdminsCanChangeBillableStatus": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can change billable status." })), "onlyAdminsCreateProject": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can create projects." })), "onlyAdminsCreateTag": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can create tags." })), "onlyAdminsCreateTask": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can create task." })), "onlyAdminsSeeAllTimeEntries": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can see all time entries." })), "onlyAdminsSeeBillableRates": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can see billable rates." })), "onlyAdminsSeeDashboard": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can see dashboard." })), "onlyAdminsSeePublicProjectsEntries": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether only admins can see public project entries." })), "projectFavorites": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project favorites are allowed." })), "projectGroupingLabel": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project grouping label." })), "projectLabel": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project label." })), "projectPickerSpecialFilter": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project picker special filter is enabled." })), "round": Schema.optionalKey(RoundDto), "taskLabel": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task label." })), "timeRoundingInReports": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether time rounding is enabled in reports." })), "timeTrackingMode": Schema.optionalKey(Schema.Literals(["DEFAULT", "STOPWATCH_ONLY"]).annotate({ "description": "Represents a time tracking mode enum." })), "trackTimeDownToSecond": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether time tracking is seconds-accurate. This is now deprecated and durationFormat can now be used to manage Time Duration Format." })), "workingDays": Schema.optionalKey(Schema.Array(Schema.Literals(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"]).annotate({ "description": "Represents a list of working days." })).annotate({ "description": "Represents a list of working days." }).check(Schema.isUnique())) }).annotate({ "description": "Workspace settings also include Time Duration Format settings.\n\nSetting Time Duration Format by changing the boolean fields\ndecimalFormat and trackTimeDownToSecond is now deprecated.\n\nTime Duration Format can be set by durationFormat enum field.\n\nThree different Time Duration modes will still map the boolean fields:\n\n 1. Full (hh:mm:ss) -> decimalFormat = false, trackTimeDownToSecond = true,\n\n 2. Compact (h:mm) -> decimalFormat = false, trackTimeDownToSecond = false,\n\n 3. Decimal (h:hh) -> decimalFormat = true, trackTimeDownToSecond = true\n\n" });
255
263
  export const ProjectRequest = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is billable or not." })), "clientId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents client identifier across the system." })), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Color format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }).check(Schema.isPattern(new RegExp("^#(?:[0-9a-fA-F]{6}){1}$")))), "costRate": Schema.optionalKey(CostRateRequestV1), "estimate": Schema.optionalKey(EstimateRequest), "hourlyRate": Schema.optionalKey(HourlyRateRequestV1), "isPublic": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is public or not." })), "memberships": Schema.optionalKey(Schema.Array(MembershipRequest).annotate({ "description": "Represents a list of membership request objects." })), "name": Schema.String.annotate({ "description": "Represents a project name." }).check(Schema.isMinLength(2)).check(Schema.isMaxLength(250)), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project note." }).check(Schema.isMaxLength(16384))), "tasks": Schema.optionalKey(Schema.Array(TaskRequest).annotate({ "description": "Represents a list of task request objects." })) });
256
264
  export const UpdateProjectMembershipsRequest = Schema.Struct({ "memberships": Schema.Array(UserIdWithRatesRequest).annotate({ "description": "Represents a list of users with id and rates request objects." }), "userGroups": Schema.optionalKey(UserGroupIdsSchema) });
@@ -259,6 +267,8 @@ export const TimeOffRequestV1Dto = Schema.Struct({ "balanceDiff": Schema.optiona
259
267
  export const CreateTimeOffRequestV1Request = Schema.Struct({ "note": Schema.optionalKey(Schema.String.annotate({ "description": "Provide the note you would like to use for creating the time off request." })), "timeOffPeriod": TimeOffRequestPeriodV1Request });
260
268
  export const ProjectDtoImplV1 = Schema.Struct({ "archived": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is archived or not." })), "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is billable or not." })), "budgetEstimate": Schema.optionalKey(EstimateWithOptionsDto), "clientId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents client identifier across the system." })), "clientName": Schema.optionalKey(Schema.String.annotate({ "description": "Represents client name." })), "color": Schema.optionalKey(Schema.String.annotate({ "description": "Color format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." })), "costRate": Schema.optionalKey(RateDtoV1), "duration": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project duration in milliseconds." })), "estimate": Schema.optionalKey(EstimateDtoV1), "estimateReset": Schema.optionalKey(EstimateResetDto), "hourlyRate": Schema.optionalKey(RateDtoV1), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "isPublic": Schema.optionalKey(Schema.Boolean.annotate({ "writeOnly": true })), "isTemplate": Schema.optionalKey(Schema.Boolean.annotate({ "writeOnly": true })), "memberships": Schema.optionalKey(Schema.Array(MembershipDtoV1).annotate({ "description": "Represents a list of membership objects." })), "name": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a project name." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project note." })), "public": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is public or not." })), "template": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is a template or not." })), "timeEstimate": Schema.optionalKey(TimeEstimateDto), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
261
269
  export const ProjectDtoV1 = Schema.Struct({ "archived": Schema.Boolean.annotate({ "description": "Indicates whether project is archived or not." }), "billable": Schema.Boolean.annotate({ "description": "Indicates whether project is billable or not." }), "budgetEstimate": Schema.optionalKey(EstimateWithOptionsDto), "color": Schema.String.annotate({ "description": "Color format ^#(?:[0-9a-fA-F]{6}){1}$. Explanation: A valid color code should start with '#' and consist of six hexadecimal characters, representing a color in hexadecimal format. Color value is in standard RGB hexadecimal format." }), "costRate": Schema.optionalKey(RateDtoV1), "duration": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project duration in milliseconds." })), "estimate": Schema.optionalKey(EstimateDtoV1), "hourlyRate": Schema.optionalKey(RateDtoV1), "id": Schema.String.annotate({ "description": "Represents project identifier across the system." }), "memberships": Schema.optionalKey(Schema.Array(MembershipDtoV1).annotate({ "description": "Represents a list of membership objects." })), "name": Schema.String, "note": Schema.optionalKey(Schema.String), "public": Schema.optionalKey(Schema.Boolean), "template": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether project is a template or not." })), "timeEstimate": Schema.optionalKey(TimeEstimateDto), "workspaceId": Schema.String });
270
+ export const AssignmentCreateRequestV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "end": Schema.String.annotate({ "description": "Represents an end date in the yyyy-MM-ddThh:mm:ssZ format." }), "hoursPerDay": Schema.Number.annotate({ "description": "Represents assignment total hours per day.", "format": "double" }).check(Schema.isFinite()), "includeNonWorkingDays": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether to include non-working days or not." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents an assignment note." }).check(Schema.isMinLength(0)).check(Schema.isMaxLength(100))), "projectId": Schema.String.annotate({ "description": "Represents a project identifier across the system." }).check(Schema.isMinLength(1)), "recurringAssignment": Schema.optionalKey(CreateRecurringAssignmentRequestV1), "start": Schema.String.annotate({ "description": "Represents a start date in the yyyy-MM-ddThh:mm:ssZ format." }), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a start time in the hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a task identifier across the system." })), "userId": Schema.String.annotate({ "description": "Represents a user identifier across the system." }).check(Schema.isMinLength(1)) });
271
+ export const AssignmentDtoV1 = Schema.Struct({ "billable": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is billable or not." })), "excludeDays": Schema.optionalKey(Schema.Array(SchedulingExcludeDay).annotate({ "description": "Represents a list of excluded days objects" }).check(Schema.isUnique())), "hoursPerDay": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents assignment total hours per day.", "format": "double" }).check(Schema.isFinite())), "id": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment identifier across the system." })), "includeNonWorkingDays": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment should include non-working days or not." })), "note": Schema.optionalKey(Schema.String.annotate({ "description": "Represents assignment note." })), "period": Schema.optionalKey(DateRangeDto), "projectId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents project identifier across the system." })), "published": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Indicates whether assignment is published or not." })), "recurring": Schema.optionalKey(RecurringAssignmentDtoV1), "startTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents start time in hh:mm:ss format." })), "taskId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents task identifier across the system." })), "userId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user identifier across the system." })), "workspaceId": Schema.optionalKey(Schema.String.annotate({ "description": "Represents workspace identifier across the system." })) });
262
272
  export const UserDtoV1 = Schema.Struct({ "activeWorkspace": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user's active workspace identifier across the system." })), "customFields": Schema.optionalKey(Schema.Array(UserCustomFieldValueDtoV1).annotate({ "description": "Represents a list of value objects for user’s custom fields." })), "defaultWorkspace": Schema.optionalKey(Schema.String.annotate({ "description": "Represents user default workspace identifier across the system." })), "email": Schema.String.annotate({ "description": "Represents email address of the user." }), "id": Schema.String.annotate({ "description": "Represents user identifier across the system." }), "memberships": Schema.optionalKey(Schema.Array(MembershipDtoV1).annotate({ "description": "Represents a list of membership objects." })), "name": Schema.String.annotate({ "description": "Represents name of the user." }), "profilePicture": Schema.optionalKey(Schema.String.annotate({ "description": "Represents profile image path of the user." })), "settings": Schema.optionalKey(UserSettingsDtoV1), "status": Schema.optionalKey(AccountStatus) });
263
273
  export const ExpensesWithCountDtoV1 = Schema.Struct({ "count": Schema.optionalKey(Schema.Number.annotate({ "description": "Represent result count.", "format": "int32" }).check(Schema.isInt())), "expenses": Schema.optionalKey(Schema.Array(ExpenseHydratedDtoV1).annotate({ "description": "Represent a list of hydrated expense objects." })) }).annotate({ "description": "Represents an expense with count data transfer object." });
264
274
  export const ApprovalDetailsDtoV1 = Schema.Struct({ "approvalRequest": Schema.optionalKey(ApprovalRequestDtoV1), "approvedTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time duration." })), "billableAmount": Schema.optionalKey(Schema.Number.annotate({ "format": "double" }).check(Schema.isFinite())), "billableTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time duration." })), "breakTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time duration." })), "costAmount": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount.", "format": "double" }).check(Schema.isFinite())), "entries": Schema.optionalKey(Schema.Array(TimeEntryInfoDto).annotate({ "description": "Represents a list of time entry info data transfer objects." })), "expenseTotal": Schema.optionalKey(Schema.Number.annotate({ "description": "Represents an amount.", "format": "double" }).check(Schema.isFinite())), "expenses": Schema.optionalKey(Schema.Array(ExpenseHydratedDto).annotate({ "description": "Represents a list of expense hydrated data transfer objects." })), "pendingTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time duration." })), "trackedTime": Schema.optionalKey(Schema.String.annotate({ "description": "Represents a time duration." })) });
@@ -288,16 +298,20 @@ export const CreateWorkspaceRequestJson = CreateWorkspaceRequestV1;
288
298
  export const CreateWorkspace201 = WorkspaceDtoV1;
289
299
  export const GetWorkspaceOfUser200 = WorkspaceDtoV1;
290
300
  export const GetAddonWebhooks200 = WebhooksDtoV1;
291
- export const GetApprovalRequestsParams = Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["PENDING", "APPROVED", "WITHDRAWN_APPROVAL"])), "sort-column": Schema.optionalKey(Schema.Literals(["ID", "USER_ID", "START", "UPDATED_AT"])), "sort-order": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"])), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "page-size": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))) });
301
+ export const GetApprovalRequestsParams = Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["PENDING", "APPROVED", "WITHDRAWN_APPROVAL"])), "sort-column": Schema.optionalKey(Schema.Literals(["ID", "USER_ID", "START", "UPDATED_AT"])), "sort-order": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"])), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "page-size": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))), "types": Schema.optionalKey(Schema.Array(Schema.Literals(["TIMESHEET", "EXPENSE", "TIMESHEET_AND_EXPENSE"])).check(Schema.isUnique())) });
292
302
  export const GetApprovalRequests200 = Schema.Array(ApprovalDetailsDtoV1);
293
303
  export const CreateApprrovalRequestRequestJson = CreateApprovalRequest;
294
304
  export const CreateApprrovalRequest201 = ApprovalRequestDtoV1;
295
305
  export const ResubmitApprovalRequestRequestJson = CreateApprovalRequest;
296
- export const CreateApprovalForOtherRequestJson = CreateApprovalRequest;
297
- export const CreateApprovalForOther201 = ApprovalRequestDtoV1;
306
+ export const CreateApprovalForOtherDeprecatedRequestJson = CreateApprovalRequest;
307
+ export const CreateApprovalForOtherDeprecated201 = ApprovalRequestDtoV1;
298
308
  export const ResubmitApprovalRequestForOtherRequestJson = CreateApprovalRequest;
309
+ export const CreateApprovalForOtherWithTypeRequestJson = CreateApprovalRequestNoType;
310
+ export const CreateApprovalForOtherWithType201 = ApprovalRequestDtoV1;
299
311
  export const UpdateApprovalStatusRequestJson = UpdateApprovalRequest;
300
312
  export const UpdateApprovalStatus200 = ApprovalRequestDtoV1;
313
+ export const CreateApprrovalRequest1RequestJson = CreateApprovalRequestNoType;
314
+ export const CreateApprrovalRequest1201 = ApprovalRequestDtoV1;
301
315
  export const GetClientsParams = Schema.Struct({ "name": Schema.optionalKey(Schema.String.annotate({ "description": "Filters client results that matches with the string provided in their client name." })), "sort-column": Schema.optionalKey(Schema.String.annotate({ "description": "Column name that will be used as criteria for sorting results." })), "sort-order": Schema.optionalKey(Schema.String), "page": Schema.optionalKey(Schema.Number.annotate({ "description": "Page number.", "format": "int32" }).check(Schema.isInt())), "page-size": Schema.optionalKey(Schema.Number.annotate({ "description": "Page size.", "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))), "archived": Schema.optionalKey(Schema.String) });
302
316
  export const GetClients200 = Schema.Array(ClientWithCurrencyDtoV1);
303
317
  export const CreateClientRequestJson = CreateClientRequestV1;
@@ -457,12 +471,17 @@ export const UpdateRequestJson = TemplatePatchRequest;
457
471
  export const Update200 = TemplateDtoImpl;
458
472
  export const CreateTimeEntryRequestJson = CreateTimeEntryRequest;
459
473
  export const CreateTimeEntry201 = TimeEntryDtoImplV1;
474
+ export const GetMultipleTimeEntriesRequestJson = GetTimeEntriesByIdsRequest;
475
+ export const GetMultipleTimeEntries200 = Schema.Array(TimeEntryWithRatesDtoV1);
460
476
  export const UpdateInvoicedStatusRequestJson = UpdateInvoicedStatusRequest;
461
477
  export const GetInProgressTimeEntriesParams = Schema.Struct({ "page": Schema.optionalKey(Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1))), "page-size": Schema.optionalKey(Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(1000))) });
462
478
  export const GetTimeEntryParams = Schema.Struct({ "hydrated": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Flag to set whether to include additional information of a time entry or not." })) });
463
479
  export const GetTimeEntry200 = TimeEntryWithRatesDtoV1;
464
480
  export const UpdateTimeEntryRequestJson = UpdateTimeEntryRequest;
465
481
  export const UpdateTimeEntry200 = TimeEntryDtoImplV1;
482
+ export const CreateBalanceAssignmentRequestJson = CreateBalanceAssignmentV1Request;
483
+ export const UpdateBalanceAssignmentRequestJson = UpdateBalanceAssignmentV1Request;
484
+ export const DeleteBalanceAssignmentRequestJson = DeleteBalanceAssignmentV1Request;
466
485
  export const GetBalancesForPolicyParams = Schema.Struct({ "page": Schema.optionalKey(Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()).check(Schema.isLessThanOrEqualTo(1000))), "page-size": Schema.optionalKey(Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(1)).check(Schema.isLessThanOrEqualTo(200))), "sort": Schema.optionalKey(Schema.Literals(["USER", "POLICY", "USED", "BALANCE", "TOTAL"])), "sort-order": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"])) });
467
486
  export const UpdateBalanceRequestJson = UpdateBalanceRequestV1;
468
487
  export const GetBalancesForUserParams = Schema.Struct({ "page": Schema.optionalKey(Schema.String), "page-size": Schema.optionalKey(Schema.String), "sort": Schema.optionalKey(Schema.Literals(["USER", "POLICY", "USED", "BALANCE", "TOTAL"])), "sort-order": Schema.optionalKey(Schema.Literals(["ASCENDING", "DESCENDING"])) });
@@ -596,7 +615,7 @@ export const make = (httpClient, options = {}) => {
596
615
  "2xx": decodeSuccess(GetAddonWebhooks200),
597
616
  orElse: unexpectedStatus
598
617
  }))),
599
- "getApprovalRequests": (workspaceId, options) => HttpClientRequest.get(`/v1/workspaces/${workspaceId}/approval-requests`).pipe(HttpClientRequest.setUrlParams({ "status": options?.params?.["status"], "sort-column": options?.params?.["sort-column"], "sort-order": options?.params?.["sort-order"], "page": options?.params?.["page"], "page-size": options?.params?.["page-size"] }), withResponse(options?.config)(HttpClientResponse.matchStatus({
618
+ "getApprovalRequests": (workspaceId, options) => HttpClientRequest.get(`/v1/workspaces/${workspaceId}/approval-requests`).pipe(HttpClientRequest.setUrlParams({ "status": options?.params?.["status"], "sort-column": options?.params?.["sort-column"], "sort-order": options?.params?.["sort-order"], "page": options?.params?.["page"], "page-size": options?.params?.["page-size"], "types": options?.params?.["types"] }), withResponse(options?.config)(HttpClientResponse.matchStatus({
600
619
  "2xx": decodeSuccess(GetApprovalRequests200),
601
620
  orElse: unexpectedStatus
602
621
  }))),
@@ -607,17 +626,25 @@ export const make = (httpClient, options = {}) => {
607
626
  "resubmitApprovalRequest": (workspaceId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/resubmit-entries-for-approval`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
608
627
  orElse: unexpectedStatus
609
628
  }))),
610
- "createApprovalForOther": (workspaceId, userId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/users/${userId}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
611
- "2xx": decodeSuccess(CreateApprovalForOther201),
629
+ "createApprovalForOtherDeprecated": (workspaceId, userId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/users/${userId}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
630
+ "2xx": decodeSuccess(CreateApprovalForOtherDeprecated201),
612
631
  orElse: unexpectedStatus
613
632
  }))),
614
633
  "resubmitApprovalRequestForOther": (workspaceId, userId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/users/${userId}/resubmit-entries-for-approval`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
615
634
  orElse: unexpectedStatus
616
635
  }))),
636
+ "createApprovalForOtherWithType": (workspaceId, userId, type, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/users/${userId}/${type}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
637
+ "2xx": decodeSuccess(CreateApprovalForOtherWithType201),
638
+ orElse: unexpectedStatus
639
+ }))),
617
640
  "updateApprovalStatus": (workspaceId, approvalRequestId, options) => HttpClientRequest.patch(`/v1/workspaces/${workspaceId}/approval-requests/${approvalRequestId}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
618
641
  "2xx": decodeSuccess(UpdateApprovalStatus200),
619
642
  orElse: unexpectedStatus
620
643
  }))),
644
+ "createApprrovalRequest1": (workspaceId, type, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/approval-requests/${type}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
645
+ "2xx": decodeSuccess(CreateApprrovalRequest1201),
646
+ orElse: unexpectedStatus
647
+ }))),
621
648
  "getClients": (workspaceId, options) => HttpClientRequest.get(`/v1/workspaces/${workspaceId}/clients`).pipe(HttpClientRequest.setUrlParams({ "name": options?.params?.["name"], "sort-column": options?.params?.["sort-column"], "sort-order": options?.params?.["sort-order"], "page": options?.params?.["page"], "page-size": options?.params?.["page-size"], "archived": options?.params?.["archived"] }), withResponse(options?.config)(HttpClientResponse.matchStatus({
622
649
  "2xx": decodeSuccess(GetClients200),
623
650
  orElse: unexpectedStatus
@@ -993,6 +1020,10 @@ export const make = (httpClient, options = {}) => {
993
1020
  "2xx": decodeSuccess(CreateTimeEntry201),
994
1021
  orElse: unexpectedStatus
995
1022
  }))),
1023
+ "getMultipleTimeEntries": (workspaceId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/time-entries/batch`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1024
+ "2xx": decodeSuccess(GetMultipleTimeEntries200),
1025
+ orElse: unexpectedStatus
1026
+ }))),
996
1027
  "updateInvoicedStatus": (workspaceId, options) => HttpClientRequest.patch(`/v1/workspaces/${workspaceId}/time-entries/invoiced`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
997
1028
  "200": () => Effect.void,
998
1029
  orElse: unexpectedStatus
@@ -1012,6 +1043,21 @@ export const make = (httpClient, options = {}) => {
1012
1043
  "204": () => Effect.void,
1013
1044
  orElse: unexpectedStatus
1014
1045
  }))),
1046
+ "createBalanceAssignment": (workspaceId, options) => HttpClientRequest.post(`/v1/workspaces/${workspaceId}/time-off/balance/assignment`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1047
+ "201": () => Effect.void,
1048
+ orElse: unexpectedStatus
1049
+ }))),
1050
+ "getBalanceAssignmentsForUserAndPolicy": (workspaceId, userId, policyId, options) => HttpClientRequest.get(`/v1/workspaces/${workspaceId}/time-off/balance/assignment/user/${userId}/policy/${policyId}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1051
+ orElse: unexpectedStatus
1052
+ }))),
1053
+ "updateBalanceAssignment": (workspaceId, balanceAssignmentId, userId, policyId, options) => HttpClientRequest.put(`/v1/workspaces/${workspaceId}/time-off/balance/assignment/${balanceAssignmentId}/user/${userId}/policy/${policyId}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1054
+ "204": () => Effect.void,
1055
+ orElse: unexpectedStatus
1056
+ }))),
1057
+ "deleteBalanceAssignment": (workspaceId, balanceAssignmentId, userId, policyId, options) => HttpClientRequest.delete(`/v1/workspaces/${workspaceId}/time-off/balance/assignment/${balanceAssignmentId}/user/${userId}/policy/${policyId}`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1058
+ "200": () => Effect.void,
1059
+ orElse: unexpectedStatus
1060
+ }))),
1015
1061
  "getBalancesForPolicy": (workspaceId, policyId, options) => HttpClientRequest.get(`/v1/workspaces/${workspaceId}/time-off/balance/policy/${policyId}`).pipe(HttpClientRequest.setUrlParams({ "page": options?.params?.["page"], "page-size": options?.params?.["page-size"], "sort": options?.params?.["sort"], "sort-order": options?.params?.["sort-order"] }), withResponse(options?.config)(HttpClientResponse.matchStatus({
1016
1062
  orElse: unexpectedStatus
1017
1063
  }))),