@sp-api-sdk/schemas
Version:
Selling Parner API additional schema types
203 lines (202 loc) • 10.4 kB
TypeScript
import { type FromSchema } from 'json-schema-to-ts';
export declare const detailPageTrafficEventNotification: {
readonly $id: "https://example.com/example.json";
readonly type: "object";
readonly description: "The root schema comprises the entire JSON document.";
readonly examples: readonly [{
readonly notificationVersion: "2020-09-04";
readonly notificationType: "DETAIL_PAGE_TRAFFIC_EVENT";
readonly payloadVersion: "2020-09-04";
readonly eventTime: "2023-02-07T16:05:32.378Z";
readonly payload: {
readonly detailPageTrafficEvents: readonly [{
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00032HE0O";
readonly glanceViews: 42;
}, {
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00094A20U";
readonly glanceViews: 69;
}];
};
readonly notificationMetadata: {
readonly applicationId: "amzn1.sellerapps.app.aacccfff-4455-4b7c-4422-664ecacdd336";
readonly subscriptionId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746";
readonly publishTime: "2023-02-07T16:45:32.378Z";
readonly notificationId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746";
};
}];
readonly required: readonly ["notificationVersion", "notificationType", "payloadVersion", "eventTime", "payload", "notificationMetadata"];
readonly properties: {
readonly notificationVersion: {
readonly $id: "#/properties/notificationVersion";
readonly type: "string";
readonly examples: readonly ["2020-09-04"];
};
readonly notificationType: {
readonly $id: "#/properties/notificationType";
readonly type: "string";
readonly examples: readonly ["DETAIL_PAGE_TRAFFIC_EVENT"];
};
readonly payloadVersion: {
readonly $id: "#/properties/payloadVersion";
readonly type: "string";
readonly examples: readonly ["2020-09-04"];
};
readonly eventTime: {
readonly $id: "#/properties/eventTime";
readonly type: "string";
readonly examples: readonly ["2023-02-07T16:45:32.378Z"];
};
readonly payload: {
readonly $id: "#/properties/payload";
readonly $ref: "#/definitions/Payload";
};
readonly notificationMetadata: {
readonly $id: "#/properties/notificationMetadata";
readonly $ref: "#/definitions/NotificationMetadata";
};
};
readonly definitions: {
readonly Payload: {
readonly type: "object";
readonly examples: readonly [{
readonly detailPageTrafficEvents: readonly [{
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00032HE0O";
readonly glanceViews: 42;
}, {
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00094A20U";
readonly glanceViews: 69;
}];
}];
readonly required: readonly ["detailPageTrafficEvents"];
readonly properties: {
readonly detailPageTrafficEvents: {
readonly $id: "#/definitions/Payload/properties/detailPageTrafficEvents";
readonly $ref: "#/definitions/DetailPageTrafficEvents";
};
};
};
readonly DetailPageTrafficEvents: {
readonly type: "array";
readonly examples: readonly [readonly [{
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00032HE0O";
readonly glanceViews: 42;
}, {
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00094A20U";
readonly glanceViews: 69;
}]];
readonly items: {
readonly $ref: "#/definitions/DetailPageTrafficEvent";
};
};
readonly DetailPageTrafficEvent: {
readonly type: "object";
readonly examples: readonly [{
readonly accountId: "amzn1.merchant.o.A21CXK3C4ERTY8";
readonly marketplaceId: "ATVPDKIKX0DER";
readonly startTime: "2023-02-07T15:00:00Z";
readonly endTime: "2023-02-07T16:00:00Z";
readonly asin: "B00032HE0O";
readonly glanceViews: 42;
}];
readonly required: readonly ["accountId", "marketplaceId", "startTime", "endTime", "asin", "glanceViews"];
readonly properties: {
readonly accountId: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/accountId";
readonly type: "string";
readonly description: "The merchant customer ID or vendor group ID of the partner account this notification is sent to.";
readonly examples: readonly ["amzn1.merchant.o.A21CXK3C4ERTY8", "amzn1.vg.6213651"];
};
readonly marketplaceId: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/marketplaceId";
readonly type: "string";
readonly description: "The marketplace identifier of the traffic data.";
readonly examples: readonly ["ATVPDKIKX0DER"];
};
readonly startTime: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/startTime";
readonly type: "string";
readonly format: "date-time";
readonly description: "The start of the date-time range of the traffic data in ISO 8601 format in UTC time.";
readonly examples: readonly ["2023-02-07T15:00:00Z"];
};
readonly endTime: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/endTime";
readonly type: "string";
readonly format: "date-time";
readonly description: "The end of the date-time range of the traffic data in ISO 8601 format in UTC time.";
readonly examples: readonly ["2023-02-07T16:00:00Z"];
};
readonly asin: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/asin";
readonly type: "string";
readonly description: "The Amazon Standard Identification Number of the product.";
readonly examples: readonly ["B00032HE0O"];
};
readonly glanceViews: {
readonly $id: "#/definitions/DetailPageTrafficEvent/properties/glanceViews";
readonly type: "integer";
readonly description: "The number of customer views of the product detail page for this ASIN.";
readonly minimum: 0;
readonly examples: readonly [42];
};
};
};
readonly NotificationMetadata: {
readonly type: "object";
readonly examples: readonly [{
readonly applicationId: "amzn1.sellerapps.app.aacccfff-4455-4b7c-4422-664ecacdd336";
readonly subscriptionId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746";
readonly publishTime: "2023-02-07T16:45:32.378Z";
readonly notificationId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746";
}];
readonly required: readonly ["applicationId", "subscriptionId", "publishTime", "notificationId"];
readonly properties: {
readonly applicationId: {
readonly $id: "#/definitions/NotificationMetadata/properties/applicationId";
readonly type: "string";
readonly examples: readonly ["amzn1.sellerapps.app.aacccfff-4455-4b7c-4422-664ecacdd336"];
};
readonly subscriptionId: {
readonly $id: "#/definitions/NotificationMetadata/properties/subscriptionId";
readonly type: "string";
readonly examples: readonly ["d0e9e693-c3ad-4373-979f-ed4ec98dd746"];
};
readonly publishTime: {
readonly $id: "#/definitions/NotificationMetadata/properties/publishTime";
readonly type: "string";
readonly examples: readonly ["2023-02-07T16:45:32.378Z"];
};
readonly notificationId: {
readonly $id: "#/definitions/NotificationMetadata/properties/notificationId";
readonly type: "string";
readonly examples: readonly ["d0e9e693-c3ad-4373-979f-ed4ec98dd746"];
};
};
};
};
};
export type DetailPageTrafficEventNotification = FromSchema<typeof detailPageTrafficEventNotification>;