UNPKG

@sp-api-sdk/schemas

Version:
267 lines (266 loc) 16.6 kB
import { type FromSchema } from 'json-schema-to-ts'; export declare const transactionUpdateNotification: { readonly $id: "http://example.com/example.json"; readonly type: "object"; readonly title: "The root schema"; readonly description: "The notification response schema that comprises the entire JSON document for the notification."; readonly examples: readonly [{ readonly NotificationVersion: "1.0"; readonly NotificationType: "TRANSACTION_UPDATE"; readonly PayloadVersion: "1.0"; readonly EventTime: "2023-07-14T03:35:13.214Z"; readonly NotificationMetadata: { readonly ApplicationId: "amzn1.sellerapps.app.aacccfff-4455-4b7c-4422-664ecacdd336"; readonly SubscriptionId: "subscription-id-d0e9e693-c3ad-4373-979f-ed4ec98dd746"; readonly PublishTime: "2023-07-14T03:35:13.214Z"; readonly NotificationId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746"; }; readonly Payload: { readonly TransactionUpdateNotification: { readonly SellingPartnerMetadata: { readonly SellingPartnerId: "A3TH9S8BH6GOGM"; readonly MarketplaceId: "ATIV93840DER"; readonly AccountType: "PAYABLE"; }; readonly RelatedIdentifiers: readonly [{ readonly RelatedIdentifierName: "OrderId"; readonly RelatedIdentifierValue: "8129762527551"; }]; readonly TransactionType: "Shipment"; readonly PostedDate: "2023-07-14T03:35:13.214Z"; readonly TotalAmount: { readonly CurrencyAmount: 10; readonly CurrencyCode: "USD"; }; }; }; }]; readonly required: readonly ["NotificationVersion", "NotificationType", "PayloadVersion", "EventTime", "Payload", "NotificationMetadata"]; readonly properties: { readonly NotificationVersion: { readonly $id: "#/properties/NotificationVersion"; readonly type: "string"; readonly title: "The NotificationVersion schema"; readonly description: "The notification version."; readonly examples: readonly ["1.0"]; }; readonly NotificationType: { readonly $id: "#/properties/NotificationType"; readonly type: "string"; readonly title: "The NotificationType schema"; readonly description: "The type of this notification, used to differentiate different notifications. Combined with payload version controls the structure of payload object."; readonly examples: readonly ["TRANSACTION_UPDATE"]; }; readonly PayloadVersion: { readonly $id: "#/properties/PayloadVersion"; readonly type: "string"; readonly title: "The PayloadVersion schema"; readonly description: "The payload version of the notification."; readonly examples: readonly ["1.0"]; }; readonly EventTime: { readonly $id: "#/properties/EventTime"; readonly type: "string"; readonly title: "The EventTime schema"; readonly description: "The time when this notification was published, presented in ISO-8601 date/time format."; readonly examples: readonly ["2023-07-14T03:35:13.214Z"]; }; readonly Payload: { readonly $id: "#/properties/Payload"; readonly type: "object"; readonly title: "The Payload schema"; readonly description: "The payload for this TRANSACTION_UPDATE notification. It's unique for different event type and will provide more in-depth information about this notification."; readonly examples: readonly [{ readonly TransactionUpdateNotification: { readonly SellingPartnerMetadata: { readonly SellingPartnerId: "A3TH9S8BH6GOGM"; readonly MarketplaceId: "ATIV93840DER"; readonly AccountType: "PAYABLE"; }; readonly RelatedIdentifiers: readonly [{ readonly RelatedIdentifierName: "OrderId"; readonly RelatedIdentifierValue: "8129762527551"; }]; readonly TransactionType: "Shipment"; readonly PostedDate: "2023-07-14T03:35:13.214Z"; readonly TotalAmount: { readonly CurrencyAmount: 10; readonly CurrencyCode: "USD"; }; }; }]; readonly required: readonly ["TransactionUpdateNotification"]; readonly properties: { readonly TransactionUpdateNotification: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification"; readonly type: "object"; readonly title: "The TransactionUpdateNotification schema"; readonly description: "An explanation about the TRANSACTION_UPDATE notification."; readonly examples: readonly [{ readonly SellingPartnerMetadata: { readonly SellingPartnerId: "A3TH9S8BH6GOGM"; readonly MarketplaceId: "ATIV93840DER"; readonly AccountType: "PAYABLE"; }; readonly RelatedIdentifiers: readonly [{ readonly RelatedIdentifierName: "OrderId"; readonly RelatedIdentifierValue: "8129762527551"; }]; readonly TransactionType: "Shipment"; readonly PostedDate: "2023-07-14T03:35:13.214Z"; readonly TotalAmount: { readonly CurrencyAmount: 10; readonly CurrencyCode: "USD"; }; }]; readonly required: readonly ["SellingPartnerMetadata", "TransactionType", "PostedDate", "TotalAmount"]; readonly properties: { readonly SellingPartnerMetadata: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/SellingPartnerMetadata"; readonly type: "object"; readonly description: "Metadata describing the seller."; readonly examples: readonly [{ readonly SellingPartnerId: "A3TH9S8BH6GOGM"; readonly MarketplaceId: "ATIV93840DER"; readonly AccountType: "PAYABLE"; }]; readonly required: readonly ["SellingPartnerId", "MarketplaceId", "AccountType"]; readonly properties: { readonly SellingPartnerId: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/SellingPartnerMetadata/properties/SellingPartnerId"; readonly type: "string"; readonly description: "Unique seller identifier."; readonly examples: readonly ["A3TH9S8BH6GOGM"]; }; readonly MarketplaceId: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/SellingPartnerMetadata/properties/MarketplaceId"; readonly type: "string"; readonly description: "Marketplace identifier of transaction."; readonly examples: readonly ["ATIV93840DER"]; }; readonly AccountType: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/SellingPartnerMetadata/properties/AccountType"; readonly type: "string"; readonly description: "Account type of transaction."; readonly examples: readonly ["PAYABLE"]; }; }; }; readonly RelatedIdentifiers: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/RelatedIdentifiers"; readonly type: "array"; readonly description: "Related business identifiers of the transaction."; readonly examples: readonly [readonly [{ readonly RelatedIdentifierName: "OrderId"; readonly RelatedIdentifierValue: "8129762527551"; }]]; readonly items: { readonly type: "object"; readonly description: "Related business identifier of the transaction."; readonly examples: readonly [{ readonly RelatedIdentifierName: "OrderId"; readonly RelatedIdentifierValue: "8129762527551"; }]; readonly required: readonly ["RelatedIdentifierName", "RelatedIdentifierValue"]; readonly properties: { readonly RelatedIdentifierName: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/RelatedIdentifiers/RelatedIdentifierName"; readonly type: "string"; readonly description: "Enumerated set of related business identifier names."; readonly examples: readonly ["OrderId"]; }; readonly RelatedIdentifierValue: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/RelatedIdentifiers/RelatedIdentifierValue"; readonly type: "string"; readonly description: "Corresponding value of RelatedIdentifierName"; readonly examples: readonly ["8129762527551"]; }; }; }; }; readonly TransactionType: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/TransactionType"; readonly type: "string"; readonly description: "Type of transaction."; readonly examples: readonly ["Shipment"]; }; readonly PostedDate: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/PostedDate"; readonly type: "string"; readonly description: "The date and time when the transaction was posted."; readonly examples: readonly ["2023-07-14T03:35:13.214Z"]; }; readonly TotalAmount: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/TotalAmount"; readonly type: "object"; readonly description: "Total amount of transaction."; readonly examples: readonly [{ readonly CurrencyAmount: 10; readonly CurrencyCode: "USD"; }]; readonly required: readonly ["CurrencyAmount", "CurrencyCode"]; readonly properties: { readonly CurrencyAmount: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/TotalAmount/properties/CurrencyAmount"; readonly type: "number"; readonly description: "Amount value of transaction."; readonly examples: readonly [10]; }; readonly CurrencyCode: { readonly $id: "#/properties/Payload/properties/TransactionUpdateNotification/properties/TotalAmount/properties/CurrencyCode"; readonly type: "string"; readonly description: "Currency code of transaction."; readonly examples: readonly ["USD"]; }; }; }; }; }; }; }; readonly NotificationMetadata: { readonly $id: "#/properties/NotificationMetadata"; readonly type: "object"; readonly title: "The NotificationMetadata schema"; readonly description: "The notification metadata."; readonly examples: readonly [{ readonly ApplicationId: "app-id-d0e9e693-c3ad-4373-979f-ed4ec98dd746"; readonly SubscriptionId: "subscription-id-d0e9e693-c3ad-4373-979f-ed4ec98dd746"; readonly PublishTime: "2023-07-13T19:42:04.284Z"; readonly NotificationId: "d0e9e693-c3ad-4373-979f-ed4ec98dd746"; }]; readonly required: readonly ["ApplicationId", "SubscriptionId", "PublishTime", "NotificationId"]; readonly properties: { readonly ApplicationId: { readonly $id: "#/properties/NotificationMetadata/properties/ApplicationId"; readonly type: "string"; readonly title: "The ApplicationId schema"; readonly description: "The identifier for the application that uses the notifications."; readonly examples: readonly ["app-id-d0e9e693-c3ad-4373-979f-ed4ec98dd746"]; }; readonly SubscriptionId: { readonly $id: "#/properties/NotificationMetadata/properties/SubscriptionId"; readonly type: "string"; readonly title: "The SubscriptionId schema"; readonly description: "A unique identifier for the subscription which resulted in this notification."; readonly examples: readonly ["subscription-id-d0e9e693-c3ad-4373-979f-ed4ec98dd746"]; }; readonly PublishTime: { readonly $id: "#/properties/NotificationMetadata/properties/PublishTime"; readonly type: "string"; readonly title: "The PublishTime schema"; readonly description: "The date and time (in UTC) that the notification was sent, presented in ISO-8601 date/time format."; readonly examples: readonly ["2023-07-14T19:42:04.284Z"]; }; readonly NotificationId: { readonly $id: "#/properties/NotificationMetadata/properties/NotificationId"; readonly type: "string"; readonly title: "The NotificationId schema"; readonly description: "A unique identifier for this notification instance."; readonly examples: readonly ["d0e9e693-c3ad-4373-979f-ed4ec98dd746"]; }; }; }; }; }; export type TransactionUpdateNotification = FromSchema<typeof transactionUpdateNotification>;