tuix-projects-service-client 0.0.113 → 0.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/apis/ClientApi.js CHANGED
@@ -187,17 +187,20 @@ class ClientApi extends runtime.BaseAPI {
187
187
  return await response.value();
188
188
  }
189
189
  /**
190
- * Creates request options for apiUpdateTimesheetEntries without sending the request
190
+ * Creates request options for apiUpdateTimesheetEntry without sending the request
191
191
  */
192
- async apiUpdateTimesheetEntriesRequestOpts(requestParameters) {
192
+ async apiUpdateTimesheetEntryRequestOpts(requestParameters) {
193
193
  if (requestParameters['projectId'] == null) {
194
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling apiUpdateTimesheetEntries().');
194
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling apiUpdateTimesheetEntry().');
195
195
  }
196
196
  if (requestParameters['timesheetId'] == null) {
197
- throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling apiUpdateTimesheetEntries().');
197
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling apiUpdateTimesheetEntry().');
198
+ }
199
+ if (requestParameters['entryId'] == null) {
200
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling apiUpdateTimesheetEntry().');
198
201
  }
199
202
  if (requestParameters['timesheetEntryUpdateDTO'] == null) {
200
- throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling apiUpdateTimesheetEntries().');
203
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling apiUpdateTimesheetEntry().');
201
204
  }
202
205
  const queryParameters = {};
203
206
  const headerParameters = {};
@@ -205,32 +208,33 @@ class ClientApi extends runtime.BaseAPI {
205
208
  if (this.configuration && this.configuration.apiKey) {
206
209
  headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // api_key authentication
207
210
  }
208
- let urlPath = `/api/projects/{projectId}/timesheets/{timesheetId}/entries`;
211
+ let urlPath = `/api/projects/{projectId}/timesheets/{timesheetId}/entries/{entryId}`;
209
212
  urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
210
213
  urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
214
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
211
215
  return {
212
216
  path: urlPath,
213
217
  method: 'PATCH',
214
218
  headers: headerParameters,
215
219
  query: queryParameters,
216
- body: requestParameters['timesheetEntryUpdateDTO'].map(TimesheetEntryUpdateDTO_1.TimesheetEntryUpdateDTOToJSON),
220
+ body: (0, TimesheetEntryUpdateDTO_1.TimesheetEntryUpdateDTOToJSON)(requestParameters['timesheetEntryUpdateDTO']),
217
221
  };
218
222
  }
219
223
  /**
220
- * Update one or more days of an employee timesheet. Only possible while the timesheet is OPEN. Internal endpoint.
221
- * Update timesheet entries
224
+ * Update or change the hours of a day in an employee timesheet. Only possible while the timesheet is OPEN. Internal endpoint.
225
+ * Update a timesheet entry
222
226
  */
223
- async apiUpdateTimesheetEntriesRaw(requestParameters, initOverrides) {
224
- const requestOptions = await this.apiUpdateTimesheetEntriesRequestOpts(requestParameters);
227
+ async apiUpdateTimesheetEntryRaw(requestParameters, initOverrides) {
228
+ const requestOptions = await this.apiUpdateTimesheetEntryRequestOpts(requestParameters);
225
229
  const response = await this.request(requestOptions, initOverrides);
226
230
  return new runtime.VoidApiResponse(response);
227
231
  }
228
232
  /**
229
- * Update one or more days of an employee timesheet. Only possible while the timesheet is OPEN. Internal endpoint.
230
- * Update timesheet entries
233
+ * Update or change the hours of a day in an employee timesheet. Only possible while the timesheet is OPEN. Internal endpoint.
234
+ * Update a timesheet entry
231
235
  */
232
- async apiUpdateTimesheetEntries(requestParameters, initOverrides) {
233
- await this.apiUpdateTimesheetEntriesRaw(requestParameters, initOverrides);
236
+ async apiUpdateTimesheetEntry(requestParameters, initOverrides) {
237
+ await this.apiUpdateTimesheetEntryRaw(requestParameters, initOverrides);
234
238
  }
235
239
  /**
236
240
  * Creates request options for approveAdjustedTimesheet without sending the request
@@ -2945,17 +2949,20 @@ class ClientApi extends runtime.BaseAPI {
2945
2949
  await this.sendTimesheetRaw(requestParameters, initOverrides);
2946
2950
  }
2947
2951
  /**
2948
- * Creates request options for updateAdjustedEntries without sending the request
2952
+ * Creates request options for updateAdjustedEntry without sending the request
2949
2953
  */
2950
- async updateAdjustedEntriesRequestOpts(requestParameters) {
2954
+ async updateAdjustedEntryRequestOpts(requestParameters) {
2951
2955
  if (requestParameters['projectId'] == null) {
2952
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateAdjustedEntries().');
2956
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateAdjustedEntry().');
2953
2957
  }
2954
2958
  if (requestParameters['timesheetId'] == null) {
2955
- throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateAdjustedEntries().');
2959
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateAdjustedEntry().');
2960
+ }
2961
+ if (requestParameters['entryId'] == null) {
2962
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateAdjustedEntry().');
2956
2963
  }
2957
2964
  if (requestParameters['adjustedTimesheetUpdateEntryDTO'] == null) {
2958
- throw new runtime.RequiredError('adjustedTimesheetUpdateEntryDTO', 'Required parameter "adjustedTimesheetUpdateEntryDTO" was null or undefined when calling updateAdjustedEntries().');
2965
+ throw new runtime.RequiredError('adjustedTimesheetUpdateEntryDTO', 'Required parameter "adjustedTimesheetUpdateEntryDTO" was null or undefined when calling updateAdjustedEntry().');
2959
2966
  }
2960
2967
  const queryParameters = {};
2961
2968
  const headerParameters = {};
@@ -2963,32 +2970,33 @@ class ClientApi extends runtime.BaseAPI {
2963
2970
  if (this.configuration && this.configuration.apiKey) {
2964
2971
  headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2965
2972
  }
2966
- let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/entries`;
2973
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/entries/{entryId}`;
2967
2974
  urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2968
2975
  urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2976
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
2969
2977
  return {
2970
2978
  path: urlPath,
2971
2979
  method: 'PATCH',
2972
2980
  headers: headerParameters,
2973
2981
  query: queryParameters,
2974
- body: requestParameters['adjustedTimesheetUpdateEntryDTO'].map(AdjustedTimesheetUpdateEntryDTO_1.AdjustedTimesheetUpdateEntryDTOToJSON),
2982
+ body: (0, AdjustedTimesheetUpdateEntryDTO_1.AdjustedTimesheetUpdateEntryDTOToJSON)(requestParameters['adjustedTimesheetUpdateEntryDTO']),
2975
2983
  };
2976
2984
  }
2977
2985
  /**
2978
- * Update one or more days of an adjusted timesheet. Only possible while the adjusted timesheet is OPEN.
2979
- * Update adjusted timesheet entries
2986
+ * Update or change the hours of a day in an adjusted timesheet. Only possible while the adjusted timesheet is OPEN.
2987
+ * Update an adjusted timesheet entry
2980
2988
  */
2981
- async updateAdjustedEntriesRaw(requestParameters, initOverrides) {
2982
- const requestOptions = await this.updateAdjustedEntriesRequestOpts(requestParameters);
2989
+ async updateAdjustedEntryRaw(requestParameters, initOverrides) {
2990
+ const requestOptions = await this.updateAdjustedEntryRequestOpts(requestParameters);
2983
2991
  const response = await this.request(requestOptions, initOverrides);
2984
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AdjustedTimesheetEntryDTO_1.AdjustedTimesheetEntryDTOFromJSON));
2992
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, AdjustedTimesheetEntryDTO_1.AdjustedTimesheetEntryDTOFromJSON)(jsonValue));
2985
2993
  }
2986
2994
  /**
2987
- * Update one or more days of an adjusted timesheet. Only possible while the adjusted timesheet is OPEN.
2988
- * Update adjusted timesheet entries
2995
+ * Update or change the hours of a day in an adjusted timesheet. Only possible while the adjusted timesheet is OPEN.
2996
+ * Update an adjusted timesheet entry
2989
2997
  */
2990
- async updateAdjustedEntries(requestParameters, initOverrides) {
2991
- const response = await this.updateAdjustedEntriesRaw(requestParameters, initOverrides);
2998
+ async updateAdjustedEntry(requestParameters, initOverrides) {
2999
+ const response = await this.updateAdjustedEntryRaw(requestParameters, initOverrides);
2992
3000
  return await response.value();
2993
3001
  }
2994
3002
  /**
@@ -3121,17 +3129,20 @@ class ClientApi extends runtime.BaseAPI {
3121
3129
  return await response.value();
3122
3130
  }
3123
3131
  /**
3124
- * Creates request options for updateGlobalTimesheetEntries without sending the request
3132
+ * Creates request options for updateGlobalTimesheetEntry without sending the request
3125
3133
  */
3126
- async updateGlobalTimesheetEntriesRequestOpts(requestParameters) {
3134
+ async updateGlobalTimesheetEntryRequestOpts(requestParameters) {
3127
3135
  if (requestParameters['projectId'] == null) {
3128
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateGlobalTimesheetEntries().');
3136
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateGlobalTimesheetEntry().');
3129
3137
  }
3130
3138
  if (requestParameters['timesheetId'] == null) {
3131
- throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateGlobalTimesheetEntries().');
3139
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateGlobalTimesheetEntry().');
3140
+ }
3141
+ if (requestParameters['entryId'] == null) {
3142
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateGlobalTimesheetEntry().');
3132
3143
  }
3133
3144
  if (requestParameters['globalTimesheetEntryUpdateDTO'] == null) {
3134
- throw new runtime.RequiredError('globalTimesheetEntryUpdateDTO', 'Required parameter "globalTimesheetEntryUpdateDTO" was null or undefined when calling updateGlobalTimesheetEntries().');
3145
+ throw new runtime.RequiredError('globalTimesheetEntryUpdateDTO', 'Required parameter "globalTimesheetEntryUpdateDTO" was null or undefined when calling updateGlobalTimesheetEntry().');
3135
3146
  }
3136
3147
  const queryParameters = {};
3137
3148
  const headerParameters = {};
@@ -3139,32 +3150,33 @@ class ClientApi extends runtime.BaseAPI {
3139
3150
  if (this.configuration && this.configuration.apiKey) {
3140
3151
  headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3141
3152
  }
3142
- let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/entries`;
3153
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/entries/{entryId}`;
3143
3154
  urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3144
3155
  urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3156
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
3145
3157
  return {
3146
3158
  path: urlPath,
3147
3159
  method: 'PATCH',
3148
3160
  headers: headerParameters,
3149
3161
  query: queryParameters,
3150
- body: requestParameters['globalTimesheetEntryUpdateDTO'].map(GlobalTimesheetEntryUpdateDTO_1.GlobalTimesheetEntryUpdateDTOToJSON),
3162
+ body: (0, GlobalTimesheetEntryUpdateDTO_1.GlobalTimesheetEntryUpdateDTOToJSON)(requestParameters['globalTimesheetEntryUpdateDTO']),
3151
3163
  };
3152
3164
  }
3153
3165
  /**
3154
- * Update the hours or comments of one or more days of a global timesheet. Only possible while the global timesheet is OPEN.
3155
- * Update global timesheet entries
3166
+ * Update or change the hours or comments of a day in a global timesheet. Only possible while the global timesheet is OPEN.
3167
+ * Update a global timesheet entry
3156
3168
  */
3157
- async updateGlobalTimesheetEntriesRaw(requestParameters, initOverrides) {
3158
- const requestOptions = await this.updateGlobalTimesheetEntriesRequestOpts(requestParameters);
3169
+ async updateGlobalTimesheetEntryRaw(requestParameters, initOverrides) {
3170
+ const requestOptions = await this.updateGlobalTimesheetEntryRequestOpts(requestParameters);
3159
3171
  const response = await this.request(requestOptions, initOverrides);
3160
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GlobalTimesheetEntryDTO_1.GlobalTimesheetEntryDTOFromJSON));
3172
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GlobalTimesheetEntryDTO_1.GlobalTimesheetEntryDTOFromJSON)(jsonValue));
3161
3173
  }
3162
3174
  /**
3163
- * Update the hours or comments of one or more days of a global timesheet. Only possible while the global timesheet is OPEN.
3164
- * Update global timesheet entries
3175
+ * Update or change the hours or comments of a day in a global timesheet. Only possible while the global timesheet is OPEN.
3176
+ * Update a global timesheet entry
3165
3177
  */
3166
- async updateGlobalTimesheetEntries(requestParameters, initOverrides) {
3167
- const response = await this.updateGlobalTimesheetEntriesRaw(requestParameters, initOverrides);
3178
+ async updateGlobalTimesheetEntry(requestParameters, initOverrides) {
3179
+ const response = await this.updateGlobalTimesheetEntryRaw(requestParameters, initOverrides);
3168
3180
  return await response.value();
3169
3181
  }
3170
3182
  /**
@@ -3292,17 +3304,20 @@ class ClientApi extends runtime.BaseAPI {
3292
3304
  await this.updateTeamRaw(requestParameters, initOverrides);
3293
3305
  }
3294
3306
  /**
3295
- * Creates request options for updateTimesheetEntries without sending the request
3307
+ * Creates request options for updateTimesheetEntry without sending the request
3296
3308
  */
3297
- async updateTimesheetEntriesRequestOpts(requestParameters) {
3309
+ async updateTimesheetEntryRequestOpts(requestParameters) {
3298
3310
  if (requestParameters['projectId'] == null) {
3299
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateTimesheetEntries().');
3311
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateTimesheetEntry().');
3300
3312
  }
3301
3313
  if (requestParameters['timesheetId'] == null) {
3302
- throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateTimesheetEntries().');
3314
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateTimesheetEntry().');
3315
+ }
3316
+ if (requestParameters['entryId'] == null) {
3317
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateTimesheetEntry().');
3303
3318
  }
3304
3319
  if (requestParameters['timesheetEntryUpdateDTO'] == null) {
3305
- throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling updateTimesheetEntries().');
3320
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling updateTimesheetEntry().');
3306
3321
  }
3307
3322
  const queryParameters = {};
3308
3323
  const headerParameters = {};
@@ -3310,32 +3325,33 @@ class ClientApi extends runtime.BaseAPI {
3310
3325
  if (this.configuration && this.configuration.apiKey) {
3311
3326
  headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3312
3327
  }
3313
- let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/entries`;
3328
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/entries/{entryId}`;
3314
3329
  urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3315
3330
  urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3331
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
3316
3332
  return {
3317
3333
  path: urlPath,
3318
3334
  method: 'PATCH',
3319
3335
  headers: headerParameters,
3320
3336
  query: queryParameters,
3321
- body: requestParameters['timesheetEntryUpdateDTO'].map(TimesheetEntryUpdateDTO_1.TimesheetEntryUpdateDTOToJSON),
3337
+ body: (0, TimesheetEntryUpdateDTO_1.TimesheetEntryUpdateDTOToJSON)(requestParameters['timesheetEntryUpdateDTO']),
3322
3338
  };
3323
3339
  }
3324
3340
  /**
3325
- * Update one or more days of an employee timesheet. Only possible while the timesheet is OPEN.
3326
- * Update timesheet entries
3341
+ * Update or change the hours of a day in an employee timesheet. Only possible while the timesheet is OPEN.
3342
+ * Update a timesheet entry
3327
3343
  */
3328
- async updateTimesheetEntriesRaw(requestParameters, initOverrides) {
3329
- const requestOptions = await this.updateTimesheetEntriesRequestOpts(requestParameters);
3344
+ async updateTimesheetEntryRaw(requestParameters, initOverrides) {
3345
+ const requestOptions = await this.updateTimesheetEntryRequestOpts(requestParameters);
3330
3346
  const response = await this.request(requestOptions, initOverrides);
3331
3347
  return new runtime.VoidApiResponse(response);
3332
3348
  }
3333
3349
  /**
3334
- * Update one or more days of an employee timesheet. Only possible while the timesheet is OPEN.
3335
- * Update timesheet entries
3350
+ * Update or change the hours of a day in an employee timesheet. Only possible while the timesheet is OPEN.
3351
+ * Update a timesheet entry
3336
3352
  */
3337
- async updateTimesheetEntries(requestParameters, initOverrides) {
3338
- await this.updateTimesheetEntriesRaw(requestParameters, initOverrides);
3353
+ async updateTimesheetEntry(requestParameters, initOverrides) {
3354
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
3339
3355
  }
3340
3356
  }
3341
3357
  exports.ClientApi = ClientApi;