@sp-api-sdk/schemas
Version:
Selling Parner API additional schema types
203 lines (202 loc) • 10.7 kB
TypeScript
import { type FromSchema } from 'json-schema-to-ts';
export declare const itemInventoryEventChangeNotification: {
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: "ITEM_INVENTORY_EVENT_CHANGE";
readonly payloadVersion: "2020-09-04";
readonly eventTime: "2023-02-07T16:05:32.378Z";
readonly payload: {
readonly itemInventoryEventChanges: 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 highlyAvailableInventory: 650;
}, {
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 highlyAvailableInventory: 519;
}];
};
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 ["ITEM_INVENTORY_EVENT_CHANGE"];
};
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 itemInventoryEventChanges: 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 highlyAvailableInventory: 650;
}, {
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 highlyAvailableInventory: 519;
}];
}];
readonly required: readonly ["itemInventoryEventChanges"];
readonly properties: {
readonly itemInventoryEventChanges: {
readonly $id: "#/definitions/Payload/properties/itemInventoryEventChanges";
readonly $ref: "#/definitions/ItemInventoryEventChanges";
};
};
};
readonly ItemInventoryEventChanges: {
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 highlyAvailableInventory: 650;
}, {
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 highlyAvailableInventory: 519;
}]];
readonly items: {
readonly $ref: "#/definitions/ItemInventoryEventChange";
};
};
readonly ItemInventoryEventChange: {
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 highlyAvailableInventory: 650;
}];
readonly required: readonly ["accountId", "marketplaceId", "startTime", "endTime", "asin", "highlyAvailableInventory"];
readonly properties: {
readonly accountId: {
readonly $id: "#/definitions/ItemInventoryEventChange/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/ItemInventoryEventChange/properties/marketplaceId";
readonly type: "string";
readonly description: "The marketplace identifier of the inventory data.";
readonly examples: readonly ["ATVPDKIKX0DER"];
};
readonly startTime: {
readonly $id: "#/definitions/ItemInventoryEventChange/properties/startTime";
readonly type: "string";
readonly format: "date-time";
readonly description: "The start of the date-time range of the inventory data in ISO 8601 format in UTC time.";
readonly examples: readonly ["2023-02-07T15:00:00Z"];
};
readonly endTime: {
readonly $id: "#/definitions/ItemInventoryEventChange/properties/endTime";
readonly type: "string";
readonly format: "date-time";
readonly description: "The end of the date-time range of the inventory data in ISO 8601 format in UTC time.";
readonly examples: readonly ["2023-02-07T16:00:00Z"];
};
readonly asin: {
readonly $id: "#/definitions/ItemInventoryEventChange/properties/asin";
readonly type: "string";
readonly description: "The Amazon Standard Identification Number of the product.";
readonly examples: readonly ["B00032HE0O"];
};
readonly highlyAvailableInventory: {
readonly $id: "#/definitions/ItemInventoryEventChange/properties/highlyAvailableInventory";
readonly type: "integer";
readonly description: "The number of units available to be sold on the website, based on units in Amazon fulfillment centers that are in sellable condition, minus units in customer shopping carts or otherwise bound for other orders (for example, subscribe-and-save orders).";
readonly minimum: 0;
readonly examples: readonly [650];
};
};
};
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 ItemInventoryEventChangeNotification = FromSchema<typeof itemInventoryEventChangeNotification>;