diff --git a/sdk/dotnet/Timr.Api/Endpoints/TaskApi.cs b/sdk/dotnet/Timr.Api/Endpoints/TaskApi.cs index 9f78881..c277d21 100644 --- a/sdk/dotnet/Timr.Api/Endpoints/TaskApi.cs +++ b/sdk/dotnet/Timr.Api/Endpoints/TaskApi.cs @@ -220,7 +220,7 @@ public interface ITaskApi : IApi /// /// The /// - public interface ICreateTaskApiResponse : Timr.Api.Client.IApiResponse, ICreated, IBadRequest, IConflict, IUnprocessableContent + public interface ICreateTaskApiResponse : Timr.Api.Client.IApiResponse, ICreated, IBadRequest, IForbidden, IConflict, IUnprocessableContent { /// /// Returns true if the response is 201 Created @@ -234,6 +234,12 @@ public interface ICreateTaskApiResponse : Timr.Api.Client.IApiResponse, ICreated /// bool IsBadRequest { get; } + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + /// /// Returns true if the response is 409 Conflict /// @@ -868,6 +874,56 @@ public bool TryBadRequest([NotNullWhen(true)]out Timr.Api.Model.Error? result) return result != null; } + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 403 Forbidden + /// + /// + public Timr.Api.Model.Error? Forbidden() + { + bool suppressDefault = false; + Timr.Api.Model.Error? result = null; + OnForbidden(ref suppressDefault, ref result); + if (!suppressDefault) + result = DefaultForbidden(); + return result; + } + + private Timr.Api.Model.Error? DefaultForbidden() + { + // NOTICE: Consider this AsModel template deprecated. Implement the appropriate partial method instead + return IsForbidden + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + partial void OnForbidden(ref bool suppressDefault, ref Timr.Api.Model.Error? result); + + /// + /// Returns true if the response is 403 Forbidden and the deserialized response is not null + /// + /// + /// + public bool TryForbidden([NotNullWhen(true)]out Timr.Api.Model.Error? result) + { + result = null; + + try + { + result = Forbidden(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)403); + } + + return result != null; + } + /// /// Returns true if the response is 409 Conflict /// diff --git a/sdk/dotnet/Timr.Api/Endpoints/TaskToUserAssignmentApi.cs b/sdk/dotnet/Timr.Api/Endpoints/TaskToUserAssignmentApi.cs index 8719630..1f144f3 100644 --- a/sdk/dotnet/Timr.Api/Endpoints/TaskToUserAssignmentApi.cs +++ b/sdk/dotnet/Timr.Api/Endpoints/TaskToUserAssignmentApi.cs @@ -228,7 +228,7 @@ public interface IGetTaskToUserAssignmentApiResponse : Timr.Api.Client.IApiRespo /// /// The /// - public interface IUpsertTaskToUserAssignmentApiResponse : Timr.Api.Client.IApiResponse, IOk, ICreated, IBadRequest, IConflict, IUnprocessableContent + public interface IUpsertTaskToUserAssignmentApiResponse : Timr.Api.Client.IApiResponse, IOk, ICreated, IBadRequest, IForbidden, IConflict, IUnprocessableContent { /// /// Returns true if the response is 200 Ok @@ -248,6 +248,12 @@ public interface IUpsertTaskToUserAssignmentApiResponse : Timr.Api.Client.IApiRe /// bool IsBadRequest { get; } + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + /// /// Returns true if the response is 409 Conflict /// @@ -1966,6 +1972,56 @@ public bool TryBadRequest([NotNullWhen(true)]out Timr.Api.Model.Error? result) return result != null; } + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 403 Forbidden + /// + /// + public Timr.Api.Model.Error? Forbidden() + { + bool suppressDefault = false; + Timr.Api.Model.Error? result = null; + OnForbidden(ref suppressDefault, ref result); + if (!suppressDefault) + result = DefaultForbidden(); + return result; + } + + private Timr.Api.Model.Error? DefaultForbidden() + { + // NOTICE: Consider this AsModel template deprecated. Implement the appropriate partial method instead + return IsForbidden + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + partial void OnForbidden(ref bool suppressDefault, ref Timr.Api.Model.Error? result); + + /// + /// Returns true if the response is 403 Forbidden and the deserialized response is not null + /// + /// + /// + public bool TryForbidden([NotNullWhen(true)]out Timr.Api.Model.Error? result) + { + result = null; + + try + { + result = Forbidden(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)403); + } + + return result != null; + } + /// /// Returns true if the response is 409 Conflict /// diff --git a/sdk/dotnet/Timr.Api/Model/Accounts.cs b/sdk/dotnet/Timr.Api/Model/Accounts.cs index 11e5d80..e4d254f 100644 --- a/sdk/dotnet/Timr.Api/Model/Accounts.cs +++ b/sdk/dotnet/Timr.Api/Model/Accounts.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// Accounts + /// Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. /// public partial class Accounts : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/Task.cs b/sdk/dotnet/Timr.Api/Model/Task.cs index 059719e..e5db9ba 100644 --- a/sdk/dotnet/Timr.Api/Model/Task.cs +++ b/sdk/dotnet/Timr.Api/Model/Task.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + /// A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. /// public partial class Task : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/TaskBase.cs b/sdk/dotnet/Timr.Api/Model/TaskBase.cs index 11f8268..f698d48 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskBase.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskBase.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// TaskBase + /// Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. /// public partial class TaskBase : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/TaskCreate.cs b/sdk/dotnet/Timr.Api/Model/TaskCreate.cs index 0408132..47afb13 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskCreate.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskCreate.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// TaskCreate + /// For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. /// public partial class TaskCreate : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/TaskReduced.cs b/sdk/dotnet/Timr.Api/Model/TaskReduced.cs index ffa96ac..22fc66f 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskReduced.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskReduced.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// TaskReduced + /// A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. /// public partial class TaskReduced : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/TaskToUserAssignment.cs b/sdk/dotnet/Timr.Api/Model/TaskToUserAssignment.cs index 3cab338..4788a51 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskToUserAssignment.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskToUserAssignment.cs @@ -36,7 +36,7 @@ public partial class TaskToUserAssignment : IValidatableObject /// user /// recordingLock /// automaticallyAssigned - /// hoursPlanned + /// Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. [JsonConstructor] public TaskToUserAssignment(UserPartial user, RecordingLockType recordingLock, bool automaticallyAssigned, Option hoursPlanned = default) { @@ -75,8 +75,9 @@ public TaskToUserAssignment(UserPartial user, RecordingLockType recordingLock, b public Option HoursPlannedOption { get; private set; } /// - /// Gets or Sets HoursPlanned + /// Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. /// + /// Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. [JsonPropertyName("hours_planned")] public decimal? HoursPlanned { get { return this.HoursPlannedOption.Value; } set { this.HoursPlannedOption = new(value); } } diff --git a/sdk/dotnet/Timr.Api/Model/TaskToUserAssignmentUpsert.cs b/sdk/dotnet/Timr.Api/Model/TaskToUserAssignmentUpsert.cs index 608ccb6..5e2adf6 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskToUserAssignmentUpsert.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskToUserAssignmentUpsert.cs @@ -33,8 +33,8 @@ public partial class TaskToUserAssignmentUpsert : IValidatableObject /// /// Initializes a new instance of the class. /// - /// hoursPlanned - /// recordingLock + /// Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. + /// Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. [JsonConstructor] public TaskToUserAssignmentUpsert(Option hoursPlanned = default, Option recordingLock = default) { @@ -53,8 +53,9 @@ public TaskToUserAssignmentUpsert(Option hoursPlanned = default, Optio public Option RecordingLockOption { get; private set; } /// - /// Gets or Sets RecordingLock + /// Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. /// + /// Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. [JsonPropertyName("recording_lock")] public RecordingLockType? RecordingLock { get { return this.RecordingLockOption.Value; } set { this.RecordingLockOption = new(value); } } @@ -66,8 +67,9 @@ public TaskToUserAssignmentUpsert(Option hoursPlanned = default, Optio public Option HoursPlannedOption { get; private set; } /// - /// Gets or Sets HoursPlanned + /// Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. /// + /// Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. [JsonPropertyName("hours_planned")] public decimal? HoursPlanned { get { return this.HoursPlannedOption.Value; } set { this.HoursPlannedOption = new(value); } } diff --git a/sdk/dotnet/Timr.Api/Model/TaskUpdate.cs b/sdk/dotnet/Timr.Api/Model/TaskUpdate.cs index e79c19b..938487e 100644 --- a/sdk/dotnet/Timr.Api/Model/TaskUpdate.cs +++ b/sdk/dotnet/Timr.Api/Model/TaskUpdate.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// TaskUpdate + /// For budget writes, task-leader authorization is checked for this task, including overall task leadership. /// public partial class TaskUpdate : IValidatableObject { @@ -58,7 +58,7 @@ public partial class TaskUpdate : IValidatableObject /// you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field. /// you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field. /// metadata - /// this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + /// Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. [JsonConstructor] public TaskUpdate(Option name = default, Option parentTaskId = default, Option externalId = default, Option description = default, Option descriptionExternal = default, Option bookable = default, Option billable = default, Option projectTimeNotesRequired = default, Option startDate = default, Option endDate = default, Option lockDate = default, Option earliestStartTime = default, Option latestEndTime = default, Option budgetPlanningType = default, Option budgetHoursPlanned = default, Option budgetHourlyRate = default, Option budgetPlanned = default, Option budgetIncludeNonBillableProjectTimes = default, Option locationInherited = default, Option location = default, Option locationRestrictionRadiusMeters = default, Option customField1 = default, Option customField2 = default, Option customField3 = default, Option?> metadata = default, Option budgetUpdateProjectTimes = default) { @@ -447,9 +447,9 @@ public TaskUpdate(Option name = default, Option parentTaskId = public Option BudgetUpdateProjectTimesOption { get; private set; } /// - /// this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + /// Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. /// - /// this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + /// Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. [JsonPropertyName("budget_update_project_times")] public bool? BudgetUpdateProjectTimes { get { return this.BudgetUpdateProjectTimesOption.Value; } set { this.BudgetUpdateProjectTimesOption = new(value); } } diff --git a/sdk/dotnet/Timr.Api/Model/User.cs b/sdk/dotnet/Timr.Api/Model/User.cs index 4d67ca7..1abcd2c 100644 --- a/sdk/dotnet/Timr.Api/Model/User.cs +++ b/sdk/dotnet/Timr.Api/Model/User.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + /// A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. /// public partial class User : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/WorkingTimeDateSpan.cs b/sdk/dotnet/Timr.Api/Model/WorkingTimeDateSpan.cs index 37cdb37..ef2b035 100644 --- a/sdk/dotnet/Timr.Api/Model/WorkingTimeDateSpan.cs +++ b/sdk/dotnet/Timr.Api/Model/WorkingTimeDateSpan.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + /// A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. /// public partial class WorkingTimeDateSpan : IValidatableObject { diff --git a/sdk/dotnet/Timr.Api/Model/WorkingTimeType.cs b/sdk/dotnet/Timr.Api/Model/WorkingTimeType.cs index 8b8e9f5..a988d1e 100644 --- a/sdk/dotnet/Timr.Api/Model/WorkingTimeType.cs +++ b/sdk/dotnet/Timr.Api/Model/WorkingTimeType.cs @@ -26,7 +26,7 @@ namespace Timr.Api.Model { /// - /// A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + /// A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. /// public partial class WorkingTimeType : IValidatableObject { diff --git a/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskApi.java b/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskApi.java index 94216c3..10dff38 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskApi.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskApi.java @@ -59,6 +59,7 @@ public void setApiClient(ApiClient apiClient) { * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity @@ -99,6 +100,7 @@ private ResponseSpec createTaskRequestCreation(TaskCreate taskCreate) throws Res * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity @@ -115,6 +117,7 @@ public Task createTask(TaskCreate taskCreate) throws RestClientResponseException * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity @@ -131,6 +134,7 @@ public ResponseEntity createTaskWithHttpInfo(TaskCreate taskCreate) throws * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity diff --git a/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java b/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java index 94b33ad..3f7bff2 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java @@ -346,6 +346,7 @@ public ResponseSpec getTaskToUserAssignmentWithResponseSpec(String taskId, Strin *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. @@ -400,6 +401,7 @@ private ResponseSpec upsertTaskToUserAssignmentRequestCreation(String taskId, St *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. @@ -419,6 +421,7 @@ public TaskToUserAssignment upsertTaskToUserAssignment(String taskId, String use *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. @@ -438,6 +441,7 @@ public ResponseEntity upsertTaskToUserAssignmentWithHttpIn *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java b/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java index df1fa02..bb43ca8 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java @@ -38,7 +38,7 @@ import com.fasterxml.jackson.annotation.*; /** - * Accounts + * Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. */ @JsonPropertyOrder({ Accounts.JSON_PROPERTY_LAST_BALANCE_DATE, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/Task.java b/sdk/java-restclient/src/main/java/com/timr/api/models/Task.java index 140eb2e..38d0f15 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/Task.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/Task.java @@ -38,7 +38,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. */ @JsonPropertyOrder({ Task.JSON_PROPERTY_ID, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskBase.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskBase.java index 10b2b3e..735268f 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskBase.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskBase.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskBase + * Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. */ @JsonPropertyOrder({ TaskBase.JSON_PROPERTY_NAME, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskCreate.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskCreate.java index 4400799..3bde2c4 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskCreate.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskCreate.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskCreate + * For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. */ @JsonPropertyOrder({ TaskCreate.JSON_PROPERTY_NAME, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskReduced.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskReduced.java index b7d8fa4..402beff 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskReduced.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskReduced.java @@ -35,7 +35,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskReduced + * A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. */ @JsonPropertyOrder({ TaskReduced.JSON_PROPERTY_ID, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignment.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignment.java index 096a737..2fa2452 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignment.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignment.java @@ -96,7 +96,7 @@ public TaskToUserAssignment hoursPlanned(@Nullable BigDecimal hoursPlanned) { } /** - * Get hoursPlanned + * Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. * @return hoursPlanned */ diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java index 5d5a51d..5621882 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java @@ -59,7 +59,7 @@ public TaskToUserAssignmentUpsert hoursPlanned(@Nullable BigDecimal hoursPlanned } /** - * Get hoursPlanned + * Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. * @return hoursPlanned */ @@ -83,7 +83,7 @@ public TaskToUserAssignmentUpsert recordingLock(@Nullable RecordingLockType reco } /** - * Get recordingLock + * Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. * @return recordingLock */ diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskUpdate.java b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskUpdate.java index c6e3634..35eb4d5 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/TaskUpdate.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/TaskUpdate.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskUpdate + * For budget writes, task-leader authorization is checked for this task, including overall task leadership. */ @JsonPropertyOrder({ TaskUpdate.JSON_PROPERTY_NAME, @@ -795,7 +795,7 @@ public TaskUpdate budgetUpdateProjectTimes(@Nullable Boolean budgetUpdateProject } /** - * this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + * Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. * @return budgetUpdateProjectTimes */ diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/User.java b/sdk/java-restclient/src/main/java/com/timr/api/models/User.java index 9d9b236..0c6b068 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/User.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/User.java @@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. */ @JsonPropertyOrder({ User.JSON_PROPERTY_ID, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java b/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java index 15ebcea..66beaab 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. */ @JsonPropertyOrder({ WorkingTimeDateSpan.JSON_PROPERTY_ID, diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeType.java b/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeType.java index 745d014..02914c6 100644 --- a/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeType.java +++ b/sdk/java-restclient/src/main/java/com/timr/api/models/WorkingTimeType.java @@ -31,7 +31,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. */ @JsonPropertyOrder({ WorkingTimeType.JSON_PROPERTY_ID, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskApi.java b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskApi.java index 081d15f..87d24fa 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskApi.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskApi.java @@ -53,6 +53,7 @@ public TaskApi(ApiClient apiClient) { * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity (required) @@ -68,6 +69,7 @@ public Task createTask(@jakarta.annotation.Nonnull TaskCreate taskCreate) throws * Creates a Task from the data in the request body. *

