pipedrive 36.0.1 → 36.1.0
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/dist/esm/versions/v1/api/activity-fields-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/activity-fields-api.js +25 -0
- package/dist/esm/versions/v1/api/activity-types-api.d.ts +72 -1
- package/dist/esm/versions/v1/api/activity-types-api.js +107 -0
- package/dist/esm/versions/v1/api/billing-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/billing-api.js +25 -0
- package/dist/esm/versions/v1/api/call-logs-api.d.ts +93 -1
- package/dist/esm/versions/v1/api/call-logs-api.js +137 -0
- package/dist/esm/versions/v1/api/channels-api.d.ts +74 -1
- package/dist/esm/versions/v1/api/channels-api.js +109 -0
- package/dist/esm/versions/v1/api/currencies-api.d.ts +19 -1
- package/dist/esm/versions/v1/api/currencies-api.js +27 -0
- package/dist/esm/versions/v1/api/deal-fields-api.d.ts +111 -1
- package/dist/esm/versions/v1/api/deal-fields-api.js +164 -0
- package/dist/esm/versions/v1/api/deals-api.d.ts +399 -1
- package/dist/esm/versions/v1/api/deals-api.js +569 -0
- package/dist/esm/versions/v1/api/files-api.d.ts +163 -1
- package/dist/esm/versions/v1/api/files-api.js +234 -0
- package/dist/esm/versions/v1/api/filters-api.d.ts +129 -1
- package/dist/esm/versions/v1/api/filters-api.js +191 -0
- package/dist/esm/versions/v1/api/goals-api.d.ts +106 -1
- package/dist/esm/versions/v1/api/goals-api.js +150 -0
- package/dist/esm/versions/v1/api/lead-fields-api.d.ts +20 -1
- package/dist/esm/versions/v1/api/lead-fields-api.js +28 -0
- package/dist/esm/versions/v1/api/lead-labels-api.d.ts +72 -1
- package/dist/esm/versions/v1/api/lead-labels-api.js +107 -0
- package/dist/esm/versions/v1/api/lead-sources-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/lead-sources-api.js +25 -0
- package/dist/esm/versions/v1/api/leads-api.d.ts +166 -1
- package/dist/esm/versions/v1/api/leads-api.js +237 -0
- package/dist/esm/versions/v1/api/legacy-teams-api.d.ts +152 -1
- package/dist/esm/versions/v1/api/legacy-teams-api.js +223 -0
- package/dist/esm/versions/v1/api/mailbox-api.d.ts +117 -1
- package/dist/esm/versions/v1/api/mailbox-api.js +170 -0
- package/dist/esm/versions/v1/api/meetings-api.d.ts +37 -1
- package/dist/esm/versions/v1/api/meetings-api.js +54 -0
- package/dist/esm/versions/v1/api/note-fields-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/note-fields-api.js +25 -0
- package/dist/esm/versions/v1/api/notes-api.d.ts +207 -1
- package/dist/esm/versions/v1/api/notes-api.js +296 -0
- package/dist/esm/versions/v1/api/organization-fields-api.d.ts +111 -1
- package/dist/esm/versions/v1/api/organization-fields-api.js +164 -0
- package/dist/esm/versions/v1/api/organization-relationships-api.d.ts +93 -1
- package/dist/esm/versions/v1/api/organization-relationships-api.js +137 -0
- package/dist/esm/versions/v1/api/organizations-api.d.ts +178 -1
- package/dist/esm/versions/v1/api/organizations-api.js +258 -0
- package/dist/esm/versions/v1/api/permission-sets-api.d.ts +57 -1
- package/dist/esm/versions/v1/api/permission-sets-api.js +83 -0
- package/dist/esm/versions/v1/api/person-fields-api.d.ts +111 -1
- package/dist/esm/versions/v1/api/person-fields-api.js +164 -0
- package/dist/esm/versions/v1/api/persons-api.d.ts +275 -37
- package/dist/esm/versions/v1/api/persons-api.js +370 -24
- package/dist/esm/versions/v1/api/pipelines-api.d.ts +69 -1
- package/dist/esm/versions/v1/api/pipelines-api.js +95 -0
- package/dist/esm/versions/v1/api/product-fields-api.d.ts +111 -1
- package/dist/esm/versions/v1/api/product-fields-api.js +164 -0
- package/dist/esm/versions/v1/api/products-api.d.ts +119 -1
- package/dist/esm/versions/v1/api/products-api.js +172 -0
- package/dist/esm/versions/v1/api/project-boards-api.d.ts +35 -1
- package/dist/esm/versions/v1/api/project-boards-api.js +52 -0
- package/dist/esm/versions/v1/api/project-phases-api.d.ts +37 -1
- package/dist/esm/versions/v1/api/project-phases-api.js +54 -0
- package/dist/esm/versions/v1/api/project-templates-api.d.ts +38 -1
- package/dist/esm/versions/v1/api/project-templates-api.js +55 -0
- package/dist/esm/versions/v1/api/projects-api.d.ts +227 -1
- package/dist/esm/versions/v1/api/projects-api.js +334 -0
- package/dist/esm/versions/v1/api/recents-api.d.ts +22 -1
- package/dist/esm/versions/v1/api/recents-api.js +30 -0
- package/dist/esm/versions/v1/api/roles-api.d.ts +226 -1
- package/dist/esm/versions/v1/api/roles-api.js +333 -0
- package/dist/esm/versions/v1/api/stages-api.d.ts +24 -1
- package/dist/esm/versions/v1/api/stages-api.js +32 -0
- package/dist/esm/versions/v1/api/tasks-api.d.ts +97 -1
- package/dist/esm/versions/v1/api/tasks-api.js +141 -0
- package/dist/esm/versions/v1/api/user-connections-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/user-connections-api.js +25 -0
- package/dist/esm/versions/v1/api/user-settings-api.d.ts +17 -1
- package/dist/esm/versions/v1/api/user-settings-api.js +25 -0
- package/dist/esm/versions/v1/api/users-api.d.ts +181 -1
- package/dist/esm/versions/v1/api/users-api.js +270 -0
- package/dist/esm/versions/v1/api/webhooks-api.d.ts +53 -1
- package/dist/esm/versions/v1/api/webhooks-api.js +79 -0
- package/dist/esm/versions/v1/base.d.ts +17 -0
- package/dist/esm/versions/v1/base.js +22 -0
- package/dist/esm/versions/v1/common.d.ts +1 -1
- package/dist/esm/versions/v1/common.js +7 -4
- package/dist/esm/versions/v2/api/activities-api.d.ts +107 -1
- package/dist/esm/versions/v2/api/activities-api.js +151 -0
- package/dist/esm/versions/v2/api/activity-fields-api.d.ts +40 -1
- package/dist/esm/versions/v2/api/activity-fields-api.js +57 -0
- package/dist/esm/versions/v2/api/beta-api.d.ts +451 -1
- package/dist/esm/versions/v2/api/beta-api.js +666 -0
- package/dist/esm/versions/v2/api/deal-fields-api.d.ts +152 -1
- package/dist/esm/versions/v2/api/deal-fields-api.js +223 -0
- package/dist/esm/versions/v2/api/deal-installments-api.d.ts +81 -1
- package/dist/esm/versions/v2/api/deal-installments-api.js +116 -0
- package/dist/esm/versions/v2/api/deal-products-api.d.ts +141 -1
- package/dist/esm/versions/v2/api/deal-products-api.js +203 -0
- package/dist/esm/versions/v2/api/deals-api.d.ts +363 -1
- package/dist/esm/versions/v2/api/deals-api.js +516 -1
- package/dist/esm/versions/v2/api/item-search-api.d.ts +49 -1
- package/dist/esm/versions/v2/api/item-search-api.js +66 -0
- package/dist/esm/versions/v2/api/leads-api.d.ts +64 -1
- package/dist/esm/versions/v2/api/leads-api.js +90 -0
- package/dist/esm/versions/v2/api/organization-fields-api.d.ts +152 -1
- package/dist/esm/versions/v2/api/organization-fields-api.js +223 -0
- package/dist/esm/versions/v2/api/organizations-api.d.ts +208 -1
- package/dist/esm/versions/v2/api/organizations-api.js +297 -0
- package/dist/esm/versions/v2/api/person-fields-api.d.ts +152 -1
- package/dist/esm/versions/v2/api/person-fields-api.js +223 -0
- package/dist/esm/versions/v2/api/persons-api.d.ts +230 -1
- package/dist/esm/versions/v2/api/persons-api.js +328 -0
- package/dist/esm/versions/v2/api/pipelines-api.d.ts +95 -1
- package/dist/esm/versions/v2/api/pipelines-api.js +139 -0
- package/dist/esm/versions/v2/api/product-fields-api.d.ts +152 -1
- package/dist/esm/versions/v2/api/product-fields-api.js +223 -0
- package/dist/esm/versions/v2/api/products-api.d.ts +371 -1
- package/dist/esm/versions/v2/api/products-api.js +541 -0
- package/dist/esm/versions/v2/api/project-boards-api.d.ts +90 -1
- package/dist/esm/versions/v2/api/project-boards-api.js +134 -0
- package/dist/esm/versions/v2/api/project-fields-api.d.ts +150 -1
- package/dist/esm/versions/v2/api/project-fields-api.js +221 -0
- package/dist/esm/versions/v2/api/project-phases-api.d.ts +92 -1
- package/dist/esm/versions/v2/api/project-phases-api.js +136 -0
- package/dist/esm/versions/v2/api/project-templates-api.d.ts +38 -1
- package/dist/esm/versions/v2/api/project-templates-api.js +55 -0
- package/dist/esm/versions/v2/api/projects-api.d.ts +201 -1
- package/dist/esm/versions/v2/api/projects-api.js +290 -0
- package/dist/esm/versions/v2/api/stages-api.d.ts +96 -1
- package/dist/esm/versions/v2/api/stages-api.js +140 -0
- package/dist/esm/versions/v2/api/tasks-api.d.ts +98 -1
- package/dist/esm/versions/v2/api/tasks-api.js +142 -0
- package/dist/esm/versions/v2/api/users-api.d.ts +21 -1
- package/dist/esm/versions/v2/api/users-api.js +29 -0
- package/dist/esm/versions/v2/base.d.ts +17 -0
- package/dist/esm/versions/v2/base.js +22 -0
- package/dist/esm/versions/v2/common.d.ts +1 -1
- package/dist/esm/versions/v2/common.js +7 -4
- package/dist/versions/v1/api/activity-fields-api.d.ts +17 -1
- package/dist/versions/v1/api/activity-fields-api.js +25 -0
- package/dist/versions/v1/api/activity-types-api.d.ts +72 -1
- package/dist/versions/v1/api/activity-types-api.js +107 -0
- package/dist/versions/v1/api/billing-api.d.ts +17 -1
- package/dist/versions/v1/api/billing-api.js +25 -0
- package/dist/versions/v1/api/call-logs-api.d.ts +93 -1
- package/dist/versions/v1/api/call-logs-api.js +137 -0
- package/dist/versions/v1/api/channels-api.d.ts +74 -1
- package/dist/versions/v1/api/channels-api.js +109 -0
- package/dist/versions/v1/api/currencies-api.d.ts +19 -1
- package/dist/versions/v1/api/currencies-api.js +27 -0
- package/dist/versions/v1/api/deal-fields-api.d.ts +111 -1
- package/dist/versions/v1/api/deal-fields-api.js +164 -0
- package/dist/versions/v1/api/deals-api.d.ts +399 -1
- package/dist/versions/v1/api/deals-api.js +569 -0
- package/dist/versions/v1/api/files-api.d.ts +163 -1
- package/dist/versions/v1/api/files-api.js +234 -0
- package/dist/versions/v1/api/filters-api.d.ts +129 -1
- package/dist/versions/v1/api/filters-api.js +191 -0
- package/dist/versions/v1/api/goals-api.d.ts +106 -1
- package/dist/versions/v1/api/goals-api.js +150 -0
- package/dist/versions/v1/api/lead-fields-api.d.ts +20 -1
- package/dist/versions/v1/api/lead-fields-api.js +28 -0
- package/dist/versions/v1/api/lead-labels-api.d.ts +72 -1
- package/dist/versions/v1/api/lead-labels-api.js +107 -0
- package/dist/versions/v1/api/lead-sources-api.d.ts +17 -1
- package/dist/versions/v1/api/lead-sources-api.js +25 -0
- package/dist/versions/v1/api/leads-api.d.ts +166 -1
- package/dist/versions/v1/api/leads-api.js +237 -0
- package/dist/versions/v1/api/legacy-teams-api.d.ts +152 -1
- package/dist/versions/v1/api/legacy-teams-api.js +223 -0
- package/dist/versions/v1/api/mailbox-api.d.ts +117 -1
- package/dist/versions/v1/api/mailbox-api.js +170 -0
- package/dist/versions/v1/api/meetings-api.d.ts +37 -1
- package/dist/versions/v1/api/meetings-api.js +54 -0
- package/dist/versions/v1/api/note-fields-api.d.ts +17 -1
- package/dist/versions/v1/api/note-fields-api.js +25 -0
- package/dist/versions/v1/api/notes-api.d.ts +207 -1
- package/dist/versions/v1/api/notes-api.js +296 -0
- package/dist/versions/v1/api/organization-fields-api.d.ts +111 -1
- package/dist/versions/v1/api/organization-fields-api.js +164 -0
- package/dist/versions/v1/api/organization-relationships-api.d.ts +93 -1
- package/dist/versions/v1/api/organization-relationships-api.js +137 -0
- package/dist/versions/v1/api/organizations-api.d.ts +178 -1
- package/dist/versions/v1/api/organizations-api.js +258 -0
- package/dist/versions/v1/api/permission-sets-api.d.ts +57 -1
- package/dist/versions/v1/api/permission-sets-api.js +83 -0
- package/dist/versions/v1/api/person-fields-api.d.ts +111 -1
- package/dist/versions/v1/api/person-fields-api.js +164 -0
- package/dist/versions/v1/api/persons-api.d.ts +275 -37
- package/dist/versions/v1/api/persons-api.js +370 -24
- package/dist/versions/v1/api/pipelines-api.d.ts +69 -1
- package/dist/versions/v1/api/pipelines-api.js +95 -0
- package/dist/versions/v1/api/product-fields-api.d.ts +111 -1
- package/dist/versions/v1/api/product-fields-api.js +164 -0
- package/dist/versions/v1/api/products-api.d.ts +119 -1
- package/dist/versions/v1/api/products-api.js +172 -0
- package/dist/versions/v1/api/project-boards-api.d.ts +35 -1
- package/dist/versions/v1/api/project-boards-api.js +52 -0
- package/dist/versions/v1/api/project-phases-api.d.ts +37 -1
- package/dist/versions/v1/api/project-phases-api.js +54 -0
- package/dist/versions/v1/api/project-templates-api.d.ts +38 -1
- package/dist/versions/v1/api/project-templates-api.js +55 -0
- package/dist/versions/v1/api/projects-api.d.ts +227 -1
- package/dist/versions/v1/api/projects-api.js +334 -0
- package/dist/versions/v1/api/recents-api.d.ts +22 -1
- package/dist/versions/v1/api/recents-api.js +30 -0
- package/dist/versions/v1/api/roles-api.d.ts +226 -1
- package/dist/versions/v1/api/roles-api.js +333 -0
- package/dist/versions/v1/api/stages-api.d.ts +24 -1
- package/dist/versions/v1/api/stages-api.js +32 -0
- package/dist/versions/v1/api/tasks-api.d.ts +97 -1
- package/dist/versions/v1/api/tasks-api.js +141 -0
- package/dist/versions/v1/api/user-connections-api.d.ts +17 -1
- package/dist/versions/v1/api/user-connections-api.js +25 -0
- package/dist/versions/v1/api/user-settings-api.d.ts +17 -1
- package/dist/versions/v1/api/user-settings-api.js +25 -0
- package/dist/versions/v1/api/users-api.d.ts +181 -1
- package/dist/versions/v1/api/users-api.js +270 -0
- package/dist/versions/v1/api/webhooks-api.d.ts +53 -1
- package/dist/versions/v1/api/webhooks-api.js +79 -0
- package/dist/versions/v1/base.d.ts +17 -0
- package/dist/versions/v1/base.js +24 -1
- package/dist/versions/v1/common.d.ts +1 -1
- package/dist/versions/v1/common.js +6 -3
- package/dist/versions/v2/api/activities-api.d.ts +107 -1
- package/dist/versions/v2/api/activities-api.js +151 -0
- package/dist/versions/v2/api/activity-fields-api.d.ts +40 -1
- package/dist/versions/v2/api/activity-fields-api.js +57 -0
- package/dist/versions/v2/api/beta-api.d.ts +451 -1
- package/dist/versions/v2/api/beta-api.js +666 -0
- package/dist/versions/v2/api/deal-fields-api.d.ts +152 -1
- package/dist/versions/v2/api/deal-fields-api.js +223 -0
- package/dist/versions/v2/api/deal-installments-api.d.ts +81 -1
- package/dist/versions/v2/api/deal-installments-api.js +116 -0
- package/dist/versions/v2/api/deal-products-api.d.ts +141 -1
- package/dist/versions/v2/api/deal-products-api.js +203 -0
- package/dist/versions/v2/api/deals-api.d.ts +363 -1
- package/dist/versions/v2/api/deals-api.js +516 -1
- package/dist/versions/v2/api/item-search-api.d.ts +49 -1
- package/dist/versions/v2/api/item-search-api.js +66 -0
- package/dist/versions/v2/api/leads-api.d.ts +64 -1
- package/dist/versions/v2/api/leads-api.js +90 -0
- package/dist/versions/v2/api/organization-fields-api.d.ts +152 -1
- package/dist/versions/v2/api/organization-fields-api.js +223 -0
- package/dist/versions/v2/api/organizations-api.d.ts +208 -1
- package/dist/versions/v2/api/organizations-api.js +297 -0
- package/dist/versions/v2/api/person-fields-api.d.ts +152 -1
- package/dist/versions/v2/api/person-fields-api.js +223 -0
- package/dist/versions/v2/api/persons-api.d.ts +230 -1
- package/dist/versions/v2/api/persons-api.js +328 -0
- package/dist/versions/v2/api/pipelines-api.d.ts +95 -1
- package/dist/versions/v2/api/pipelines-api.js +139 -0
- package/dist/versions/v2/api/product-fields-api.d.ts +152 -1
- package/dist/versions/v2/api/product-fields-api.js +223 -0
- package/dist/versions/v2/api/products-api.d.ts +371 -1
- package/dist/versions/v2/api/products-api.js +541 -0
- package/dist/versions/v2/api/project-boards-api.d.ts +90 -1
- package/dist/versions/v2/api/project-boards-api.js +134 -0
- package/dist/versions/v2/api/project-fields-api.d.ts +150 -1
- package/dist/versions/v2/api/project-fields-api.js +221 -0
- package/dist/versions/v2/api/project-phases-api.d.ts +92 -1
- package/dist/versions/v2/api/project-phases-api.js +136 -0
- package/dist/versions/v2/api/project-templates-api.d.ts +38 -1
- package/dist/versions/v2/api/project-templates-api.js +55 -0
- package/dist/versions/v2/api/projects-api.d.ts +201 -1
- package/dist/versions/v2/api/projects-api.js +290 -0
- package/dist/versions/v2/api/stages-api.d.ts +96 -1
- package/dist/versions/v2/api/stages-api.js +140 -0
- package/dist/versions/v2/api/tasks-api.d.ts +98 -1
- package/dist/versions/v2/api/tasks-api.js +142 -0
- package/dist/versions/v2/api/users-api.d.ts +21 -1
- package/dist/versions/v2/api/users-api.js +29 -0
- package/dist/versions/v2/base.d.ts +17 -0
- package/dist/versions/v2/base.js +24 -1
- package/dist/versions/v2/common.d.ts +1 -1
- package/dist/versions/v2/common.js +6 -3
- package/package.json +1 -1
|
@@ -259,6 +259,19 @@ const TasksApiFp = function (configuration) {
|
|
|
259
259
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
260
260
|
});
|
|
261
261
|
},
|
|
262
|
+
/**
|
|
263
|
+
* Same as `addTask`, but resolves with the response body together with the HTTP status and headers.
|
|
264
|
+
* @summary Add a task
|
|
265
|
+
* @param {AddTaskRequest} AddTaskRequest
|
|
266
|
+
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
addTaskWithHttpInfo(AddTaskRequest) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.addTask(AddTaskRequest);
|
|
272
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
273
|
+
});
|
|
274
|
+
},
|
|
262
275
|
/**
|
|
263
276
|
* Marks a task as deleted. If the task has subtasks, those will also be deleted.
|
|
264
277
|
* @summary Delete a task
|
|
@@ -272,6 +285,19 @@ const TasksApiFp = function (configuration) {
|
|
|
272
285
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
273
286
|
});
|
|
274
287
|
},
|
|
288
|
+
/**
|
|
289
|
+
* Same as `deleteTask`, but resolves with the response body together with the HTTP status and headers.
|
|
290
|
+
* @summary Delete a task
|
|
291
|
+
* @param {number} id The ID of the task
|
|
292
|
+
|
|
293
|
+
* @throws {RequiredError}
|
|
294
|
+
*/
|
|
295
|
+
deleteTaskWithHttpInfo(id) {
|
|
296
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteTask(id);
|
|
298
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
299
|
+
});
|
|
300
|
+
},
|
|
275
301
|
/**
|
|
276
302
|
* Returns the details of a specific task.
|
|
277
303
|
* @summary Get details of a task
|
|
@@ -285,6 +311,19 @@ const TasksApiFp = function (configuration) {
|
|
|
285
311
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
286
312
|
});
|
|
287
313
|
},
|
|
314
|
+
/**
|
|
315
|
+
* Same as `getTask`, but resolves with the response body together with the HTTP status and headers.
|
|
316
|
+
* @summary Get details of a task
|
|
317
|
+
* @param {number} id The ID of the task
|
|
318
|
+
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
*/
|
|
321
|
+
getTaskWithHttpInfo(id) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getTask(id);
|
|
324
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
325
|
+
});
|
|
326
|
+
},
|
|
288
327
|
/**
|
|
289
328
|
* Returns all tasks.
|
|
290
329
|
* @summary Get all tasks
|
|
@@ -304,6 +343,25 @@ const TasksApiFp = function (configuration) {
|
|
|
304
343
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
305
344
|
});
|
|
306
345
|
},
|
|
346
|
+
/**
|
|
347
|
+
* Same as `getTasks`, but resolves with the response body together with the HTTP status and headers.
|
|
348
|
+
* @summary Get all tasks
|
|
349
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
|
350
|
+
* @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
|
|
351
|
+
* @param {boolean} [is_done] Whether the task is done or not. If omitted, both done and not done tasks are returned.
|
|
352
|
+
* @param {boolean} [is_milestone] Whether the task is a milestone or not. If omitted, both milestone and non-milestone tasks are returned.
|
|
353
|
+
* @param {number} [assignee_id] If supplied, only tasks assigned to this user are returned
|
|
354
|
+
* @param {number} [project_id] If supplied, only tasks belonging to this project are returned
|
|
355
|
+
* @param {string} [parent_task_id] If `null` is supplied, only root-level tasks (without a parent) are returned. If an integer is supplied, only subtasks of that specific task are returned. By default all tasks are returned.
|
|
356
|
+
|
|
357
|
+
* @throws {RequiredError}
|
|
358
|
+
*/
|
|
359
|
+
getTasksWithHttpInfo(cursor, limit, is_done, is_milestone, assignee_id, project_id, parent_task_id) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getTasks(cursor, limit, is_done, is_milestone, assignee_id, project_id, parent_task_id);
|
|
362
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
363
|
+
});
|
|
364
|
+
},
|
|
307
365
|
/**
|
|
308
366
|
* Updates a task.
|
|
309
367
|
* @summary Update a task
|
|
@@ -318,6 +376,20 @@ const TasksApiFp = function (configuration) {
|
|
|
318
376
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
319
377
|
});
|
|
320
378
|
},
|
|
379
|
+
/**
|
|
380
|
+
* Same as `updateTask`, but resolves with the response body together with the HTTP status and headers.
|
|
381
|
+
* @summary Update a task
|
|
382
|
+
* @param {number} id The ID of the task
|
|
383
|
+
* @param {UpdateTaskRequest} [UpdateTaskRequest]
|
|
384
|
+
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
*/
|
|
387
|
+
updateTaskWithHttpInfo(id, UpdateTaskRequest) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
389
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateTask(id, UpdateTaskRequest);
|
|
390
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
391
|
+
});
|
|
392
|
+
},
|
|
321
393
|
};
|
|
322
394
|
};
|
|
323
395
|
exports.TasksApiFp = TasksApiFp;
|
|
@@ -338,6 +410,9 @@ const TasksApiFactory = function (configuration, basePath, axios) {
|
|
|
338
410
|
addTask(requestParameters) {
|
|
339
411
|
return localVarFp.addTask(requestParameters.AddTaskRequest).then((request) => request(axios, basePath));
|
|
340
412
|
},
|
|
413
|
+
addTaskWithHttpInfo(requestParameters) {
|
|
414
|
+
return localVarFp.addTaskWithHttpInfo(requestParameters.AddTaskRequest).then((request) => request(axios, basePath));
|
|
415
|
+
},
|
|
341
416
|
/**
|
|
342
417
|
* Marks a task as deleted. If the task has subtasks, those will also be deleted.
|
|
343
418
|
* @summary Delete a task
|
|
@@ -348,6 +423,9 @@ const TasksApiFactory = function (configuration, basePath, axios) {
|
|
|
348
423
|
deleteTask(requestParameters) {
|
|
349
424
|
return localVarFp.deleteTask(requestParameters.id).then((request) => request(axios, basePath));
|
|
350
425
|
},
|
|
426
|
+
deleteTaskWithHttpInfo(requestParameters) {
|
|
427
|
+
return localVarFp.deleteTaskWithHttpInfo(requestParameters.id).then((request) => request(axios, basePath));
|
|
428
|
+
},
|
|
351
429
|
/**
|
|
352
430
|
* Returns the details of a specific task.
|
|
353
431
|
* @summary Get details of a task
|
|
@@ -358,6 +436,9 @@ const TasksApiFactory = function (configuration, basePath, axios) {
|
|
|
358
436
|
getTask(requestParameters) {
|
|
359
437
|
return localVarFp.getTask(requestParameters.id).then((request) => request(axios, basePath));
|
|
360
438
|
},
|
|
439
|
+
getTaskWithHttpInfo(requestParameters) {
|
|
440
|
+
return localVarFp.getTaskWithHttpInfo(requestParameters.id).then((request) => request(axios, basePath));
|
|
441
|
+
},
|
|
361
442
|
/**
|
|
362
443
|
* Returns all tasks.
|
|
363
444
|
* @summary Get all tasks
|
|
@@ -368,6 +449,9 @@ const TasksApiFactory = function (configuration, basePath, axios) {
|
|
|
368
449
|
getTasks(requestParameters = {}) {
|
|
369
450
|
return localVarFp.getTasks(requestParameters.cursor, requestParameters.limit, requestParameters.is_done, requestParameters.is_milestone, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id).then((request) => request(axios, basePath));
|
|
370
451
|
},
|
|
452
|
+
getTasksWithHttpInfo(requestParameters = {}) {
|
|
453
|
+
return localVarFp.getTasksWithHttpInfo(requestParameters.cursor, requestParameters.limit, requestParameters.is_done, requestParameters.is_milestone, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id).then((request) => request(axios, basePath));
|
|
454
|
+
},
|
|
371
455
|
/**
|
|
372
456
|
* Updates a task.
|
|
373
457
|
* @summary Update a task
|
|
@@ -378,6 +462,9 @@ const TasksApiFactory = function (configuration, basePath, axios) {
|
|
|
378
462
|
updateTask(requestParameters) {
|
|
379
463
|
return localVarFp.updateTask(requestParameters.id, requestParameters.UpdateTaskRequest).then((request) => request(axios, basePath));
|
|
380
464
|
},
|
|
465
|
+
updateTaskWithHttpInfo(requestParameters) {
|
|
466
|
+
return localVarFp.updateTaskWithHttpInfo(requestParameters.id, requestParameters.UpdateTaskRequest).then((request) => request(axios, basePath));
|
|
467
|
+
},
|
|
381
468
|
};
|
|
382
469
|
};
|
|
383
470
|
exports.TasksApiFactory = TasksApiFactory;
|
|
@@ -399,6 +486,17 @@ class TasksApi extends base_1.BaseAPI {
|
|
|
399
486
|
addTask(requestParameters) {
|
|
400
487
|
return (0, exports.TasksApiFp)(this.configuration).addTask(requestParameters.AddTaskRequest).then((request) => request(this.axios, this.basePath));
|
|
401
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Same as `addTask`, but resolves with the response body together with the HTTP status and headers.
|
|
491
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
492
|
+
* @param {TasksApiAddTaskRequest} requestParameters Request parameters.
|
|
493
|
+
|
|
494
|
+
* @throws {RequiredError}
|
|
495
|
+
* @memberof TasksApi
|
|
496
|
+
*/
|
|
497
|
+
addTaskWithHttpInfo(requestParameters) {
|
|
498
|
+
return (0, exports.TasksApiFp)(this.configuration).addTaskWithHttpInfo(requestParameters.AddTaskRequest).then((request) => request(this.axios, this.basePath));
|
|
499
|
+
}
|
|
402
500
|
/**
|
|
403
501
|
* Marks a task as deleted. If the task has subtasks, those will also be deleted.
|
|
404
502
|
* @summary Delete a task
|
|
@@ -410,6 +508,17 @@ class TasksApi extends base_1.BaseAPI {
|
|
|
410
508
|
deleteTask(requestParameters) {
|
|
411
509
|
return (0, exports.TasksApiFp)(this.configuration).deleteTask(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
412
510
|
}
|
|
511
|
+
/**
|
|
512
|
+
* Same as `deleteTask`, but resolves with the response body together with the HTTP status and headers.
|
|
513
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
514
|
+
* @param {TasksApiDeleteTaskRequest} requestParameters Request parameters.
|
|
515
|
+
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
* @memberof TasksApi
|
|
518
|
+
*/
|
|
519
|
+
deleteTaskWithHttpInfo(requestParameters) {
|
|
520
|
+
return (0, exports.TasksApiFp)(this.configuration).deleteTaskWithHttpInfo(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
521
|
+
}
|
|
413
522
|
/**
|
|
414
523
|
* Returns the details of a specific task.
|
|
415
524
|
* @summary Get details of a task
|
|
@@ -421,6 +530,17 @@ class TasksApi extends base_1.BaseAPI {
|
|
|
421
530
|
getTask(requestParameters) {
|
|
422
531
|
return (0, exports.TasksApiFp)(this.configuration).getTask(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
423
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Same as `getTask`, but resolves with the response body together with the HTTP status and headers.
|
|
535
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
536
|
+
* @param {TasksApiGetTaskRequest} requestParameters Request parameters.
|
|
537
|
+
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
* @memberof TasksApi
|
|
540
|
+
*/
|
|
541
|
+
getTaskWithHttpInfo(requestParameters) {
|
|
542
|
+
return (0, exports.TasksApiFp)(this.configuration).getTaskWithHttpInfo(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
543
|
+
}
|
|
424
544
|
/**
|
|
425
545
|
* Returns all tasks.
|
|
426
546
|
* @summary Get all tasks
|
|
@@ -432,6 +552,17 @@ class TasksApi extends base_1.BaseAPI {
|
|
|
432
552
|
getTasks(requestParameters = {}) {
|
|
433
553
|
return (0, exports.TasksApiFp)(this.configuration).getTasks(requestParameters.cursor, requestParameters.limit, requestParameters.is_done, requestParameters.is_milestone, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id).then((request) => request(this.axios, this.basePath));
|
|
434
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* Same as `getTasks`, but resolves with the response body together with the HTTP status and headers.
|
|
557
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
558
|
+
* @param {TasksApiGetTasksRequest} requestParameters Request parameters.
|
|
559
|
+
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
* @memberof TasksApi
|
|
562
|
+
*/
|
|
563
|
+
getTasksWithHttpInfo(requestParameters = {}) {
|
|
564
|
+
return (0, exports.TasksApiFp)(this.configuration).getTasksWithHttpInfo(requestParameters.cursor, requestParameters.limit, requestParameters.is_done, requestParameters.is_milestone, requestParameters.assignee_id, requestParameters.project_id, requestParameters.parent_task_id).then((request) => request(this.axios, this.basePath));
|
|
565
|
+
}
|
|
435
566
|
/**
|
|
436
567
|
* Updates a task.
|
|
437
568
|
* @summary Update a task
|
|
@@ -443,5 +574,16 @@ class TasksApi extends base_1.BaseAPI {
|
|
|
443
574
|
updateTask(requestParameters) {
|
|
444
575
|
return (0, exports.TasksApiFp)(this.configuration).updateTask(requestParameters.id, requestParameters.UpdateTaskRequest).then((request) => request(this.axios, this.basePath));
|
|
445
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Same as `updateTask`, but resolves with the response body together with the HTTP status and headers.
|
|
579
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
580
|
+
* @param {TasksApiUpdateTaskRequest} requestParameters Request parameters.
|
|
581
|
+
|
|
582
|
+
* @throws {RequiredError}
|
|
583
|
+
* @memberof TasksApi
|
|
584
|
+
*/
|
|
585
|
+
updateTaskWithHttpInfo(requestParameters) {
|
|
586
|
+
return (0, exports.TasksApiFp)(this.configuration).updateTaskWithHttpInfo(requestParameters.id, requestParameters.UpdateTaskRequest).then((request) => request(this.axios, this.basePath));
|
|
587
|
+
}
|
|
446
588
|
}
|
|
447
589
|
exports.TasksApi = TasksApi;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
13
|
import type { AxiosInstance } from 'axios';
|
|
14
|
-
import { RequestArgs, BaseAPI } from '../base';
|
|
14
|
+
import { RequestArgs, BaseAPI, ApiResponse } from '../base';
|
|
15
15
|
import { GetFollowersResponse } from '../models';
|
|
16
16
|
/**
|
|
17
17
|
* UsersApi - axios parameter creator
|
|
@@ -44,6 +44,16 @@ export declare const UsersApiFp: (configuration?: Configuration) => {
|
|
|
44
44
|
* @throws {RequiredError}
|
|
45
45
|
*/
|
|
46
46
|
getUserFollowers(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetFollowersResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Same as `getUserFollowers`, but resolves with the response body together with the HTTP status and headers.
|
|
49
|
+
* @summary List followers of a user
|
|
50
|
+
* @param {number} id The ID of the user
|
|
51
|
+
* @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
|
|
52
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
|
53
|
+
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
getUserFollowersWithHttpInfo(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<ApiResponse<GetFollowersResponse>>>;
|
|
47
57
|
};
|
|
48
58
|
/**
|
|
49
59
|
* UsersApi - factory interface
|
|
@@ -58,6 +68,7 @@ export declare const UsersApiFactory: (configuration?: Configuration, basePath?:
|
|
|
58
68
|
* @throws {RequiredError}
|
|
59
69
|
*/
|
|
60
70
|
getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest): Promise<GetFollowersResponse>;
|
|
71
|
+
getUserFollowersWithHttpInfo(requestParameters: UsersApiGetUserFollowersRequest): Promise<ApiResponse<GetFollowersResponse>>;
|
|
61
72
|
};
|
|
62
73
|
/**
|
|
63
74
|
* Request parameters for getUserFollowers operation in UsersApi.
|
|
@@ -100,4 +111,13 @@ export declare class UsersApi extends BaseAPI {
|
|
|
100
111
|
* @memberof UsersApi
|
|
101
112
|
*/
|
|
102
113
|
getUserFollowers(requestParameters: UsersApiGetUserFollowersRequest): Promise<GetFollowersResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Same as `getUserFollowers`, but resolves with the response body together with the HTTP status and headers.
|
|
116
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
117
|
+
* @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters.
|
|
118
|
+
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
* @memberof UsersApi
|
|
121
|
+
*/
|
|
122
|
+
getUserFollowersWithHttpInfo(requestParameters: UsersApiGetUserFollowersRequest): Promise<ApiResponse<GetFollowersResponse>>;
|
|
103
123
|
}
|
|
@@ -105,6 +105,21 @@ const UsersApiFp = function (configuration) {
|
|
|
105
105
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
|
+
/**
|
|
109
|
+
* Same as `getUserFollowers`, but resolves with the response body together with the HTTP status and headers.
|
|
110
|
+
* @summary List followers of a user
|
|
111
|
+
* @param {number} id The ID of the user
|
|
112
|
+
* @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
|
|
113
|
+
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
|
|
114
|
+
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
getUserFollowersWithHttpInfo(id, limit, cursor) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserFollowers(id, limit, cursor);
|
|
120
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration, true);
|
|
121
|
+
});
|
|
122
|
+
},
|
|
108
123
|
};
|
|
109
124
|
};
|
|
110
125
|
exports.UsersApiFp = UsersApiFp;
|
|
@@ -125,6 +140,9 @@ const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
125
140
|
getUserFollowers(requestParameters) {
|
|
126
141
|
return localVarFp.getUserFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
127
142
|
},
|
|
143
|
+
getUserFollowersWithHttpInfo(requestParameters) {
|
|
144
|
+
return localVarFp.getUserFollowersWithHttpInfo(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
145
|
+
},
|
|
128
146
|
};
|
|
129
147
|
};
|
|
130
148
|
exports.UsersApiFactory = UsersApiFactory;
|
|
@@ -146,5 +164,16 @@ class UsersApi extends base_1.BaseAPI {
|
|
|
146
164
|
getUserFollowers(requestParameters) {
|
|
147
165
|
return (0, exports.UsersApiFp)(this.configuration).getUserFollowers(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
148
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Same as `getUserFollowers`, but resolves with the response body together with the HTTP status and headers.
|
|
169
|
+
* Error rejections keep their usual shape and additionally carry `$response: { status, headers }`.
|
|
170
|
+
* @param {UsersApiGetUserFollowersRequest} requestParameters Request parameters.
|
|
171
|
+
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
* @memberof UsersApi
|
|
174
|
+
*/
|
|
175
|
+
getUserFollowersWithHttpInfo(requestParameters) {
|
|
176
|
+
return (0, exports.UsersApiFp)(this.configuration).getUserFollowersWithHttpInfo(requestParameters.id, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
177
|
+
}
|
|
149
178
|
}
|
|
150
179
|
exports.UsersApi = UsersApi;
|
|
@@ -32,7 +32,24 @@ export interface RequestArgs {
|
|
|
32
32
|
options: AxiosRequestConfig;
|
|
33
33
|
}
|
|
34
34
|
export declare const versionInterceptor: (config: InternalAxiosRequestConfig) => Promise<InternalAxiosRequestConfig<any>>;
|
|
35
|
+
/**
|
|
36
|
+
* Response returned by the `*WithHttpInfo` methods: the parsed body together with the HTTP metadata.
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
* @interface ApiResponse
|
|
40
|
+
*/
|
|
41
|
+
export interface ApiResponse<T> {
|
|
42
|
+
data: T;
|
|
43
|
+
status: number;
|
|
44
|
+
headers: AxiosResponse['headers'];
|
|
45
|
+
}
|
|
35
46
|
export declare const responseInterceptor: (response: AxiosResponse) => any;
|
|
47
|
+
/**
|
|
48
|
+
* Turns a raw AxiosError into the rejection used by the `*WithHttpInfo` methods: the error body fields (if any)
|
|
49
|
+
* plus `$response: { status, headers }`. Values that are not AxiosErrors with a response, including errors that
|
|
50
|
+
* were already normalized, are returned unchanged.
|
|
51
|
+
*/
|
|
52
|
+
export declare const toFullResponseError: (error: any) => any;
|
|
36
53
|
export declare const errorInterceptor: (error: AxiosError) => Promise<never>;
|
|
37
54
|
/**
|
|
38
55
|
*
|
package/dist/versions/v2/base.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.RequiredError = exports.BaseAPI = exports.errorInterceptor = exports.responseInterceptor = exports.versionInterceptor = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
28
|
+
exports.RequiredError = exports.BaseAPI = exports.errorInterceptor = exports.toFullResponseError = exports.responseInterceptor = exports.versionInterceptor = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
29
29
|
const axios_1 = __importDefault(require("axios"));
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
31
31
|
const _pkg = require('../../../package.json');
|
|
@@ -45,11 +45,34 @@ const versionInterceptor = (config) => __awaiter(void 0, void 0, void 0, functio
|
|
|
45
45
|
return config;
|
|
46
46
|
});
|
|
47
47
|
exports.versionInterceptor = versionInterceptor;
|
|
48
|
+
// Set by the `*WithHttpInfo` methods to keep status and headers instead of returning only the body.
|
|
49
|
+
const wantsFullResponse = (config) => !!(config === null || config === void 0 ? void 0 : config.fullResponse);
|
|
48
50
|
const responseInterceptor = (response) => {
|
|
51
|
+
if (wantsFullResponse(response === null || response === void 0 ? void 0 : response.config)) {
|
|
52
|
+
return { data: response.data, status: response.status, headers: response.headers };
|
|
53
|
+
}
|
|
49
54
|
return (response === null || response === void 0 ? void 0 : response.data) ? response.data : response;
|
|
50
55
|
};
|
|
51
56
|
exports.responseInterceptor = responseInterceptor;
|
|
57
|
+
/**
|
|
58
|
+
* Turns a raw AxiosError into the rejection used by the `*WithHttpInfo` methods: the error body fields (if any)
|
|
59
|
+
* plus `$response: { status, headers }`. Values that are not AxiosErrors with a response, including errors that
|
|
60
|
+
* were already normalized, are returned unchanged.
|
|
61
|
+
*/
|
|
62
|
+
const toFullResponseError = (error) => {
|
|
63
|
+
if (!(error === null || error === void 0 ? void 0 : error.isAxiosError) || !error.response) {
|
|
64
|
+
return error;
|
|
65
|
+
}
|
|
66
|
+
const { data, status, headers } = error.response;
|
|
67
|
+
const body = data && typeof data === 'object' ? data : data ? { data } : {};
|
|
68
|
+
return Object.assign(Object.assign({}, body), { $response: { status, headers } });
|
|
69
|
+
};
|
|
70
|
+
exports.toFullResponseError = toFullResponseError;
|
|
52
71
|
const errorInterceptor = (error) => {
|
|
72
|
+
if (error.response && wantsFullResponse(error.config)) {
|
|
73
|
+
// Applies to empty error bodies too, so headers such as Retry-After are not lost.
|
|
74
|
+
return Promise.reject((0, exports.toFullResponseError)(error));
|
|
75
|
+
}
|
|
53
76
|
if (error.response && error.response.data) {
|
|
54
77
|
return Promise.reject(error.response.data);
|
|
55
78
|
}
|
|
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration, fullResponse?: boolean) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -149,12 +149,15 @@ exports.toPathString = toPathString;
|
|
|
149
149
|
*
|
|
150
150
|
* @export
|
|
151
151
|
*/
|
|
152
|
-
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
152
|
+
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration, fullResponse = false) {
|
|
153
153
|
// Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
|
|
154
154
|
// which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
|
|
155
155
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
156
|
-
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
|
157
|
-
|
|
156
|
+
const axiosRequestArgs = Object.assign(Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url }), (fullResponse ? { fullResponse } : {}));
|
|
157
|
+
const request = axios.request(axiosRequestArgs);
|
|
158
|
+
// Instances without the SDK's interceptors (e.g. the default global axios used by Fp and Factory calls)
|
|
159
|
+
// reject with a raw AxiosError, so give full-response errors the same shape as the class API.
|
|
160
|
+
return fullResponse ? request.catch((error) => Promise.reject((0, base_1.toFullResponseError)(error))) : request;
|
|
158
161
|
};
|
|
159
162
|
};
|
|
160
163
|
exports.createRequestFunction = createRequestFunction;
|