ebay-api 8.6.1 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,131 @@
1
+ export interface paths {
2
+ "/video": {
3
+ post: operations["createVideo"];
4
+ };
5
+ "/video/{video_id}": {
6
+ get: operations["getVideo"];
7
+ };
8
+ "/video/{video_id}/upload": {
9
+ post: operations["uploadVideo"];
10
+ };
11
+ }
12
+ export type webhooks = Record<string, never>;
13
+ export interface components {
14
+ schemas: {
15
+ CreateVideoRequest: {
16
+ classification?: (string)[];
17
+ description?: string;
18
+ size?: number;
19
+ title?: string;
20
+ };
21
+ Error: {
22
+ category?: string;
23
+ domain?: string;
24
+ errorId?: number;
25
+ inputRefIds?: (string)[];
26
+ longMessage?: string;
27
+ message?: string;
28
+ outputRefIds?: (string)[];
29
+ parameters?: (components["schemas"]["ErrorParameter"])[];
30
+ subdomain?: string;
31
+ };
32
+ ErrorParameter: {
33
+ name?: string;
34
+ value?: string;
35
+ };
36
+ Image: {
37
+ imageUrl?: string;
38
+ };
39
+ InputStream: Record<string, never>;
40
+ Moderation: {
41
+ rejectReasons?: (string)[];
42
+ };
43
+ Play: {
44
+ playUrl?: string;
45
+ protocol?: string;
46
+ };
47
+ Video: {
48
+ classification?: (string)[];
49
+ description?: string;
50
+ expirationDate?: string;
51
+ moderation?: components["schemas"]["Moderation"];
52
+ playLists?: (components["schemas"]["Play"])[];
53
+ size?: number;
54
+ status?: string;
55
+ statusMessage?: string;
56
+ thumbnail?: components["schemas"]["Image"];
57
+ title?: string;
58
+ videoId?: string;
59
+ };
60
+ };
61
+ responses: never;
62
+ parameters: never;
63
+ requestBodies: never;
64
+ headers: never;
65
+ pathItems: never;
66
+ }
67
+ export type external = Record<string, never>;
68
+ export interface operations {
69
+ createVideo: {
70
+ parameters: {
71
+ header: {
72
+ "Content-Type": string;
73
+ };
74
+ };
75
+ requestBody?: {
76
+ content: {
77
+ "application/json": components["schemas"]["CreateVideoRequest"];
78
+ };
79
+ };
80
+ responses: {
81
+ 201: never;
82
+ 400: never;
83
+ 403: never;
84
+ 500: never;
85
+ };
86
+ };
87
+ getVideo: {
88
+ parameters: {
89
+ path: {
90
+ video_id: string;
91
+ };
92
+ };
93
+ responses: {
94
+ 200: {
95
+ content: {
96
+ "application/json": components["schemas"]["Video"];
97
+ };
98
+ };
99
+ 400: never;
100
+ 403: never;
101
+ 404: never;
102
+ 500: never;
103
+ };
104
+ };
105
+ uploadVideo: {
106
+ parameters: {
107
+ header: {
108
+ "Content-Length"?: string;
109
+ "Content-Range"?: string;
110
+ "Content-Type": string;
111
+ };
112
+ path: {
113
+ video_id: string;
114
+ };
115
+ };
116
+ requestBody?: {
117
+ content: {
118
+ "application/json": components["schemas"]["InputStream"];
119
+ };
120
+ };
121
+ responses: {
122
+ 200: never;
123
+ 400: never;
124
+ 404: never;
125
+ 409: never;
126
+ 411: never;
127
+ 416: never;
128
+ 500: never;
129
+ };
130
+ };
131
+ }
@@ -4,6 +4,7 @@ import { operations as buyMarketingOperations } from './restful/specs/buy_market
4
4
  import { components as buyOffer } from './restful/specs/buy_offer_v1_beta_oas3.js';
5
5
  import { components as buyOrder } from './restful/specs/buy_order_v1_beta_oas3.js';
6
6
  import { operations as commerceCatalogOperations } from './restful/specs/commerce_catalog_v1_beta_oas3.js';
7
+ import { components as commerceMedia } from './restful/specs/commerce_media_v1_beta_oas3.js';
7
8
  import { components as commerceNotification } from './restful/specs/commerce_notification_v1_oas3.js';
8
9
  import { components as commerceTranslation } from './restful/specs/commerce_translation_v1_beta_oas3.js';
9
10
  import { components as sellAccount } from './restful/specs/sell_account_v1_oas3.js';
@@ -352,6 +353,8 @@ export type DestinationRequest = commerceNotification['schemas']['DestinationReq
352
353
  export type CommerceNotificationConfig = commerceNotification['schemas']['Config'];
353
354
  export type TranslateRequest = commerceTranslation['schemas']['TranslateRequest'];
354
355
  export type CommerceCatalogSearchParams = commerceCatalogOperations['search']['parameters']['query'];
356
+ export type CreateVideoRequest = commerceMedia['schemas']['CreateVideoRequest'];
357
+ export type InputStream = commerceMedia['schemas']['InputStream'];
355
358
  export type AttributeNameValue = buyBrowse['schemas']['AttributeNameValue'];
356
359
  export type CompatibilityPayload = buyBrowse['schemas']['CompatibilityPayload'];
357
360
  export type AddCartItemInput = buyBrowse['schemas']['AddCartItemInput'];
@@ -0,0 +1,11 @@
1
+ import { CreateVideoRequest, InputStream } from '../../../../types/index.js';
2
+ import { operations } from '../../../../types/restful/specs/commerce_media_v1_beta_oas3.js';
3
+ import Restful, { OpenApi } from '../../index.js';
4
+ export default class Media extends Restful implements OpenApi<operations> {
5
+ static id: string;
6
+ get basePath(): string;
7
+ get subdomain(): string;
8
+ createVideo(body?: CreateVideoRequest): Promise<any>;
9
+ getVideo(videoId: string): Promise<any>;
10
+ uploadVideo(videoId: string, body?: InputStream): Promise<any>;
11
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const index_js_1 = __importDefault(require("../../index.js"));
7
+ class Media extends index_js_1.default {
8
+ get basePath() {
9
+ return '/commerce/media/v1_beta';
10
+ }
11
+ get subdomain() {
12
+ return 'apim';
13
+ }
14
+ async createVideo(body) {
15
+ return this.post('/video', body);
16
+ }
17
+ async getVideo(videoId) {
18
+ videoId = encodeURIComponent(videoId);
19
+ return this.get(`/video/${videoId}`);
20
+ }
21
+ ;
22
+ async uploadVideo(videoId, body) {
23
+ videoId = encodeURIComponent(videoId);
24
+ return this.post(`/video/${videoId}/upload`, body);
25
+ }
26
+ }
27
+ Media.id = 'Media';
28
+ exports.default = Media;