@maple-app/sdk-node
Advanced tools
Comparing version 0.3.11 to 0.4.0
265
api.d.ts
@@ -239,2 +239,15 @@ /** | ||
* @export | ||
* @interface CompletionListApiResponseDto | ||
*/ | ||
export interface CompletionListApiResponseDto { | ||
/** | ||
* | ||
* @type {Array<TimecardApiResponseDataDto>} | ||
* @memberof CompletionListApiResponseDto | ||
*/ | ||
data: Array<TimecardApiResponseDataDto>; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface CreateAssignmentIntegrationApiRequestDataDto | ||
@@ -728,2 +741,65 @@ */ | ||
* @export | ||
* @interface UpdateShiftCompletionApiRequestDataDto | ||
*/ | ||
export interface UpdateShiftCompletionApiRequestDataDto { | ||
/** | ||
* | ||
* @type {UpdateShiftCompletionDto} | ||
* @memberof UpdateShiftCompletionApiRequestDataDto | ||
*/ | ||
attributes: UpdateShiftCompletionDto; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof UpdateShiftCompletionApiRequestDataDto | ||
*/ | ||
type: string; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface UpdateShiftCompletionApiRequestDto | ||
*/ | ||
export interface UpdateShiftCompletionApiRequestDto { | ||
/** | ||
* | ||
* @type {UpdateShiftCompletionApiRequestDataDto} | ||
* @memberof UpdateShiftCompletionApiRequestDto | ||
*/ | ||
data: UpdateShiftCompletionApiRequestDataDto; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface UpdateShiftCompletionDto | ||
*/ | ||
export interface UpdateShiftCompletionDto { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof UpdateShiftCompletionDto | ||
*/ | ||
totalCost?: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof UpdateShiftCompletionDto | ||
*/ | ||
hourlyRate?: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof UpdateShiftCompletionDto | ||
*/ | ||
fees?: number; | ||
/** | ||
* | ||
* @type {Array<TimecardPunchIntegrationDto>} | ||
* @memberof UpdateShiftCompletionDto | ||
*/ | ||
punches?: Array<TimecardPunchIntegrationDto>; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface UpdateShiftIntegrationApiRequestDataDto | ||
@@ -856,2 +932,3 @@ */ | ||
readonly Caregiver: "CAREGIVER"; | ||
readonly Nurse: "NURSE"; | ||
}; | ||
@@ -866,3 +943,3 @@ export type WorkerType = (typeof WorkerType)[keyof typeof WorkerType]; | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {CreateBatchShiftsIntegrationApiRequestDto} createBatchShiftsIntegrationApiRequestDto | ||
@@ -876,3 +953,3 @@ * @param {string} [idempotencyKey] | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {string} shiftId | ||
@@ -886,3 +963,3 @@ * @param {CreateAssignmentIntegrationApiRequestDto} createAssignmentIntegrationApiRequestDto | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {string} shiftId | ||
@@ -897,3 +974,3 @@ * @param {CompleteShiftApiRequestDto} completeShiftApiRequestDto | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {string} shiftId | ||
@@ -906,3 +983,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {string} shiftId | ||
@@ -916,3 +993,3 @@ * @param {string} shiftAssignmentId | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {string} shiftId | ||
@@ -925,3 +1002,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {string} shiftId | ||
@@ -933,4 +1010,12 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {string} shiftId | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getShiftCompletion: (shiftId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {string} shiftId | ||
@@ -944,3 +1029,3 @@ * @param {UpdateShiftIntegrationApiRequestDto} updateShiftIntegrationApiRequestDto | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {string} shiftId | ||
@@ -953,2 +1038,13 @@ * @param {string} shiftAssignmentId | ||
updateShiftAssignment: (shiftId: string, shiftAssignmentId: string, createAssignmentIntegrationApiRequestDto: CreateAssignmentIntegrationApiRequestDto, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {string} shiftId | ||
* @param {string} completionId | ||
* @param {UpdateShiftCompletionApiRequestDto} updateShiftCompletionApiRequestDto | ||
* @param {string} [idempotencyKey] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
updateShiftCompletion: (shiftId: string, completionId: string, updateShiftCompletionApiRequestDto: UpdateShiftCompletionApiRequestDto, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
}; | ||
@@ -962,3 +1058,3 @@ /** | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {CreateBatchShiftsIntegrationApiRequestDto} createBatchShiftsIntegrationApiRequestDto | ||
@@ -972,3 +1068,3 @@ * @param {string} [idempotencyKey] | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {string} shiftId | ||
@@ -982,3 +1078,3 @@ * @param {CreateAssignmentIntegrationApiRequestDto} createAssignmentIntegrationApiRequestDto | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {string} shiftId | ||
@@ -993,3 +1089,3 @@ * @param {CompleteShiftApiRequestDto} completeShiftApiRequestDto | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {string} shiftId | ||
@@ -1002,3 +1098,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {string} shiftId | ||
@@ -1012,3 +1108,3 @@ * @param {string} shiftAssignmentId | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {string} shiftId | ||
@@ -1021,3 +1117,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {string} shiftId | ||
@@ -1029,4 +1125,12 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {string} shiftId | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getShiftCompletion(shiftId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompletionListApiResponseDto>>; | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {string} shiftId | ||
@@ -1040,3 +1144,3 @@ * @param {UpdateShiftIntegrationApiRequestDto} updateShiftIntegrationApiRequestDto | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {string} shiftId | ||
@@ -1049,2 +1153,13 @@ * @param {string} shiftAssignmentId | ||
updateShiftAssignment(shiftId: string, shiftAssignmentId: string, createAssignmentIntegrationApiRequestDto: CreateAssignmentIntegrationApiRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShiftAssignmentApiResponseDto>>; | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {string} shiftId | ||
* @param {string} completionId | ||
* @param {UpdateShiftCompletionApiRequestDto} updateShiftCompletionApiRequestDto | ||
* @param {string} [idempotencyKey] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
updateShiftCompletion(shiftId: string, completionId: string, updateShiftCompletionApiRequestDto: UpdateShiftCompletionApiRequestDto, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TimecardApiResponseDto>>; | ||
}; | ||
@@ -1058,3 +1173,3 @@ /** | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {DefaultApiCreateShiftRequest} requestParameters Request parameters. | ||
@@ -1067,3 +1182,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {DefaultApiCreateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1076,3 +1191,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {DefaultApiCreateShiftCompletionRequest} requestParameters Request parameters. | ||
@@ -1085,3 +1200,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {DefaultApiDeleteShiftRequest} requestParameters Request parameters. | ||
@@ -1094,3 +1209,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {DefaultApiDeleteShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1103,3 +1218,3 @@ * @param {*} [options] Override http request option. | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {DefaultApiGetShiftRequest} requestParameters Request parameters. | ||
@@ -1112,3 +1227,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {DefaultApiGetShiftAssignmentsRequest} requestParameters Request parameters. | ||
@@ -1120,4 +1235,12 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {DefaultApiGetShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getShiftCompletion(requestParameters: DefaultApiGetShiftCompletionRequest, options?: AxiosRequestConfig): AxiosPromise<CompletionListApiResponseDto>; | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {DefaultApiUpdateShiftRequest} requestParameters Request parameters. | ||
@@ -1130,3 +1253,3 @@ * @param {*} [options] Override http request option. | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {DefaultApiUpdateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1137,2 +1260,10 @@ * @param {*} [options] Override http request option. | ||
updateShiftAssignment(requestParameters: DefaultApiUpdateShiftAssignmentRequest, options?: AxiosRequestConfig): AxiosPromise<ShiftAssignmentApiResponseDto>; | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {DefaultApiUpdateShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
updateShiftCompletion(requestParameters: DefaultApiUpdateShiftCompletionRequest, options?: AxiosRequestConfig): AxiosPromise<TimecardApiResponseDto>; | ||
}; | ||
@@ -1261,2 +1392,15 @@ /** | ||
/** | ||
* Request parameters for getShiftCompletion operation in DefaultApi. | ||
* @export | ||
* @interface DefaultApiGetShiftCompletionRequest | ||
*/ | ||
export interface DefaultApiGetShiftCompletionRequest { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof DefaultApiGetShiftCompletion | ||
*/ | ||
readonly shiftId: string; | ||
} | ||
/** | ||
* Request parameters for updateShift operation in DefaultApi. | ||
@@ -1306,2 +1450,33 @@ * @export | ||
/** | ||
* Request parameters for updateShiftCompletion operation in DefaultApi. | ||
* @export | ||
* @interface DefaultApiUpdateShiftCompletionRequest | ||
*/ | ||
export interface DefaultApiUpdateShiftCompletionRequest { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof DefaultApiUpdateShiftCompletion | ||
*/ | ||
readonly shiftId: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof DefaultApiUpdateShiftCompletion | ||
*/ | ||
readonly completionId: string; | ||
/** | ||
* | ||
* @type {UpdateShiftCompletionApiRequestDto} | ||
* @memberof DefaultApiUpdateShiftCompletion | ||
*/ | ||
readonly updateShiftCompletionApiRequestDto: UpdateShiftCompletionApiRequestDto; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof DefaultApiUpdateShiftCompletion | ||
*/ | ||
readonly idempotencyKey?: string; | ||
} | ||
/** | ||
* DefaultApi - object-oriented interface | ||
@@ -1315,3 +1490,3 @@ * @export | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {DefaultApiCreateShiftRequest} requestParameters Request parameters. | ||
@@ -1325,3 +1500,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {DefaultApiCreateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1335,3 +1510,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {DefaultApiCreateShiftCompletionRequest} requestParameters Request parameters. | ||
@@ -1345,3 +1520,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {DefaultApiDeleteShiftRequest} requestParameters Request parameters. | ||
@@ -1355,3 +1530,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {DefaultApiDeleteShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1365,3 +1540,3 @@ * @param {*} [options] Override http request option. | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {DefaultApiGetShiftRequest} requestParameters Request parameters. | ||
@@ -1375,3 +1550,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {DefaultApiGetShiftAssignmentsRequest} requestParameters Request parameters. | ||
@@ -1384,4 +1559,13 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {DefaultApiGetShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof DefaultApi | ||
*/ | ||
getShiftCompletion(requestParameters: DefaultApiGetShiftCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CompletionListApiResponseDto, any>>; | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {DefaultApiUpdateShiftRequest} requestParameters Request parameters. | ||
@@ -1395,3 +1579,3 @@ * @param {*} [options] Override http request option. | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {DefaultApiUpdateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -1403,3 +1587,12 @@ * @param {*} [options] Override http request option. | ||
updateShiftAssignment(requestParameters: DefaultApiUpdateShiftAssignmentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ShiftAssignmentApiResponseDto, any>>; | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {DefaultApiUpdateShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof DefaultApi | ||
*/ | ||
updateShiftCompletion(requestParameters: DefaultApiUpdateShiftCompletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TimecardApiResponseDto, any>>; | ||
} | ||
//# sourceMappingURL=api.d.ts.map |
230
api.js
@@ -45,2 +45,3 @@ /* tslint:disable */ | ||
Caregiver: "CAREGIVER", | ||
Nurse: "NURSE", | ||
}; | ||
@@ -55,3 +56,3 @@ /** | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {CreateBatchShiftsIntegrationApiRequestDto} createBatchShiftsIntegrationApiRequestDto | ||
@@ -96,3 +97,3 @@ * @param {string} [idempotencyKey] | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {string} shiftId | ||
@@ -136,3 +137,3 @@ * @param {CreateAssignmentIntegrationApiRequestDto} createAssignmentIntegrationApiRequestDto | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {string} shiftId | ||
@@ -180,3 +181,3 @@ * @param {CompleteShiftApiRequestDto} completeShiftApiRequestDto | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {string} shiftId | ||
@@ -215,3 +216,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {string} shiftId | ||
@@ -255,3 +256,3 @@ * @param {string} shiftAssignmentId | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {string} shiftId | ||
@@ -290,3 +291,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {string} shiftId | ||
@@ -324,4 +325,38 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {string} shiftId | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getShiftCompletion: async (shiftId, options = {}) => { | ||
// verify required parameter 'shiftId' is not null or undefined | ||
assertParamExists("getShiftCompletion", "shiftId", shiftId); | ||
const localVarPath = `/api/v1/shifts/{shiftId}/completions`.replace(`{${"shiftId"}}`, encodeURIComponent(String(shiftId))); | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); | ||
let baseOptions; | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options }; | ||
const localVarHeaderParameter = {}; | ||
const localVarQueryParameter = {}; | ||
// authentication x-api-key required | ||
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration); | ||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = { | ||
...localVarHeaderParameter, | ||
...headersFromBaseOptions, | ||
...options.headers, | ||
}; | ||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {string} shiftId | ||
@@ -365,3 +400,3 @@ * @param {UpdateShiftIntegrationApiRequestDto} updateShiftIntegrationApiRequestDto | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {string} shiftId | ||
@@ -408,2 +443,50 @@ * @param {string} shiftAssignmentId | ||
}, | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {string} shiftId | ||
* @param {string} completionId | ||
* @param {UpdateShiftCompletionApiRequestDto} updateShiftCompletionApiRequestDto | ||
* @param {string} [idempotencyKey] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
updateShiftCompletion: async (shiftId, completionId, updateShiftCompletionApiRequestDto, idempotencyKey, options = {}) => { | ||
// verify required parameter 'shiftId' is not null or undefined | ||
assertParamExists("updateShiftCompletion", "shiftId", shiftId); | ||
// verify required parameter 'completionId' is not null or undefined | ||
assertParamExists("updateShiftCompletion", "completionId", completionId); | ||
// verify required parameter 'updateShiftCompletionApiRequestDto' is not null or undefined | ||
assertParamExists("updateShiftCompletion", "updateShiftCompletionApiRequestDto", updateShiftCompletionApiRequestDto); | ||
const localVarPath = `/api/v1/shifts/{shiftId}/completions/{completionId}` | ||
.replace(`{${"shiftId"}}`, encodeURIComponent(String(shiftId))) | ||
.replace(`{${"completionId"}}`, encodeURIComponent(String(completionId))); | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); | ||
let baseOptions; | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
const localVarRequestOptions = { method: "PATCH", ...baseOptions, ...options }; | ||
const localVarHeaderParameter = {}; | ||
const localVarQueryParameter = {}; | ||
// authentication x-api-key required | ||
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration); | ||
if (idempotencyKey != null) { | ||
localVarHeaderParameter["idempotency-key"] = String(idempotencyKey); | ||
} | ||
localVarHeaderParameter["Content-Type"] = "application/json"; | ||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = { | ||
...localVarHeaderParameter, | ||
...headersFromBaseOptions, | ||
...options.headers, | ||
}; | ||
localVarRequestOptions.data = serializeDataIfNeeded(updateShiftCompletionApiRequestDto, localVarRequestOptions, configuration); | ||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
}; | ||
@@ -420,3 +503,3 @@ }; | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {CreateBatchShiftsIntegrationApiRequestDto} createBatchShiftsIntegrationApiRequestDto | ||
@@ -433,3 +516,3 @@ * @param {string} [idempotencyKey] | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {string} shiftId | ||
@@ -446,3 +529,3 @@ * @param {CreateAssignmentIntegrationApiRequestDto} createAssignmentIntegrationApiRequestDto | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {string} shiftId | ||
@@ -460,3 +543,3 @@ * @param {CompleteShiftApiRequestDto} completeShiftApiRequestDto | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {string} shiftId | ||
@@ -472,3 +555,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {string} shiftId | ||
@@ -485,3 +568,3 @@ * @param {string} shiftAssignmentId | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {string} shiftId | ||
@@ -497,3 +580,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {string} shiftId | ||
@@ -508,4 +591,15 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {string} shiftId | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async getShiftCompletion(shiftId, options) { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.getShiftCompletion(shiftId, options); | ||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
}, | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {string} shiftId | ||
@@ -522,3 +616,3 @@ * @param {UpdateShiftIntegrationApiRequestDto} updateShiftIntegrationApiRequestDto | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {string} shiftId | ||
@@ -534,2 +628,16 @@ * @param {string} shiftAssignmentId | ||
}, | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {string} shiftId | ||
* @param {string} completionId | ||
* @param {UpdateShiftCompletionApiRequestDto} updateShiftCompletionApiRequestDto | ||
* @param {string} [idempotencyKey] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async updateShiftCompletion(shiftId, completionId, updateShiftCompletionApiRequestDto, idempotencyKey, options) { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateShiftCompletion(shiftId, completionId, updateShiftCompletionApiRequestDto, idempotencyKey, options); | ||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
}, | ||
}; | ||
@@ -546,3 +654,3 @@ }; | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {DefaultApiCreateShiftRequest} requestParameters Request parameters. | ||
@@ -559,3 +667,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {DefaultApiCreateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -572,3 +680,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {DefaultApiCreateShiftCompletionRequest} requestParameters Request parameters. | ||
@@ -585,3 +693,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {DefaultApiDeleteShiftRequest} requestParameters Request parameters. | ||
@@ -598,3 +706,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {DefaultApiDeleteShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -611,3 +719,3 @@ * @param {*} [options] Override http request option. | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {DefaultApiGetShiftRequest} requestParameters Request parameters. | ||
@@ -624,3 +732,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {DefaultApiGetShiftAssignmentsRequest} requestParameters Request parameters. | ||
@@ -636,4 +744,16 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {DefaultApiGetShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getShiftCompletion(requestParameters, options) { | ||
return localVarFp | ||
.getShiftCompletion(requestParameters.shiftId, options) | ||
.then((request) => request(axios, basePath)); | ||
}, | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {DefaultApiUpdateShiftRequest} requestParameters Request parameters. | ||
@@ -650,3 +770,3 @@ * @param {*} [options] Override http request option. | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {DefaultApiUpdateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -661,2 +781,14 @@ * @param {*} [options] Override http request option. | ||
}, | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {DefaultApiUpdateShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
updateShiftCompletion(requestParameters, options) { | ||
return localVarFp | ||
.updateShiftCompletion(requestParameters.shiftId, requestParameters.completionId, requestParameters.updateShiftCompletionApiRequestDto, requestParameters.idempotencyKey, options) | ||
.then((request) => request(axios, basePath)); | ||
}, | ||
}; | ||
@@ -673,3 +805,3 @@ }; | ||
* Create a shift. | ||
* @summary | ||
* @summary Create a shift | ||
* @param {DefaultApiCreateShiftRequest} requestParameters Request parameters. | ||
@@ -687,3 +819,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Create shift assignment | ||
* @param {DefaultApiCreateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -701,3 +833,3 @@ * @param {*} [options] Override http request option. | ||
* Create a shift completion, creating a timecard for the shift. | ||
* @summary | ||
* @summary Create completion | ||
* @param {DefaultApiCreateShiftCompletionRequest} requestParameters Request parameters. | ||
@@ -715,3 +847,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift. | ||
* @summary | ||
* @summary Delete a shift | ||
* @param {DefaultApiDeleteShiftRequest} requestParameters Request parameters. | ||
@@ -729,3 +861,3 @@ * @param {*} [options] Override http request option. | ||
* Delete a shift assignment, making the shift available for booking. | ||
* @summary | ||
* @summary Delete shift assignment | ||
* @param {DefaultApiDeleteShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -743,3 +875,3 @@ * @param {*} [options] Override http request option. | ||
* Get a shift. | ||
* @summary | ||
* @summary Get a shift | ||
* @param {DefaultApiGetShiftRequest} requestParameters Request parameters. | ||
@@ -757,3 +889,3 @@ * @param {*} [options] Override http request option. | ||
* Get shift assignments. | ||
* @summary | ||
* @summary Get shift assignments | ||
* @param {DefaultApiGetShiftAssignmentsRequest} requestParameters Request parameters. | ||
@@ -770,4 +902,17 @@ * @param {*} [options] Override http request option. | ||
/** | ||
* Get shift completions. | ||
* @summary Get shift completions | ||
* @param {DefaultApiGetShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof DefaultApi | ||
*/ | ||
getShiftCompletion(requestParameters, options) { | ||
return DefaultApiFp(this.configuration) | ||
.getShiftCompletion(requestParameters.shiftId, options) | ||
.then((request) => request(this.axios, this.basePath)); | ||
} | ||
/** | ||
* Update a shift. | ||
* @summary | ||
* @summary Update a shift | ||
* @param {DefaultApiUpdateShiftRequest} requestParameters Request parameters. | ||
@@ -785,3 +930,3 @@ * @param {*} [options] Override http request option. | ||
* Update a shift assignment, creating the worker if it does not exist. | ||
* @summary | ||
* @summary Update shift assignment | ||
* @param {DefaultApiUpdateShiftAssignmentRequest} requestParameters Request parameters. | ||
@@ -797,3 +942,16 @@ * @param {*} [options] Override http request option. | ||
} | ||
/** | ||
* Update a shift completion and timecard for the shift. | ||
* @summary Update completion | ||
* @param {DefaultApiUpdateShiftCompletionRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof DefaultApi | ||
*/ | ||
updateShiftCompletion(requestParameters, options) { | ||
return DefaultApiFp(this.configuration) | ||
.updateShiftCompletion(requestParameters.shiftId, requestParameters.completionId, requestParameters.updateShiftCompletionApiRequestDto, requestParameters.idempotencyKey, options) | ||
.then((request) => request(this.axios, this.basePath)); | ||
} | ||
} | ||
//# sourceMappingURL=api.js.map |
@@ -15,3 +15,3 @@ /* tslint:disable */ | ||
import globalAxios from "axios"; | ||
export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); | ||
export const BASE_PATH = "https://api.maple.com".replace(/\/+$/, ""); | ||
/** | ||
@@ -18,0 +18,0 @@ * |
@@ -5,7 +5,7 @@ # Changelog | ||
## [0.3.11](https://github.com/ClipboardHealth/maple/compare/sdk-node-0.3.10...sdk-node-0.3.11) (2023-09-30) | ||
## [0.4.0](https://github.com/ClipboardHealth/maple/compare/sdk-node-0.3.11...sdk-node-0.4.0) (2023-10-13) | ||
### Bug Fixes | ||
### Features | ||
* **deps:** update all non-major dependencies ([#26](https://github.com/ClipboardHealth/maple/issues/26)) ([e05c6f8](https://github.com/ClipboardHealth/maple/commit/e05c6f81ec38c60eb8e602d5b83eb55f6b3cd258)) | ||
* **MAPLE-2299:** Update CBH mappings for NURSE shift type ([#32](https://github.com/ClipboardHealth/maple/issues/32)) ([3cb5099](https://github.com/ClipboardHealth/maple/commit/3cb5099d5f53d5a1b1a4767ff4ed11375f70136d)) |
{ | ||
"name": "@maple-app/sdk-node", | ||
"version": "0.3.11", | ||
"version": "0.4.0", | ||
"description": "The Maple REST API SDK for Node.js.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
157376
3019