tuix-projects-service-client 0.0.111 → 0.0.113

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