ebay-mcp 1.17.0 → 1.18.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.md +92 -53
- package/build/api/account-management/accountV2.js +347 -0
- package/build/api/account-management/finances.js +289 -0
- package/build/api/analytics-and-report/analytics.js +1 -1
- package/build/api/{client.js → client/ebayApiClient.js} +83 -36
- package/build/api/{clientTrading.js → client/tradingApiClient.js} +22 -22
- package/build/api/communication/feedback.js +21 -21
- package/build/api/communication/message.js +23 -23
- package/build/api/communication/negotiation.js +7 -7
- package/build/api/communication/notification.js +52 -52
- package/build/api/developer/developer.js +3 -3
- package/build/api/{index.js → ebaySellerApi.js} +28 -4
- package/build/api/listing-management/feed.js +91 -0
- package/build/api/listing-management/feedReportTasks.js +107 -0
- package/build/api/listing-management/feedRequest.js +91 -0
- package/build/api/listing-management/feedSchedules.js +95 -0
- package/build/api/listing-management/feedTasks.js +91 -0
- package/build/api/listing-management/items.js +22 -22
- package/build/api/listing-management/locations.js +4 -4
- package/build/api/listing-management/media.js +14 -14
- package/build/api/listing-management/mediaAttach.js +14 -14
- package/build/api/listing-management/mediaResources.js +22 -39
- package/build/api/listing-management/offerFormat.js +1 -1
- package/build/api/listing-management/offers.js +23 -23
- package/build/api/listing-management/stores.js +203 -0
- package/build/api/listing-metadata/charity.js +76 -0
- package/build/api/listing-metadata/metadata.js +31 -11
- package/build/api/listing-metadata/metadataShipping.js +117 -0
- package/build/api/listing-metadata/taxonomy.js +52 -7
- package/build/api/marketing-and-promotions/ads.js +34 -34
- package/build/api/marketing-and-promotions/campaigns.js +21 -21
- package/build/api/marketing-and-promotions/promotions.js +24 -24
- package/build/api/marketing-and-promotions/reports.js +7 -7
- package/build/api/marketing-and-promotions/shared.js +0 -3
- package/build/api/order-management/dispute.js +11 -9
- package/build/api/order-management/fulfillment.js +4 -4
- package/build/api/order-management/logistics.js +150 -0
- package/build/api/other/browseMappers.js +15 -13
- package/build/api/other/browseValidators.js +4 -4
- package/build/api/other/edelivery.js +19 -19
- package/build/api/other/finding.js +13 -13
- package/build/api/other/translation.js +2 -2
- package/build/api/other/vero.js +2 -2
- package/build/api/shared/download.js +79 -0
- package/build/api/shared/location.js +33 -0
- package/build/api/shared/request.js +69 -11
- package/build/api/trading/listingFormat.js +37 -30
- package/build/api/trading/trading.js +33 -33
- package/build/auth/credentialSession.js +5 -5
- package/build/auth/oauth.js +3 -3
- package/build/auth/oauthHelper.js +24 -24
- package/build/auth/oauthMetadata.js +4 -4
- package/build/auth/oauthMiddleware.js +16 -16
- package/build/auth/scopeUtils.js +24 -3
- package/build/auth/tokenVerifier.js +23 -23
- package/build/config/environment.js +10 -45
- package/build/config/oauthScopes.js +132 -0
- package/build/config/toolFamilies.js +4 -0
- package/build/index.js +5 -5
- package/build/mcp/httpTransport.js +32 -20
- package/build/mcp/runtime.js +12 -12
- package/build/mcp/toolGating.js +6 -12
- package/build/mcp/uiBridge.js +3 -3
- package/build/schemas/account-management/account.js +2 -52
- package/build/schemas/account-management/accountV2.js +294 -0
- package/build/schemas/account-management/finances.js +143 -0
- package/build/schemas/analytics/analytics.js +2 -48
- package/build/schemas/communication/messages.js +2 -46
- package/build/schemas/developer/developer.js +1 -27
- package/build/schemas/fulfillment/logistics.js +115 -0
- package/build/schemas/fulfillment/orders.js +2 -47
- package/build/schemas/inventory-management/feed.js +217 -0
- package/build/schemas/inventory-management/inventory.js +2 -50
- package/build/schemas/inventory-management/media.js +2 -2
- package/build/schemas/inventory-management/mediaDocuments.js +1 -1
- package/build/schemas/inventory-management/stores.js +42 -0
- package/build/schemas/marketing/ads.js +2 -2
- package/build/schemas/marketing/campaigns.js +2 -2
- package/build/schemas/marketing/common.js +2 -2
- package/build/schemas/marketing/marketing.js +0 -1
- package/build/schemas/marketing/promotions.js +2 -2
- package/build/schemas/marketing/reports.js +2 -2
- package/build/schemas/metadata/metadata.js +2 -90
- package/build/schemas/metadata/shipping.js +16 -0
- package/build/schemas/other/browse.js +2 -2
- package/build/schemas/other/finding.js +2 -2
- package/build/schemas/other/otherApis.js +2 -114
- package/build/schemas/taxonomy/categoryTree.js +8 -0
- package/build/schemas/taxonomy/charity.js +41 -0
- package/build/schemas/taxonomy/taxonomy.js +2 -69
- package/build/scripts/autoSetup.js +3 -3
- package/build/scripts/{buildUi.js → buildMcpApps.js} +13 -13
- package/build/scripts/devSync.js +34 -70
- package/build/scripts/diagnostics.js +15 -16
- package/build/scripts/interactiveSetup.js +25 -25
- package/build/scripts/scopeHelper.js +2 -2
- package/build/scripts/securityChecker.js +20 -20
- package/build/scripts/setup.js +76 -76
- package/build/scripts/setupShared.js +5 -30
- package/build/scripts/setupValidator.js +9 -9
- package/build/scripts/setupWizard.js +23 -23
- package/build/scripts/skills.js +14 -17
- package/build/scripts/specRefs.js +55 -0
- package/build/scripts/specSources.js +144 -0
- package/build/serverHttp.js +4 -7
- package/build/skills/content.js +13 -13
- package/build/skills/install.js +9 -9
- package/build/skills/registrySnapshot.js +7 -3
- package/build/skills/render.js +2 -2
- package/build/tools/categories/accountV2.js +106 -0
- package/build/tools/categories/charity.js +21 -0
- package/build/tools/categories/communication.js +1 -1
- package/build/tools/categories/connector.js +19 -16
- package/build/tools/categories/feed.js +183 -0
- package/build/tools/categories/finances.js +86 -0
- package/build/tools/categories/fulfillment.js +4 -4
- package/build/tools/categories/index.js +12 -2
- package/build/tools/categories/inventory.js +1 -1
- package/build/tools/categories/logistics.js +52 -0
- package/build/tools/categories/metadata.js +38 -1
- package/build/tools/categories/stores.js +64 -0
- package/build/tools/categories/taxonomy.js +18 -1
- package/build/tools/categories/tokenManagement.js +8 -8
- package/build/tools/contracts.js +2 -2
- package/build/tools/defineTool.js +27 -12
- package/build/tools/fileResult.js +30 -0
- package/build/tools/registry.js +2 -2
- package/build/tools/schemas.js +2 -2
- package/build/tools/ui/mapHelpers.js +12 -12
- package/build/tools/ui/maps.js +101 -97
- package/build/tools/ui/viewModels.js +2 -2
- package/build/utils/apiStatusFeed.js +12 -12
- package/build/utils/communication/feedback.js +3 -3
- package/build/utils/communication/message.js +3 -3
- package/build/utils/communication/negotiation.js +3 -3
- package/build/utils/communication/notification.js +3 -3
- package/build/utils/entryModule.js +33 -0
- package/build/utils/envFile.js +47 -0
- package/build/utils/envParser.js +5 -5
- package/build/utils/errors.js +4 -4
- package/build/utils/http.js +60 -41
- package/build/utils/localFeedFiles.js +61 -0
- package/build/utils/localMedia.js +18 -6
- package/build/utils/logRedaction.js +21 -0
- package/build/utils/logger.js +52 -33
- package/build/utils/other/compliance.js +3 -3
- package/build/utils/other/identity.js +3 -3
- package/build/utils/other/translation.js +3 -3
- package/build/utils/other/vero.js +3 -3
- package/build/utils/schemaHelpers.js +2 -2
- package/build/utils/tokenUtils.js +2 -2
- package/build/utils/trading/trading.js +1 -1
- package/build/utils/version.js +1 -1
- package/build/utils/zodIssues.js +14 -0
- package/package.json +9 -12
- package/README.de.md +0 -422
- package/README.es.md +0 -422
- package/README.fr.md +0 -422
- package/README.ja.md +0 -422
- package/README.ko.md +0 -422
- package/README.pt-BR.md +0 -422
- package/README.ru.md +0 -422
- package/README.zh-CN.md +0 -422
- package/build/schemas/index.js +0 -76
- package/build/schemas/marketing/jsonSchemas.js +0 -118
- package/build/scripts/downloadSpecs.js +0 -117
- package/build/scripts/updateApiStatusDoc.js +0 -71
- package/build/utils/effectSchema.js +0 -203
- package/build/utils/effectSchemaAdapter.js +0 -121
- package/build/utils/effectSchemaChainMethods.js +0 -146
- package/build/utils/effectSchemaRefinements.js +0 -104
- package/build/utils/effectSchemaStringMethods.js +0 -63
- package/build/utils/effectSchemaTypes.js +0 -47
- package/docs/auth/production_scopes.json +0 -111
- package/docs/auth/sandbox_scopes.json +0 -142
- /package/build/api/{clientRequestError.js → client/ebayClientRequestError.js} +0 -0
- /package/build/api/{rateLimitTracker.js → client/rateLimitTracker.js} +0 -0
- /package/build/api/{clientTradingError.js → client/tradingApiFailure.js} +0 -0
|
@@ -2,7 +2,7 @@ import { buildEndpointParams, optionalPositiveNumberEffect, optionalStringEffect
|
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
/**
|
|
4
4
|
* Notification API - Event notifications and subscriptions
|
|
5
|
-
* Based on:
|
|
5
|
+
* Based on: commerce_notification_v1_oas3.json
|
|
6
6
|
*/
|
|
7
7
|
export class NotificationApi {
|
|
8
8
|
basePath = '/commerce/notification/v1';
|
|
@@ -27,8 +27,8 @@ export class NotificationApi {
|
|
|
27
27
|
const apiClient = this.client;
|
|
28
28
|
const apiBasePath = this.basePath;
|
|
29
29
|
return Effect.gen(function* () {
|
|
30
|
-
const
|
|
31
|
-
const validatedPublicKeyId = yield* requireStringEffect(
|
|
30
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
31
|
+
const validatedPublicKeyId = yield* requireStringEffect(validatedInput.publicKeyId, 'publicKeyId');
|
|
32
32
|
return yield* requestGetEffect(apiClient, `${apiBasePath}/public_key/${validatedPublicKeyId}`);
|
|
33
33
|
});
|
|
34
34
|
};
|
|
@@ -66,8 +66,8 @@ export class NotificationApi {
|
|
|
66
66
|
const apiClient = this.client;
|
|
67
67
|
const path = `${this.basePath}/config`;
|
|
68
68
|
return Effect.gen(function* () {
|
|
69
|
-
const
|
|
70
|
-
return yield* requestPutEffect(apiClient, path,
|
|
69
|
+
const configUpdate = yield* requireObjectEffect(input, 'input');
|
|
70
|
+
return yield* requestPutEffect(apiClient, path, configUpdate);
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
@@ -87,9 +87,9 @@ export class NotificationApi {
|
|
|
87
87
|
const apiClient = this.client;
|
|
88
88
|
const path = `${this.basePath}/destination`;
|
|
89
89
|
return Effect.gen(function* () {
|
|
90
|
-
const
|
|
91
|
-
const limit = yield* optionalPositiveNumberEffect(
|
|
92
|
-
const continuationToken = yield* optionalStringEffect(
|
|
90
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
91
|
+
const limit = yield* optionalPositiveNumberEffect(validatedInput.limit, 'limit');
|
|
92
|
+
const continuationToken = yield* optionalStringEffect(validatedInput.continuationToken, 'continuationToken');
|
|
93
93
|
const params = buildEndpointParams({
|
|
94
94
|
limit: { wireName: 'limit', value: limit },
|
|
95
95
|
continuationToken: { wireName: 'continuation_token', value: continuationToken },
|
|
@@ -116,8 +116,8 @@ export class NotificationApi {
|
|
|
116
116
|
const apiClient = this.client;
|
|
117
117
|
const apiBasePath = this.basePath;
|
|
118
118
|
return Effect.gen(function* () {
|
|
119
|
-
const
|
|
120
|
-
const validatedDestinationId = yield* requireStringEffect(
|
|
119
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
120
|
+
const validatedDestinationId = yield* requireStringEffect(validatedInput.destinationId, 'destinationId');
|
|
121
121
|
return yield* requestGetEffect(apiClient, `${apiBasePath}/destination/${validatedDestinationId}`);
|
|
122
122
|
});
|
|
123
123
|
};
|
|
@@ -138,8 +138,8 @@ export class NotificationApi {
|
|
|
138
138
|
const apiClient = this.client;
|
|
139
139
|
const path = `${this.basePath}/destination`;
|
|
140
140
|
return Effect.gen(function* () {
|
|
141
|
-
const
|
|
142
|
-
return yield* requestPostEffect(apiClient, path,
|
|
141
|
+
const destinationRequest = yield* requireObjectEffect(input, 'input');
|
|
142
|
+
return yield* requestPostEffect(apiClient, path, destinationRequest);
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
145
|
/**
|
|
@@ -161,11 +161,11 @@ export class NotificationApi {
|
|
|
161
161
|
const apiClient = this.client;
|
|
162
162
|
const apiBasePath = this.basePath;
|
|
163
163
|
return Effect.gen(function* () {
|
|
164
|
-
const
|
|
165
|
-
const { destinationId, ...destination } =
|
|
164
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
165
|
+
const { destinationId, ...destination } = validatedInput;
|
|
166
166
|
const validatedDestinationId = yield* requireStringEffect(destinationId, 'destinationId');
|
|
167
|
-
const
|
|
168
|
-
return yield* requestPutEffect(apiClient, `${apiBasePath}/destination/${validatedDestinationId}`,
|
|
167
|
+
const destinationRequest = yield* requireObjectEffect(destination, 'destination');
|
|
168
|
+
return yield* requestPutEffect(apiClient, `${apiBasePath}/destination/${validatedDestinationId}`, destinationRequest);
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
@@ -185,8 +185,8 @@ export class NotificationApi {
|
|
|
185
185
|
const apiClient = this.client;
|
|
186
186
|
const apiBasePath = this.basePath;
|
|
187
187
|
return Effect.gen(function* () {
|
|
188
|
-
const
|
|
189
|
-
const validatedDestinationId = yield* requireStringEffect(
|
|
188
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
189
|
+
const validatedDestinationId = yield* requireStringEffect(validatedInput.destinationId, 'destinationId');
|
|
190
190
|
return yield* requestDeleteEffect(apiClient, `${apiBasePath}/destination/${validatedDestinationId}`);
|
|
191
191
|
});
|
|
192
192
|
};
|
|
@@ -207,9 +207,9 @@ export class NotificationApi {
|
|
|
207
207
|
const apiClient = this.client;
|
|
208
208
|
const path = `${this.basePath}/subscription`;
|
|
209
209
|
return Effect.gen(function* () {
|
|
210
|
-
const
|
|
211
|
-
const limit = yield* optionalPositiveNumberEffect(
|
|
212
|
-
const continuationToken = yield* optionalStringEffect(
|
|
210
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
211
|
+
const limit = yield* optionalPositiveNumberEffect(validatedInput.limit, 'limit');
|
|
212
|
+
const continuationToken = yield* optionalStringEffect(validatedInput.continuationToken, 'continuationToken');
|
|
213
213
|
const params = buildEndpointParams({
|
|
214
214
|
limit: { wireName: 'limit', value: limit },
|
|
215
215
|
continuationToken: { wireName: 'continuation_token', value: continuationToken },
|
|
@@ -234,8 +234,8 @@ export class NotificationApi {
|
|
|
234
234
|
const apiClient = this.client;
|
|
235
235
|
const path = `${this.basePath}/subscription`;
|
|
236
236
|
return Effect.gen(function* () {
|
|
237
|
-
const
|
|
238
|
-
return yield* requestPostEffect(apiClient, path,
|
|
237
|
+
const subscriptionRequest = yield* requireObjectEffect(input, 'input');
|
|
238
|
+
return yield* requestPostEffect(apiClient, path, subscriptionRequest);
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
/**
|
|
@@ -257,8 +257,8 @@ export class NotificationApi {
|
|
|
257
257
|
const apiClient = this.client;
|
|
258
258
|
const apiBasePath = this.basePath;
|
|
259
259
|
return Effect.gen(function* () {
|
|
260
|
-
const
|
|
261
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
260
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
261
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
262
262
|
return yield* requestGetEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}`);
|
|
263
263
|
});
|
|
264
264
|
};
|
|
@@ -281,11 +281,11 @@ export class NotificationApi {
|
|
|
281
281
|
const apiClient = this.client;
|
|
282
282
|
const apiBasePath = this.basePath;
|
|
283
283
|
return Effect.gen(function* () {
|
|
284
|
-
const
|
|
285
|
-
const { subscriptionId, ...subscription } =
|
|
284
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
285
|
+
const { subscriptionId, ...subscription } = validatedInput;
|
|
286
286
|
const validatedSubscriptionId = yield* requireStringEffect(subscriptionId, 'subscriptionId');
|
|
287
|
-
const
|
|
288
|
-
return yield* requestPutEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}`,
|
|
287
|
+
const subscriptionUpdate = yield* requireObjectEffect(subscription, 'subscription');
|
|
288
|
+
return yield* requestPutEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}`, subscriptionUpdate);
|
|
289
289
|
});
|
|
290
290
|
};
|
|
291
291
|
/**
|
|
@@ -305,8 +305,8 @@ export class NotificationApi {
|
|
|
305
305
|
const apiClient = this.client;
|
|
306
306
|
const apiBasePath = this.basePath;
|
|
307
307
|
return Effect.gen(function* () {
|
|
308
|
-
const
|
|
309
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
308
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
309
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
310
310
|
return yield* requestDeleteEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}`);
|
|
311
311
|
});
|
|
312
312
|
};
|
|
@@ -327,8 +327,8 @@ export class NotificationApi {
|
|
|
327
327
|
const apiClient = this.client;
|
|
328
328
|
const apiBasePath = this.basePath;
|
|
329
329
|
return Effect.gen(function* () {
|
|
330
|
-
const
|
|
331
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
330
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
331
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
332
332
|
return yield* requestPostEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/disable`);
|
|
333
333
|
});
|
|
334
334
|
};
|
|
@@ -349,8 +349,8 @@ export class NotificationApi {
|
|
|
349
349
|
const apiClient = this.client;
|
|
350
350
|
const apiBasePath = this.basePath;
|
|
351
351
|
return Effect.gen(function* () {
|
|
352
|
-
const
|
|
353
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
352
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
353
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
354
354
|
return yield* requestPostEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/enable`);
|
|
355
355
|
});
|
|
356
356
|
};
|
|
@@ -371,8 +371,8 @@ export class NotificationApi {
|
|
|
371
371
|
const apiClient = this.client;
|
|
372
372
|
const apiBasePath = this.basePath;
|
|
373
373
|
return Effect.gen(function* () {
|
|
374
|
-
const
|
|
375
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
374
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
375
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
376
376
|
return yield* requestPostEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/test`);
|
|
377
377
|
});
|
|
378
378
|
};
|
|
@@ -393,8 +393,8 @@ export class NotificationApi {
|
|
|
393
393
|
const apiClient = this.client;
|
|
394
394
|
const apiBasePath = this.basePath;
|
|
395
395
|
return Effect.gen(function* () {
|
|
396
|
-
const
|
|
397
|
-
const validatedTopicId = yield* requireStringEffect(
|
|
396
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
397
|
+
const validatedTopicId = yield* requireStringEffect(validatedInput.topicId, 'topicId');
|
|
398
398
|
return yield* requestGetEffect(apiClient, `${apiBasePath}/topic/${validatedTopicId}`);
|
|
399
399
|
});
|
|
400
400
|
};
|
|
@@ -415,9 +415,9 @@ export class NotificationApi {
|
|
|
415
415
|
const apiClient = this.client;
|
|
416
416
|
const path = `${this.basePath}/topic`;
|
|
417
417
|
return Effect.gen(function* () {
|
|
418
|
-
const
|
|
419
|
-
const limit = yield* optionalPositiveNumberEffect(
|
|
420
|
-
const continuationToken = yield* optionalStringEffect(
|
|
418
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
419
|
+
const limit = yield* optionalPositiveNumberEffect(validatedInput.limit, 'limit');
|
|
420
|
+
const continuationToken = yield* optionalStringEffect(validatedInput.continuationToken, 'continuationToken');
|
|
421
421
|
const params = buildEndpointParams({
|
|
422
422
|
limit: { wireName: 'limit', value: limit },
|
|
423
423
|
continuationToken: { wireName: 'continuation_token', value: continuationToken },
|
|
@@ -447,11 +447,11 @@ export class NotificationApi {
|
|
|
447
447
|
const apiClient = this.client;
|
|
448
448
|
const apiBasePath = this.basePath;
|
|
449
449
|
return Effect.gen(function* () {
|
|
450
|
-
const
|
|
451
|
-
const { subscriptionId, ...filter } =
|
|
450
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
451
|
+
const { subscriptionId, ...filter } = validatedInput;
|
|
452
452
|
const validatedSubscriptionId = yield* requireStringEffect(subscriptionId, 'subscriptionId');
|
|
453
|
-
const
|
|
454
|
-
return yield* requestPostEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/filter`,
|
|
453
|
+
const filterRequest = yield* requireObjectEffect(filter, 'filter');
|
|
454
|
+
return yield* requestPostEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/filter`, filterRequest);
|
|
455
455
|
});
|
|
456
456
|
};
|
|
457
457
|
/**
|
|
@@ -473,9 +473,9 @@ export class NotificationApi {
|
|
|
473
473
|
const apiClient = this.client;
|
|
474
474
|
const apiBasePath = this.basePath;
|
|
475
475
|
return Effect.gen(function* () {
|
|
476
|
-
const
|
|
477
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
478
|
-
const validatedFilterId = yield* requireStringEffect(
|
|
476
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
477
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
478
|
+
const validatedFilterId = yield* requireStringEffect(validatedInput.filterId, 'filterId');
|
|
479
479
|
return yield* requestGetEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/filter/${validatedFilterId}`);
|
|
480
480
|
});
|
|
481
481
|
};
|
|
@@ -501,9 +501,9 @@ export class NotificationApi {
|
|
|
501
501
|
const apiClient = this.client;
|
|
502
502
|
const apiBasePath = this.basePath;
|
|
503
503
|
return Effect.gen(function* () {
|
|
504
|
-
const
|
|
505
|
-
const validatedSubscriptionId = yield* requireStringEffect(
|
|
506
|
-
const validatedFilterId = yield* requireStringEffect(
|
|
504
|
+
const validatedInput = yield* requireObjectEffect(input, 'input');
|
|
505
|
+
const validatedSubscriptionId = yield* requireStringEffect(validatedInput.subscriptionId, 'subscriptionId');
|
|
506
|
+
const validatedFilterId = yield* requireStringEffect(validatedInput.filterId, 'filterId');
|
|
507
507
|
return yield* requestDeleteEffect(apiClient, `${apiBasePath}/subscription/${validatedSubscriptionId}/filter/${validatedFilterId}`);
|
|
508
508
|
});
|
|
509
509
|
};
|
|
@@ -3,9 +3,9 @@ import { Effect } from 'effect';
|
|
|
3
3
|
/**
|
|
4
4
|
* Developer API - Rate limits, client registration, and signing keys
|
|
5
5
|
* Based on:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
6
|
+
* - developer_analytics_v1_beta_oas3.json
|
|
7
|
+
* - developer_client_registration_v1_oas3.json
|
|
8
|
+
* - developer_key_management_v1_oas3.json
|
|
9
9
|
*/
|
|
10
10
|
export class DeveloperApi {
|
|
11
11
|
client;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { AccountApi } from '../api/account-management/account.js';
|
|
2
|
+
import { AccountV2Api } from '../api/account-management/accountV2.js';
|
|
3
|
+
import { FinancesApi } from '../api/account-management/finances.js';
|
|
2
4
|
import { AnalyticsApi } from '../api/analytics-and-report/analytics.js';
|
|
3
|
-
import { EbayApiClient } from '../api/client.js';
|
|
5
|
+
import { EbayApiClient } from '../api/client/ebayApiClient.js';
|
|
4
6
|
import { FeedbackApi } from '../api/communication/feedback.js';
|
|
5
7
|
import { MessageApi } from '../api/communication/message.js';
|
|
6
8
|
import { NegotiationApi } from '../api/communication/negotiation.js';
|
|
7
9
|
import { NotificationApi } from '../api/communication/notification.js';
|
|
8
10
|
import { DeveloperApi } from '../api/developer/developer.js';
|
|
11
|
+
import { FeedApi } from '../api/listing-management/feed.js';
|
|
9
12
|
import { InventoryApi } from '../api/listing-management/inventory.js';
|
|
10
13
|
import { MediaApi } from '../api/listing-management/media.js';
|
|
14
|
+
import { StoresApi } from '../api/listing-management/stores.js';
|
|
15
|
+
import { CharityApi } from '../api/listing-metadata/charity.js';
|
|
11
16
|
import { MetadataApi } from '../api/listing-metadata/metadata.js';
|
|
12
17
|
import { TaxonomyApi } from '../api/listing-metadata/taxonomy.js';
|
|
13
18
|
import { MarketingApi } from '../api/marketing-and-promotions/marketing.js';
|
|
14
19
|
import { RecommendationApi } from '../api/marketing-and-promotions/recommendation.js';
|
|
15
20
|
import { DisputeApi } from '../api/order-management/dispute.js';
|
|
16
21
|
import { FulfillmentApi } from '../api/order-management/fulfillment.js';
|
|
22
|
+
import { LogisticsApi } from '../api/order-management/logistics.js';
|
|
17
23
|
import { ComplianceApi } from '../api/other/compliance.js';
|
|
18
24
|
import { EDeliveryApi } from '../api/other/edelivery.js';
|
|
19
25
|
import { BrowseApi } from '../api/other/browse.js';
|
|
@@ -21,7 +27,7 @@ import { FindingApi } from '../api/other/finding.js';
|
|
|
21
27
|
import { IdentityApi } from '../api/other/identity.js';
|
|
22
28
|
import { TranslationApi } from '../api/other/translation.js';
|
|
23
29
|
import { VeroApi } from '../api/other/vero.js';
|
|
24
|
-
import { TradingApiClient } from '../api/
|
|
30
|
+
import { TradingApiClient } from '../api/client/tradingApiClient.js';
|
|
25
31
|
import { TradingApi } from '../api/trading/trading.js';
|
|
26
32
|
/**
|
|
27
33
|
* Main API facade providing access to all eBay APIs
|
|
@@ -31,15 +37,21 @@ export class EbaySellerApi {
|
|
|
31
37
|
config;
|
|
32
38
|
// API categories
|
|
33
39
|
account;
|
|
40
|
+
accountV2;
|
|
41
|
+
finances;
|
|
34
42
|
inventory;
|
|
35
43
|
media;
|
|
44
|
+
feed;
|
|
45
|
+
stores;
|
|
36
46
|
fulfillment;
|
|
47
|
+
logistics;
|
|
37
48
|
dispute;
|
|
38
49
|
marketing;
|
|
39
50
|
recommendation;
|
|
40
51
|
analytics;
|
|
41
52
|
metadata;
|
|
42
53
|
taxonomy;
|
|
54
|
+
charity;
|
|
43
55
|
negotiation;
|
|
44
56
|
message;
|
|
45
57
|
notification;
|
|
@@ -58,15 +70,21 @@ export class EbaySellerApi {
|
|
|
58
70
|
this.client = new EbayApiClient(config);
|
|
59
71
|
// Initialize API category handlers
|
|
60
72
|
this.account = new AccountApi(this.client);
|
|
73
|
+
this.accountV2 = new AccountV2Api(this.client);
|
|
74
|
+
this.finances = new FinancesApi(this.client);
|
|
61
75
|
this.inventory = new InventoryApi(this.client);
|
|
62
76
|
this.media = new MediaApi(this.client, this.inventory);
|
|
77
|
+
this.feed = new FeedApi(this.client);
|
|
78
|
+
this.stores = new StoresApi(this.client);
|
|
63
79
|
this.fulfillment = new FulfillmentApi(this.client);
|
|
80
|
+
this.logistics = new LogisticsApi(this.client);
|
|
64
81
|
this.dispute = new DisputeApi(this.client);
|
|
65
82
|
this.marketing = new MarketingApi(this.client);
|
|
66
83
|
this.recommendation = new RecommendationApi(this.client);
|
|
67
84
|
this.analytics = new AnalyticsApi(this.client);
|
|
68
85
|
this.metadata = new MetadataApi(this.client);
|
|
69
86
|
this.taxonomy = new TaxonomyApi(this.client);
|
|
87
|
+
this.charity = new CharityApi(this.client);
|
|
70
88
|
this.negotiation = new NegotiationApi(this.client);
|
|
71
89
|
this.message = new MessageApi(this.client);
|
|
72
90
|
this.notification = new NotificationApi(this.client);
|
|
@@ -129,21 +147,27 @@ export class EbaySellerApi {
|
|
|
129
147
|
}
|
|
130
148
|
}
|
|
131
149
|
export * from '../api/account-management/account.js';
|
|
150
|
+
export * from '../api/account-management/accountV2.js';
|
|
151
|
+
export * from '../api/account-management/finances.js';
|
|
132
152
|
export * from '../api/analytics-and-report/analytics.js';
|
|
133
|
-
export * from '../api/client.js';
|
|
153
|
+
export * from '../api/client/ebayApiClient.js';
|
|
134
154
|
export * from '../api/communication/feedback.js';
|
|
135
155
|
export * from '../api/communication/message.js';
|
|
136
156
|
export * from '../api/communication/negotiation.js';
|
|
137
157
|
export * from '../api/communication/notification.js';
|
|
158
|
+
export * from '../api/listing-management/feed.js';
|
|
138
159
|
export * from '../api/listing-management/inventory.js';
|
|
139
160
|
export * from '../api/listing-management/media.js';
|
|
140
161
|
export * from '../api/listing-management/mediaAttach.js';
|
|
162
|
+
export * from '../api/listing-management/stores.js';
|
|
163
|
+
export * from '../api/listing-metadata/charity.js';
|
|
141
164
|
export * from '../api/listing-metadata/metadata.js';
|
|
142
165
|
export * from '../api/listing-metadata/taxonomy.js';
|
|
143
166
|
export * from '../api/marketing-and-promotions/marketing.js';
|
|
144
167
|
export * from '../api/marketing-and-promotions/recommendation.js';
|
|
145
168
|
export * from '../api/order-management/dispute.js';
|
|
146
169
|
export * from '../api/order-management/fulfillment.js';
|
|
170
|
+
export * from '../api/order-management/logistics.js';
|
|
147
171
|
export * from '../api/other/compliance.js';
|
|
148
172
|
export * from '../api/other/edelivery.js';
|
|
149
173
|
export { BrowseApi } from '../api/other/browse.js';
|
|
@@ -156,4 +180,4 @@ export * from '../api/other/translation.js';
|
|
|
156
180
|
export * from '../api/other/vero.js';
|
|
157
181
|
export * from '../api/developer/developer.js';
|
|
158
182
|
export * from '../api/trading/trading.js';
|
|
159
|
-
export * from '../api/
|
|
183
|
+
export * from '../api/client/tradingApiClient.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createFeedReportTaskMethods } from './feedReportTasks.js';
|
|
2
|
+
import { createFeedScheduleMethods } from './feedSchedules.js';
|
|
3
|
+
import { createFeedTaskMethods } from './feedTasks.js';
|
|
4
|
+
/**
|
|
5
|
+
* Feed API - asynchronous order, inventory, and customer service metric feed tasks and
|
|
6
|
+
* schedules. Every member is the eBay operation of the same name; the endpoints live in
|
|
7
|
+
* `feedTasks.ts`, `feedReportTasks.ts` and `feedSchedules.ts` by resource.
|
|
8
|
+
*/
|
|
9
|
+
export class FeedApi {
|
|
10
|
+
// task resource: feed tasks without filter criteria, their files and uploads.
|
|
11
|
+
/** Feed API getTasks endpoint; see createFeedTaskMethods. */
|
|
12
|
+
getTasks;
|
|
13
|
+
/** Feed API createTask endpoint; see createFeedTaskMethods. */
|
|
14
|
+
createTask;
|
|
15
|
+
/** Feed API getTask endpoint; see createFeedTaskMethods. */
|
|
16
|
+
getTask;
|
|
17
|
+
/** Feed API getInputFile endpoint; see createFeedTaskMethods. */
|
|
18
|
+
getInputFile;
|
|
19
|
+
/** Feed API getResultFile endpoint; see createFeedTaskMethods. */
|
|
20
|
+
getResultFile;
|
|
21
|
+
/** Feed API uploadFile endpoint; see createFeedTaskMethods. */
|
|
22
|
+
uploadFile;
|
|
23
|
+
// order_task, inventory_task and customer_service_metric_task: filtered report tasks.
|
|
24
|
+
/** Feed API getOrderTasks endpoint; see createFeedReportTaskMethods. */
|
|
25
|
+
getOrderTasks;
|
|
26
|
+
/** Feed API createOrderTask endpoint; see createFeedReportTaskMethods. */
|
|
27
|
+
createOrderTask;
|
|
28
|
+
/** Feed API getOrderTask endpoint; see createFeedReportTaskMethods. */
|
|
29
|
+
getOrderTask;
|
|
30
|
+
/** Feed API getInventoryTasks endpoint; see createFeedReportTaskMethods. */
|
|
31
|
+
getInventoryTasks;
|
|
32
|
+
/** Feed API createInventoryTask endpoint; see createFeedReportTaskMethods. */
|
|
33
|
+
createInventoryTask;
|
|
34
|
+
/** Feed API getInventoryTask endpoint; see createFeedReportTaskMethods. */
|
|
35
|
+
getInventoryTask;
|
|
36
|
+
/** Feed API getCustomerServiceMetricTasks endpoint; see createFeedReportTaskMethods. */
|
|
37
|
+
getCustomerServiceMetricTasks;
|
|
38
|
+
/** Feed API createCustomerServiceMetricTask endpoint; see createFeedReportTaskMethods. */
|
|
39
|
+
createCustomerServiceMetricTask;
|
|
40
|
+
/** Feed API getCustomerServiceMetricTask endpoint; see createFeedReportTaskMethods. */
|
|
41
|
+
getCustomerServiceMetricTask;
|
|
42
|
+
// schedule resource: recurring reports and the templates they subscribe to.
|
|
43
|
+
/** Feed API getSchedules endpoint; see createFeedScheduleMethods. */
|
|
44
|
+
getSchedules;
|
|
45
|
+
/** Feed API createSchedule endpoint; see createFeedScheduleMethods. */
|
|
46
|
+
createSchedule;
|
|
47
|
+
/** Feed API getSchedule endpoint; see createFeedScheduleMethods. */
|
|
48
|
+
getSchedule;
|
|
49
|
+
/** Feed API updateSchedule endpoint; see createFeedScheduleMethods. */
|
|
50
|
+
updateSchedule;
|
|
51
|
+
/** Feed API deleteSchedule endpoint; see createFeedScheduleMethods. */
|
|
52
|
+
deleteSchedule;
|
|
53
|
+
/** Feed API getLatestResultFile endpoint; see createFeedScheduleMethods. */
|
|
54
|
+
getLatestResultFile;
|
|
55
|
+
/** Feed API getScheduleTemplate endpoint; see createFeedScheduleMethods. */
|
|
56
|
+
getScheduleTemplate;
|
|
57
|
+
/** Feed API getScheduleTemplates endpoint; see createFeedScheduleMethods. */
|
|
58
|
+
getScheduleTemplates;
|
|
59
|
+
/**
|
|
60
|
+
* Builds every Feed API endpoint over one shared client.
|
|
61
|
+
* @param client - Shared authenticated HTTP client.
|
|
62
|
+
*/
|
|
63
|
+
constructor(client) {
|
|
64
|
+
const tasks = createFeedTaskMethods(client);
|
|
65
|
+
this.getTasks = tasks.getTasks;
|
|
66
|
+
this.createTask = tasks.createTask;
|
|
67
|
+
this.getTask = tasks.getTask;
|
|
68
|
+
this.getInputFile = tasks.getInputFile;
|
|
69
|
+
this.getResultFile = tasks.getResultFile;
|
|
70
|
+
this.uploadFile = tasks.uploadFile;
|
|
71
|
+
const reports = createFeedReportTaskMethods(client);
|
|
72
|
+
this.getOrderTasks = reports.getOrderTasks;
|
|
73
|
+
this.createOrderTask = reports.createOrderTask;
|
|
74
|
+
this.getOrderTask = reports.getOrderTask;
|
|
75
|
+
this.getInventoryTasks = reports.getInventoryTasks;
|
|
76
|
+
this.createInventoryTask = reports.createInventoryTask;
|
|
77
|
+
this.getInventoryTask = reports.getInventoryTask;
|
|
78
|
+
this.getCustomerServiceMetricTasks = reports.getCustomerServiceMetricTasks;
|
|
79
|
+
this.createCustomerServiceMetricTask = reports.createCustomerServiceMetricTask;
|
|
80
|
+
this.getCustomerServiceMetricTask = reports.getCustomerServiceMetricTask;
|
|
81
|
+
const schedules = createFeedScheduleMethods(client);
|
|
82
|
+
this.getSchedules = schedules.getSchedules;
|
|
83
|
+
this.createSchedule = schedules.createSchedule;
|
|
84
|
+
this.getSchedule = schedules.getSchedule;
|
|
85
|
+
this.updateSchedule = schedules.updateSchedule;
|
|
86
|
+
this.deleteSchedule = schedules.deleteSchedule;
|
|
87
|
+
this.getLatestResultFile = schedules.getLatestResultFile;
|
|
88
|
+
this.getScheduleTemplate = schedules.getScheduleTemplate;
|
|
89
|
+
this.getScheduleTemplates = schedules.getScheduleTemplates;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { decodeEndpointInputEffect, requestGetEffect } from '../../api/shared/request.js';
|
|
2
|
+
import { createCustomerServiceMetricTaskInputSchema, createInventoryTaskInputSchema, createOrderTaskInputSchema, feedTaskIdInputSchema, getCustomerServiceMetricTasksInputSchema, getInventoryTasksInputSchema, getOrderTasksInputSchema, } from '../../schemas/inventory-management/feed.js';
|
|
3
|
+
import { Effect } from 'effect';
|
|
4
|
+
import { exclusiveFeedFilters, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedTask, } from './feedRequest.js';
|
|
5
|
+
/**
|
|
6
|
+
* Creates the Feed API report-task endpoints that take filter criteria: order reports
|
|
7
|
+
* (`order_task`), active inventory reports (`inventory_task`) and customer service metric
|
|
8
|
+
* reports (`customer_service_metric_task`).
|
|
9
|
+
* @param client - Shared authenticated HTTP client.
|
|
10
|
+
* @returns Endpoint Effects composed into FeedApi.
|
|
11
|
+
*/
|
|
12
|
+
export const createFeedReportTaskMethods = (client) => {
|
|
13
|
+
/**
|
|
14
|
+
* Lists order report tasks by feed type or schedule.
|
|
15
|
+
* @param input - feedType or scheduleId (not both), dateRange or lookBackDays, limit, offset.
|
|
16
|
+
* @returns Generated OrderTaskCollection.
|
|
17
|
+
* @example feed.getOrderTasks({ feedType: 'LMS_ORDER_REPORT', lookBackDays: 10 })
|
|
18
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/order_task/methods/getOrderTasks
|
|
19
|
+
*/
|
|
20
|
+
const getOrderTasks = (input = {}) => decodeEndpointInputEffect(getOrderTasksInputSchema, input).pipe(Effect.flatMap(exclusiveFeedFilters), Effect.flatMap((query) => requestGetEffect(client, `${FEED_BASE_PATH}/order_task`, feedListParams(query))));
|
|
21
|
+
/**
|
|
22
|
+
* Creates an LMS_ORDER_REPORT download task; eBay answers 202 with only a Location.
|
|
23
|
+
* @param input - CreateOrderTaskRequest body.
|
|
24
|
+
* @returns The new task ID and Location.
|
|
25
|
+
* @example feed.createOrderTask({ task: { feedType: 'LMS_ORDER_REPORT', schemaVersion: '1235' } })
|
|
26
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/order_task/methods/createOrderTask
|
|
27
|
+
*/
|
|
28
|
+
const createOrderTask = (input) => decodeEndpointInputEffect(createOrderTaskInputSchema, input).pipe(Effect.flatMap(({ task }) => {
|
|
29
|
+
const orderTaskRequest = task;
|
|
30
|
+
return postFeedTask(client, '/order_task', orderTaskRequest);
|
|
31
|
+
}));
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves one order report task.
|
|
34
|
+
* @param input - Task identifier.
|
|
35
|
+
* @returns Generated OrderTask.
|
|
36
|
+
* @example feed.getOrderTask({ taskId: 'TASK-1' })
|
|
37
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/order_task/methods/getOrderTask
|
|
38
|
+
*/
|
|
39
|
+
const getOrderTask = (input) => decodeEndpointInputEffect(feedTaskIdInputSchema, input).pipe(Effect.flatMap(({ taskId }) => requestGetEffect(client, feedResourcePath('/order_task', taskId))));
|
|
40
|
+
/**
|
|
41
|
+
* Lists active inventory report tasks.
|
|
42
|
+
* @param input - feedType, dateRange or lookBackDays, limit, offset.
|
|
43
|
+
* @returns Generated InventoryTaskCollection.
|
|
44
|
+
* @example feed.getInventoryTasks({ feedType: 'LMS_ACTIVE_INVENTORY_REPORT' })
|
|
45
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/inventory_task/methods/getInventoryTasks
|
|
46
|
+
*/
|
|
47
|
+
const getInventoryTasks = (input = {}) => decodeEndpointInputEffect(getInventoryTasksInputSchema, input).pipe(Effect.flatMap(exclusiveFeedFilters), Effect.flatMap((query) => requestGetEffect(client, `${FEED_BASE_PATH}/inventory_task`, feedListParams(query))));
|
|
48
|
+
/**
|
|
49
|
+
* Creates an LMS_ACTIVE_INVENTORY_REPORT download task; eBay answers 202 with only a Location.
|
|
50
|
+
* @param input - CreateInventoryTaskRequest body.
|
|
51
|
+
* @returns The new task ID and Location.
|
|
52
|
+
* @example feed.createInventoryTask({ task: { feedType: 'LMS_ACTIVE_INVENTORY_REPORT', schemaVersion: '1.0' } })
|
|
53
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/inventory_task/methods/createInventoryTask
|
|
54
|
+
*/
|
|
55
|
+
const createInventoryTask = (input) => decodeEndpointInputEffect(createInventoryTaskInputSchema, input).pipe(Effect.flatMap(({ task }) => {
|
|
56
|
+
const inventoryTaskRequest = task;
|
|
57
|
+
return postFeedTask(client, '/inventory_task', inventoryTaskRequest);
|
|
58
|
+
}));
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves one active inventory report task.
|
|
61
|
+
* @param input - Task identifier.
|
|
62
|
+
* @returns Generated InventoryTask.
|
|
63
|
+
* @example feed.getInventoryTask({ taskId: 'TASK-1' })
|
|
64
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/inventory_task/methods/getInventoryTask
|
|
65
|
+
*/
|
|
66
|
+
const getInventoryTask = (input) => decodeEndpointInputEffect(feedTaskIdInputSchema, input).pipe(Effect.flatMap(({ taskId }) => requestGetEffect(client, feedResourcePath('/inventory_task', taskId))));
|
|
67
|
+
/**
|
|
68
|
+
* Lists customer service metric report tasks.
|
|
69
|
+
* @param input - feedType, dateRange or lookBackDays, limit, offset.
|
|
70
|
+
* @returns Generated CustomerServiceMetricTaskCollection.
|
|
71
|
+
* @example feed.getCustomerServiceMetricTasks({ lookBackDays: 30 })
|
|
72
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/customer_service_metric_task/methods/getCustomerServiceMetricTasks
|
|
73
|
+
*/
|
|
74
|
+
const getCustomerServiceMetricTasks = (input = {}) => decodeEndpointInputEffect(getCustomerServiceMetricTasksInputSchema, input).pipe(Effect.flatMap(exclusiveFeedFilters), Effect.flatMap((query) => requestGetEffect(client, `${FEED_BASE_PATH}/customer_service_metric_task`, feedListParams(query))));
|
|
75
|
+
/**
|
|
76
|
+
* Creates a CUSTOMER_SERVICE_METRICS_REPORT download task; eBay answers 202 with only a
|
|
77
|
+
* Location. Accept-Language is required by eBay and defaults to the configured language.
|
|
78
|
+
* @param input - CreateServiceMetricsTaskRequest body and optional Accept-Language.
|
|
79
|
+
* @returns The new task ID and Location.
|
|
80
|
+
* @example feed.createCustomerServiceMetricTask({ task: { feedType: 'CUSTOMER_SERVICE_METRICS_REPORT', schemaVersion: '1.0', filterCriteria: { customerServiceMetricType: 'ITEM_NOT_RECEIVED', evaluationMarketplaceId: 'EBAY_US' } } })
|
|
81
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/customer_service_metric_task/methods/createCustomerServiceMetricTask
|
|
82
|
+
*/
|
|
83
|
+
const createCustomerServiceMetricTask = (input) => decodeEndpointInputEffect(createCustomerServiceMetricTaskInputSchema, input).pipe(Effect.flatMap(({ task, acceptLanguage }) => {
|
|
84
|
+
const metricTaskRequest = task;
|
|
85
|
+
const headers = acceptLanguage ? { 'Accept-Language': acceptLanguage } : undefined;
|
|
86
|
+
return postFeedTask(client, '/customer_service_metric_task', metricTaskRequest, headers);
|
|
87
|
+
}));
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves one customer service metric report task.
|
|
90
|
+
* @param input - Task identifier.
|
|
91
|
+
* @returns Generated ServiceMetricsTask.
|
|
92
|
+
* @example feed.getCustomerServiceMetricTask({ taskId: 'TASK-1' })
|
|
93
|
+
* @see https://developer.ebay.com/api-docs/sell/feed/resources/customer_service_metric_task/methods/getCustomerServiceMetricTask
|
|
94
|
+
*/
|
|
95
|
+
const getCustomerServiceMetricTask = (input) => decodeEndpointInputEffect(feedTaskIdInputSchema, input).pipe(Effect.flatMap(({ taskId }) => requestGetEffect(client, feedResourcePath('/customer_service_metric_task', taskId))));
|
|
96
|
+
return {
|
|
97
|
+
getOrderTasks,
|
|
98
|
+
createOrderTask,
|
|
99
|
+
getOrderTask,
|
|
100
|
+
getInventoryTasks,
|
|
101
|
+
createInventoryTask,
|
|
102
|
+
getInventoryTask,
|
|
103
|
+
getCustomerServiceMetricTasks,
|
|
104
|
+
createCustomerServiceMetricTask,
|
|
105
|
+
getCustomerServiceMetricTask,
|
|
106
|
+
};
|
|
107
|
+
};
|