201 - The created Task. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskCreate Project Time entity (required) diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java index d674180..4a3a943 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TaskToUserAssignmentApi.java @@ -241,6 +241,7 @@ public ResponseEntity getTaskToUserAssignmentWithHttpInfo( *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. (required) @@ -259,6 +260,7 @@ public TaskToUserAssignment upsertTaskToUserAssignment(@jakarta.annotation.Nonnu *

200 - The updated Task to User Assignment. *

201 - The created Task to User Assignment. *

400 - Bad Request + *

403 - Forbidden *

409 - Conflict *

422 - Unprocessable Content * @param taskId ID of the Task. (required) diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java index a012e0d..0757fe3 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * Accounts + * Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. */ @JsonPropertyOrder({ Accounts.JSON_PROPERTY_LAST_BALANCE_DATE, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Task.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Task.java index 6c67190..7280e87 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Task.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Task.java @@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. */ @JsonPropertyOrder({ Task.JSON_PROPERTY_ID, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskBase.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskBase.java index d2047b4..1d7d0e7 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskBase.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskBase.java @@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskBase + * Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. */ @JsonPropertyOrder({ TaskBase.JSON_PROPERTY_NAME, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskCreate.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskCreate.java index 90b4bc2..7843eb9 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskCreate.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskCreate.java @@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskCreate + * For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. */ @JsonPropertyOrder({ TaskCreate.JSON_PROPERTY_NAME, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskReduced.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskReduced.java index 7a67b85..4a00e80 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskReduced.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskReduced.java @@ -34,7 +34,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskReduced + * A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. */ @JsonPropertyOrder({ TaskReduced.JSON_PROPERTY_ID, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignment.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignment.java index e6c7c4c..ea53661 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignment.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignment.java @@ -95,7 +95,7 @@ public TaskToUserAssignment hoursPlanned(@jakarta.annotation.Nullable BigDecimal } /** - * Get hoursPlanned + * Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. * @return hoursPlanned */ @jakarta.annotation.Nullable diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java index 0cb97a2..ceadc1b 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskToUserAssignmentUpsert.java @@ -58,7 +58,7 @@ public TaskToUserAssignmentUpsert hoursPlanned(@jakarta.annotation.Nullable BigD } /** - * Get hoursPlanned + * Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. * @return hoursPlanned */ @jakarta.annotation.Nullable @@ -82,7 +82,7 @@ public TaskToUserAssignmentUpsert recordingLock(@jakarta.annotation.Nullable Rec } /** - * Get recordingLock + * Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. * @return recordingLock */ @jakarta.annotation.Nullable diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskUpdate.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskUpdate.java index 60dcfe0..4ac93f2 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskUpdate.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/TaskUpdate.java @@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*; /** - * TaskUpdate + * For budget writes, task-leader authorization is checked for this task, including overall task leadership. */ @JsonPropertyOrder({ TaskUpdate.JSON_PROPERTY_NAME, @@ -794,7 +794,7 @@ public TaskUpdate budgetUpdateProjectTimes(@jakarta.annotation.Nullable Boolean } /** - * this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + * Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. * @return budgetUpdateProjectTimes */ @jakarta.annotation.Nullable diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/User.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/User.java index 0eb604a..8f8ae20 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/User.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/User.java @@ -35,7 +35,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. */ @JsonPropertyOrder({ User.JSON_PROPERTY_ID, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java index 84be959..993d235 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeDateSpan.java @@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. */ @JsonPropertyOrder({ WorkingTimeDateSpan.JSON_PROPERTY_ID, diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeType.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeType.java index 5212587..dae9784 100644 --- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeType.java +++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/WorkingTimeType.java @@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.*; /** - * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. */ @JsonPropertyOrder({ WorkingTimeType.JSON_PROPERTY_ID, diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt index be1cdd4..303b3fc 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt @@ -30,7 +30,7 @@ import com.timr.api.models.VacationAccount import com.google.gson.annotations.SerializedName /** - * + * Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. * * @param lastBalanceDate The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself. * @param timeAccount diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Task.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Task.kt index 3d578bb..bc3dc2a 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Task.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Task.kt @@ -30,7 +30,7 @@ import com.timr.api.models.TaskPartial import com.google.gson.annotations.SerializedName /** - * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. * * @param id Unique identifier. Treat it as an opaque string. * @param name diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskBase.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskBase.kt index dc80163..6a7b8e0 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskBase.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskBase.kt @@ -29,7 +29,7 @@ import com.timr.api.models.TaskLocation import com.google.gson.annotations.SerializedName /** - * + * Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. * * @param name * @param parentTaskId returns the id of the immediate parent task if the task has one. Use this id when creating or a updating a task in order to locate it at the right place in your task tree. diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskCreate.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskCreate.kt index 042480c..84e4bdc 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskCreate.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskCreate.kt @@ -29,7 +29,7 @@ import com.timr.api.models.TaskLocation import com.google.gson.annotations.SerializedName /** - * + * For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. * * @param name * @param bookable when a task is not bookable, no project times can be booked on it. You need to define child tasks, to book on tasks related to this task. diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskReduced.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskReduced.kt index f6d92d4..f5c9706 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskReduced.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskReduced.kt @@ -30,7 +30,7 @@ import com.timr.api.models.TaskPartial import com.google.gson.annotations.SerializedName /** - * + * A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. * * @param id Unique identifier. Treat it as an opaque string. * @param name diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignment.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignment.kt index 4a8c7f2..f862388 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignment.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignment.kt @@ -34,7 +34,7 @@ import com.google.gson.annotations.SerializedName * @param user * @param recordingLock * @param automaticallyAssigned - * @param hoursPlanned + * @param hoursPlanned Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. */ @@ -49,6 +49,7 @@ data class TaskToUserAssignment ( @SerializedName("automatically_assigned") val automaticallyAssigned: kotlin.Boolean, + /* Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. */ @SerializedName("hours_planned") val hoursPlanned: java.math.BigDecimal? = null diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignmentUpsert.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignmentUpsert.kt index 0516bed..93f7503 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignmentUpsert.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskToUserAssignmentUpsert.kt @@ -30,16 +30,18 @@ import com.google.gson.annotations.SerializedName /** * * - * @param hoursPlanned - * @param recordingLock + * @param hoursPlanned Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. + * @param recordingLock Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. */ data class TaskToUserAssignmentUpsert ( + /* Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. */ @SerializedName("hours_planned") val hoursPlanned: java.math.BigDecimal? = null, + /* Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. */ @SerializedName("recording_lock") val recordingLock: RecordingLockType? = null diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskUpdate.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskUpdate.kt index 2c4e4ba..11585f3 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskUpdate.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/TaskUpdate.kt @@ -29,7 +29,7 @@ import com.timr.api.models.TaskLocation import com.google.gson.annotations.SerializedName /** - * + * For budget writes, task-leader authorization is checked for this task, including overall task leadership. * * @param name * @param parentTaskId returns the id of the immediate parent task if the task has one. Use this id when creating or a updating a task in order to locate it at the right place in your task tree. @@ -56,7 +56,7 @@ import com.google.gson.annotations.SerializedName * @param customField2 you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field. * @param customField3 you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field. * @param metadata - * @param budgetUpdateProjectTimes this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. + * @param budgetUpdateProjectTimes Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. */ @@ -156,7 +156,7 @@ data class TaskUpdate ( @SerializedName("metadata") val metadata: kotlin.collections.Map? = null, - /* this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. */ + /* Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. */ @SerializedName("budget_update_project_times") val budgetUpdateProjectTimes: kotlin.Boolean? = null diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/User.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/User.kt index c34018c..343ad6f 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/User.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/User.kt @@ -29,7 +29,7 @@ import com.timr.api.models.WorkScheduleModelPartial import com.google.gson.annotations.SerializedName /** - * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. * * @param id Unique identifier. Treat it as an opaque string. * @param firstname diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeDateSpan.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeDateSpan.kt index 76c68b2..577a993 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeDateSpan.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeDateSpan.kt @@ -29,7 +29,7 @@ import com.timr.api.models.WorkingTimeTypePartial import com.google.gson.annotations.SerializedName /** - * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. * * @param id Unique identifier. Treat it as an opaque string. * @param start RFC 3339 date (ISO-8601) diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeType.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeType.kt index 12aeb26..0236d37 100644 --- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeType.kt +++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/WorkingTimeType.kt @@ -31,7 +31,7 @@ import com.timr.api.models.WorkingTimeTypeSubCategory import com.google.gson.annotations.SerializedName /** - * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. * * @param id Unique identifier. Treat it as an opaque string. * @param name diff --git a/sdk/python/timr_api/api/task_api.py b/sdk/python/timr_api/api/task_api.py index 708aa51..a1d85fe 100644 --- a/sdk/python/timr_api/api/task_api.py +++ b/sdk/python/timr_api/api/task_api.py @@ -98,6 +98,7 @@ def create_task( _response_types_map: Dict[str, Optional[str]] = { '201': "Task", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } @@ -168,6 +169,7 @@ def create_task_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '201': "Task", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } @@ -238,6 +240,7 @@ def create_task_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '201': "Task", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } diff --git a/sdk/python/timr_api/api/task_to_user_assignment_api.py b/sdk/python/timr_api/api/task_to_user_assignment_api.py index a1f9190..d7dfdd1 100644 --- a/sdk/python/timr_api/api/task_to_user_assignment_api.py +++ b/sdk/python/timr_api/api/task_to_user_assignment_api.py @@ -1012,6 +1012,7 @@ def upsert_task_to_user_assignment( '200': "TaskToUserAssignment", '201': "TaskToUserAssignment", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } @@ -1091,6 +1092,7 @@ def upsert_task_to_user_assignment_with_http_info( '200': "TaskToUserAssignment", '201': "TaskToUserAssignment", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } @@ -1170,6 +1172,7 @@ def upsert_task_to_user_assignment_without_preload_content( '200': "TaskToUserAssignment", '201': "TaskToUserAssignment", '400': "Error", + '403': "Error", '409': "Error", '422': "Error", } diff --git a/sdk/python/timr_api/configuration.py b/sdk/python/timr_api/configuration.py index 2df13cd..6fb97d3 100644 --- a/sdk/python/timr_api/configuration.py +++ b/sdk/python/timr_api/configuration.py @@ -569,7 +569,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ + "Version of the API: 1.2.1\n"\ "SDK Package Version: 2.1.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/sdk/python/timr_api/models/accounts.py b/sdk/python/timr_api/models/accounts.py index d3b7434..4a61902 100644 --- a/sdk/python/timr_api/models/accounts.py +++ b/sdk/python/timr_api/models/accounts.py @@ -29,7 +29,7 @@ class Accounts(BaseModel): """ - Accounts + Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. """ # noqa: E501 last_balance_date: Optional[date] = Field(description="The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.") time_account: Optional[TimeAccount] = None diff --git a/sdk/python/timr_api/models/task.py b/sdk/python/timr_api/models/task.py index 4d9f116..c0f1351 100644 --- a/sdk/python/timr_api/models/task.py +++ b/sdk/python/timr_api/models/task.py @@ -29,7 +29,7 @@ class Task(BaseModel): """ - A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. """ # noqa: E501 id: StrictStr = Field(description="Unique identifier. Treat it as an opaque string.") name: StrictStr diff --git a/sdk/python/timr_api/models/task_base.py b/sdk/python/timr_api/models/task_base.py index ef8a93c..6f1142d 100644 --- a/sdk/python/timr_api/models/task_base.py +++ b/sdk/python/timr_api/models/task_base.py @@ -28,7 +28,7 @@ class TaskBase(BaseModel): """ - TaskBase + Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. """ # noqa: E501 name: Optional[StrictStr] = None parent_task_id: Optional[StrictStr] = Field(default=None, description="returns the id of the immediate parent task if the task has one. Use this id when creating or a updating a task in order to locate it at the right place in your task tree.") diff --git a/sdk/python/timr_api/models/task_create.py b/sdk/python/timr_api/models/task_create.py index d36e9b9..fec24e3 100644 --- a/sdk/python/timr_api/models/task_create.py +++ b/sdk/python/timr_api/models/task_create.py @@ -28,7 +28,7 @@ class TaskCreate(BaseModel): """ - TaskCreate + For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. """ # noqa: E501 name: StrictStr parent_task_id: Optional[StrictStr] = Field(default=None, description="returns the id of the immediate parent task if the task has one. Use this id when creating or a updating a task in order to locate it at the right place in your task tree.") diff --git a/sdk/python/timr_api/models/task_reduced.py b/sdk/python/timr_api/models/task_reduced.py index 31adb03..9be8400 100644 --- a/sdk/python/timr_api/models/task_reduced.py +++ b/sdk/python/timr_api/models/task_reduced.py @@ -29,7 +29,7 @@ class TaskReduced(BaseModel): """ - TaskReduced + A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. """ # noqa: E501 id: StrictStr = Field(description="Unique identifier. Treat it as an opaque string.") name: StrictStr diff --git a/sdk/python/timr_api/models/task_to_user_assignment.py b/sdk/python/timr_api/models/task_to_user_assignment.py index ad537ed..8e4cadd 100644 --- a/sdk/python/timr_api/models/task_to_user_assignment.py +++ b/sdk/python/timr_api/models/task_to_user_assignment.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from timr_api.models.recording_lock_type import RecordingLockType from timr_api.models.user_partial import UserPartial @@ -30,7 +30,7 @@ class TaskToUserAssignment(BaseModel): TaskToUserAssignment """ # noqa: E501 user: UserPartial - hours_planned: Optional[Union[StrictFloat, StrictInt]] = None + hours_planned: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured.") recording_lock: RecordingLockType automatically_assigned: StrictBool __properties: ClassVar[List[str]] = ["user", "hours_planned", "recording_lock", "automatically_assigned"] diff --git a/sdk/python/timr_api/models/task_to_user_assignment_upsert.py b/sdk/python/timr_api/models/task_to_user_assignment_upsert.py index 6221840..5d186c8 100644 --- a/sdk/python/timr_api/models/task_to_user_assignment_upsert.py +++ b/sdk/python/timr_api/models/task_to_user_assignment_upsert.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from timr_api.models.recording_lock_type import RecordingLockType from typing import Optional, Set @@ -28,8 +28,8 @@ class TaskToUserAssignmentUpsert(BaseModel): """ TaskToUserAssignmentUpsert """ # noqa: E501 - hours_planned: Optional[Union[StrictFloat, StrictInt]] = None - recording_lock: Optional[RecordingLockType] = None + hours_planned: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged.") + recording_lock: Optional[RecordingLockType] = Field(default=None, description="Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged.") __properties: ClassVar[List[str]] = ["hours_planned", "recording_lock"] model_config = ConfigDict( diff --git a/sdk/python/timr_api/models/task_update.py b/sdk/python/timr_api/models/task_update.py index f7fa664..c983297 100644 --- a/sdk/python/timr_api/models/task_update.py +++ b/sdk/python/timr_api/models/task_update.py @@ -28,7 +28,7 @@ class TaskUpdate(BaseModel): """ - TaskUpdate + For budget writes, task-leader authorization is checked for this task, including overall task leadership. """ # noqa: E501 name: Optional[StrictStr] = None parent_task_id: Optional[StrictStr] = Field(default=None, description="returns the id of the immediate parent task if the task has one. Use this id when creating or a updating a task in order to locate it at the right place in your task tree.") @@ -55,7 +55,7 @@ class TaskUpdate(BaseModel): custom_field_2: Optional[StrictStr] = Field(default=None, description="you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field.") custom_field_3: Optional[StrictStr] = Field(default=None, description="you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field.") metadata: Optional[Dict[str, Any]] = None - budget_update_project_times: Optional[StrictBool] = Field(default=None, description="this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. ") + budget_update_project_times: Optional[StrictBool] = Field(default=None, description="Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false.") __properties: ClassVar[List[str]] = ["name", "parent_task_id", "external_id", "description", "description_external", "bookable", "billable", "project_time_notes_required", "start_date", "end_date", "lock_date", "earliest_start_time", "latest_end_time", "budget_planning_type", "budget_hours_planned", "budget_hourly_rate", "budget_planned", "budget_include_non_billable_project_times", "location_inherited", "location", "location_restriction_radius_meters", "custom_field_1", "custom_field_2", "custom_field_3", "metadata", "budget_update_project_times"] model_config = ConfigDict( diff --git a/sdk/python/timr_api/models/user.py b/sdk/python/timr_api/models/user.py index 9fa1776..99e5953 100644 --- a/sdk/python/timr_api/models/user.py +++ b/sdk/python/timr_api/models/user.py @@ -29,7 +29,7 @@ class User(BaseModel): """ - A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. """ # noqa: E501 id: StrictStr = Field(description="Unique identifier. Treat it as an opaque string.") firstname: Optional[StrictStr] diff --git a/sdk/python/timr_api/models/working_time_date_span.py b/sdk/python/timr_api/models/working_time_date_span.py index 0a9d1e3..a60fd21 100644 --- a/sdk/python/timr_api/models/working_time_date_span.py +++ b/sdk/python/timr_api/models/working_time_date_span.py @@ -28,7 +28,7 @@ class WorkingTimeDateSpan(BaseModel): """ - A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. """ # noqa: E501 id: StrictStr = Field(description="Unique identifier. Treat it as an opaque string.") start: date = Field(description="RFC 3339 date (ISO-8601)") diff --git a/sdk/python/timr_api/models/working_time_type.py b/sdk/python/timr_api/models/working_time_type.py index 6359900..be848cf 100644 --- a/sdk/python/timr_api/models/working_time_type.py +++ b/sdk/python/timr_api/models/working_time_type.py @@ -29,7 +29,7 @@ class WorkingTimeType(BaseModel): """ - A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. """ # noqa: E501 id: StrictStr = Field(description="Unique identifier. Treat it as an opaque string.") name: StrictStr diff --git a/sdk/swift/TimrApi/Models/Accounts.swift b/sdk/swift/TimrApi/Models/Accounts.swift index 154db8f..05af997 100644 --- a/sdk/swift/TimrApi/Models/Accounts.swift +++ b/sdk/swift/TimrApi/Models/Accounts.swift @@ -10,6 +10,7 @@ import Foundation import AnyCodable #endif +/** Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. */ public struct Accounts: Codable, JSONEncodable, Hashable { /** The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself. */ diff --git a/sdk/swift/TimrApi/Models/Task.swift b/sdk/swift/TimrApi/Models/Task.swift index 15e2e4b..eeedc5d 100644 --- a/sdk/swift/TimrApi/Models/Task.swift +++ b/sdk/swift/TimrApi/Models/Task.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. */ +/** A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. */ public struct Task: Codable, JSONEncodable, Hashable { /** Unique identifier. Treat it as an opaque string. */ diff --git a/sdk/swift/TimrApi/Models/TaskBase.swift b/sdk/swift/TimrApi/Models/TaskBase.swift index 671aac2..e30bea1 100644 --- a/sdk/swift/TimrApi/Models/TaskBase.swift +++ b/sdk/swift/TimrApi/Models/TaskBase.swift @@ -10,6 +10,7 @@ import Foundation import AnyCodable #endif +/** Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. */ public struct TaskBase: Codable, JSONEncodable, Hashable { public var name: String? diff --git a/sdk/swift/TimrApi/Models/TaskCreate.swift b/sdk/swift/TimrApi/Models/TaskCreate.swift index f494b81..f894a1f 100644 --- a/sdk/swift/TimrApi/Models/TaskCreate.swift +++ b/sdk/swift/TimrApi/Models/TaskCreate.swift @@ -10,6 +10,7 @@ import Foundation import AnyCodable #endif +/** For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. */ public struct TaskCreate: Codable, JSONEncodable, Hashable { public var name: String diff --git a/sdk/swift/TimrApi/Models/TaskReduced.swift b/sdk/swift/TimrApi/Models/TaskReduced.swift index e30615e..0822828 100644 --- a/sdk/swift/TimrApi/Models/TaskReduced.swift +++ b/sdk/swift/TimrApi/Models/TaskReduced.swift @@ -10,6 +10,7 @@ import Foundation import AnyCodable #endif +/** A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. */ public struct TaskReduced: Codable, JSONEncodable, Hashable { /** Unique identifier. Treat it as an opaque string. */ diff --git a/sdk/swift/TimrApi/Models/TaskToUserAssignment.swift b/sdk/swift/TimrApi/Models/TaskToUserAssignment.swift index 0c45052..7e87523 100644 --- a/sdk/swift/TimrApi/Models/TaskToUserAssignment.swift +++ b/sdk/swift/TimrApi/Models/TaskToUserAssignment.swift @@ -13,6 +13,7 @@ import AnyCodable public struct TaskToUserAssignment: Codable, JSONEncodable, Hashable { public var user: UserPartial + /** Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. */ public var hoursPlanned: Double? public var recordingLock: RecordingLockType public var automaticallyAssigned: Bool diff --git a/sdk/swift/TimrApi/Models/TaskToUserAssignmentUpsert.swift b/sdk/swift/TimrApi/Models/TaskToUserAssignmentUpsert.swift index 101c40d..69ec6cc 100644 --- a/sdk/swift/TimrApi/Models/TaskToUserAssignmentUpsert.swift +++ b/sdk/swift/TimrApi/Models/TaskToUserAssignmentUpsert.swift @@ -12,7 +12,9 @@ import AnyCodable public struct TaskToUserAssignmentUpsert: Codable, JSONEncodable, Hashable { + /** Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. */ public var hoursPlanned: Double? + /** Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. */ public var recordingLock: RecordingLockType? public init(hoursPlanned: Double? = nil, recordingLock: RecordingLockType? = nil) { diff --git a/sdk/swift/TimrApi/Models/TaskUpdate.swift b/sdk/swift/TimrApi/Models/TaskUpdate.swift index 24adff7..d0721fe 100644 --- a/sdk/swift/TimrApi/Models/TaskUpdate.swift +++ b/sdk/swift/TimrApi/Models/TaskUpdate.swift @@ -10,6 +10,7 @@ import Foundation import AnyCodable #endif +/** For budget writes, task-leader authorization is checked for this task, including overall task leadership. */ public struct TaskUpdate: Codable, JSONEncodable, Hashable { public var name: String? @@ -56,7 +57,7 @@ public struct TaskUpdate: Codable, JSONEncodable, Hashable { /** you can configure custom fields for tasks in the settings of timr under Administration/Settings/Tasks. To add a new custom field, simply choose a name for the field. */ public var customField3: String? public var metadata: [String: AnyCodable]? - /** this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. */ + /** Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. */ public var budgetUpdateProjectTimes: Bool? public init(name: String? = nil, parentTaskId: String? = nil, externalId: String? = nil, description: String? = nil, descriptionExternal: String? = nil, bookable: Bool? = nil, billable: Bool? = nil, projectTimeNotesRequired: Bool? = nil, startDate: Date? = nil, endDate: Date? = nil, lockDate: Date? = nil, earliestStartTime: String? = nil, latestEndTime: String? = nil, budgetPlanningType: BudgetPlanningTypeRequest? = nil, budgetHoursPlanned: Double? = nil, budgetHourlyRate: Double? = nil, budgetPlanned: Double? = nil, budgetIncludeNonBillableProjectTimes: Bool? = nil, locationInherited: Bool? = nil, location: TaskLocation? = nil, locationRestrictionRadiusMeters: Int? = nil, customField1: String? = nil, customField2: String? = nil, customField3: String? = nil, metadata: [String: AnyCodable]? = nil, budgetUpdateProjectTimes: Bool? = nil) { diff --git a/sdk/swift/TimrApi/Models/User.swift b/sdk/swift/TimrApi/Models/User.swift index 9fe1d6d..db18e5d 100644 --- a/sdk/swift/TimrApi/Models/User.swift +++ b/sdk/swift/TimrApi/Models/User.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. */ +/** A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. */ public struct User: Codable, JSONEncodable, Hashable { public static let emailRule = StringRule(minLength: 1, maxLength: nil, pattern: nil) diff --git a/sdk/swift/TimrApi/Models/WorkingTimeDateSpan.swift b/sdk/swift/TimrApi/Models/WorkingTimeDateSpan.swift index 9466794..4b8cf68 100644 --- a/sdk/swift/TimrApi/Models/WorkingTimeDateSpan.swift +++ b/sdk/swift/TimrApi/Models/WorkingTimeDateSpan.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. */ +/** A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. */ public struct WorkingTimeDateSpan: Codable, JSONEncodable, Hashable { /** Unique identifier. Treat it as an opaque string. */ diff --git a/sdk/swift/TimrApi/Models/WorkingTimeType.swift b/sdk/swift/TimrApi/Models/WorkingTimeType.swift index 820bd25..58ff7f9 100644 --- a/sdk/swift/TimrApi/Models/WorkingTimeType.swift +++ b/sdk/swift/TimrApi/Models/WorkingTimeType.swift @@ -10,7 +10,7 @@ import Foundation import AnyCodable #endif -/** A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. */ +/** A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. */ public struct WorkingTimeType: Codable, JSONEncodable, Hashable { /** Unique identifier. Treat it as an opaque string. */ diff --git a/sdk/typescript-fetch/src/models/Accounts.ts b/sdk/typescript-fetch/src/models/Accounts.ts index 0053119..c6d8537 100644 --- a/sdk/typescript-fetch/src/models/Accounts.ts +++ b/sdk/typescript-fetch/src/models/Accounts.ts @@ -35,7 +35,7 @@ import { } from './OvertimeSurchargeAccounts.js'; /** - * + * Account balances for a user. `time_account` is omitted for trust-based working time; `overtime_surcharge_accounts` requires the Overtime Allowance feature; `vacation_account` is omitted when the balance has no vacation account. Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. * @export * @interface Accounts */ diff --git a/sdk/typescript-fetch/src/models/Task.ts b/sdk/typescript-fetch/src/models/Task.ts index 37db778..42ba6b7 100644 --- a/sdk/typescript-fetch/src/models/Task.ts +++ b/sdk/typescript-fetch/src/models/Task.ts @@ -35,8 +35,7 @@ import { } from './BudgetPlanningType.js'; /** - * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. - * + * A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task-leader access also requires Corporate Features. Otherwise these fields are omitted without an error; omission does not mean no budget is configured. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. `location` requires Task Locations, or Geofence when budget details are visible. * @export * @interface Task */ diff --git a/sdk/typescript-fetch/src/models/TaskBase.ts b/sdk/typescript-fetch/src/models/TaskBase.ts index 722eac0..2ed1ab6 100644 --- a/sdk/typescript-fetch/src/models/TaskBase.ts +++ b/sdk/typescript-fetch/src/models/TaskBase.ts @@ -28,7 +28,7 @@ import { } from './TaskLocation.js'; /** - * + * Common task fields. Task administration requires the Administrator or Task Manager role. Budget fields additionally require the Budgets feature and administrator or task-leader authorization; task leaders also need Corporate Features. Supplying a budget field without this authorization, including false or null for nullable fields, rejects the entire request with HTTP 403. * @export * @interface TaskBase */ diff --git a/sdk/typescript-fetch/src/models/TaskCreate.ts b/sdk/typescript-fetch/src/models/TaskCreate.ts index 54446d5..b1c83ba 100644 --- a/sdk/typescript-fetch/src/models/TaskCreate.ts +++ b/sdk/typescript-fetch/src/models/TaskCreate.ts @@ -28,7 +28,7 @@ import { } from './TaskLocation.js'; /** - * + * For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. Budget visibility in the response is checked separately against the created task. * @export * @interface TaskCreate */ diff --git a/sdk/typescript-fetch/src/models/TaskReduced.ts b/sdk/typescript-fetch/src/models/TaskReduced.ts index 549b2b4..580c1e1 100644 --- a/sdk/typescript-fetch/src/models/TaskReduced.ts +++ b/sdk/typescript-fetch/src/models/TaskReduced.ts @@ -35,7 +35,7 @@ import { } from './BudgetPlanningType.js'; /** - * + * A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and administrator or task-leader access to the task are available; task leaders also need Corporate Features. `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. * @export * @interface TaskReduced */ diff --git a/sdk/typescript-fetch/src/models/TaskToUserAssignment.ts b/sdk/typescript-fetch/src/models/TaskToUserAssignment.ts index 9bbbe44..1464b5e 100644 --- a/sdk/typescript-fetch/src/models/TaskToUserAssignment.ts +++ b/sdk/typescript-fetch/src/models/TaskToUserAssignment.ts @@ -38,7 +38,7 @@ export interface TaskToUserAssignment { */ user: UserPartial; /** - * + * Omitted without an error or warning unless the Budgets feature and administrator or task-leader access to this task are available. Task-leader access also requires Corporate Features. An omitted field does not mean no budget is configured. */ hoursPlanned?: number | null; /** diff --git a/sdk/typescript-fetch/src/models/TaskToUserAssignmentUpsert.ts b/sdk/typescript-fetch/src/models/TaskToUserAssignmentUpsert.ts index 5d324f2..88bcf27 100644 --- a/sdk/typescript-fetch/src/models/TaskToUserAssignmentUpsert.ts +++ b/sdk/typescript-fetch/src/models/TaskToUserAssignmentUpsert.ts @@ -27,11 +27,11 @@ import { */ export interface TaskToUserAssignmentUpsert { /** - * + * Requires the Budgets feature and administrator or task-leader access to this task, including overall task leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. */ hoursPlanned?: number | null; /** - * + * Supplying a value other than `recordable`, including null, requires administrator or task-leader access to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. Omitted or null values leave the recording lock unchanged. */ recordingLock?: RecordingLockType | null; } diff --git a/sdk/typescript-fetch/src/models/TaskUpdate.ts b/sdk/typescript-fetch/src/models/TaskUpdate.ts index eea0eaf..9109a6f 100644 --- a/sdk/typescript-fetch/src/models/TaskUpdate.ts +++ b/sdk/typescript-fetch/src/models/TaskUpdate.ts @@ -28,7 +28,7 @@ import { } from './TaskLocation.js'; /** - * + * For budget writes, task-leader authorization is checked for this task, including overall task leadership. * @export * @interface TaskUpdate */ @@ -153,8 +153,7 @@ export interface TaskUpdate { */ metadata?: { [key: string]: any; } | null; /** - * this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. If budget_planning type or budget_hourly_rate are set, this property must also be set. Based on this, the budgets of the existing project times are then recalculated or not. - * + * Whether to recalculate existing project times after a budget change. Required when budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. */ budgetUpdateProjectTimes?: boolean; } diff --git a/sdk/typescript-fetch/src/models/User.ts b/sdk/typescript-fetch/src/models/User.ts index 0c14880..344060f 100644 --- a/sdk/typescript-fetch/src/models/User.ts +++ b/sdk/typescript-fetch/src/models/User.ts @@ -28,8 +28,7 @@ import { } from './HolidayCalendarPartial.js'; /** - * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. - * + * A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. Omission does not mean the corresponding value is not configured. * @export * @interface User */ diff --git a/sdk/typescript-fetch/src/models/WorkingTimeDateSpan.ts b/sdk/typescript-fetch/src/models/WorkingTimeDateSpan.ts index 85d09cd..eae69ae 100644 --- a/sdk/typescript-fetch/src/models/WorkingTimeDateSpan.ts +++ b/sdk/typescript-fetch/src/models/WorkingTimeDateSpan.ts @@ -28,8 +28,7 @@ import { } from './UserPartial.js'; /** - * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. - * + * A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. * @export * @interface WorkingTimeDateSpan */ diff --git a/sdk/typescript-fetch/src/models/WorkingTimeType.ts b/sdk/typescript-fetch/src/models/WorkingTimeType.ts index 2caadc1..36b0cc0 100644 --- a/sdk/typescript-fetch/src/models/WorkingTimeType.ts +++ b/sdk/typescript-fetch/src/models/WorkingTimeType.ts @@ -42,8 +42,7 @@ import { } from './WorkingTimeTypeSubCategory.js'; /** - * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. - * + * A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. * @export * @interface WorkingTimeType */ diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 3939b10..e0e8159 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -10,7 +10,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 1.2.0 + version: 1.2.1 servers: - url: https://api.timr.com/v1/ @@ -2207,6 +2207,8 @@ paths: $ref: '#/components/schemas/Task' "400": $ref: '#/components/responses/BadRequest' + "403": + $ref: '#/components/responses/Forbidden' "409": $ref: '#/components/responses/Conflict' "422": @@ -2449,6 +2451,8 @@ paths: $ref: '#/components/schemas/TaskToUserAssignment' "400": $ref: '#/components/responses/BadRequest' + "403": + $ref: '#/components/responses/Forbidden' "409": $ref: '#/components/responses/Conflict' "422": @@ -4809,9 +4813,12 @@ components: - external_id User: - description: > + description: >- A user's identity (`firstname`, `lastname`, `email`), employment dates (`entry_date`, `resign_date`), and the assigned `work_schedule_model` and `holiday_calendar`. + `login`, `entry_date`, `resign_date` and `work_schedule_model` are omitted unless the caller is an administrator. + `holiday_calendar` is returned only to administrators, the user themselves or a group leader of that user. + Omission does not mean the corresponding value is not configured. allOf: - $ref: '#/components/schemas/UserPartial' - type: object @@ -5083,6 +5090,11 @@ components: - date Accounts: + description: >- + Account balances for a user. `time_account` is omitted for trust-based working time; + `overtime_surcharge_accounts` requires the Overtime Allowance feature; + `vacation_account` is omitted when the balance has no vacation account. + Omitted balances do not mean zero. When no balance exists for the requested day, the response can be empty. type: object properties: last_balance_date: @@ -5821,10 +5833,16 @@ components: - external_id Task: - description: > + description: >- A task, placed in the tree by `parent_task`, with the full path from the root in `breadcrumbs`. `bookable` and `billable` control recording and invoicing; `lock_date`, time windows and location constrain what may be recorded. + Budget fields (`budget_*`) require the Budgets feature and administrator or task-leader access to this task, + including overall task leaders. Task-leader access also requires Corporate Features. + Otherwise these fields are omitted without an error; omission does not mean no budget is configured. + `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; + `location_restriction_radius_meters` requires Geofence. These fields are otherwise omitted. + `location` requires Task Locations, or Geofence when budget details are visible. allOf: - $ref: '#/components/schemas/TaskPartial' - type: object @@ -5927,6 +5945,12 @@ components: - custom_field_3 TaskReduced: + description: >- + A task with recording-related details. `budget_planning_type` is omitted unless the Budgets feature and + administrator or task-leader access to the task are available; task leaders also need Corporate Features. + `lock_date` requires Task Locking; `earliest_start_time` and `latest_end_time` require Recording Restrictions; + `location` requires Task Locations; `location_restriction_radius_meters` requires Geofence. + Fields whose requirements are not met are omitted without an error; omission does not mean no value is configured. allOf: - $ref: '#/components/schemas/TaskPartial' - type: object @@ -6022,6 +6046,9 @@ components: - data TaskCreate: + description: >- + For budget writes, task-leader authorization is based on the Task Leader or Overall Task Leader role. + Budget visibility in the response is checked separately against the created task. allOf: - $ref: '#/components/schemas/TaskBase' - type: object @@ -6031,18 +6058,24 @@ components: - billable TaskUpdate: + description: >- + For budget writes, task-leader authorization is checked for this task, including overall task leadership. allOf: - $ref: '#/components/schemas/TaskBase' - type: object properties: budget_update_project_times: type: boolean - description: > - this property is used to decide whether existing project times that have been booked to this task should be updated with the changed budget. - If budget_planning type or budget_hourly_rate are set, this property must also be set. - Based on this, the budgets of the existing project times are then recalculated or not. + description: >- + Whether to recalculate existing project times after a budget change. Required when + budget_planning_type or budget_hourly_rate is supplied. The same budget permissions apply, including false. TaskBase: + description: >- + Common task fields. Task administration requires the Administrator or Task Manager role. + Budget fields additionally require the Budgets feature and administrator or task-leader authorization; + task leaders also need Corporate Features. Supplying a budget field without this authorization, + including false or null for nullable fields, rejects the entire request with HTTP 403. type: object properties: name: @@ -6222,6 +6255,10 @@ components: user: $ref: '#/components/schemas/UserPartial' hours_planned: + description: >- + Omitted without an error or warning unless the Budgets feature and administrator or task-leader access + to this task are available. Task-leader access also requires Corporate Features. + An omitted field does not mean no budget is configured. type: number nullable: true recording_lock: @@ -6249,9 +6286,17 @@ components: type: object properties: hours_planned: + description: >- + Requires the Budgets feature and administrator or task-leader access to this task, including overall task + leaders. Task leaders also need Corporate Features. Supplying this field without permission, including null + to clear it, rejects the entire assignment request with HTTP 403. Omit it to leave the budget unchanged. type: number nullable: true recording_lock: + description: >- + Supplying a value other than `recordable`, including null, requires administrator or task-leader access + to the task; otherwise the entire request is rejected with HTTP 403. Task leaders need Corporate Features. + Omitted or null values leave the recording lock unchanged. nullable: true allOf: - $ref: '#/components/schemas/RecordingLockType' @@ -7175,10 +7220,11 @@ components: WorkingTimeDateSpan: type: object - description: > + description: >- A span from `start` to `end` of a single `working_time_type`. Every working time derived for a covered day links back to it via `WorkingTime.working_time_date_span`. It can be created directly or become effective through an approved request. + `substitute` is omitted unless the Substitutes feature is available; omission does not mean no substitute is assigned. properties: id: description: Unique identifier. Treat it as an opaque string. @@ -7306,9 +7352,10 @@ components: - external_id WorkingTimeType: - description: > + description: >- A working time type. `category` and `sub_category` place it in the classification, `edit_unit` decides whether it is recorded by time or by day, and `requires_substitute` governs how it is recorded. + `requires_substitute` is omitted unless the Substitutes feature is available; omission does not mean false. type: object properties: id: