ebay-mcp 1.14.0 → 1.14.2
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/README.de.md +5 -0
- package/README.es.md +5 -0
- package/README.fr.md +5 -0
- package/README.ja.md +5 -0
- package/README.ko.md +5 -0
- package/README.md +1 -0
- package/README.pt-BR.md +5 -0
- package/README.ru.md +5 -0
- package/README.zh-CN.md +5 -0
- package/build/api/clientTrading.js +2 -3
- package/build/api/listing-management/inventory.js +7 -888
- package/build/api/listing-management/items.js +408 -0
- package/build/api/listing-management/locations.js +172 -0
- package/build/api/listing-management/offers.js +284 -0
- package/build/api/listing-management/shared.js +1 -0
- package/build/api/marketing-and-promotions/ads.js +621 -0
- package/build/api/marketing-and-promotions/campaigns.js +362 -0
- package/build/api/marketing-and-promotions/marketing.js +8 -1530
- package/build/api/marketing-and-promotions/promotions.js +422 -0
- package/build/api/marketing-and-promotions/reports.js +137 -0
- package/build/api/marketing-and-promotions/shared.js +4 -0
- package/build/{utils → auth}/oauthHelper.js +1 -1
- package/build/config/environment.js +56 -0
- package/build/schemas/marketing/ads.js +769 -0
- package/build/schemas/marketing/campaigns.js +361 -0
- package/build/schemas/marketing/common.js +152 -0
- package/build/schemas/marketing/jsonSchemas.js +118 -0
- package/build/schemas/marketing/marketing.js +10 -2016
- package/build/schemas/marketing/promotions.js +480 -0
- package/build/schemas/marketing/reports.js +162 -0
- package/build/scripts/devSync.js +28 -23
- package/build/scripts/diagnostics.js +3 -3
- package/build/scripts/interactiveSetup.js +4 -4
- package/build/{utils → scripts}/scopeHelper.js +1 -1
- package/build/{utils → scripts}/securityChecker.js +1 -1
- package/build/scripts/setup.js +4 -4
- package/build/{utils → scripts}/setupValidator.js +2 -2
- package/build/{utils → scripts}/setupWizard.js +1 -1
- package/package.json +1 -1
- package/build/tools/tool-handlers/types.js +0 -1
- /package/build/tools/{definitions/types.js → types.js} +0 -0
|
@@ -1,1534 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { createMarketingAdsMethods } from './ads.js';
|
|
2
|
+
import { createMarketingCampaignsMethods } from './campaigns.js';
|
|
3
|
+
import { createMarketingPromotionsMethods } from './promotions.js';
|
|
4
|
+
import { createMarketingReportsMethods } from './reports.js';
|
|
5
|
+
/**
|
|
6
|
+
* Composes Marketing subdomain method maps onto one facade instance.
|
|
7
|
+
*/
|
|
7
8
|
export class MarketingApi {
|
|
8
|
-
client;
|
|
9
9
|
constructor(client) {
|
|
10
|
-
this
|
|
10
|
+
Object.assign(this, createMarketingAdsMethods(client), createMarketingCampaignsMethods(client), createMarketingPromotionsMethods(client), createMarketingReportsMethods(client));
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Bulk create ads by inventory reference through the eBay Marketing API.
|
|
14
|
-
*
|
|
15
|
-
* @param input - Path, query, header, and request body values for bulkCreateAdsByInventoryReference.
|
|
16
|
-
* @returns An Effect that succeeds with eBay's generated bulkCreateAdsByInventoryReference response DTO.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const response = await Effect.runPromise(marketingApi.bulkCreateAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByInventoryReference
|
|
24
|
-
*/
|
|
25
|
-
bulkCreateAdsByInventoryReference = (input) => {
|
|
26
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_ads_by_inventory_reference`;
|
|
27
|
-
return requestPostEffect(this.client, path, input.request);
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Bulk create ads by listing id through the eBay Marketing API.
|
|
31
|
-
*
|
|
32
|
-
* @param input - Path, query, header, and request body values for bulkCreateAdsByListingId.
|
|
33
|
-
* @returns An Effect that succeeds with eBay's generated bulkCreateAdsByListingId response DTO.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const response = await Effect.runPromise(marketingApi.bulkCreateAdsByListingId({ campaignId: 'campaign-1', request: { ... } }));
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByListingId
|
|
41
|
-
*/
|
|
42
|
-
bulkCreateAdsByListingId = (input) => {
|
|
43
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_ads_by_listing_id`;
|
|
44
|
-
return requestPostEffect(this.client, path, input.request);
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Bulk delete ads by inventory reference through the eBay Marketing API.
|
|
48
|
-
*
|
|
49
|
-
* @param input - Path, query, header, and request body values for bulkDeleteAdsByInventoryReference.
|
|
50
|
-
* @returns An Effect that succeeds with eBay's generated bulkDeleteAdsByInventoryReference response DTO.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const response = await Effect.runPromise(marketingApi.bulkDeleteAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkDeleteAdsByInventoryReference
|
|
58
|
-
*/
|
|
59
|
-
bulkDeleteAdsByInventoryReference = (input) => {
|
|
60
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_delete_ads_by_inventory_reference`;
|
|
61
|
-
return requestPostEffect(this.client, path, input.request);
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Bulk delete ads by listing id through the eBay Marketing API.
|
|
65
|
-
*
|
|
66
|
-
* @param input - Path, query, header, and request body values for bulkDeleteAdsByListingId.
|
|
67
|
-
* @returns An Effect that succeeds with eBay's generated bulkDeleteAdsByListingId response DTO.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* const response = await Effect.runPromise(marketingApi.bulkDeleteAdsByListingId({ campaignId: 'campaign-1', request: { ... } }));
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkDeleteAdsByListingId
|
|
75
|
-
*/
|
|
76
|
-
bulkDeleteAdsByListingId = (input) => {
|
|
77
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_delete_ads_by_listing_id`;
|
|
78
|
-
return requestPostEffect(this.client, path, input.request);
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Bulk update ads bid by inventory reference through the eBay Marketing API.
|
|
82
|
-
*
|
|
83
|
-
* @param input - Path, query, header, and request body values for bulkUpdateAdsBidByInventoryReference.
|
|
84
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateAdsBidByInventoryReference response DTO.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateAdsBidByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsBidByInventoryReference
|
|
92
|
-
*/
|
|
93
|
-
bulkUpdateAdsBidByInventoryReference = (input) => {
|
|
94
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_bid_by_inventory_reference`;
|
|
95
|
-
return requestPostEffect(this.client, path, input.request);
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Bulk update ads bid by listing id through the eBay Marketing API.
|
|
99
|
-
*
|
|
100
|
-
* @param input - Path, query, header, and request body values for bulkUpdateAdsBidByListingId.
|
|
101
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateAdsBidByListingId response DTO.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```ts
|
|
105
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateAdsBidByListingId({ campaignId: 'campaign-1', request: { ... } }));
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsBidByListingId
|
|
109
|
-
*/
|
|
110
|
-
bulkUpdateAdsBidByListingId = (input) => {
|
|
111
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_bid_by_listing_id`;
|
|
112
|
-
return requestPostEffect(this.client, path, input.request);
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Bulk update ads status through the eBay Marketing API.
|
|
116
|
-
*
|
|
117
|
-
* @param input - Path, query, header, and request body values for bulkUpdateAdsStatus.
|
|
118
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateAdsStatus response DTO.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateAdsStatus({ campaignId: 'campaign-1', request: { ... } }));
|
|
123
|
-
* ```
|
|
124
|
-
*
|
|
125
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsStatus
|
|
126
|
-
*/
|
|
127
|
-
bulkUpdateAdsStatus = (input) => {
|
|
128
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_status`;
|
|
129
|
-
return requestPostEffect(this.client, path, input.request);
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Bulk update ads status by listing id through the eBay Marketing API.
|
|
133
|
-
*
|
|
134
|
-
* @param input - Path, query, header, and request body values for bulkUpdateAdsStatusByListingId.
|
|
135
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateAdsStatusByListingId response DTO.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```ts
|
|
139
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateAdsStatusByListingId({ campaignId: 'campaign-1', request: { ... } }));
|
|
140
|
-
* ```
|
|
141
|
-
*
|
|
142
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsStatusByListingId
|
|
143
|
-
*/
|
|
144
|
-
bulkUpdateAdsStatusByListingId = (input) => {
|
|
145
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_status_by_listing_id`;
|
|
146
|
-
return requestPostEffect(this.client, path, input.request);
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Get ads through the eBay Marketing API.
|
|
150
|
-
*
|
|
151
|
-
* @param input - Path, query, header, and request body values for getAds.
|
|
152
|
-
* @returns An Effect that succeeds with eBay's generated getAds response DTO.
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```ts
|
|
156
|
-
* const response = await Effect.runPromise(marketingApi.getAds({ campaignId: 'campaign-1' }));
|
|
157
|
-
* ```
|
|
158
|
-
*
|
|
159
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAds
|
|
160
|
-
*/
|
|
161
|
-
getAds = (input) => {
|
|
162
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad`;
|
|
163
|
-
const params = buildEndpointParams({
|
|
164
|
-
adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
|
|
165
|
-
adStatus: { wireName: 'ad_status', value: input.adStatus },
|
|
166
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
167
|
-
listingIds: { wireName: 'listing_ids', value: input.listingIds },
|
|
168
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
169
|
-
});
|
|
170
|
-
return requestGetEffect(this.client, path, params);
|
|
171
|
-
};
|
|
172
|
-
/**
|
|
173
|
-
* Create ad by listing id through the eBay Marketing API.
|
|
174
|
-
*
|
|
175
|
-
* @param input - Path, query, header, and request body values for createAdByListingId.
|
|
176
|
-
* @returns An Effect that succeeds with eBay's generated createAdByListingId response DTO.
|
|
177
|
-
*
|
|
178
|
-
* @example
|
|
179
|
-
* ```ts
|
|
180
|
-
* const response = await Effect.runPromise(marketingApi.createAdByListingId({ campaignId: 'campaign-1', request: { ... } }));
|
|
181
|
-
* ```
|
|
182
|
-
*
|
|
183
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/createAdByListingId
|
|
184
|
-
*/
|
|
185
|
-
createAdByListingId = (input) => {
|
|
186
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad`;
|
|
187
|
-
return requestPostEffect(this.client, path, input.request);
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* Create ads by inventory reference through the eBay Marketing API.
|
|
191
|
-
*
|
|
192
|
-
* @param input - Path, query, header, and request body values for createAdsByInventoryReference.
|
|
193
|
-
* @returns An Effect that succeeds with eBay's generated createAdsByInventoryReference response DTO.
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* ```ts
|
|
197
|
-
* const response = await Effect.runPromise(marketingApi.createAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
|
|
198
|
-
* ```
|
|
199
|
-
*
|
|
200
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/createAdsByInventoryReference
|
|
201
|
-
*/
|
|
202
|
-
createAdsByInventoryReference = (input) => {
|
|
203
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/create_ads_by_inventory_reference`;
|
|
204
|
-
return requestPostEffect(this.client, path, input.request);
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* Get ad through the eBay Marketing API.
|
|
208
|
-
*
|
|
209
|
-
* @param input - Path, query, header, and request body values for getAd.
|
|
210
|
-
* @returns An Effect that succeeds with eBay's generated getAd response DTO.
|
|
211
|
-
*
|
|
212
|
-
* @example
|
|
213
|
-
* ```ts
|
|
214
|
-
* const response = await Effect.runPromise(marketingApi.getAd({ adId: 'ad-1', campaignId: 'campaign-1' }));
|
|
215
|
-
* ```
|
|
216
|
-
*
|
|
217
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAd
|
|
218
|
-
*/
|
|
219
|
-
getAd = (input) => {
|
|
220
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}`;
|
|
221
|
-
return requestGetEffect(this.client, path);
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* Delete ad through the eBay Marketing API.
|
|
225
|
-
*
|
|
226
|
-
* @param input - Path, query, header, and request body values for deleteAd.
|
|
227
|
-
* @returns An Effect that succeeds with eBay's generated deleteAd response DTO.
|
|
228
|
-
*
|
|
229
|
-
* @example
|
|
230
|
-
* ```ts
|
|
231
|
-
* const response = await Effect.runPromise(marketingApi.deleteAd({ adId: 'ad-1', campaignId: 'campaign-1' }));
|
|
232
|
-
* ```
|
|
233
|
-
*
|
|
234
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/deleteAd
|
|
235
|
-
*/
|
|
236
|
-
deleteAd = (input) => {
|
|
237
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}`;
|
|
238
|
-
return requestDeleteEffect(this.client, path);
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* Delete ads by inventory reference through the eBay Marketing API.
|
|
242
|
-
*
|
|
243
|
-
* @param input - Path, query, header, and request body values for deleteAdsByInventoryReference.
|
|
244
|
-
* @returns An Effect that succeeds with eBay's generated deleteAdsByInventoryReference response DTO.
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```ts
|
|
248
|
-
* const response = await Effect.runPromise(marketingApi.deleteAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
|
|
249
|
-
* ```
|
|
250
|
-
*
|
|
251
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/deleteAdsByInventoryReference
|
|
252
|
-
*/
|
|
253
|
-
deleteAdsByInventoryReference = (input) => {
|
|
254
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/delete_ads_by_inventory_reference`;
|
|
255
|
-
return requestPostEffect(this.client, path, input.request);
|
|
256
|
-
};
|
|
257
|
-
/**
|
|
258
|
-
* Get ads by inventory reference through the eBay Marketing API.
|
|
259
|
-
*
|
|
260
|
-
* @param input - Path, query, header, and request body values for getAdsByInventoryReference.
|
|
261
|
-
* @returns An Effect that succeeds with eBay's generated getAdsByInventoryReference response DTO.
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
* ```ts
|
|
265
|
-
* const response = await Effect.runPromise(marketingApi.getAdsByInventoryReference({ campaignId: 'campaign-1', inventoryReferenceId: 'inventoryReference-1', inventoryReferenceType: 'inventoryReferenceType-1' }));
|
|
266
|
-
* ```
|
|
267
|
-
*
|
|
268
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAdsByInventoryReference
|
|
269
|
-
*/
|
|
270
|
-
getAdsByInventoryReference = (input) => {
|
|
271
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/get_ads_by_inventory_reference`;
|
|
272
|
-
const params = buildEndpointParams({
|
|
273
|
-
inventoryReferenceId: {
|
|
274
|
-
wireName: 'inventory_reference_id',
|
|
275
|
-
value: input.inventoryReferenceId,
|
|
276
|
-
},
|
|
277
|
-
inventoryReferenceType: {
|
|
278
|
-
wireName: 'inventory_reference_type',
|
|
279
|
-
value: input.inventoryReferenceType,
|
|
280
|
-
},
|
|
281
|
-
});
|
|
282
|
-
return requestGetEffect(this.client, path, params);
|
|
283
|
-
};
|
|
284
|
-
/**
|
|
285
|
-
* Update bid through the eBay Marketing API.
|
|
286
|
-
*
|
|
287
|
-
* @param input - Path, query, header, and request body values for updateBid.
|
|
288
|
-
* @returns An Effect that succeeds with eBay's generated updateBid response DTO.
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* ```ts
|
|
292
|
-
* const response = await Effect.runPromise(marketingApi.updateBid({ adId: 'ad-1', campaignId: 'campaign-1', request: { ... } }));
|
|
293
|
-
* ```
|
|
294
|
-
*
|
|
295
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/updateBid
|
|
296
|
-
*/
|
|
297
|
-
updateBid = (input) => {
|
|
298
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}/update_bid`;
|
|
299
|
-
return requestPostEffect(this.client, path, input.request);
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* Get ad groups through the eBay Marketing API.
|
|
303
|
-
*
|
|
304
|
-
* @param input - Path, query, header, and request body values for getAdGroups.
|
|
305
|
-
* @returns An Effect that succeeds with eBay's generated getAdGroups response DTO.
|
|
306
|
-
*
|
|
307
|
-
* @example
|
|
308
|
-
* ```ts
|
|
309
|
-
* const response = await Effect.runPromise(marketingApi.getAdGroups({ campaignId: 'campaign-1' }));
|
|
310
|
-
* ```
|
|
311
|
-
*
|
|
312
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/getAdGroups
|
|
313
|
-
*/
|
|
314
|
-
getAdGroups = (input) => {
|
|
315
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group`;
|
|
316
|
-
const params = buildEndpointParams({
|
|
317
|
-
adGroupStatus: { wireName: 'ad_group_status', value: input.adGroupStatus },
|
|
318
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
319
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
320
|
-
});
|
|
321
|
-
return requestGetEffect(this.client, path, params);
|
|
322
|
-
};
|
|
323
|
-
/**
|
|
324
|
-
* Create ad group through the eBay Marketing API.
|
|
325
|
-
*
|
|
326
|
-
* @param input - Path, query, header, and request body values for createAdGroup.
|
|
327
|
-
* @returns An Effect that succeeds with eBay's generated createAdGroup response DTO.
|
|
328
|
-
*
|
|
329
|
-
* @example
|
|
330
|
-
* ```ts
|
|
331
|
-
* const response = await Effect.runPromise(marketingApi.createAdGroup({ campaignId: 'campaign-1', request: { ... } }));
|
|
332
|
-
* ```
|
|
333
|
-
*
|
|
334
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/createAdGroup
|
|
335
|
-
*/
|
|
336
|
-
createAdGroup = (input) => {
|
|
337
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group`;
|
|
338
|
-
return requestPostEffect(this.client, path, input.request);
|
|
339
|
-
};
|
|
340
|
-
/**
|
|
341
|
-
* Get ad group through the eBay Marketing API.
|
|
342
|
-
*
|
|
343
|
-
* @param input - Path, query, header, and request body values for getAdGroup.
|
|
344
|
-
* @returns An Effect that succeeds with eBay's generated getAdGroup response DTO.
|
|
345
|
-
*
|
|
346
|
-
* @example
|
|
347
|
-
* ```ts
|
|
348
|
-
* const response = await Effect.runPromise(marketingApi.getAdGroup({ adGroupId: 'adGroup-1', campaignId: 'campaign-1' }));
|
|
349
|
-
* ```
|
|
350
|
-
*
|
|
351
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/getAdGroup
|
|
352
|
-
*/
|
|
353
|
-
getAdGroup = (input) => {
|
|
354
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}`;
|
|
355
|
-
return requestGetEffect(this.client, path);
|
|
356
|
-
};
|
|
357
|
-
/**
|
|
358
|
-
* Update ad group through the eBay Marketing API.
|
|
359
|
-
*
|
|
360
|
-
* @param input - Path, query, header, and request body values for updateAdGroup.
|
|
361
|
-
* @returns An Effect that succeeds with eBay's generated updateAdGroup response DTO.
|
|
362
|
-
*
|
|
363
|
-
* @example
|
|
364
|
-
* ```ts
|
|
365
|
-
* const response = await Effect.runPromise(marketingApi.updateAdGroup({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
|
|
366
|
-
* ```
|
|
367
|
-
*
|
|
368
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/updateAdGroup
|
|
369
|
-
*/
|
|
370
|
-
updateAdGroup = (input) => {
|
|
371
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}`;
|
|
372
|
-
return requestPutEffect(this.client, path, input.request);
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* Suggest bids through the eBay Marketing API.
|
|
376
|
-
*
|
|
377
|
-
* @param input - Path, query, header, and request body values for suggestBids.
|
|
378
|
-
* @returns An Effect that succeeds with eBay's generated suggestBids response DTO.
|
|
379
|
-
*
|
|
380
|
-
* @example
|
|
381
|
-
* ```ts
|
|
382
|
-
* const response = await Effect.runPromise(marketingApi.suggestBids({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
|
|
383
|
-
* ```
|
|
384
|
-
*
|
|
385
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/suggestBids
|
|
386
|
-
*/
|
|
387
|
-
suggestBids = (input) => {
|
|
388
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}/suggest_bids`;
|
|
389
|
-
return requestPostEffect(this.client, path, input.request);
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* Suggest keywords through the eBay Marketing API.
|
|
393
|
-
*
|
|
394
|
-
* @param input - Path, query, header, and request body values for suggestKeywords.
|
|
395
|
-
* @returns An Effect that succeeds with eBay's generated suggestKeywords response DTO.
|
|
396
|
-
*
|
|
397
|
-
* @example
|
|
398
|
-
* ```ts
|
|
399
|
-
* const response = await Effect.runPromise(marketingApi.suggestKeywords({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
|
|
400
|
-
* ```
|
|
401
|
-
*
|
|
402
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/suggestKeywords
|
|
403
|
-
*/
|
|
404
|
-
suggestKeywords = (input) => {
|
|
405
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}/suggest_keywords`;
|
|
406
|
-
return requestPostEffect(this.client, path, input.request);
|
|
407
|
-
};
|
|
408
|
-
/**
|
|
409
|
-
* Clone campaign through the eBay Marketing API.
|
|
410
|
-
*
|
|
411
|
-
* @param input - Path, query, header, and request body values for cloneCampaign.
|
|
412
|
-
* @returns An Effect that succeeds with eBay's generated cloneCampaign response DTO.
|
|
413
|
-
*
|
|
414
|
-
* @example
|
|
415
|
-
* ```ts
|
|
416
|
-
* const response = await Effect.runPromise(marketingApi.cloneCampaign({ campaignId: 'campaign-1', request: { ... } }));
|
|
417
|
-
* ```
|
|
418
|
-
*
|
|
419
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/cloneCampaign
|
|
420
|
-
*/
|
|
421
|
-
cloneCampaign = (input) => {
|
|
422
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/clone`;
|
|
423
|
-
return requestPostEffect(this.client, path, input.request);
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* Get campaigns through the eBay Marketing API.
|
|
427
|
-
*
|
|
428
|
-
* @param input - Path, query, header, and request body values for getCampaigns.
|
|
429
|
-
* @returns An Effect that succeeds with eBay's generated getCampaigns response DTO.
|
|
430
|
-
*
|
|
431
|
-
* @example
|
|
432
|
-
* ```ts
|
|
433
|
-
* const response = await Effect.runPromise(marketingApi.getCampaigns());
|
|
434
|
-
* ```
|
|
435
|
-
*
|
|
436
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/getCampaigns
|
|
437
|
-
*/
|
|
438
|
-
getCampaigns = (input = {}) => {
|
|
439
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign`;
|
|
440
|
-
const params = buildEndpointParams({
|
|
441
|
-
campaignName: { wireName: 'campaign_name', value: input.campaignName },
|
|
442
|
-
campaignStatus: { wireName: 'campaign_status', value: input.campaignStatus },
|
|
443
|
-
campaignTargetingTypes: {
|
|
444
|
-
wireName: 'campaign_targeting_types',
|
|
445
|
-
value: input.campaignTargetingTypes,
|
|
446
|
-
},
|
|
447
|
-
channels: { wireName: 'channels', value: input.channels },
|
|
448
|
-
endDateRange: { wireName: 'end_date_range', value: input.endDateRange },
|
|
449
|
-
fundingStrategy: { wireName: 'funding_strategy', value: input.fundingStrategy },
|
|
450
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
451
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
452
|
-
startDateRange: { wireName: 'start_date_range', value: input.startDateRange },
|
|
453
|
-
});
|
|
454
|
-
return requestGetEffect(this.client, path, params);
|
|
455
|
-
};
|
|
456
|
-
/**
|
|
457
|
-
* Create campaign through the eBay Marketing API.
|
|
458
|
-
*
|
|
459
|
-
* @param input - Path, query, header, and request body values for createCampaign.
|
|
460
|
-
* @returns An Effect that succeeds with eBay's generated createCampaign response DTO.
|
|
461
|
-
*
|
|
462
|
-
* @example
|
|
463
|
-
* ```ts
|
|
464
|
-
* const response = await Effect.runPromise(marketingApi.createCampaign({ request: { ... } }));
|
|
465
|
-
* ```
|
|
466
|
-
*
|
|
467
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/createCampaign
|
|
468
|
-
*/
|
|
469
|
-
createCampaign = (input) => {
|
|
470
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign`;
|
|
471
|
-
return requestPostEffect(this.client, path, input.request);
|
|
472
|
-
};
|
|
473
|
-
/**
|
|
474
|
-
* Get campaign through the eBay Marketing API.
|
|
475
|
-
*
|
|
476
|
-
* @param input - Path, query, header, and request body values for getCampaign.
|
|
477
|
-
* @returns An Effect that succeeds with eBay's generated getCampaign response DTO.
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```ts
|
|
481
|
-
* const response = await Effect.runPromise(marketingApi.getCampaign({ campaignId: 'campaign-1' }));
|
|
482
|
-
* ```
|
|
483
|
-
*
|
|
484
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/getCampaign
|
|
485
|
-
*/
|
|
486
|
-
getCampaign = (input) => {
|
|
487
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}`;
|
|
488
|
-
return requestGetEffect(this.client, path);
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* Delete campaign through the eBay Marketing API.
|
|
492
|
-
*
|
|
493
|
-
* @param input - Path, query, header, and request body values for deleteCampaign.
|
|
494
|
-
* @returns An Effect that succeeds with eBay's generated deleteCampaign response DTO.
|
|
495
|
-
*
|
|
496
|
-
* @example
|
|
497
|
-
* ```ts
|
|
498
|
-
* const response = await Effect.runPromise(marketingApi.deleteCampaign({ campaignId: 'campaign-1' }));
|
|
499
|
-
* ```
|
|
500
|
-
*
|
|
501
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/deleteCampaign
|
|
502
|
-
*/
|
|
503
|
-
deleteCampaign = (input) => {
|
|
504
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}`;
|
|
505
|
-
return requestDeleteEffect(this.client, path);
|
|
506
|
-
};
|
|
507
|
-
/**
|
|
508
|
-
* End campaign through the eBay Marketing API.
|
|
509
|
-
*
|
|
510
|
-
* @param input - Path, query, header, and request body values for endCampaign.
|
|
511
|
-
* @returns An Effect that succeeds with eBay's generated endCampaign response DTO.
|
|
512
|
-
*
|
|
513
|
-
* @example
|
|
514
|
-
* ```ts
|
|
515
|
-
* const response = await Effect.runPromise(marketingApi.endCampaign({ campaignId: 'campaign-1' }));
|
|
516
|
-
* ```
|
|
517
|
-
*
|
|
518
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/endCampaign
|
|
519
|
-
*/
|
|
520
|
-
endCampaign = (input) => {
|
|
521
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/end`;
|
|
522
|
-
return requestPostEffect(this.client, path);
|
|
523
|
-
};
|
|
524
|
-
/**
|
|
525
|
-
* Find campaign by ad reference through the eBay Marketing API.
|
|
526
|
-
*
|
|
527
|
-
* @param input - Path, query, header, and request body values for findCampaignByAdReference.
|
|
528
|
-
* @returns An Effect that succeeds with eBay's generated findCampaignByAdReference response DTO.
|
|
529
|
-
*
|
|
530
|
-
* @example
|
|
531
|
-
* ```ts
|
|
532
|
-
* const response = await Effect.runPromise(marketingApi.findCampaignByAdReference());
|
|
533
|
-
* ```
|
|
534
|
-
*
|
|
535
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/findCampaignByAdReference
|
|
536
|
-
*/
|
|
537
|
-
findCampaignByAdReference = (input = {}) => {
|
|
538
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/find_campaign_by_ad_reference`;
|
|
539
|
-
const params = buildEndpointParams({
|
|
540
|
-
inventoryReferenceId: {
|
|
541
|
-
wireName: 'inventory_reference_id',
|
|
542
|
-
value: input.inventoryReferenceId,
|
|
543
|
-
},
|
|
544
|
-
inventoryReferenceType: {
|
|
545
|
-
wireName: 'inventory_reference_type',
|
|
546
|
-
value: input.inventoryReferenceType,
|
|
547
|
-
},
|
|
548
|
-
listingId: { wireName: 'listing_id', value: input.listingId },
|
|
549
|
-
});
|
|
550
|
-
return requestGetEffect(this.client, path, params);
|
|
551
|
-
};
|
|
552
|
-
/**
|
|
553
|
-
* Get campaign by name through the eBay Marketing API.
|
|
554
|
-
*
|
|
555
|
-
* @param input - Path, query, header, and request body values for getCampaignByName.
|
|
556
|
-
* @returns An Effect that succeeds with eBay's generated getCampaignByName response DTO.
|
|
557
|
-
*
|
|
558
|
-
* @example
|
|
559
|
-
* ```ts
|
|
560
|
-
* const response = await Effect.runPromise(marketingApi.getCampaignByName({ campaignName: 'campaignName-1' }));
|
|
561
|
-
* ```
|
|
562
|
-
*
|
|
563
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/getCampaignByName
|
|
564
|
-
*/
|
|
565
|
-
getCampaignByName = (input) => {
|
|
566
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/get_campaign_by_name`;
|
|
567
|
-
const params = buildEndpointParams({
|
|
568
|
-
campaignName: { wireName: 'campaign_name', value: input.campaignName },
|
|
569
|
-
});
|
|
570
|
-
return requestGetEffect(this.client, path, params);
|
|
571
|
-
};
|
|
572
|
-
/**
|
|
573
|
-
* Launch campaign through the eBay Marketing API.
|
|
574
|
-
*
|
|
575
|
-
* @param input - Path, query, header, and request body values for launchCampaign.
|
|
576
|
-
* @returns An Effect that succeeds with eBay's generated launchCampaign response DTO.
|
|
577
|
-
*
|
|
578
|
-
* @example
|
|
579
|
-
* ```ts
|
|
580
|
-
* const response = await Effect.runPromise(marketingApi.launchCampaign({ campaignId: 'campaign-1' }));
|
|
581
|
-
* ```
|
|
582
|
-
*
|
|
583
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/launchCampaign
|
|
584
|
-
*/
|
|
585
|
-
launchCampaign = (input) => {
|
|
586
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/launch`;
|
|
587
|
-
return requestPostEffect(this.client, path);
|
|
588
|
-
};
|
|
589
|
-
/**
|
|
590
|
-
* Pause campaign through the eBay Marketing API.
|
|
591
|
-
*
|
|
592
|
-
* @param input - Path, query, header, and request body values for pauseCampaign.
|
|
593
|
-
* @returns An Effect that succeeds with eBay's generated pauseCampaign response DTO.
|
|
594
|
-
*
|
|
595
|
-
* @example
|
|
596
|
-
* ```ts
|
|
597
|
-
* const response = await Effect.runPromise(marketingApi.pauseCampaign({ campaignId: 'campaign-1' }));
|
|
598
|
-
* ```
|
|
599
|
-
*
|
|
600
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/pauseCampaign
|
|
601
|
-
*/
|
|
602
|
-
pauseCampaign = (input) => {
|
|
603
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/pause`;
|
|
604
|
-
return requestPostEffect(this.client, path);
|
|
605
|
-
};
|
|
606
|
-
/**
|
|
607
|
-
* Resume campaign through the eBay Marketing API.
|
|
608
|
-
*
|
|
609
|
-
* @param input - Path, query, header, and request body values for resumeCampaign.
|
|
610
|
-
* @returns An Effect that succeeds with eBay's generated resumeCampaign response DTO.
|
|
611
|
-
*
|
|
612
|
-
* @example
|
|
613
|
-
* ```ts
|
|
614
|
-
* const response = await Effect.runPromise(marketingApi.resumeCampaign({ campaignId: 'campaign-1' }));
|
|
615
|
-
* ```
|
|
616
|
-
*
|
|
617
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/resumeCampaign
|
|
618
|
-
*/
|
|
619
|
-
resumeCampaign = (input) => {
|
|
620
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/resume`;
|
|
621
|
-
return requestPostEffect(this.client, path);
|
|
622
|
-
};
|
|
623
|
-
/**
|
|
624
|
-
* Setup quick campaign through the eBay Marketing API.
|
|
625
|
-
*
|
|
626
|
-
* @param input - Path, query, header, and request body values for setupQuickCampaign.
|
|
627
|
-
* @returns An Effect that succeeds with eBay's generated setupQuickCampaign response DTO.
|
|
628
|
-
*
|
|
629
|
-
* @example
|
|
630
|
-
* ```ts
|
|
631
|
-
* const response = await Effect.runPromise(marketingApi.setupQuickCampaign({ request: { ... } }));
|
|
632
|
-
* ```
|
|
633
|
-
*
|
|
634
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/setupQuickCampaign
|
|
635
|
-
*/
|
|
636
|
-
setupQuickCampaign = (input) => {
|
|
637
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/setup_quick_campaign`;
|
|
638
|
-
return requestPostEffect(this.client, path, input.request);
|
|
639
|
-
};
|
|
640
|
-
/**
|
|
641
|
-
* Suggest budget through the eBay Marketing API.
|
|
642
|
-
*
|
|
643
|
-
* @param input - Path, query, header, and request body values for suggestBudget.
|
|
644
|
-
* @returns An Effect that succeeds with eBay's generated suggestBudget response DTO.
|
|
645
|
-
*
|
|
646
|
-
* @example
|
|
647
|
-
* ```ts
|
|
648
|
-
* const response = await Effect.runPromise(marketingApi.suggestBudget({ marketplaceId: 'EBAY_US' }));
|
|
649
|
-
* ```
|
|
650
|
-
*
|
|
651
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestBudget
|
|
652
|
-
*/
|
|
653
|
-
suggestBudget = (input) => {
|
|
654
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/suggest_budget`;
|
|
655
|
-
const config = marketplaceHeader(input.marketplaceId);
|
|
656
|
-
return requestGetEffect(this.client, path, undefined, config);
|
|
657
|
-
};
|
|
658
|
-
/**
|
|
659
|
-
* Suggest items through the eBay Marketing API.
|
|
660
|
-
*
|
|
661
|
-
* @param input - Path, query, header, and request body values for suggestItems.
|
|
662
|
-
* @returns An Effect that succeeds with eBay's generated suggestItems response DTO.
|
|
663
|
-
*
|
|
664
|
-
* @example
|
|
665
|
-
* ```ts
|
|
666
|
-
* const response = await Effect.runPromise(marketingApi.suggestItems({ campaignId: 'campaign-1' }));
|
|
667
|
-
* ```
|
|
668
|
-
*
|
|
669
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestItems
|
|
670
|
-
*/
|
|
671
|
-
suggestItems = (input) => {
|
|
672
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/suggest_items`;
|
|
673
|
-
const params = buildEndpointParams({
|
|
674
|
-
categoryIds: { wireName: 'category_ids', value: input.categoryIds },
|
|
675
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
676
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
677
|
-
});
|
|
678
|
-
return requestGetEffect(this.client, path, params);
|
|
679
|
-
};
|
|
680
|
-
/**
|
|
681
|
-
* Suggest max cpc through the eBay Marketing API.
|
|
682
|
-
*
|
|
683
|
-
* @param input - Path, query, header, and request body values for suggestMaxCpc.
|
|
684
|
-
* @returns An Effect that succeeds with eBay's generated suggestMaxCpc response DTO.
|
|
685
|
-
*
|
|
686
|
-
* @example
|
|
687
|
-
* ```ts
|
|
688
|
-
* const response = await Effect.runPromise(marketingApi.suggestMaxCpc({ request: { ... } }));
|
|
689
|
-
* ```
|
|
690
|
-
*
|
|
691
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/suggestMaxCpc
|
|
692
|
-
*/
|
|
693
|
-
suggestMaxCpc = (input) => {
|
|
694
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/suggest_max_cpc`;
|
|
695
|
-
return requestPostEffect(this.client, path, input.request);
|
|
696
|
-
};
|
|
697
|
-
/**
|
|
698
|
-
* Update ad rate strategy through the eBay Marketing API.
|
|
699
|
-
*
|
|
700
|
-
* @param input - Path, query, header, and request body values for updateAdRateStrategy.
|
|
701
|
-
* @returns An Effect that succeeds with eBay's generated updateAdRateStrategy response DTO.
|
|
702
|
-
*
|
|
703
|
-
* @example
|
|
704
|
-
* ```ts
|
|
705
|
-
* const response = await Effect.runPromise(marketingApi.updateAdRateStrategy({ campaignId: 'campaign-1', request: { ... } }));
|
|
706
|
-
* ```
|
|
707
|
-
*
|
|
708
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/updateAdRateStrategy
|
|
709
|
-
*/
|
|
710
|
-
updateAdRateStrategy = (input) => {
|
|
711
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/update_ad_rate_strategy`;
|
|
712
|
-
return requestPostEffect(this.client, path, input.request);
|
|
713
|
-
};
|
|
714
|
-
/**
|
|
715
|
-
* Update bidding strategy through the eBay Marketing API.
|
|
716
|
-
*
|
|
717
|
-
* @param input - Path, query, header, and request body values for updateBiddingStrategy.
|
|
718
|
-
* @returns An Effect that succeeds with eBay's generated updateBiddingStrategy response DTO.
|
|
719
|
-
*
|
|
720
|
-
* @example
|
|
721
|
-
* ```ts
|
|
722
|
-
* const response = await Effect.runPromise(marketingApi.updateBiddingStrategy({ campaignId: 'campaign-1', request: { ... } }));
|
|
723
|
-
* ```
|
|
724
|
-
*
|
|
725
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/updateBiddingStrategy
|
|
726
|
-
*/
|
|
727
|
-
updateBiddingStrategy = (input) => {
|
|
728
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/update_bidding_strategy`;
|
|
729
|
-
return requestPostEffect(this.client, path, input.request);
|
|
730
|
-
};
|
|
731
|
-
/**
|
|
732
|
-
* Update campaign budget through the eBay Marketing API.
|
|
733
|
-
*
|
|
734
|
-
* @param input - Path, query, header, and request body values for updateCampaignBudget.
|
|
735
|
-
* @returns An Effect that succeeds with eBay's generated updateCampaignBudget response DTO.
|
|
736
|
-
*
|
|
737
|
-
* @example
|
|
738
|
-
* ```ts
|
|
739
|
-
* const response = await Effect.runPromise(marketingApi.updateCampaignBudget({ campaignId: 'campaign-1', request: { ... } }));
|
|
740
|
-
* ```
|
|
741
|
-
*
|
|
742
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/updateCampaignBudget
|
|
743
|
-
*/
|
|
744
|
-
updateCampaignBudget = (input) => {
|
|
745
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/update_campaign_budget`;
|
|
746
|
-
return requestPostEffect(this.client, path, input.request);
|
|
747
|
-
};
|
|
748
|
-
/**
|
|
749
|
-
* Update campaign identification through the eBay Marketing API.
|
|
750
|
-
*
|
|
751
|
-
* @param input - Path, query, header, and request body values for updateCampaignIdentification.
|
|
752
|
-
* @returns An Effect that succeeds with eBay's generated updateCampaignIdentification response DTO.
|
|
753
|
-
*
|
|
754
|
-
* @example
|
|
755
|
-
* ```ts
|
|
756
|
-
* const response = await Effect.runPromise(marketingApi.updateCampaignIdentification({ campaignId: 'campaign-1', request: { ... } }));
|
|
757
|
-
* ```
|
|
758
|
-
*
|
|
759
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/campaign/methods/updateCampaignIdentification
|
|
760
|
-
*/
|
|
761
|
-
updateCampaignIdentification = (input) => {
|
|
762
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/update_campaign_identification`;
|
|
763
|
-
return requestPostEffect(this.client, path, input.request);
|
|
764
|
-
};
|
|
765
|
-
/**
|
|
766
|
-
* Bulk create keyword through the eBay Marketing API.
|
|
767
|
-
*
|
|
768
|
-
* @param input - Path, query, header, and request body values for bulkCreateKeyword.
|
|
769
|
-
* @returns An Effect that succeeds with eBay's generated bulkCreateKeyword response DTO.
|
|
770
|
-
*
|
|
771
|
-
* @example
|
|
772
|
-
* ```ts
|
|
773
|
-
* const response = await Effect.runPromise(marketingApi.bulkCreateKeyword({ campaignId: 'campaign-1', request: { ... } }));
|
|
774
|
-
* ```
|
|
775
|
-
*
|
|
776
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/bulkCreateKeyword
|
|
777
|
-
*/
|
|
778
|
-
bulkCreateKeyword = (input) => {
|
|
779
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_keyword`;
|
|
780
|
-
return requestPostEffect(this.client, path, input.request);
|
|
781
|
-
};
|
|
782
|
-
/**
|
|
783
|
-
* Bulk update keyword through the eBay Marketing API.
|
|
784
|
-
*
|
|
785
|
-
* @param input - Path, query, header, and request body values for bulkUpdateKeyword.
|
|
786
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateKeyword response DTO.
|
|
787
|
-
*
|
|
788
|
-
* @example
|
|
789
|
-
* ```ts
|
|
790
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateKeyword({ campaignId: 'campaign-1', request: { ... } }));
|
|
791
|
-
* ```
|
|
792
|
-
*
|
|
793
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/bulkUpdateKeyword
|
|
794
|
-
*/
|
|
795
|
-
bulkUpdateKeyword = (input) => {
|
|
796
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_keyword`;
|
|
797
|
-
return requestPostEffect(this.client, path, input.request);
|
|
798
|
-
};
|
|
799
|
-
/**
|
|
800
|
-
* Get keywords through the eBay Marketing API.
|
|
801
|
-
*
|
|
802
|
-
* @param input - Path, query, header, and request body values for getKeywords.
|
|
803
|
-
* @returns An Effect that succeeds with eBay's generated getKeywords response DTO.
|
|
804
|
-
*
|
|
805
|
-
* @example
|
|
806
|
-
* ```ts
|
|
807
|
-
* const response = await Effect.runPromise(marketingApi.getKeywords({ campaignId: 'campaign-1' }));
|
|
808
|
-
* ```
|
|
809
|
-
*
|
|
810
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeywords
|
|
811
|
-
*/
|
|
812
|
-
getKeywords = (input) => {
|
|
813
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword`;
|
|
814
|
-
const params = buildEndpointParams({
|
|
815
|
-
adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
|
|
816
|
-
keywordStatus: { wireName: 'keyword_status', value: input.keywordStatus },
|
|
817
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
818
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
819
|
-
});
|
|
820
|
-
return requestGetEffect(this.client, path, params);
|
|
821
|
-
};
|
|
822
|
-
/**
|
|
823
|
-
* Create keyword through the eBay Marketing API.
|
|
824
|
-
*
|
|
825
|
-
* @param input - Path, query, header, and request body values for createKeyword.
|
|
826
|
-
* @returns An Effect that succeeds with eBay's generated createKeyword response DTO.
|
|
827
|
-
*
|
|
828
|
-
* @example
|
|
829
|
-
* ```ts
|
|
830
|
-
* const response = await Effect.runPromise(marketingApi.createKeyword({ campaignId: 'campaign-1', request: { ... } }));
|
|
831
|
-
* ```
|
|
832
|
-
*
|
|
833
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/createKeyword
|
|
834
|
-
*/
|
|
835
|
-
createKeyword = (input) => {
|
|
836
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword`;
|
|
837
|
-
return requestPostEffect(this.client, path, input.request);
|
|
838
|
-
};
|
|
839
|
-
/**
|
|
840
|
-
* Get keyword through the eBay Marketing API.
|
|
841
|
-
*
|
|
842
|
-
* @param input - Path, query, header, and request body values for getKeyword.
|
|
843
|
-
* @returns An Effect that succeeds with eBay's generated getKeyword response DTO.
|
|
844
|
-
*
|
|
845
|
-
* @example
|
|
846
|
-
* ```ts
|
|
847
|
-
* const response = await Effect.runPromise(marketingApi.getKeyword({ campaignId: 'campaign-1', keywordId: 'keyword-1' }));
|
|
848
|
-
* ```
|
|
849
|
-
*
|
|
850
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeyword
|
|
851
|
-
*/
|
|
852
|
-
getKeyword = (input) => {
|
|
853
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword/${input.keywordId}`;
|
|
854
|
-
return requestGetEffect(this.client, path);
|
|
855
|
-
};
|
|
856
|
-
/**
|
|
857
|
-
* Update keyword through the eBay Marketing API.
|
|
858
|
-
*
|
|
859
|
-
* @param input - Path, query, header, and request body values for updateKeyword.
|
|
860
|
-
* @returns An Effect that succeeds with eBay's generated updateKeyword response DTO.
|
|
861
|
-
*
|
|
862
|
-
* @example
|
|
863
|
-
* ```ts
|
|
864
|
-
* const response = await Effect.runPromise(marketingApi.updateKeyword({ campaignId: 'campaign-1', keywordId: 'keyword-1', request: { ... } }));
|
|
865
|
-
* ```
|
|
866
|
-
*
|
|
867
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/updateKeyword
|
|
868
|
-
*/
|
|
869
|
-
updateKeyword = (input) => {
|
|
870
|
-
const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword/${input.keywordId}`;
|
|
871
|
-
return requestPutEffect(this.client, path, input.request);
|
|
872
|
-
};
|
|
873
|
-
/**
|
|
874
|
-
* Bulk create negative keyword through the eBay Marketing API.
|
|
875
|
-
*
|
|
876
|
-
* @param input - Path, query, header, and request body values for bulkCreateNegativeKeyword.
|
|
877
|
-
* @returns An Effect that succeeds with eBay's generated bulkCreateNegativeKeyword response DTO.
|
|
878
|
-
*
|
|
879
|
-
* @example
|
|
880
|
-
* ```ts
|
|
881
|
-
* const response = await Effect.runPromise(marketingApi.bulkCreateNegativeKeyword({ request: { ... } }));
|
|
882
|
-
* ```
|
|
883
|
-
*
|
|
884
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/bulkCreateNegativeKeyword
|
|
885
|
-
*/
|
|
886
|
-
bulkCreateNegativeKeyword = (input) => {
|
|
887
|
-
const path = `${MARKETING_BASE_PATH}/bulk_create_negative_keyword`;
|
|
888
|
-
return requestPostEffect(this.client, path, input.request);
|
|
889
|
-
};
|
|
890
|
-
/**
|
|
891
|
-
* Bulk update negative keyword through the eBay Marketing API.
|
|
892
|
-
*
|
|
893
|
-
* @param input - Path, query, header, and request body values for bulkUpdateNegativeKeyword.
|
|
894
|
-
* @returns An Effect that succeeds with eBay's generated bulkUpdateNegativeKeyword response DTO.
|
|
895
|
-
*
|
|
896
|
-
* @example
|
|
897
|
-
* ```ts
|
|
898
|
-
* const response = await Effect.runPromise(marketingApi.bulkUpdateNegativeKeyword({ request: { ... } }));
|
|
899
|
-
* ```
|
|
900
|
-
*
|
|
901
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/bulkUpdateNegativeKeyword
|
|
902
|
-
*/
|
|
903
|
-
bulkUpdateNegativeKeyword = (input) => {
|
|
904
|
-
const path = `${MARKETING_BASE_PATH}/bulk_update_negative_keyword`;
|
|
905
|
-
return requestPostEffect(this.client, path, input.request);
|
|
906
|
-
};
|
|
907
|
-
/**
|
|
908
|
-
* Get negative keywords through the eBay Marketing API.
|
|
909
|
-
*
|
|
910
|
-
* @param input - Path, query, header, and request body values for getNegativeKeywords.
|
|
911
|
-
* @returns An Effect that succeeds with eBay's generated getNegativeKeywords response DTO.
|
|
912
|
-
*
|
|
913
|
-
* @example
|
|
914
|
-
* ```ts
|
|
915
|
-
* const response = await Effect.runPromise(marketingApi.getNegativeKeywords());
|
|
916
|
-
* ```
|
|
917
|
-
*
|
|
918
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/getNegativeKeywords
|
|
919
|
-
*/
|
|
920
|
-
getNegativeKeywords = (input = {}) => {
|
|
921
|
-
const path = `${MARKETING_BASE_PATH}/negative_keyword`;
|
|
922
|
-
const params = buildEndpointParams({
|
|
923
|
-
adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
|
|
924
|
-
campaignIds: { wireName: 'campaign_ids', value: input.campaignIds },
|
|
925
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
926
|
-
negativeKeywordStatus: {
|
|
927
|
-
wireName: 'negative_keyword_status',
|
|
928
|
-
value: input.negativeKeywordStatus,
|
|
929
|
-
},
|
|
930
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
931
|
-
});
|
|
932
|
-
return requestGetEffect(this.client, path, params);
|
|
933
|
-
};
|
|
934
|
-
/**
|
|
935
|
-
* Create negative keyword through the eBay Marketing API.
|
|
936
|
-
*
|
|
937
|
-
* @param input - Path, query, header, and request body values for createNegativeKeyword.
|
|
938
|
-
* @returns An Effect that succeeds with eBay's generated createNegativeKeyword response DTO.
|
|
939
|
-
*
|
|
940
|
-
* @example
|
|
941
|
-
* ```ts
|
|
942
|
-
* const response = await Effect.runPromise(marketingApi.createNegativeKeyword({ request: { ... } }));
|
|
943
|
-
* ```
|
|
944
|
-
*
|
|
945
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/createNegativeKeyword
|
|
946
|
-
*/
|
|
947
|
-
createNegativeKeyword = (input) => {
|
|
948
|
-
const path = `${MARKETING_BASE_PATH}/negative_keyword`;
|
|
949
|
-
return requestPostEffect(this.client, path, input.request);
|
|
950
|
-
};
|
|
951
|
-
/**
|
|
952
|
-
* Get negative keyword through the eBay Marketing API.
|
|
953
|
-
*
|
|
954
|
-
* @param input - Path, query, header, and request body values for getNegativeKeyword.
|
|
955
|
-
* @returns An Effect that succeeds with eBay's generated getNegativeKeyword response DTO.
|
|
956
|
-
*
|
|
957
|
-
* @example
|
|
958
|
-
* ```ts
|
|
959
|
-
* const response = await Effect.runPromise(marketingApi.getNegativeKeyword({ negativeKeywordId: 'negativeKeyword-1' }));
|
|
960
|
-
* ```
|
|
961
|
-
*
|
|
962
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/getNegativeKeyword
|
|
963
|
-
*/
|
|
964
|
-
getNegativeKeyword = (input) => {
|
|
965
|
-
const path = `${MARKETING_BASE_PATH}/negative_keyword/${input.negativeKeywordId}`;
|
|
966
|
-
return requestGetEffect(this.client, path);
|
|
967
|
-
};
|
|
968
|
-
/**
|
|
969
|
-
* Update negative keyword through the eBay Marketing API.
|
|
970
|
-
*
|
|
971
|
-
* @param input - Path, query, header, and request body values for updateNegativeKeyword.
|
|
972
|
-
* @returns An Effect that succeeds with eBay's generated updateNegativeKeyword response DTO.
|
|
973
|
-
*
|
|
974
|
-
* @example
|
|
975
|
-
* ```ts
|
|
976
|
-
* const response = await Effect.runPromise(marketingApi.updateNegativeKeyword({ negativeKeywordId: 'negativeKeyword-1', request: { ... } }));
|
|
977
|
-
* ```
|
|
978
|
-
*
|
|
979
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/updateNegativeKeyword
|
|
980
|
-
*/
|
|
981
|
-
updateNegativeKeyword = (input) => {
|
|
982
|
-
const path = `${MARKETING_BASE_PATH}/negative_keyword/${input.negativeKeywordId}`;
|
|
983
|
-
return requestPutEffect(this.client, path, input.request);
|
|
984
|
-
};
|
|
985
|
-
/**
|
|
986
|
-
* Get report through the eBay Marketing API.
|
|
987
|
-
*
|
|
988
|
-
* @param input - Path, query, header, and request body values for getReport.
|
|
989
|
-
* @returns An Effect that succeeds with eBay's generated getReport response DTO.
|
|
990
|
-
*
|
|
991
|
-
* @example
|
|
992
|
-
* ```ts
|
|
993
|
-
* const response = await Effect.runPromise(marketingApi.getReport({ reportId: 'report-1' }));
|
|
994
|
-
* ```
|
|
995
|
-
*
|
|
996
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report/methods/getReport
|
|
997
|
-
*/
|
|
998
|
-
getReport = (input) => {
|
|
999
|
-
const path = `${MARKETING_BASE_PATH}/ad_report/${input.reportId}`;
|
|
1000
|
-
return requestGetEffect(this.client, path);
|
|
1001
|
-
};
|
|
1002
|
-
/**
|
|
1003
|
-
* Get report metadata through the eBay Marketing API.
|
|
1004
|
-
*
|
|
1005
|
-
* @param input - Path, query, header, and request body values for getReportMetadata.
|
|
1006
|
-
* @returns An Effect that succeeds with eBay's generated getReportMetadata response DTO.
|
|
1007
|
-
*
|
|
1008
|
-
* @example
|
|
1009
|
-
* ```ts
|
|
1010
|
-
* const response = await Effect.runPromise(marketingApi.getReportMetadata());
|
|
1011
|
-
* ```
|
|
1012
|
-
*
|
|
1013
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_metadata/methods/getReportMetadata
|
|
1014
|
-
*/
|
|
1015
|
-
getReportMetadata = (input = {}) => {
|
|
1016
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_metadata`;
|
|
1017
|
-
const params = buildEndpointParams({
|
|
1018
|
-
fundingModel: { wireName: 'funding_model', value: input.fundingModel },
|
|
1019
|
-
channel: { wireName: 'channel', value: input.channel },
|
|
1020
|
-
});
|
|
1021
|
-
return requestGetEffect(this.client, path, params);
|
|
1022
|
-
};
|
|
1023
|
-
/**
|
|
1024
|
-
* Get report metadata for report type through the eBay Marketing API.
|
|
1025
|
-
*
|
|
1026
|
-
* @param input - Path, query, header, and request body values for getReportMetadataForReportType.
|
|
1027
|
-
* @returns An Effect that succeeds with eBay's generated getReportMetadataForReportType response DTO.
|
|
1028
|
-
*
|
|
1029
|
-
* @example
|
|
1030
|
-
* ```ts
|
|
1031
|
-
* const response = await Effect.runPromise(marketingApi.getReportMetadataForReportType({ reportType: 'reportType-1' }));
|
|
1032
|
-
* ```
|
|
1033
|
-
*
|
|
1034
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_metadata/methods/getReportMetadataForReportType
|
|
1035
|
-
*/
|
|
1036
|
-
getReportMetadataForReportType = (input) => {
|
|
1037
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_metadata/${input.reportType}`;
|
|
1038
|
-
const params = buildEndpointParams({
|
|
1039
|
-
fundingModel: { wireName: 'funding_model', value: input.fundingModel },
|
|
1040
|
-
channel: { wireName: 'channel', value: input.channel },
|
|
1041
|
-
});
|
|
1042
|
-
return requestGetEffect(this.client, path, params);
|
|
1043
|
-
};
|
|
1044
|
-
/**
|
|
1045
|
-
* Get report tasks through the eBay Marketing API.
|
|
1046
|
-
*
|
|
1047
|
-
* @param input - Path, query, header, and request body values for getReportTasks.
|
|
1048
|
-
* @returns An Effect that succeeds with eBay's generated getReportTasks response DTO.
|
|
1049
|
-
*
|
|
1050
|
-
* @example
|
|
1051
|
-
* ```ts
|
|
1052
|
-
* const response = await Effect.runPromise(marketingApi.getReportTasks());
|
|
1053
|
-
* ```
|
|
1054
|
-
*
|
|
1055
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/getReportTasks
|
|
1056
|
-
*/
|
|
1057
|
-
getReportTasks = (input = {}) => {
|
|
1058
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_task`;
|
|
1059
|
-
const params = buildEndpointParams({
|
|
1060
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1061
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1062
|
-
reportTaskStatuses: { wireName: 'report_task_statuses', value: input.reportTaskStatuses },
|
|
1063
|
-
});
|
|
1064
|
-
return requestGetEffect(this.client, path, params);
|
|
1065
|
-
};
|
|
1066
|
-
/**
|
|
1067
|
-
* Create report task through the eBay Marketing API.
|
|
1068
|
-
*
|
|
1069
|
-
* @param input - Path, query, header, and request body values for createReportTask.
|
|
1070
|
-
* @returns An Effect that succeeds with eBay's generated createReportTask response DTO.
|
|
1071
|
-
*
|
|
1072
|
-
* @example
|
|
1073
|
-
* ```ts
|
|
1074
|
-
* const response = await Effect.runPromise(marketingApi.createReportTask({ request: { ... } }));
|
|
1075
|
-
* ```
|
|
1076
|
-
*
|
|
1077
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/createReportTask
|
|
1078
|
-
*/
|
|
1079
|
-
createReportTask = (input) => {
|
|
1080
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_task`;
|
|
1081
|
-
return requestPostEffect(this.client, path, input.request);
|
|
1082
|
-
};
|
|
1083
|
-
/**
|
|
1084
|
-
* Get report task through the eBay Marketing API.
|
|
1085
|
-
*
|
|
1086
|
-
* @param input - Path, query, header, and request body values for getReportTask.
|
|
1087
|
-
* @returns An Effect that succeeds with eBay's generated getReportTask response DTO.
|
|
1088
|
-
*
|
|
1089
|
-
* @example
|
|
1090
|
-
* ```ts
|
|
1091
|
-
* const response = await Effect.runPromise(marketingApi.getReportTask({ reportTaskId: 'reportTask-1' }));
|
|
1092
|
-
* ```
|
|
1093
|
-
*
|
|
1094
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/getReportTask
|
|
1095
|
-
*/
|
|
1096
|
-
getReportTask = (input) => {
|
|
1097
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_task/${input.reportTaskId}`;
|
|
1098
|
-
return requestGetEffect(this.client, path);
|
|
1099
|
-
};
|
|
1100
|
-
/**
|
|
1101
|
-
* Delete report task through the eBay Marketing API.
|
|
1102
|
-
*
|
|
1103
|
-
* @param input - Path, query, header, and request body values for deleteReportTask.
|
|
1104
|
-
* @returns An Effect that succeeds with eBay's generated deleteReportTask response DTO.
|
|
1105
|
-
*
|
|
1106
|
-
* @example
|
|
1107
|
-
* ```ts
|
|
1108
|
-
* const response = await Effect.runPromise(marketingApi.deleteReportTask({ reportTaskId: 'reportTask-1' }));
|
|
1109
|
-
* ```
|
|
1110
|
-
*
|
|
1111
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/deleteReportTask
|
|
1112
|
-
*/
|
|
1113
|
-
deleteReportTask = (input) => {
|
|
1114
|
-
const path = `${MARKETING_BASE_PATH}/ad_report_task/${input.reportTaskId}`;
|
|
1115
|
-
return requestDeleteEffect(this.client, path);
|
|
1116
|
-
};
|
|
1117
|
-
/**
|
|
1118
|
-
* Create item price markdown promotion through the eBay Marketing API.
|
|
1119
|
-
*
|
|
1120
|
-
* @param input - Path, query, header, and request body values for createItemPriceMarkdownPromotion.
|
|
1121
|
-
* @returns An Effect that succeeds with eBay's generated createItemPriceMarkdownPromotion response DTO.
|
|
1122
|
-
*
|
|
1123
|
-
* @example
|
|
1124
|
-
* ```ts
|
|
1125
|
-
* const response = await Effect.runPromise(marketingApi.createItemPriceMarkdownPromotion({ request: { ... } }));
|
|
1126
|
-
* ```
|
|
1127
|
-
*
|
|
1128
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/createItemPriceMarkdownPromotion
|
|
1129
|
-
*/
|
|
1130
|
-
createItemPriceMarkdownPromotion = (input) => {
|
|
1131
|
-
const path = `${MARKETING_BASE_PATH}/item_price_markdown`;
|
|
1132
|
-
return requestPostEffect(this.client, path, input.request);
|
|
1133
|
-
};
|
|
1134
|
-
/**
|
|
1135
|
-
* Get item price markdown promotion through the eBay Marketing API.
|
|
1136
|
-
*
|
|
1137
|
-
* @param input - Path, query, header, and request body values for getItemPriceMarkdownPromotion.
|
|
1138
|
-
* @returns An Effect that succeeds with eBay's generated getItemPriceMarkdownPromotion response DTO.
|
|
1139
|
-
*
|
|
1140
|
-
* @example
|
|
1141
|
-
* ```ts
|
|
1142
|
-
* const response = await Effect.runPromise(marketingApi.getItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
|
|
1143
|
-
* ```
|
|
1144
|
-
*
|
|
1145
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/getItemPriceMarkdownPromotion
|
|
1146
|
-
*/
|
|
1147
|
-
getItemPriceMarkdownPromotion = (input) => {
|
|
1148
|
-
const path = `${MARKETING_BASE_PATH}/item_price_markdown/${input.promotionId}`;
|
|
1149
|
-
return requestGetEffect(this.client, path);
|
|
1150
|
-
};
|
|
1151
|
-
/**
|
|
1152
|
-
* Update item price markdown promotion through the eBay Marketing API.
|
|
1153
|
-
*
|
|
1154
|
-
* @param input - Path, query, header, and request body values for updateItemPriceMarkdownPromotion.
|
|
1155
|
-
* @returns An Effect that succeeds with eBay's generated updateItemPriceMarkdownPromotion response DTO.
|
|
1156
|
-
*
|
|
1157
|
-
* @example
|
|
1158
|
-
* ```ts
|
|
1159
|
-
* const response = await Effect.runPromise(marketingApi.updateItemPriceMarkdownPromotion({ promotionId: 'promotion-1', request: { ... } }));
|
|
1160
|
-
* ```
|
|
1161
|
-
*
|
|
1162
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/updateItemPriceMarkdownPromotion
|
|
1163
|
-
*/
|
|
1164
|
-
updateItemPriceMarkdownPromotion = (input) => {
|
|
1165
|
-
const path = `${MARKETING_BASE_PATH}/item_price_markdown/${input.promotionId}`;
|
|
1166
|
-
return requestPutEffect(this.client, path, input.request);
|
|
1167
|
-
};
|
|
1168
|
-
/**
|
|
1169
|
-
* Delete item price markdown promotion through the eBay Marketing API.
|
|
1170
|
-
*
|
|
1171
|
-
* @param input - Path, query, header, and request body values for deleteItemPriceMarkdownPromotion.
|
|
1172
|
-
* @returns An Effect that succeeds with eBay's generated deleteItemPriceMarkdownPromotion response DTO.
|
|
1173
|
-
*
|
|
1174
|
-
* @example
|
|
1175
|
-
* ```ts
|
|
1176
|
-
* const response = await Effect.runPromise(marketingApi.deleteItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
|
|
1177
|
-
* ```
|
|
1178
|
-
*
|
|
1179
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/deleteItemPriceMarkdownPromotion
|
|
1180
|
-
*/
|
|
1181
|
-
deleteItemPriceMarkdownPromotion = (input) => {
|
|
1182
|
-
const path = `${MARKETING_BASE_PATH}/item_price_markdown/${input.promotionId}`;
|
|
1183
|
-
return requestDeleteEffect(this.client, path);
|
|
1184
|
-
};
|
|
1185
|
-
/**
|
|
1186
|
-
* Create item promotion through the eBay Marketing API.
|
|
1187
|
-
*
|
|
1188
|
-
* @param input - Path, query, header, and request body values for createItemPromotion.
|
|
1189
|
-
* @returns An Effect that succeeds with eBay's generated createItemPromotion response DTO.
|
|
1190
|
-
*
|
|
1191
|
-
* @example
|
|
1192
|
-
* ```ts
|
|
1193
|
-
* const response = await Effect.runPromise(marketingApi.createItemPromotion({ request: { ... } }));
|
|
1194
|
-
* ```
|
|
1195
|
-
*
|
|
1196
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/createItemPromotion
|
|
1197
|
-
*/
|
|
1198
|
-
createItemPromotion = (input) => {
|
|
1199
|
-
const path = `${MARKETING_BASE_PATH}/item_promotion`;
|
|
1200
|
-
return requestPostEffect(this.client, path, input.request);
|
|
1201
|
-
};
|
|
1202
|
-
/**
|
|
1203
|
-
* Get item promotion through the eBay Marketing API.
|
|
1204
|
-
*
|
|
1205
|
-
* @param input - Path, query, header, and request body values for getItemPromotion.
|
|
1206
|
-
* @returns An Effect that succeeds with eBay's generated getItemPromotion response DTO.
|
|
1207
|
-
*
|
|
1208
|
-
* @example
|
|
1209
|
-
* ```ts
|
|
1210
|
-
* const response = await Effect.runPromise(marketingApi.getItemPromotion({ promotionId: 'promotion-1' }));
|
|
1211
|
-
* ```
|
|
1212
|
-
*
|
|
1213
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/getItemPromotion
|
|
1214
|
-
*/
|
|
1215
|
-
getItemPromotion = (input) => {
|
|
1216
|
-
const path = `${MARKETING_BASE_PATH}/item_promotion/${input.promotionId}`;
|
|
1217
|
-
return requestGetEffect(this.client, path);
|
|
1218
|
-
};
|
|
1219
|
-
/**
|
|
1220
|
-
* Update item promotion through the eBay Marketing API.
|
|
1221
|
-
*
|
|
1222
|
-
* @param input - Path, query, header, and request body values for updateItemPromotion.
|
|
1223
|
-
* @returns An Effect that succeeds with eBay's generated updateItemPromotion response DTO.
|
|
1224
|
-
*
|
|
1225
|
-
* @example
|
|
1226
|
-
* ```ts
|
|
1227
|
-
* const response = await Effect.runPromise(marketingApi.updateItemPromotion({ promotionId: 'promotion-1', request: { ... } }));
|
|
1228
|
-
* ```
|
|
1229
|
-
*
|
|
1230
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/updateItemPromotion
|
|
1231
|
-
*/
|
|
1232
|
-
updateItemPromotion = (input) => {
|
|
1233
|
-
const path = `${MARKETING_BASE_PATH}/item_promotion/${input.promotionId}`;
|
|
1234
|
-
return requestPutEffect(this.client, path, input.request);
|
|
1235
|
-
};
|
|
1236
|
-
/**
|
|
1237
|
-
* Delete item promotion through the eBay Marketing API.
|
|
1238
|
-
*
|
|
1239
|
-
* @param input - Path, query, header, and request body values for deleteItemPromotion.
|
|
1240
|
-
* @returns An Effect that succeeds with eBay's generated deleteItemPromotion response DTO.
|
|
1241
|
-
*
|
|
1242
|
-
* @example
|
|
1243
|
-
* ```ts
|
|
1244
|
-
* const response = await Effect.runPromise(marketingApi.deleteItemPromotion({ promotionId: 'promotion-1' }));
|
|
1245
|
-
* ```
|
|
1246
|
-
*
|
|
1247
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/deleteItemPromotion
|
|
1248
|
-
*/
|
|
1249
|
-
deleteItemPromotion = (input) => {
|
|
1250
|
-
const path = `${MARKETING_BASE_PATH}/item_promotion/${input.promotionId}`;
|
|
1251
|
-
return requestDeleteEffect(this.client, path);
|
|
1252
|
-
};
|
|
1253
|
-
/**
|
|
1254
|
-
* Get listing set through the eBay Marketing API.
|
|
1255
|
-
*
|
|
1256
|
-
* @param input - Path, query, header, and request body values for getListingSet.
|
|
1257
|
-
* @returns An Effect that succeeds with eBay's generated getListingSet response DTO.
|
|
1258
|
-
*
|
|
1259
|
-
* @example
|
|
1260
|
-
* ```ts
|
|
1261
|
-
* const response = await Effect.runPromise(marketingApi.getListingSet({ promotionId: 'promotion-1' }));
|
|
1262
|
-
* ```
|
|
1263
|
-
*
|
|
1264
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getListingSet
|
|
1265
|
-
*/
|
|
1266
|
-
getListingSet = (input) => {
|
|
1267
|
-
const path = `${MARKETING_BASE_PATH}/promotion/${input.promotionId}/get_listing_set`;
|
|
1268
|
-
const params = buildEndpointParams({
|
|
1269
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1270
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1271
|
-
q: { wireName: 'q', value: input.q },
|
|
1272
|
-
sort: { wireName: 'sort', value: input.sort },
|
|
1273
|
-
status: { wireName: 'status', value: input.status },
|
|
1274
|
-
});
|
|
1275
|
-
return requestGetEffect(this.client, path, params);
|
|
1276
|
-
};
|
|
1277
|
-
/**
|
|
1278
|
-
* Get promotions through the eBay Marketing API.
|
|
1279
|
-
*
|
|
1280
|
-
* @param input - Path, query, header, and request body values for getPromotions.
|
|
1281
|
-
* @returns An Effect that succeeds with eBay's generated getPromotions response DTO.
|
|
1282
|
-
*
|
|
1283
|
-
* @example
|
|
1284
|
-
* ```ts
|
|
1285
|
-
* const response = await Effect.runPromise(marketingApi.getPromotions({ marketplaceId: 'marketplace-1' }));
|
|
1286
|
-
* ```
|
|
1287
|
-
*
|
|
1288
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getPromotions
|
|
1289
|
-
*/
|
|
1290
|
-
getPromotions = (input) => {
|
|
1291
|
-
const path = `${MARKETING_BASE_PATH}/promotion`;
|
|
1292
|
-
const params = buildEndpointParams({
|
|
1293
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1294
|
-
marketplaceId: { wireName: 'marketplace_id', value: input.marketplaceId },
|
|
1295
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1296
|
-
promotionStatus: { wireName: 'promotion_status', value: input.promotionStatus },
|
|
1297
|
-
promotionType: { wireName: 'promotion_type', value: input.promotionType },
|
|
1298
|
-
q: { wireName: 'q', value: input.q },
|
|
1299
|
-
sort: { wireName: 'sort', value: input.sort },
|
|
1300
|
-
});
|
|
1301
|
-
return requestGetEffect(this.client, path, params);
|
|
1302
|
-
};
|
|
1303
|
-
/**
|
|
1304
|
-
* Pause promotion through the eBay Marketing API.
|
|
1305
|
-
*
|
|
1306
|
-
* @param input - Path, query, header, and request body values for pausePromotion.
|
|
1307
|
-
* @returns An Effect that succeeds with eBay's generated pausePromotion response DTO.
|
|
1308
|
-
*
|
|
1309
|
-
* @example
|
|
1310
|
-
* ```ts
|
|
1311
|
-
* const response = await Effect.runPromise(marketingApi.pausePromotion({ promotionId: 'promotion-1' }));
|
|
1312
|
-
* ```
|
|
1313
|
-
*
|
|
1314
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/pausePromotion
|
|
1315
|
-
*/
|
|
1316
|
-
pausePromotion = (input) => {
|
|
1317
|
-
const path = `${MARKETING_BASE_PATH}/promotion/${input.promotionId}/pause`;
|
|
1318
|
-
return requestPostEffect(this.client, path);
|
|
1319
|
-
};
|
|
1320
|
-
/**
|
|
1321
|
-
* Resume promotion through the eBay Marketing API.
|
|
1322
|
-
*
|
|
1323
|
-
* @param input - Path, query, header, and request body values for resumePromotion.
|
|
1324
|
-
* @returns An Effect that succeeds with eBay's generated resumePromotion response DTO.
|
|
1325
|
-
*
|
|
1326
|
-
* @example
|
|
1327
|
-
* ```ts
|
|
1328
|
-
* const response = await Effect.runPromise(marketingApi.resumePromotion({ promotionId: 'promotion-1' }));
|
|
1329
|
-
* ```
|
|
1330
|
-
*
|
|
1331
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/resumePromotion
|
|
1332
|
-
*/
|
|
1333
|
-
resumePromotion = (input) => {
|
|
1334
|
-
const path = `${MARKETING_BASE_PATH}/promotion/${input.promotionId}/resume`;
|
|
1335
|
-
return requestPostEffect(this.client, path);
|
|
1336
|
-
};
|
|
1337
|
-
/**
|
|
1338
|
-
* Get promotion reports through the eBay Marketing API.
|
|
1339
|
-
*
|
|
1340
|
-
* @param input - Path, query, header, and request body values for getPromotionReports.
|
|
1341
|
-
* @returns An Effect that succeeds with eBay's generated getPromotionReports response DTO.
|
|
1342
|
-
*
|
|
1343
|
-
* @example
|
|
1344
|
-
* ```ts
|
|
1345
|
-
* const response = await Effect.runPromise(marketingApi.getPromotionReports({ marketplaceId: 'marketplace-1' }));
|
|
1346
|
-
* ```
|
|
1347
|
-
*
|
|
1348
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion_report/methods/getPromotionReports
|
|
1349
|
-
*/
|
|
1350
|
-
getPromotionReports = (input) => {
|
|
1351
|
-
const path = `${MARKETING_BASE_PATH}/promotion_report`;
|
|
1352
|
-
const params = buildEndpointParams({
|
|
1353
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1354
|
-
marketplaceId: { wireName: 'marketplace_id', value: input.marketplaceId },
|
|
1355
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1356
|
-
promotionStatus: { wireName: 'promotion_status', value: input.promotionStatus },
|
|
1357
|
-
promotionType: { wireName: 'promotion_type', value: input.promotionType },
|
|
1358
|
-
q: { wireName: 'q', value: input.q },
|
|
1359
|
-
});
|
|
1360
|
-
return requestGetEffect(this.client, path, params);
|
|
1361
|
-
};
|
|
1362
|
-
/**
|
|
1363
|
-
* Get promotion summary report through the eBay Marketing API.
|
|
1364
|
-
*
|
|
1365
|
-
* @param input - Path, query, header, and request body values for getPromotionSummaryReport.
|
|
1366
|
-
* @returns An Effect that succeeds with eBay's generated getPromotionSummaryReport response DTO.
|
|
1367
|
-
*
|
|
1368
|
-
* @example
|
|
1369
|
-
* ```ts
|
|
1370
|
-
* const response = await Effect.runPromise(marketingApi.getPromotionSummaryReport({ marketplaceId: 'marketplace-1' }));
|
|
1371
|
-
* ```
|
|
1372
|
-
*
|
|
1373
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion_summary_report/methods/getPromotionSummaryReport
|
|
1374
|
-
*/
|
|
1375
|
-
getPromotionSummaryReport = (input) => {
|
|
1376
|
-
const path = `${MARKETING_BASE_PATH}/promotion_summary_report`;
|
|
1377
|
-
const params = buildEndpointParams({
|
|
1378
|
-
marketplaceId: { wireName: 'marketplace_id', value: input.marketplaceId },
|
|
1379
|
-
});
|
|
1380
|
-
return requestGetEffect(this.client, path, params);
|
|
1381
|
-
};
|
|
1382
|
-
/**
|
|
1383
|
-
* Get email campaigns through the eBay Marketing API.
|
|
1384
|
-
*
|
|
1385
|
-
* @param input - Path, query, header, and request body values for getEmailCampaigns.
|
|
1386
|
-
* @returns An Effect that succeeds with eBay's generated getEmailCampaigns response DTO.
|
|
1387
|
-
*
|
|
1388
|
-
* @example
|
|
1389
|
-
* ```ts
|
|
1390
|
-
* const response = await Effect.runPromise(marketingApi.getEmailCampaigns());
|
|
1391
|
-
* ```
|
|
1392
|
-
*
|
|
1393
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailCampaigns
|
|
1394
|
-
*/
|
|
1395
|
-
getEmailCampaigns = (input = {}) => {
|
|
1396
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign`;
|
|
1397
|
-
const params = buildEndpointParams({
|
|
1398
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1399
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1400
|
-
q: { wireName: 'q', value: input.q },
|
|
1401
|
-
sort: { wireName: 'sort', value: input.sort },
|
|
1402
|
-
});
|
|
1403
|
-
return requestGetEffect(this.client, path, params);
|
|
1404
|
-
};
|
|
1405
|
-
/**
|
|
1406
|
-
* Create email campaign through the eBay Marketing API.
|
|
1407
|
-
*
|
|
1408
|
-
* @param input - Path, query, header, and request body values for createEmailCampaign.
|
|
1409
|
-
* @returns An Effect that succeeds with eBay's generated createEmailCampaign response DTO.
|
|
1410
|
-
*
|
|
1411
|
-
* @example
|
|
1412
|
-
* ```ts
|
|
1413
|
-
* const response = await Effect.runPromise(marketingApi.createEmailCampaign({ marketplaceId: 'EBAY_US', request: { ... } }));
|
|
1414
|
-
* ```
|
|
1415
|
-
*
|
|
1416
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/createEmailCampaign
|
|
1417
|
-
*/
|
|
1418
|
-
createEmailCampaign = (input) => {
|
|
1419
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign`;
|
|
1420
|
-
const config = marketplaceHeader(input.marketplaceId);
|
|
1421
|
-
return requestPostEffect(this.client, path, input.request, config);
|
|
1422
|
-
};
|
|
1423
|
-
/**
|
|
1424
|
-
* Get email campaign through the eBay Marketing API.
|
|
1425
|
-
*
|
|
1426
|
-
* @param input - Path, query, header, and request body values for getEmailCampaign.
|
|
1427
|
-
* @returns An Effect that succeeds with eBay's generated getEmailCampaign response DTO.
|
|
1428
|
-
*
|
|
1429
|
-
* @example
|
|
1430
|
-
* ```ts
|
|
1431
|
-
* const response = await Effect.runPromise(marketingApi.getEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
|
|
1432
|
-
* ```
|
|
1433
|
-
*
|
|
1434
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailCampaign
|
|
1435
|
-
*/
|
|
1436
|
-
getEmailCampaign = (input) => {
|
|
1437
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/${input.emailCampaignId}`;
|
|
1438
|
-
return requestGetEffect(this.client, path);
|
|
1439
|
-
};
|
|
1440
|
-
/**
|
|
1441
|
-
* Update email campaign through the eBay Marketing API.
|
|
1442
|
-
*
|
|
1443
|
-
* @param input - Path, query, header, and request body values for updateEmailCampaign.
|
|
1444
|
-
* @returns An Effect that succeeds with eBay's generated updateEmailCampaign response DTO.
|
|
1445
|
-
*
|
|
1446
|
-
* @example
|
|
1447
|
-
* ```ts
|
|
1448
|
-
* const response = await Effect.runPromise(marketingApi.updateEmailCampaign({ emailCampaignId: 'emailCampaign-1', request: { ... } }));
|
|
1449
|
-
* ```
|
|
1450
|
-
*
|
|
1451
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/updateEmailCampaign
|
|
1452
|
-
*/
|
|
1453
|
-
updateEmailCampaign = (input) => {
|
|
1454
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/${input.emailCampaignId}`;
|
|
1455
|
-
return requestPutEffect(this.client, path, input.request);
|
|
1456
|
-
};
|
|
1457
|
-
/**
|
|
1458
|
-
* Delete email campaign through the eBay Marketing API.
|
|
1459
|
-
*
|
|
1460
|
-
* @param input - Path, query, header, and request body values for deleteEmailCampaign.
|
|
1461
|
-
* @returns An Effect that succeeds with eBay's generated deleteEmailCampaign response DTO.
|
|
1462
|
-
*
|
|
1463
|
-
* @example
|
|
1464
|
-
* ```ts
|
|
1465
|
-
* const response = await Effect.runPromise(marketingApi.deleteEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
|
|
1466
|
-
* ```
|
|
1467
|
-
*
|
|
1468
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/deleteEmailCampaign
|
|
1469
|
-
*/
|
|
1470
|
-
deleteEmailCampaign = (input) => {
|
|
1471
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/${input.emailCampaignId}`;
|
|
1472
|
-
return requestDeleteEffect(this.client, path);
|
|
1473
|
-
};
|
|
1474
|
-
/**
|
|
1475
|
-
* Get audiences through the eBay Marketing API.
|
|
1476
|
-
*
|
|
1477
|
-
* @param input - Path, query, header, and request body values for getAudiences.
|
|
1478
|
-
* @returns An Effect that succeeds with eBay's generated getAudiences response DTO.
|
|
1479
|
-
*
|
|
1480
|
-
* @example
|
|
1481
|
-
* ```ts
|
|
1482
|
-
* const response = await Effect.runPromise(marketingApi.getAudiences({ emailCampaignType: 'emailCampaignType-1' }));
|
|
1483
|
-
* ```
|
|
1484
|
-
*
|
|
1485
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getAudiences
|
|
1486
|
-
*/
|
|
1487
|
-
getAudiences = (input) => {
|
|
1488
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/audience`;
|
|
1489
|
-
const params = buildEndpointParams({
|
|
1490
|
-
emailCampaignType: { wireName: 'emailCampaignType', value: input.emailCampaignType },
|
|
1491
|
-
limit: { wireName: 'limit', value: input.limit },
|
|
1492
|
-
offset: { wireName: 'offset', value: input.offset },
|
|
1493
|
-
});
|
|
1494
|
-
return requestGetEffect(this.client, path, params);
|
|
1495
|
-
};
|
|
1496
|
-
/**
|
|
1497
|
-
* Get email preview through the eBay Marketing API.
|
|
1498
|
-
*
|
|
1499
|
-
* @param input - Path, query, header, and request body values for getEmailPreview.
|
|
1500
|
-
* @returns An Effect that succeeds with eBay's generated getEmailPreview response DTO.
|
|
1501
|
-
*
|
|
1502
|
-
* @example
|
|
1503
|
-
* ```ts
|
|
1504
|
-
* const response = await Effect.runPromise(marketingApi.getEmailPreview({ emailCampaignId: 'emailCampaign-1' }));
|
|
1505
|
-
* ```
|
|
1506
|
-
*
|
|
1507
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailPreview
|
|
1508
|
-
*/
|
|
1509
|
-
getEmailPreview = (input) => {
|
|
1510
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/${input.emailCampaignId}/email_preview`;
|
|
1511
|
-
return requestGetEffect(this.client, path);
|
|
1512
|
-
};
|
|
1513
|
-
/**
|
|
1514
|
-
* Get email report through the eBay Marketing API.
|
|
1515
|
-
*
|
|
1516
|
-
* @param input - Path, query, header, and request body values for getEmailReport.
|
|
1517
|
-
* @returns An Effect that succeeds with eBay's generated getEmailReport response DTO.
|
|
1518
|
-
*
|
|
1519
|
-
* @example
|
|
1520
|
-
* ```ts
|
|
1521
|
-
* const response = await Effect.runPromise(marketingApi.getEmailReport({ endDate: 'endDate-1', startDate: 'startDate-1' }));
|
|
1522
|
-
* ```
|
|
1523
|
-
*
|
|
1524
|
-
* @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailReport
|
|
1525
|
-
*/
|
|
1526
|
-
getEmailReport = (input) => {
|
|
1527
|
-
const path = `${MARKETING_BASE_PATH}/email_campaign/report`;
|
|
1528
|
-
const params = buildEndpointParams({
|
|
1529
|
-
endDate: { wireName: 'endDate', value: input.endDate },
|
|
1530
|
-
startDate: { wireName: 'startDate', value: input.startDate },
|
|
1531
|
-
});
|
|
1532
|
-
return requestGetEffect(this.client, path, params);
|
|
1533
|
-
};
|
|
1534
12
|
}
|