pipedrive 30.3.3 → 30.5.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/v2/api/persons-api.d.ts +10 -2
- package/dist/esm/versions/v2/api/persons-api.js +10 -5
- package/dist/esm/versions/v2/api/products-api.d.ts +46 -0
- package/dist/esm/versions/v2/api/products-api.js +68 -0
- package/dist/versions/v2/api/persons-api.d.ts +10 -2
- package/dist/versions/v2/api/persons-api.js +10 -5
- package/dist/versions/v2/api/products-api.d.ts +46 -0
- package/dist/versions/v2/api/products-api.js +68 -0
- package/package.json +1 -1
|
@@ -99,6 +99,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
99
99
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
100
100
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
101
101
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
102
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
102
103
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
103
104
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
104
105
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -110,7 +111,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
110
111
|
|
|
111
112
|
* @throws {RequiredError}
|
|
112
113
|
*/
|
|
113
|
-
getPersons: (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string) => Promise<RequestArgs>;
|
|
114
|
+
getPersons: (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string) => Promise<RequestArgs>;
|
|
114
115
|
/**
|
|
115
116
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
116
117
|
* @summary Search persons
|
|
@@ -211,6 +212,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
|
|
|
211
212
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
212
213
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
213
214
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
215
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
214
216
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
215
217
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
216
218
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -222,7 +224,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
|
|
|
222
224
|
|
|
223
225
|
* @throws {RequiredError}
|
|
224
226
|
*/
|
|
225
|
-
getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonsResponse>>;
|
|
227
|
+
getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonsResponse>>;
|
|
226
228
|
/**
|
|
227
229
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
228
230
|
* @summary Search persons
|
|
@@ -502,6 +504,12 @@ export interface PersonsApiGetPersonsRequest {
|
|
|
502
504
|
* @memberof PersonsApiGetPersons
|
|
503
505
|
*/
|
|
504
506
|
readonly org_id?: number;
|
|
507
|
+
/**
|
|
508
|
+
* If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
509
|
+
* @type {number}
|
|
510
|
+
* @memberof PersonsApiGetPersons
|
|
511
|
+
*/
|
|
512
|
+
readonly deal_id?: number;
|
|
505
513
|
/**
|
|
506
514
|
* If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
507
515
|
* @type {string}
|
|
@@ -307,6 +307,7 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
307
307
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
308
308
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
309
309
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
310
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
310
311
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
311
312
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
312
313
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -318,7 +319,7 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
318
319
|
|
|
319
320
|
* @throws {RequiredError}
|
|
320
321
|
*/
|
|
321
|
-
getPersons: (filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
getPersons: (filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
|
322
323
|
const localVarPath = `/persons`;
|
|
323
324
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
324
325
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -346,6 +347,9 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
346
347
|
if (org_id !== undefined) {
|
|
347
348
|
localVarQueryParameter['org_id'] = org_id;
|
|
348
349
|
}
|
|
350
|
+
if (deal_id !== undefined) {
|
|
351
|
+
localVarQueryParameter['deal_id'] = deal_id;
|
|
352
|
+
}
|
|
349
353
|
if (updated_since !== undefined) {
|
|
350
354
|
localVarQueryParameter['updated_since'] = updated_since;
|
|
351
355
|
}
|
|
@@ -590,6 +594,7 @@ export const PersonsApiFp = function (configuration) {
|
|
|
590
594
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
591
595
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
592
596
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
597
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
593
598
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
594
599
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
595
600
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -601,9 +606,9 @@ export const PersonsApiFp = function (configuration) {
|
|
|
601
606
|
|
|
602
607
|
* @throws {RequiredError}
|
|
603
608
|
*/
|
|
604
|
-
getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
|
609
|
+
getPersons(filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
|
605
610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
606
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
|
611
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
|
607
612
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
608
613
|
});
|
|
609
614
|
},
|
|
@@ -727,7 +732,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
|
|
|
727
732
|
* @throws {RequiredError}
|
|
728
733
|
*/
|
|
729
734
|
getPersons(requestParameters = {}) {
|
|
730
|
-
return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
735
|
+
return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.deal_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
731
736
|
},
|
|
732
737
|
/**
|
|
733
738
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
@@ -844,7 +849,7 @@ export class PersonsApi extends BaseAPI {
|
|
|
844
849
|
* @memberof PersonsApi
|
|
845
850
|
*/
|
|
846
851
|
getPersons(requestParameters = {}) {
|
|
847
|
-
return PersonsApiFp(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
852
|
+
return PersonsApiFp(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.deal_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
848
853
|
}
|
|
849
854
|
/**
|
|
850
855
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
@@ -98,6 +98,14 @@ export declare const ProductsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
98
98
|
* @throws {RequiredError}
|
|
99
99
|
*/
|
|
100
100
|
deleteProductVariation: (id: number, product_variation_id: number) => Promise<RequestArgs>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
103
|
+
* @summary Duplicate a product
|
|
104
|
+
* @param {number} id The ID of the product
|
|
105
|
+
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
duplicateProduct: (id: number) => Promise<RequestArgs>;
|
|
101
109
|
/**
|
|
102
110
|
* Returns data about a specific product.
|
|
103
111
|
* @summary Get one product
|
|
@@ -275,6 +283,14 @@ export declare const ProductsApiFp: (configuration?: Configuration) => {
|
|
|
275
283
|
* @throws {RequiredError}
|
|
276
284
|
*/
|
|
277
285
|
deleteProductVariation(id: number, product_variation_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteProductVariationResponse>>;
|
|
286
|
+
/**
|
|
287
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
288
|
+
* @summary Duplicate a product
|
|
289
|
+
* @param {number} id The ID of the product
|
|
290
|
+
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
duplicateProduct(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProductResponse>>;
|
|
278
294
|
/**
|
|
279
295
|
* Returns data about a specific product.
|
|
280
296
|
* @summary Get one product
|
|
@@ -448,6 +464,14 @@ export declare const ProductsApiFactory: (configuration?: Configuration, basePat
|
|
|
448
464
|
* @throws {RequiredError}
|
|
449
465
|
*/
|
|
450
466
|
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise<DeleteProductVariationResponse>;
|
|
467
|
+
/**
|
|
468
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
469
|
+
* @summary Duplicate a product
|
|
470
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
471
|
+
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise<GetProductResponse>;
|
|
451
475
|
/**
|
|
452
476
|
* Returns data about a specific product.
|
|
453
477
|
* @summary Get one product
|
|
@@ -652,6 +676,19 @@ export interface ProductsApiDeleteProductVariationRequest {
|
|
|
652
676
|
*/
|
|
653
677
|
readonly product_variation_id: number;
|
|
654
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Request parameters for duplicateProduct operation in ProductsApi.
|
|
681
|
+
* @export
|
|
682
|
+
* @interface ProductsApiDuplicateProductRequest
|
|
683
|
+
*/
|
|
684
|
+
export interface ProductsApiDuplicateProductRequest {
|
|
685
|
+
/**
|
|
686
|
+
* The ID of the product
|
|
687
|
+
* @type {number}
|
|
688
|
+
* @memberof ProductsApiDuplicateProduct
|
|
689
|
+
*/
|
|
690
|
+
readonly id: number;
|
|
691
|
+
}
|
|
655
692
|
/**
|
|
656
693
|
* Request parameters for getProduct operation in ProductsApi.
|
|
657
694
|
* @export
|
|
@@ -1003,6 +1040,15 @@ export declare class ProductsApi extends BaseAPI {
|
|
|
1003
1040
|
* @memberof ProductsApi
|
|
1004
1041
|
*/
|
|
1005
1042
|
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise<DeleteProductVariationResponse>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1045
|
+
* @summary Duplicate a product
|
|
1046
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1047
|
+
|
|
1048
|
+
* @throws {RequiredError}
|
|
1049
|
+
* @memberof ProductsApi
|
|
1050
|
+
*/
|
|
1051
|
+
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise<GetProductResponse>;
|
|
1006
1052
|
/**
|
|
1007
1053
|
* Returns data about a specific product.
|
|
1008
1054
|
* @summary Get one product
|
|
@@ -283,6 +283,40 @@ export const ProductsApiAxiosParamCreator = function (configuration) {
|
|
|
283
283
|
options: localVarRequestOptions,
|
|
284
284
|
};
|
|
285
285
|
}),
|
|
286
|
+
/**
|
|
287
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
288
|
+
* @summary Duplicate a product
|
|
289
|
+
* @param {number} id The ID of the product
|
|
290
|
+
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
duplicateProduct: (id) => __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
// verify required parameter 'id' is not null or undefined
|
|
295
|
+
assertParamExists('duplicateProduct', 'id', id);
|
|
296
|
+
const localVarPath = `/products/{id}/duplicate`
|
|
297
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
298
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
300
|
+
let baseOptions;
|
|
301
|
+
if (configuration) {
|
|
302
|
+
baseOptions = configuration.baseOptions;
|
|
303
|
+
}
|
|
304
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
|
305
|
+
const localVarHeaderParameter = {};
|
|
306
|
+
const localVarQueryParameter = {};
|
|
307
|
+
// authentication api_key required
|
|
308
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
|
|
309
|
+
// authentication oauth2 required
|
|
310
|
+
// oauth required
|
|
311
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
|
|
312
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
313
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
314
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
|
315
|
+
return {
|
|
316
|
+
url: toPathString(localVarUrlObj),
|
|
317
|
+
options: localVarRequestOptions,
|
|
318
|
+
};
|
|
319
|
+
}),
|
|
286
320
|
/**
|
|
287
321
|
* Returns data about a specific product.
|
|
288
322
|
* @summary Get one product
|
|
@@ -863,6 +897,19 @@ export const ProductsApiFp = function (configuration) {
|
|
|
863
897
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
864
898
|
});
|
|
865
899
|
},
|
|
900
|
+
/**
|
|
901
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
902
|
+
* @summary Duplicate a product
|
|
903
|
+
* @param {number} id The ID of the product
|
|
904
|
+
|
|
905
|
+
* @throws {RequiredError}
|
|
906
|
+
*/
|
|
907
|
+
duplicateProduct(id) {
|
|
908
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
909
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.duplicateProduct(id);
|
|
910
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
911
|
+
});
|
|
912
|
+
},
|
|
866
913
|
/**
|
|
867
914
|
* Returns data about a specific product.
|
|
868
915
|
* @summary Get one product
|
|
@@ -1108,6 +1155,16 @@ export const ProductsApiFactory = function (configuration, basePath, axios) {
|
|
|
1108
1155
|
deleteProductVariation(requestParameters) {
|
|
1109
1156
|
return localVarFp.deleteProductVariation(requestParameters.id, requestParameters.product_variation_id).then((request) => request(axios, basePath));
|
|
1110
1157
|
},
|
|
1158
|
+
/**
|
|
1159
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1160
|
+
* @summary Duplicate a product
|
|
1161
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1162
|
+
|
|
1163
|
+
* @throws {RequiredError}
|
|
1164
|
+
*/
|
|
1165
|
+
duplicateProduct(requestParameters) {
|
|
1166
|
+
return localVarFp.duplicateProduct(requestParameters.id).then((request) => request(axios, basePath));
|
|
1167
|
+
},
|
|
1111
1168
|
/**
|
|
1112
1169
|
* Returns data about a specific product.
|
|
1113
1170
|
* @summary Get one product
|
|
@@ -1304,6 +1361,17 @@ export class ProductsApi extends BaseAPI {
|
|
|
1304
1361
|
deleteProductVariation(requestParameters) {
|
|
1305
1362
|
return ProductsApiFp(this.configuration).deleteProductVariation(requestParameters.id, requestParameters.product_variation_id).then((request) => request(this.axios, this.basePath));
|
|
1306
1363
|
}
|
|
1364
|
+
/**
|
|
1365
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1366
|
+
* @summary Duplicate a product
|
|
1367
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1368
|
+
|
|
1369
|
+
* @throws {RequiredError}
|
|
1370
|
+
* @memberof ProductsApi
|
|
1371
|
+
*/
|
|
1372
|
+
duplicateProduct(requestParameters) {
|
|
1373
|
+
return ProductsApiFp(this.configuration).duplicateProduct(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
1374
|
+
}
|
|
1307
1375
|
/**
|
|
1308
1376
|
* Returns data about a specific product.
|
|
1309
1377
|
* @summary Get one product
|
|
@@ -99,6 +99,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
99
99
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
100
100
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
101
101
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
102
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
102
103
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
103
104
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
104
105
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -110,7 +111,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
110
111
|
|
|
111
112
|
* @throws {RequiredError}
|
|
112
113
|
*/
|
|
113
|
-
getPersons: (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string) => Promise<RequestArgs>;
|
|
114
|
+
getPersons: (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string) => Promise<RequestArgs>;
|
|
114
115
|
/**
|
|
115
116
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
116
117
|
* @summary Search persons
|
|
@@ -211,6 +212,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
|
|
|
211
212
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
212
213
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
213
214
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
215
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
214
216
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
215
217
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
216
218
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -222,7 +224,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
|
|
|
222
224
|
|
|
223
225
|
* @throws {RequiredError}
|
|
224
226
|
*/
|
|
225
|
-
getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonsResponse>>;
|
|
227
|
+
getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status', custom_fields?: string, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonsResponse>>;
|
|
226
228
|
/**
|
|
227
229
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
228
230
|
* @summary Search persons
|
|
@@ -502,6 +504,12 @@ export interface PersonsApiGetPersonsRequest {
|
|
|
502
504
|
* @memberof PersonsApiGetPersons
|
|
503
505
|
*/
|
|
504
506
|
readonly org_id?: number;
|
|
507
|
+
/**
|
|
508
|
+
* If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
509
|
+
* @type {number}
|
|
510
|
+
* @memberof PersonsApiGetPersons
|
|
511
|
+
*/
|
|
512
|
+
readonly deal_id?: number;
|
|
505
513
|
/**
|
|
506
514
|
* If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
507
515
|
* @type {string}
|
|
@@ -313,6 +313,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
313
313
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
314
314
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
315
315
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
316
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
316
317
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
317
318
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
318
319
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -324,7 +325,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
324
325
|
|
|
325
326
|
* @throws {RequiredError}
|
|
326
327
|
*/
|
|
327
|
-
getPersons: (filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
getPersons: (filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) => __awaiter(this, void 0, void 0, function* () {
|
|
328
329
|
const localVarPath = `/persons`;
|
|
329
330
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
330
331
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -352,6 +353,9 @@ const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
352
353
|
if (org_id !== undefined) {
|
|
353
354
|
localVarQueryParameter['org_id'] = org_id;
|
|
354
355
|
}
|
|
356
|
+
if (deal_id !== undefined) {
|
|
357
|
+
localVarQueryParameter['deal_id'] = deal_id;
|
|
358
|
+
}
|
|
355
359
|
if (updated_since !== undefined) {
|
|
356
360
|
localVarQueryParameter['updated_since'] = updated_since;
|
|
357
361
|
}
|
|
@@ -597,6 +601,7 @@ const PersonsApiFp = function (configuration) {
|
|
|
597
601
|
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
|
|
598
602
|
* @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored.
|
|
599
603
|
* @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored.
|
|
604
|
+
* @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored.
|
|
600
605
|
* @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
601
606
|
* @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
|
|
602
607
|
* @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
|
|
@@ -608,9 +613,9 @@ const PersonsApiFp = function (configuration) {
|
|
|
608
613
|
|
|
609
614
|
* @throws {RequiredError}
|
|
610
615
|
*/
|
|
611
|
-
getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
|
616
|
+
getPersons(filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor) {
|
|
612
617
|
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
|
618
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersons(filter_id, ids, owner_id, org_id, deal_id, updated_since, updated_until, sort_by, sort_direction, include_fields, custom_fields, limit, cursor);
|
|
614
619
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
615
620
|
});
|
|
616
621
|
},
|
|
@@ -735,7 +740,7 @@ const PersonsApiFactory = function (configuration, basePath, axios) {
|
|
|
735
740
|
* @throws {RequiredError}
|
|
736
741
|
*/
|
|
737
742
|
getPersons(requestParameters = {}) {
|
|
738
|
-
return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
743
|
+
return localVarFp.getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.deal_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
|
|
739
744
|
},
|
|
740
745
|
/**
|
|
741
746
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
@@ -853,7 +858,7 @@ class PersonsApi extends base_1.BaseAPI {
|
|
|
853
858
|
* @memberof PersonsApi
|
|
854
859
|
*/
|
|
855
860
|
getPersons(requestParameters = {}) {
|
|
856
|
-
return (0, exports.PersonsApiFp)(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
861
|
+
return (0, exports.PersonsApiFp)(this.configuration).getPersons(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.org_id, requestParameters.deal_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.custom_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
|
|
857
862
|
}
|
|
858
863
|
/**
|
|
859
864
|
* Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found persons can be filtered by organization ID.
|
|
@@ -98,6 +98,14 @@ export declare const ProductsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
98
98
|
* @throws {RequiredError}
|
|
99
99
|
*/
|
|
100
100
|
deleteProductVariation: (id: number, product_variation_id: number) => Promise<RequestArgs>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
103
|
+
* @summary Duplicate a product
|
|
104
|
+
* @param {number} id The ID of the product
|
|
105
|
+
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
duplicateProduct: (id: number) => Promise<RequestArgs>;
|
|
101
109
|
/**
|
|
102
110
|
* Returns data about a specific product.
|
|
103
111
|
* @summary Get one product
|
|
@@ -275,6 +283,14 @@ export declare const ProductsApiFp: (configuration?: Configuration) => {
|
|
|
275
283
|
* @throws {RequiredError}
|
|
276
284
|
*/
|
|
277
285
|
deleteProductVariation(id: number, product_variation_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteProductVariationResponse>>;
|
|
286
|
+
/**
|
|
287
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
288
|
+
* @summary Duplicate a product
|
|
289
|
+
* @param {number} id The ID of the product
|
|
290
|
+
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
duplicateProduct(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProductResponse>>;
|
|
278
294
|
/**
|
|
279
295
|
* Returns data about a specific product.
|
|
280
296
|
* @summary Get one product
|
|
@@ -448,6 +464,14 @@ export declare const ProductsApiFactory: (configuration?: Configuration, basePat
|
|
|
448
464
|
* @throws {RequiredError}
|
|
449
465
|
*/
|
|
450
466
|
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise<DeleteProductVariationResponse>;
|
|
467
|
+
/**
|
|
468
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
469
|
+
* @summary Duplicate a product
|
|
470
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
471
|
+
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise<GetProductResponse>;
|
|
451
475
|
/**
|
|
452
476
|
* Returns data about a specific product.
|
|
453
477
|
* @summary Get one product
|
|
@@ -652,6 +676,19 @@ export interface ProductsApiDeleteProductVariationRequest {
|
|
|
652
676
|
*/
|
|
653
677
|
readonly product_variation_id: number;
|
|
654
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Request parameters for duplicateProduct operation in ProductsApi.
|
|
681
|
+
* @export
|
|
682
|
+
* @interface ProductsApiDuplicateProductRequest
|
|
683
|
+
*/
|
|
684
|
+
export interface ProductsApiDuplicateProductRequest {
|
|
685
|
+
/**
|
|
686
|
+
* The ID of the product
|
|
687
|
+
* @type {number}
|
|
688
|
+
* @memberof ProductsApiDuplicateProduct
|
|
689
|
+
*/
|
|
690
|
+
readonly id: number;
|
|
691
|
+
}
|
|
655
692
|
/**
|
|
656
693
|
* Request parameters for getProduct operation in ProductsApi.
|
|
657
694
|
* @export
|
|
@@ -1003,6 +1040,15 @@ export declare class ProductsApi extends BaseAPI {
|
|
|
1003
1040
|
* @memberof ProductsApi
|
|
1004
1041
|
*/
|
|
1005
1042
|
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise<DeleteProductVariationResponse>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1045
|
+
* @summary Duplicate a product
|
|
1046
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1047
|
+
|
|
1048
|
+
* @throws {RequiredError}
|
|
1049
|
+
* @memberof ProductsApi
|
|
1050
|
+
*/
|
|
1051
|
+
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise<GetProductResponse>;
|
|
1006
1052
|
/**
|
|
1007
1053
|
* Returns data about a specific product.
|
|
1008
1054
|
* @summary Get one product
|
|
@@ -289,6 +289,40 @@ const ProductsApiAxiosParamCreator = function (configuration) {
|
|
|
289
289
|
options: localVarRequestOptions,
|
|
290
290
|
};
|
|
291
291
|
}),
|
|
292
|
+
/**
|
|
293
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
294
|
+
* @summary Duplicate a product
|
|
295
|
+
* @param {number} id The ID of the product
|
|
296
|
+
|
|
297
|
+
* @throws {RequiredError}
|
|
298
|
+
*/
|
|
299
|
+
duplicateProduct: (id) => __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
// verify required parameter 'id' is not null or undefined
|
|
301
|
+
(0, common_1.assertParamExists)('duplicateProduct', 'id', id);
|
|
302
|
+
const localVarPath = `/products/{id}/duplicate`
|
|
303
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
304
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
305
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
306
|
+
let baseOptions;
|
|
307
|
+
if (configuration) {
|
|
308
|
+
baseOptions = configuration.baseOptions;
|
|
309
|
+
}
|
|
310
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
|
|
311
|
+
const localVarHeaderParameter = {};
|
|
312
|
+
const localVarQueryParameter = {};
|
|
313
|
+
// authentication api_key required
|
|
314
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-token", configuration);
|
|
315
|
+
// authentication oauth2 required
|
|
316
|
+
// oauth required
|
|
317
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
|
|
318
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
319
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
320
|
+
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
|
321
|
+
return {
|
|
322
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
323
|
+
options: localVarRequestOptions,
|
|
324
|
+
};
|
|
325
|
+
}),
|
|
292
326
|
/**
|
|
293
327
|
* Returns data about a specific product.
|
|
294
328
|
* @summary Get one product
|
|
@@ -870,6 +904,19 @@ const ProductsApiFp = function (configuration) {
|
|
|
870
904
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
871
905
|
});
|
|
872
906
|
},
|
|
907
|
+
/**
|
|
908
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
909
|
+
* @summary Duplicate a product
|
|
910
|
+
* @param {number} id The ID of the product
|
|
911
|
+
|
|
912
|
+
* @throws {RequiredError}
|
|
913
|
+
*/
|
|
914
|
+
duplicateProduct(id) {
|
|
915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
916
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.duplicateProduct(id);
|
|
917
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
918
|
+
});
|
|
919
|
+
},
|
|
873
920
|
/**
|
|
874
921
|
* Returns data about a specific product.
|
|
875
922
|
* @summary Get one product
|
|
@@ -1116,6 +1163,16 @@ const ProductsApiFactory = function (configuration, basePath, axios) {
|
|
|
1116
1163
|
deleteProductVariation(requestParameters) {
|
|
1117
1164
|
return localVarFp.deleteProductVariation(requestParameters.id, requestParameters.product_variation_id).then((request) => request(axios, basePath));
|
|
1118
1165
|
},
|
|
1166
|
+
/**
|
|
1167
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1168
|
+
* @summary Duplicate a product
|
|
1169
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1170
|
+
|
|
1171
|
+
* @throws {RequiredError}
|
|
1172
|
+
*/
|
|
1173
|
+
duplicateProduct(requestParameters) {
|
|
1174
|
+
return localVarFp.duplicateProduct(requestParameters.id).then((request) => request(axios, basePath));
|
|
1175
|
+
},
|
|
1119
1176
|
/**
|
|
1120
1177
|
* Returns data about a specific product.
|
|
1121
1178
|
* @summary Get one product
|
|
@@ -1313,6 +1370,17 @@ class ProductsApi extends base_1.BaseAPI {
|
|
|
1313
1370
|
deleteProductVariation(requestParameters) {
|
|
1314
1371
|
return (0, exports.ProductsApiFp)(this.configuration).deleteProductVariation(requestParameters.id, requestParameters.product_variation_id).then((request) => request(this.axios, this.basePath));
|
|
1315
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
|
|
1375
|
+
* @summary Duplicate a product
|
|
1376
|
+
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
|
|
1377
|
+
|
|
1378
|
+
* @throws {RequiredError}
|
|
1379
|
+
* @memberof ProductsApi
|
|
1380
|
+
*/
|
|
1381
|
+
duplicateProduct(requestParameters) {
|
|
1382
|
+
return (0, exports.ProductsApiFp)(this.configuration).duplicateProduct(requestParameters.id).then((request) => request(this.axios, this.basePath));
|
|
1383
|
+
}
|
|
1316
1384
|
/**
|
|
1317
1385
|
* Returns data about a specific product.
|
|
1318
1386
|
* @summary Get one product
|