Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Unify 'Release' to 'Void' in .tsx and schema

Pacu2ca607d2e6206
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index d8861cba78..0bc6dee35d 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -896,7 +896,7 @@ type Mutations {
orderMarkAsPaid(id: ID!): OrderMarkAsPaid
orderUpdateShipping(order: ID!, input: OrderUpdateShippingInput): OrderUpdateShipping
orderRefund(amount: Decimal!, id: ID!): OrderRefund
- orderRelease(id: ID!): OrderRelease
+ orderVoid(id: ID!): OrderVoid
orderUpdate(id: ID!, input: OrderUpdateInput!): OrderUpdate
pageCreate(input: PageInput!): PageCreate
pageDelete(id: ID!): PageDelete
@@ -1043,7 +1043,7 @@ enum OrderEvents {
EMAIL_SENT
PAYMENT_CAPTURED
PAYMENT_REFUNDED
- PAYMENT_RELEASED
+ PAYMENT_VOIDED
FULFILLMENT_CANCELED
FULFILLMENT_RESTOCKED_ITEMS
FULFILLMENT_FULFILLED_ITEMS
@@ -1102,11 +1102,6 @@ type OrderRefund {
order: Order
}
-type OrderRelease {
- errors: [Error]
- order: Order
-}
-
enum OrderStatus {
DRAFT
UNFULFILLED
@@ -1140,6 +1135,11 @@ input OrderUpdateShippingInput {
shippingMethod: ID
}
+type OrderVoid {
+ errors: [Error]
+ order: Order
+}
+
type Page implements Node {
seoTitle: String
seoDescription: String
@@ -1198,12 +1198,6 @@ type PasswordReset {
errors: [Error]
}
-enum PaymentChargeStatusEnum {
- CHARGED
- NOT_CHARGED
- FULLY_REFUNDED
-}
-
type Payment implements Node {
id: ID!
variant: String!
@@ -1213,6 +1207,7 @@ type Payment implements Node {
chargeStatus: PaymentChargeStatusEnum!
billingFirstName: String!
billingLastName: String!
+ billingCompanyName: String!
billingAddress1: String!
billingAddress2: String!
billingCity: String!
@@ -1223,9 +1218,7 @@ type Payment implements Node {
customerIpAddress: String
extraData: String!
token: String!
- totalNet: Money
- totalGross: Money
- total: TaxedMoney
+ total: Money
capturedAmount: Money
checkout: Checkout
order: Order
@@ -1237,6 +1230,12 @@ type PaymentCapture {
payment: Payment
}
+enum PaymentChargeStatusEnum {
+ CHARGED
+ NOT_CHARGED
+ FULLY_REFUNDED
+}
+
type PaymentCountableConnection {
pageInfo: PageInfo!
edges: [PaymentCountableEdge!]!
@@ -1252,7 +1251,6 @@ input PaymentInput {
gateway: ProvidersEnum
checkoutId: ID
transactionToken: String!
- tax: Decimal!
amount: Decimal!
billingAddress: AddressInput
}
diff --git a/saleor/static/dashboard-next/gql-types.ts b/saleor/static/dashboard-next/gql-types.ts
index 41a1dd6129..72331852f8 100644
--- a/saleor/static/dashboard-next/gql-types.ts
+++ b/saleor/static/dashboard-next/gql-types.ts
@@ -3,21 +3,21 @@
export interface FulfillmentCreateInput {
// ID of the order to be fulfilled.
- order?: string | null,
+ order?: string | null;
// Fulfillment tracking number
- trackingNumber?: string | null,
+ trackingNumber?: string | null;
// If true, send an email notification to the customer.
- notifyCustomer?: boolean | null,
+ notifyCustomer?: boolean | null;
// Item line to be fulfilled.
- lines?: Array< FulfillmentLineInput | null > | null,
-};
+ lines?: Array<FulfillmentLineInput | null> | null;
+}
export interface FulfillmentLineInput {
// The ID of the order line.
- orderLineId?: string | null,
+ orderLineId?: string | null;
// The number of line item(s) to be fulfiled.
- quantity?: number | null,
-};
+ quantity?: number | null;
+}
// An enumeration.
export enum OrderStatus {
@@ -25,10 +25,9 @@ export enum OrderStatus {
DRAFT = "DRAFT", // Draft
FULFILLED = "FULFILLED", // Fulfilled
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED", // Partially fulfilled
- UNFULFILLED = "UNFULFILLED", // Unfulfilled
+ UNFULFILLED = "UNFULFILLED" // Unfulfilled
}
-
// An enumeration.
export enum AddressCountry {
AD = "AD", // Andorra
@@ -280,10 +279,9 @@ export enum AddressCountry {
YT = "YT", // Mayotte
ZA = "ZA", // South Africa
ZM = "ZM", // Zambia
- ZW = "ZW", // Zimbabwe
+ ZW = "ZW" // Zimbabwe
}
-
// An enumeration.
export enum OrderEvents {
CANCELED = "CANCELED",
@@ -297,3735 +295,3733 @@ export enum OrderEvents {
OTHER = "OTHER",
PAYMENT_CAPTURED = "PAYMENT_CAPTURED",
PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
- PAYMENT_RELEASED = "PAYMENT_RELEASED",
+ PAYMENT_VOIDED = "PAYMENT_VOIDED",
PLACED = "PLACED",
PLACED_FROM_DRAFT = "PLACED_FROM_DRAFT",
- UPDATED = "UPDATED",
+ UPDATED = "UPDATED"
}
-
// An enumeration.
export enum FulfillmentStatus {
CANCELED = "CANCELED", // Canceled
- FULFILLED = "FULFILLED", // Fulfilled
+ FULFILLED = "FULFILLED" // Fulfilled
}
-
export interface AttributeValueInput {
// Slug of an attribute.
- slug: string,
+ slug: string;
// Value of an attribute.
- value: string,
-};
+ value: string;
+}
export interface TokenAuthMutationVariables {
- email: string,
- password: string,
-};
+ email: string;
+ password: string;
+}
export interface TokenAuthMutation {
- tokenCreate: {
- token: string | null,
- errors: Array< {
+ tokenCreate: {
+ token: string | null;
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- user: {
+ message: string | null;
+ } | null> | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- isStaff: boolean,
- note: string | null,
- permissions: Array< {
+ id: string;
+ email: string;
+ isStaff: boolean;
+ note: string | null;
+ permissions: Array<{
// Internal code for permission.
- code: string,
+ code: string;
// Describe action(s) allowed to do by permission.
- name: string,
- } | null > | null,
- } | null,
- } | null,
-};
+ name: string;
+ } | null> | null;
+ } | null;
+ } | null;
+}
export interface VerifyTokenMutationVariables {
- token: string,
-};
+ token: string;
+}
export interface VerifyTokenMutation {
- tokenVerify: {
- payload: string | null,
- user: {
+ tokenVerify: {
+ payload: string | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- isStaff: boolean,
- note: string | null,
- permissions: Array< {
+ id: string;
+ email: string;
+ isStaff: boolean;
+ note: string | null;
+ permissions: Array<{
// Internal code for permission.
- code: string,
+ code: string;
// Describe action(s) allowed to do by permission.
- name: string,
- } | null > | null,
- } | null,
- } | null,
-};
+ name: string;
+ } | null> | null;
+ } | null;
+ } | null;
+}
export interface CategoryDeleteMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface CategoryDeleteMutation {
- categoryDelete: {
+ categoryDelete: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- } | null,
-};
+ message: string | null;
+ } | null> | null;
+ } | null;
+}
export interface CategoryCreateMutationVariables {
- name?: string | null,
- description?: string | null,
- parent?: string | null,
-};
+ name?: string | null;
+ description?: string | null;
+ parent?: string | null;
+}
export interface CategoryCreateMutation {
- categoryCreate: {
+ categoryCreate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- category: {
+ message: string | null;
+ } | null> | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- parent: {
+ id: string;
+ name: string;
+ description: string;
+ parent: {
// The ID of the object.
- id: string,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ } | null;
+ } | null;
+ } | null;
+}
export interface CategoryUpdateMutationVariables {
- id: string,
- name?: string | null,
- description?: string | null,
-};
+ id: string;
+ name?: string | null;
+ description?: string | null;
+}
export interface CategoryUpdateMutation {
- categoryUpdate: {
+ categoryUpdate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- category: {
+ message: string | null;
+ } | null> | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- parent: {
+ id: string;
+ name: string;
+ description: string;
+ parent: {
// The ID of the object.
- id: string,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ } | null;
+ } | null;
+ } | null;
+}
export interface CategoryDetailsQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface CategoryDetailsQuery {
// Lookup a category by ID.
- category: {
+ category: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- parent: {
+ id: string;
+ name: string;
+ description: string;
+ parent: {
// The ID of the object.
- id: string,
- } | null,
- } | null,
-};
+ id: string;
+ } | null;
+ } | null;
+}
export interface RootCategoryChildrenQuery {
// List of the shop's categories.
- categories: {
- edges: Array< {
+ categories: {
+ edges: Array<{
// A cursor for use in pagination
- cursor: string,
+ cursor: string;
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
+ id: string;
+ name: string;
// List of children of the category.
- children: {
+ children: {
// A total count of items in the collection
- totalCount: number | null,
- } | null,
+ totalCount: number | null;
+ } | null;
// List of products in the category.
- products: {
+ products: {
// A total count of items in the collection
- totalCount: number | null,
- } | null,
- },
- } >,
- } | null,
-};
+ totalCount: number | null;
+ } | null;
+ };
+ }>;
+ } | null;
+}
export interface CategoryPropertiesQueryVariables {
- id: string,
- first?: number | null,
- after?: string | null,
- last?: number | null,
- before?: string | null,
-};
+ id: string;
+ first?: number | null;
+ after?: string | null;
+ last?: number | null;
+ before?: string | null;
+}
export interface CategoryPropertiesQuery {
// Lookup a category by ID.
- category: {
+ category: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- parent: {
+ id: string;
+ name: string;
+ description: string;
+ parent: {
// The ID of the object.
- id: string,
- } | null,
+ id: string;
+ } | null;
// List of children of the category.
- children: {
- edges: Array< {
+ children: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
+ id: string;
+ name: string;
// List of children of the category.
- children: {
+ children: {
// A total count of items in the collection
- totalCount: number | null,
- } | null,
+ totalCount: number | null;
+ } | null;
// List of products in the category.
- products: {
+ products: {
// A total count of items in the collection
- totalCount: number | null,
- } | null,
- },
- } >,
- } | null,
+ totalCount: number | null;
+ } | null;
+ };
+ }>;
+ } | null;
// List of products in the category.
- products: {
+ products: {
// A total count of items in the collection
- totalCount: number | null,
- pageInfo: {
+ totalCount: number | null;
+ pageInfo: {
// When paginating forwards, the cursor to continue.
- endCursor: string | null,
+ endCursor: string | null;
// When paginating forwards, are there more items?
- hasNextPage: boolean,
+ hasNextPage: boolean;
// When paginating backwards, are there more items?
- hasPreviousPage: boolean,
+ hasPreviousPage: boolean;
// When paginating backwards, the cursor to continue.
- startCursor: string | null,
- },
- edges: Array< {
+ startCursor: string | null;
+ };
+ edges: Array<{
// A cursor for use in pagination
- cursor: string,
+ cursor: string;
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
+ id: string;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- productType: {
+ thumbnailUrl: string | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- },
- },
- } >,
- } | null,
- } | null,
-};
+ id: string;
+ name: string;
+ };
+ };
+ }>;
+ } | null;
+ } | null;
+}
export interface OrderCancelMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface OrderCancelMutation {
- orderCancel: {
+ orderCancel: {
// Canceled order.
- order: {
+ order: {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ email: string;
+ } | null;
+ } | null;
+ } | null;
+}
export interface OrderRefundMutationVariables {
- id: string,
- amount: string,
-};
+ id: string;
+ amount: string;
+}
export interface OrderRefundMutation {
- orderRefund: {
+ orderRefund: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
+ message: string | null;
+ } | null> | null;
// A refunded order.
- order: {
+ order: {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
- } | null,
- } | null,
-};
-
-export interface OrderReleaseMutationVariables {
- id: string,
-};
-
-export interface OrderReleaseMutation {
- orderRelease: {
- // A released order.
- order: {
+ id: string;
+ email: string;
+ } | null;
+ } | null;
+ } | null;
+}
+
+export interface OrderVoidMutationVariables {
+ id: string;
+}
+
+export interface OrderVoidMutation {
+ orderVoid: {
+ // A voided order.
+ order: {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ email: string;
+ } | null;
+ } | null;
+ } | null;
+}
export interface OrderCaptureMutationVariables {
- id: string,
- amount: string,
-};
+ id: string;
+ amount: string;
+}
export interface OrderCaptureMutation {
- orderCapture: {
+ orderCapture: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
+ message: string | null;
+ } | null> | null;
// Captured order.
- order: {
+ order: {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ email: string;
+ } | null;
+ } | null;
+ } | null;
+}
export interface OrderCreateFulfillmentMutationVariables {
- input: FulfillmentCreateInput,
-};
+ input: FulfillmentCreateInput;
+}
export interface OrderCreateFulfillmentMutation {
- fulfillmentCreate: {
+ fulfillmentCreate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- } | null,
-};
+ message: string | null;
+ } | null> | null;
+ } | null;
+}
export interface OrderListQueryVariables {
- first?: number | null,
- after?: string | null,
- last?: number | null,
- before?: string | null,
-};
+ first?: number | null;
+ after?: string | null;
+ last?: number | null;
+ before?: string | null;
+}
export interface OrderListQuery {
// List of the shop's orders.
- orders: {
- edges: Array< {
+ orders: {
+ edges: Array<{
// A cursor for use in pagination
- cursor: string,
+ cursor: string;
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// User-friendly number of an order.
- number: string | null,
- created: string,
+ number: string | null;
+ created: string;
// Internal payment status.
- paymentStatus: string | null,
- status: OrderStatus,
- total: {
+ paymentStatus: string | null;
+ status: OrderStatus;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- userEmail: string,
- },
- } >,
- pageInfo: {
+ currency: string;
+ };
+ } | null;
+ userEmail: string;
+ };
+ }>;
+ pageInfo: {
// When paginating backwards, are there more items?
- hasPreviousPage: boolean,
+ hasPreviousPage: boolean;
// When paginating forwards, are there more items?
- hasNextPage: boolean,
+ hasNextPage: boolean;
// When paginating backwards, the cursor to continue.
- startCursor: string | null,
+ startCursor: string | null;
// When paginating forwards, the cursor to continue.
- endCursor: string | null,
- },
- } | null,
-};
+ endCursor: string | null;
+ };
+ } | null;
+}
export interface OrderDetailsQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface OrderDetailsQuery {
// Lookup an order by ID.
- order: {
+ order: {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
- } | null,
-};
+ id: string;
+ email: string;
+ } | null;
+ } | null;
+}
export interface OrderShippingMethodsQuery {
// List of the shop's shipping zones.
- shippingZones: {
- edges: Array< {
+ shippingZones: {
+ edges: Array<{
// The item at the end of the edge
- node: {
- shippingMethods: {
- edges: Array< {
+ node: {
+ shippingMethods: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- } | null,
- } | null >,
- } | null,
- },
- } >,
- } | null,
-};
+ id: string;
+ name: string;
+ } | null;
+ } | null>;
+ } | null;
+ };
+ }>;
+ } | null;
+}
export interface PageDeleteMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface PageDeleteMutation {
- pageDelete: {
+ pageDelete: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- } | null,
-};
+ message: string | null;
+ } | null> | null;
+ } | null;
+}
export interface PageUpdateMutationVariables {
- id: string,
- title: string,
- content: string,
- slug: string,
- isVisible: boolean,
- availableOn?: string | null,
-};
+ id: string;
+ title: string;
+ content: string;
+ slug: string;
+ isVisible: boolean;
+ availableOn?: string | null;
+}
export interface PageUpdateMutation {
- pageUpdate: {
- page: {
+ pageUpdate: {
+ page: {
// The ID of the object.
- id: string,
- slug: string,
- title: string,
- content: string,
- isVisible: boolean,
- availableOn: string | null,
- } | null,
+ id: string;
+ slug: string;
+ title: string;
+ content: string;
+ isVisible: boolean;
+ availableOn: string | null;
+ } | null;
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- } | null,
-};
+ message: string | null;
+ } | null> | null;
+ } | null;
+}
export interface PageCreateMutationVariables {
- title: string,
- content: string,
- slug: string,
- isVisible: boolean,
- availableOn?: string | null,
-};
+ title: string;
+ content: string;
+ slug: string;
+ isVisible: boolean;
+ availableOn?: string | null;
+}
export interface PageCreateMutation {
- pageCreate: {
- page: {
+ pageCreate: {
+ page: {
// The ID of the object.
- id: string,
- slug: string,
- title: string,
- content: string,
- isVisible: boolean,
- availableOn: string | null,
- created: string,
- } | null,
+ id: string;
+ slug: string;
+ title: string;
+ content: string;
+ isVisible: boolean;
+ availableOn: string | null;
+ created: string;
+ } | null;
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- } | null,
-};
+ message: string | null;
+ } | null> | null;
+ } | null;
+}
export interface PageListQueryVariables {
- first?: number | null,
- after?: string | null,
- last?: number | null,
- before?: string | null,
-};
+ first?: number | null;
+ after?: string | null;
+ last?: number | null;
+ before?: string | null;
+}
export interface PageListQuery {
// List of the shop's pages.
- pages: {
- edges: Array< {
+ pages: {
+ edges: Array<{
// A cursor for use in pagination
- cursor: string,
+ cursor: string;
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- slug: string,
- title: string,
- isVisible: boolean,
- },
- } >,
- pageInfo: {
+ id: string;
+ slug: string;
+ title: string;
+ isVisible: boolean;
+ };
+ }>;
+ pageInfo: {
// When paginating backwards, are there more items?
- hasPreviousPage: boolean,
+ hasPreviousPage: boolean;
// When paginating forwards, are there more items?
- hasNextPage: boolean,
+ hasNextPage: boolean;
// When paginating backwards, the cursor to continue.
- startCursor: string | null,
+ startCursor: string | null;
// When paginating forwards, the cursor to continue.
- endCursor: string | null,
- },
- } | null,
-};
+ endCursor: string | null;
+ };
+ } | null;
+}
export interface PageDetailsQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface PageDetailsQuery {
// Lookup a page by ID or by slug.
- page: {
+ page: {
// The ID of the object.
- id: string,
- slug: string,
- title: string,
- content: string,
- created: string,
- isVisible: boolean,
- availableOn: string | null,
- } | null,
-};
+ id: string;
+ slug: string;
+ title: string;
+ content: string;
+ created: string;
+ isVisible: boolean;
+ availableOn: string | null;
+ } | null;
+}
export interface ProductImageCreateMutationVariables {
- product: string,
- image: string,
- alt?: string | null,
-};
+ product: string;
+ image: string;
+ alt?: string | null;
+}
export interface ProductImageCreateMutation {
- productImageCreate: {
+ productImageCreate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
- } | null,
- } | null,
-};
+ url: string;
+ } | null;
+ } | null;
+}
export interface ProductDeleteMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface ProductDeleteMutation {
- productDelete: {
+ productDelete: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- } | null,
- } | null,
-};
+ id: string;
+ } | null;
+ } | null;
+}
export interface ProductImageReorderMutationVariables {
- productId: string,
- imagesIds: Array< string | null >,
-};
+ productId: string;
+ imagesIds: Array<string | null>;
+}
export interface ProductImageReorderMutation {
- productImageReorder: {
+ productImageReorder: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ } | null;
+ } | null;
+}
export interface ProductUpdateMutationVariables {
- id: string,
- attributes?: Array< AttributeValueInput | null > | null,
- availableOn?: string | null,
- category?: string | null,
- chargeTaxes: boolean,
- collections?: Array< string | null > | null,
- description?: string | null,
- isPublished: boolean,
- name?: string | null,
- price?: string | null,
-};
+ id: string;
+ attributes?: Array<AttributeValueInput | null> | null;
+ availableOn?: string | null;
+ category?: string | null;
+ chargeTaxes: boolean;
+ collections?: Array<string | null> | null;
+ description?: string | null;
+ isPublished: boolean;
+ name?: string | null;
+ price?: string | null;
+}
export interface ProductUpdateMutation {
- productUpdate: {
+ productUpdate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
- } | null,
- } | null,
-};
+ url: string;
+ } | null;
+ } | null;
+}
export interface ProductCreateMutationVariables {
- attributes?: Array< AttributeValueInput | null > | null,
- availableOn?: string | null,
- category: string,
- chargeTaxes: boolean,
- collections?: Array< string | null > | null,
- description?: string | null,
- isPublished: boolean,
- name: string,
- price?: string | null,
- productType: string,
-};
+ attributes?: Array<AttributeValueInput | null> | null;
+ availableOn?: string | null;
+ category: string;
+ chargeTaxes: boolean;
+ collections?: Array<string | null> | null;
+ description?: string | null;
+ isPublished: boolean;
+ name: string;
+ price?: string | null;
+ productType: string;
+}
export interface ProductCreateMutation {
- productCreate: {
+ productCreate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
- } | null,
- } | null,
-};
+ url: string;
+ } | null;
+ } | null;
+}
export interface VariantDeleteMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface VariantDeleteMutation {
- productVariantDelete: {
+ productVariantDelete: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- productVariant: {
+ message: string | null;
+ } | null> | null;
+ productVariant: {
// The ID of the object.
- id: string,
- } | null,
- } | null,
-};
+ id: string;
+ } | null;
+ } | null;
+}
export interface VariantUpdateMutationVariables {
- id: string,
- attributes?: Array< AttributeValueInput | null > | null,
- costPrice?: string | null,
- priceOverride?: string | null,
- sku?: string | null,
- quantity?: number | null,
- trackInventory: boolean,
-};
+ id: string;
+ attributes?: Array<AttributeValueInput | null> | null;
+ costPrice?: string | null;
+ priceOverride?: string | null;
+ sku?: string | null;
+ quantity?: number | null;
+ trackInventory: boolean;
+}
export interface VariantUpdateMutation {
- productVariantUpdate: {
+ productVariantUpdate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- productVariant: {
+ message: string | null;
+ } | null> | null;
+ productVariant: {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+ } | null;
+ } | null;
+}
export interface VariantCreateMutationVariables {
- attributes?: Array< AttributeValueInput | null > | null,
- costPrice?: string | null,
- priceOverride?: string | null,
- product: string,
- sku?: string | null,
- quantity?: number | null,
- trackInventory: boolean,
-};
+ attributes?: Array<AttributeValueInput | null> | null;
+ costPrice?: string | null;
+ priceOverride?: string | null;
+ product: string;
+ sku?: string | null;
+ quantity?: number | null;
+ trackInventory: boolean;
+}
export interface VariantCreateMutation {
- productVariantCreate: {
+ productVariantCreate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- productVariant: {
+ message: string | null;
+ } | null> | null;
+ productVariant: {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+ } | null;
+ } | null;
+}
export interface ProductImageDeleteMutationVariables {
- id: string,
-};
+ id: string;
+}
export interface ProductImageDeleteMutation {
- productImageDelete: {
- product: {
+ productImageDelete: {
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- } | null,
- } | null,
-};
+ id: string;
+ };
+ }>;
+ } | null;
+ } | null;
+ } | null;
+}
export interface ProductImageUpdateMutationVariables {
- id: string,
- alt: string,
-};
+ id: string;
+ alt: string;
+}
export interface ProductImageUpdateMutation {
- productImageUpdate: {
+ productImageUpdate: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- product: {
+ message: string | null;
+ } | null> | null;
+ product: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
- } | null,
- } | null,
-};
+ url: string;
+ } | null;
+ } | null;
+}
export interface VariantImageAssignMutationVariables {
- variantId: string,
- imageId: string,
-};
+ variantId: string;
+ imageId: string;
+}
export interface VariantImageAssignMutation {
- variantImageAssign: {
+ variantImageAssign: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- productVariant: {
+ message: string | null;
+ } | null> | null;
+ productVariant: {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+ } | null;
+ } | null;
+}
export interface VariantImageUnassignMutationVariables {
- variantId: string,
- imageId: string,
-};
+ variantId: string;
+ imageId: string;
+}
export interface VariantImageUnassignMutation {
- variantImageUnassign: {
+ variantImageUnassign: {
// List of errors that occurred executing the mutation.
- errors: Array< {
+ errors: Array<{
// Name of a field that caused the error. A value of
// `null` indicates that the error isn't associated with a particular
// field.
- field: string | null,
+ field: string | null;
// The error message.
- message: string | null,
- } | null > | null,
- productVariant: {
+ message: string | null;
+ } | null> | null;
+ productVariant: {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+ } | null;
+ } | null;
+}
export interface ProductListQueryVariables {
- first?: number | null,
- after?: string | null,
- last?: number | null,
- before?: string | null,
-};
+ first?: number | null;
+ after?: string | null;
+ last?: number | null;
+ before?: string | null;
+}
export interface ProductListQuery {
// List of the shop's products.
- products: {
- edges: Array< {
+ products: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
+ id: string;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
+ thumbnailUrl: string | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- } | null,
+ availability: {
+ available: boolean | null;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- productType: {
+ currency: string;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- },
- },
- } >,
- pageInfo: {
+ id: string;
+ name: string;
+ };
+ };
+ }>;
+ pageInfo: {
// When paginating backwards, are there more items?
- hasPreviousPage: boolean,
+ hasPreviousPage: boolean;
// When paginating forwards, are there more items?
- hasNextPage: boolean,
+ hasNextPage: boolean;
// When paginating backwards, the cursor to continue.
- startCursor: string | null,
+ startCursor: string | null;
// When paginating forwards, the cursor to continue.
- endCursor: string | null,
- },
- } | null,
-};
+ endCursor: string | null;
+ };
+ } | null;
+}
export interface ProductDetailsQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface ProductDetailsQuery {
// Lookup a product by ID.
- product: {
+ product: {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
- } | null,
+ url: string;
+ } | null;
// List of the shop's collections.
- collections: {
- edges: Array< {
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// List of the shop's categories.
- categories: {
- edges: Array< {
+ categories: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
-};
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
+}
export interface ProductVariantDetailsQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface ProductVariantDetailsQuery {
// Lookup a variant by ID.
- productVariant: {
+ productVariant: {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+ } | null;
+}
export interface ProductCreateDataQuery {
// List of the shop's product types.
- productTypes: {
- edges: Array< {
+ productTypes: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- productAttributes: {
- edges: Array< {
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ productAttributes: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
- sortOrder: number,
+ id: string;
+ sortOrder: number;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
// List of the shop's collections.
- collections: {
- edges: Array< {
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// List of the shop's categories.
- categories: {
- edges: Array< {
+ categories: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
-};
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
+}
export interface ProductVariantCreateDataQueryVariables {
- id: string,
-};
+ id: string;
+}
export interface ProductVariantCreateDataQuery {
// Lookup a product by ID.
- product: {
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sortOrder: number,
+ id: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- productType: {
+ url: string;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- variantAttributes: {
- edges: Array< {
+ id: string;
+ variantAttributes: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
- sortOrder: number,
+ id: string;
+ sortOrder: number;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- },
- } >,
- } | null,
- },
- variants: {
- edges: Array< {
+ slug: string | null;
+ } | null> | null;
+ };
+ }>;
+ } | null;
+ };
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- } | null,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ } | null;
+}
export interface ProductImageQueryVariables {
- productId: string,
- imageId: string,
-};
+ productId: string;
+ imageId: string;
+}
export interface ProductImageQuery {
// Lookup a product by ID.
- product: {
+ product: {
// The ID of the object.
- id: string,
+ id: string;
// Get a single product image by ID
- mainImage: {
+ mainImage: {
// The ID of the object.
- id: string,
- alt: string,
+ id: string;
+ alt: string;
// The URL of the image.
- url: string,
- } | null,
- images: {
- edges: Array< {
+ url: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- pageInfo: {
+ url: string;
+ };
+ }>;
+ pageInfo: {
// When paginating backwards, are there more items?
- hasPreviousPage: boolean,
+ hasPreviousPage: boolean;
// When paginating forwards, are there more items?
- hasNextPage: boolean,
+ hasNextPage: boolean;
// When paginating backwards, the cursor to continue.
- startCursor: string | null,
+ startCursor: string | null;
// When paginating forwards, the cursor to continue.
- endCursor: string | null,
- },
- } | null,
- } | null,
-};
+ endCursor: string | null;
+ };
+ } | null;
+ } | null;
+}
export interface UserFragment {
// The ID of the object.
- id: string,
- email: string,
- isStaff: boolean,
- note: string | null,
- permissions: Array< {
+ id: string;
+ email: string;
+ isStaff: boolean;
+ note: string | null;
+ permissions: Array<{
// Internal code for permission.
- code: string,
+ code: string;
// Describe action(s) allowed to do by permission.
- name: string,
- } | null > | null,
-};
+ name: string;
+ } | null> | null;
+}
export interface OrderDetailsFragment {
// The ID of the object.
- id: string,
- billingAddress: {
+ id: string;
+ billingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- created: string,
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ created: string;
// List of events associated with the order.
- events: Array< {
+ events: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Amount of money.
- amount: number | null,
+ amount: number | null;
// Date when event happened at in ISO 8601 format.
- date: string | null,
+ date: string | null;
// Email of the customer
- email: string | null,
+ email: string | null;
// Type of an email sent to the customer
- emailType: string | null,
+ emailType: string | null;
// Content of a note added to the order.
- message: string | null,
+ message: string | null;
// Number of items.
- quantity: number | null,
+ quantity: number | null;
// Order event type
- type: OrderEvents | null,
+ type: OrderEvents | null;
// User who performed the action.
- user: {
- email: string,
- } | null,
- } | null > | null,
+ user: {
+ email: string;
+ } | null;
+ } | null> | null;
// List of shipments for the order.
- fulfillments: Array< {
+ fulfillments: Array<{
// The ID of the object.
- id: string,
- lines: {
- edges: Array< {
+ id: string;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- orderLine: {
+ id: string;
+ orderLine: {
// The ID of the object.
- id: string,
- productName: string,
- },
- quantity: number,
- },
- } >,
- } | null,
- status: FulfillmentStatus,
- trackingNumber: string,
- } | null >,
- lines: {
- edges: Array< {
+ id: string;
+ productName: string;
+ };
+ quantity: number;
+ };
+ }>;
+ } | null;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+ } | null>;
+ lines: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- productName: string,
- productSku: string,
- quantity: number,
- quantityFulfilled: number,
- unitPrice: {
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- },
- } >,
- } | null,
+ currency: string;
+ };
+ } | null;
+ };
+ }>;
+ } | null;
// User-friendly number of an order.
- number: string | null,
+ number: string | null;
// Internal payment status.
- paymentStatus: string | null,
- shippingAddress: {
+ paymentStatus: string | null;
+ shippingAddress: {
// The ID of the object.
- id: string,
- city: string,
- cityArea: string,
- companyName: string,
- country: AddressCountry,
- countryArea: string,
- firstName: string,
- lastName: string,
- phone: string | null,
- postalCode: string,
- streetAddress1: string,
- streetAddress2: string,
- } | null,
- shippingMethod: {
+ id: string;
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: AddressCountry;
+ countryArea: string;
+ firstName: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+ } | null;
+ shippingMethod: {
// The ID of the object.
- id: string,
- } | null,
- shippingMethodName: string | null,
- shippingPrice: {
+ id: string;
+ } | null;
+ shippingMethodName: string | null;
+ shippingPrice: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- status: OrderStatus,
+ currency: string;
+ };
+ } | null;
+ status: OrderStatus;
// The sum of line prices not including shipping.
- subtotal: {
+ subtotal: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- total: {
+ currency: string;
+ };
+ } | null;
+ total: {
// Amount of money including taxes.
- gross: {
+ gross: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
+ currency: string;
+ };
// Amount of taxes.
- tax: {
+ tax: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Amount authorized for the order.
- totalAuthorized: {
+ totalAuthorized: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Amount captured by payment.
- totalCaptured: {
+ totalCaptured: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- user: {
+ currency: string;
+ } | null;
+ user: {
// The ID of the object.
- id: string,
- email: string,
- } | null,
-};
+ id: string;
+ email: string;
+ } | null;
+}
export interface MoneyFragment {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
-};
+ currency: string;
+}
export interface ProductImageFragment {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
-};
+ url: string;
+}
export interface ProductFragment {
// The ID of the object.
- id: string,
- name: string,
- description: string,
- seoTitle: string | null,
- seoDescription: string | null,
- category: {
+ id: string;
+ name: string;
+ description: string;
+ seoTitle: string | null;
+ seoDescription: string | null;
+ category: {
// The ID of the object.
- id: string,
- name: string,
- },
- collections: {
- edges: Array< {
+ id: string;
+ name: string;
+ };
+ collections: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- },
- } >,
- } | null,
+ id: string;
+ name: string;
+ };
+ }>;
+ } | null;
// The product's base price (without any discounts
// applied).
- price: {
+ price: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- margin: {
- start: number | null,
- stop: number | null,
- } | null,
- purchaseCost: {
+ currency: string;
+ } | null;
+ margin: {
+ start: number | null;
+ stop: number | null;
+ } | null;
+ purchaseCost: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- } | null,
- isPublished: boolean,
- chargeTaxes: boolean,
- availableOn: string | null,
+ currency: string;
+ } | null;
+ } | null;
+ isPublished: boolean;
+ chargeTaxes: boolean;
+ availableOn: string | null;
// List of product attributes assigned to this product.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Informs about product's availability in the storefront,
// current price and discounts.
- availability: {
- available: boolean | null,
- priceRange: {
+ availability: {
+ available: boolean | null;
+ priceRange: {
// Lower bound of a price range.
- start: {
+ start: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
+ currency: string;
+ };
+ } | null;
// Upper bound of a price range.
- stop: {
+ stop: {
// Amount of money without taxes.
- net: {
+ net: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- },
- } | null,
- } | null,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ };
+ } | null;
+ } | null;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- variants: {
- edges: Array< {
+ url: string;
+ };
+ }>;
+ } | null;
+ variants: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- sku: string,
- name: string,
+ id: string;
+ sku: string;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
+ currency: string;
+ } | null;
// Quantity of a product available for sale.
- stockQuantity: number,
+ stockQuantity: number;
// Gross margin percentage value.
- margin: number | null,
- },
- } >,
- } | null,
- productType: {
+ margin: number | null;
+ };
+ }>;
+ } | null;
+ productType: {
// The ID of the object.
- id: string,
- name: string,
- hasVariants: boolean,
- },
+ id: string;
+ name: string;
+ hasVariants: boolean;
+ };
// The storefront URL for the product.
- url: string,
-};
+ url: string;
+}
export interface ProductVariantFragment {
// The ID of the object.
- id: string,
+ id: string;
// List of attributes assigned to this variant.
- attributes: Array< {
+ attributes: Array<{
// Name of an attribute
- attribute: {
+ attribute: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
+ slug: string | null;
// List of attribute's values.
- values: Array< {
+ values: Array<{
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null > | null,
- } | null,
+ slug: string | null;
+ } | null> | null;
+ } | null;
// Value of an attribute.
- value: {
+ value: {
// The ID of the object.
- id: string,
+ id: string;
// Visible name for display purposes.
- name: string | null,
+ name: string | null;
// Internal representation of an attribute name.
- slug: string | null,
- } | null,
- } | null > | null,
+ slug: string | null;
+ } | null;
+ } | null> | null;
// Cost price of the variant.
- costPrice: {
+ costPrice: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- images: {
- edges: Array< {
+ currency: string;
+ } | null;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- },
- } >,
- } | null,
- name: string,
+ id: string;
+ };
+ }>;
+ } | null;
+ name: string;
// Override the base price of a product if necessary.
// A value of `null` indicates that the default product price is used.
- priceOverride: {
+ priceOverride: {
// Amount of money.
- amount: number,
+ amount: number;
// Currency code.
- currency: string,
- } | null,
- product: {
+ currency: string;
+ } | null;
+ product: {
// The ID of the object.
- id: string,
- images: {
- edges: Array< {
+ id: string;
+ images: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- alt: string,
- sortOrder: number,
+ id: string;
+ alt: string;
+ sortOrder: number;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- name: string,
+ url: string;
+ };
+ }>;
+ } | null;
+ name: string;
// The URL of a main thumbnail for a product.
- thumbnailUrl: string | null,
- variants: {
+ thumbnailUrl: string | null;
+ variants: {
// A total count of items in the collection
- totalCount: number | null,
- edges: Array< {
+ totalCount: number | null;
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
- name: string,
- sku: string,
- image: {
- edges: Array< {
+ id: string;
+ name: string;
+ sku: string;
+ image: {
+ edges: Array<{
// The item at the end of the edge
- node: {
+ node: {
// The ID of the object.
- id: string,
+ id: string;
// The URL of the image.
- url: string,
- },
- } >,
- } | null,
- },
- } >,
- } | null,
- },
- sku: string,
- quantity: number,
- quantityAllocated: number,
-};
+ url: string;
+ };
+ }>;
+ } | null;
+ };
+ }>;
+ } | null;
+ };
+ sku: string;
+ quantity: number;
+ quantityAllocated: number;
+}
diff --git a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
index d4601ee062..338f3db7d5 100644
--- a/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderDetailsPage/OrderDetailsPage.tsx
@@ -39,7 +39,7 @@ import OrderPayment from "../OrderPayment/OrderPayment";
import OrderPaymentDialog, {
FormData as OrderPaymentFormData
} from "../OrderPaymentDialog";
-import OrderPaymentReleaseDialog from "../OrderPaymentReleaseDialog";
+import OrderPaymentVoidDialog from "../OrderPaymentVoidDialog";
import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems";
export interface OrderDetailsPageProps {
@@ -65,7 +65,7 @@ export interface OrderDetailsPageProps {
onPaymentCapture(data: OrderPaymentFormData);
onPaymentPaid();
onPaymentRefund(data: OrderPaymentFormData);
- onPaymentRelease();
+ onPaymentVoid();
onShippingAddressEdit(data: AddressTypeInput);
onOrderCancel(data: OrderCancelFormData);
onNoteAdd(data: HistoryFormData);
@@ -77,7 +77,7 @@ interface OrderDetailsPageState {
openedPaymentCaptureDialog: boolean;
openedPaymentPaidDialog: boolean;
openedPaymentRefundDialog: boolean;
- openedPaymentReleaseDialog: boolean;
+ openedPaymentVoidDialog: boolean;
openedShippingAddressEditDialog: boolean;
}
@@ -109,7 +109,7 @@ class OrderDetailsPageComponent extends React.Component<
openedPaymentCaptureDialog: false,
openedPaymentPaidDialog: false,
openedPaymentRefundDialog: false,
- openedPaymentReleaseDialog: false,
+ openedPaymentVoidDialog: false,
openedShippingAddressEditDialog: false
};
@@ -117,9 +117,9 @@ class OrderDetailsPageComponent extends React.Component<
this.setState(prevState => ({
openedFulfillmentDialog: !prevState.openedFulfillmentDialog
}));
- togglePaymentReleaseDialog = () =>
+ togglePaymentVoidDialog = () =>
this.setState(prevState => ({
- openedPaymentReleaseDialog: !prevState.openedPaymentReleaseDialog
+ openedPaymentVoidDialog: !prevState.openedPaymentVoidDialog
}));
togglePaymentCaptureDialog = () =>
this.setState(prevState => ({
@@ -162,7 +162,7 @@ class OrderDetailsPageComponent extends React.Component<
onPaymentCapture,
onPaymentPaid,
onPaymentRefund,
- onPaymentRelease,
+ onPaymentVoid,
onShippingAddressEdit
} = this.props;
const {
@@ -172,7 +172,7 @@ class OrderDetailsPageComponent extends React.Component<
openedPaymentCaptureDialog,
openedPaymentPaidDialog,
openedPaymentRefundDialog,
- openedPaymentReleaseDialog,
+ openedPaymentVoidDialog,
openedShippingAddressEditDialog
} = this.state;
const canCancel = maybe(() => order.status) !== OrderStatus.CANCELED;
@@ -279,7 +279,7 @@ class OrderDetailsPageComponent extends React.Component<
onCapture={this.togglePaymentCaptureDialog}
onMarkAsPaid={this.togglePaymentPaidDialog}
onRefund={this.togglePaymentRefundDialog}
- onRelease={this.togglePaymentReleaseDialog}
+ onVoid={this.togglePaymentVoidDialog}
/>
<OrderHistory
history={maybe(() => order.events)}
@@ -365,10 +365,10 @@ class OrderDetailsPageComponent extends React.Component<
onClose={this.toggleOrderCancelDialog}
onSubmit={onOrderCancel}
/>
- <OrderPaymentReleaseDialog
- open={openedPaymentReleaseDialog}
- onClose={this.togglePaymentReleaseDialog}
- onConfirm={onPaymentRelease}
+ <OrderPaymentVoidDialog
+ open={openedPaymentVoidDialog}
+ onClose={this.togglePaymentVoidDialog}
+ onConfirm={onPaymentVoid}
/>
<ActionDialog
open={openedPaymentPaidDialog}
diff --git a/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx b/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
index 49d807f65a..7a3118cc9b 100644
--- a/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderHistory/OrderHistory.tsx
@@ -80,8 +80,8 @@ const getEventMessage = (event: OrderDetails_order_events) => {
return i18n.t("Payment has been refunded", {
context: "order history message"
});
- case OrderEvents.PAYMENT_RELEASED:
- return i18n.t("Payment has been released", {
+ case OrderEvents.PAYMENT_VOIDED:
+ return i18n.t("Payment has been voided", {
context: "order history message"
});
case OrderEvents.PLACED:
diff --git a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
index 1845e0204f..2002fb425a 100644
--- a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
@@ -21,7 +21,7 @@ interface OrderPaymentProps {
onCapture: () => void;
onMarkAsPaid: () => void;
onRefund: () => void;
- onRelease: () => void;
+ onVoid: () => void;
}
const decorate = withStyles(theme => ({
@@ -38,12 +38,12 @@ const decorate = withStyles(theme => ({
}
}));
const OrderPayment = decorate<OrderPaymentProps>(
- ({ classes, order, onCapture, onMarkAsPaid, onRefund, onRelease }) => {
+ ({ classes, order, onCapture, onMarkAsPaid, onRefund, onVoid }) => {
const canCapture = maybe(() => order.paymentStatus)
? order.paymentStatus === PaymentChargeStatusEnum.PREAUTH &&
order.status !== OrderStatus.CANCELED
: false;
- const canRelease = maybe(() => order.paymentStatus)
+ const canVoid = maybe(() => order.paymentStatus)
? order.paymentStatus === PaymentChargeStatusEnum.PREAUTH
: false;
const canRefund = maybe(() => order.paymentStatus)
@@ -146,7 +146,7 @@ const OrderPayment = decorate<OrderPaymentProps>(
</table>
</CardContent>
{maybe(() => order.status) !== OrderStatus.CANCELED &&
- (canCapture || canRefund || canRelease || canMarkAsPaid) && (
+ (canCapture || canRefund || canVoid || canMarkAsPaid) && (
<>
<Hr />
<CardActions>
@@ -160,9 +160,9 @@ const OrderPayment = decorate<OrderPaymentProps>(
{i18n.t("Refund", { context: "button" })}
</Button>
)}
- {canRelease && (
- <Button color="secondary" variant="flat" onClick={onRelease}>
- {i18n.t("Release", { context: "button" })}
+ {canVoid && (
+ <Button color="secondary" variant="flat" onClick={onVoid}>
+ {i18n.t("Void", { context: "button" })}
</Button>
)}
{canMarkAsPaid && (
diff --git a/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentReleaseDialog.tsx b/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentVoidDialog.tsx
similarity index 73%
rename from saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentReleaseDialog.tsx
rename to saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentVoidDialog.tsx
index 32b800650f..8bfb6b7348 100644
--- a/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentReleaseDialog.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/OrderPaymentVoidDialog.tsx
@@ -8,20 +8,20 @@ import * as React from "react";
import i18n from "../../../i18n";
-interface OrderPaymentReleaseDialogProps {
+interface OrderPaymentVoidDialogProps {
open: boolean;
onClose?();
onConfirm?();
}
-const OrderPaymentReleaseDialog: React.StatelessComponent<
- OrderPaymentReleaseDialogProps
+const OrderPaymentVoidDialog: React.StatelessComponent<
+ OrderPaymentVoidDialogProps
> = ({ open, onConfirm, onClose }) => (
<Dialog open={open}>
- <DialogTitle>{i18n.t("Release payment", { context: "title" })}</DialogTitle>
+ <DialogTitle>{i18n.t("Void payment", { context: "title" })}</DialogTitle>
<DialogContent>
<DialogContentText>
- {i18n.t("Are you sure you want to release this payment?")}
+ {i18n.t("Are you sure you want to void this payment?")}
</DialogContentText>
</DialogContent>
<DialogActions>
@@ -32,4 +32,4 @@ const OrderPaymentReleaseDialog: React.StatelessComponent<
</DialogActions>
</Dialog>
);
-export default OrderPaymentReleaseDialog;
+export default OrderPaymentVoidDialog;
diff --git a/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/index.ts b/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/index.ts
index 38627f19c4..98765d4235 100644
--- a/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/index.ts
+++ b/saleor/static/dashboard-next/orders/components/OrderPaymentReleaseDialog/index.ts
@@ -1,2 +1,2 @@
-export { default } from "./OrderPaymentReleaseDialog";
-export * from "./OrderPaymentReleaseDialog";
+export { default } from "./OrderPaymentVoidDialog";
+export * from "./OrderPaymentVoidDialog";
diff --git a/saleor/static/dashboard-next/orders/containers/OrderOperations.tsx b/saleor/static/dashboard-next/orders/containers/OrderOperations.tsx
index f949fc2fdb..f6333649b5 100644
--- a/saleor/static/dashboard-next/orders/containers/OrderOperations.tsx
+++ b/saleor/static/dashboard-next/orders/containers/OrderOperations.tsx
@@ -43,7 +43,7 @@ import {
OrderLineUpdateVariables
} from "../types/OrderLineUpdate";
import { OrderRefund, OrderRefundVariables } from "../types/OrderRefund";
-import { OrderRelease, OrderReleaseVariables } from "../types/OrderRelease";
+import { OrderVoid, OrderVoidVariables } from "../types/OrderVoid";
import {
OrderShippingMethodUpdate,
OrderShippingMethodUpdateVariables
@@ -62,7 +62,7 @@ import OrderLineUpdateProvider from "./OrderLineUpdate";
import OrderNoteAddProvider from "./OrderNoteAdd";
import OrderPaymentCaptureProvider from "./OrderPaymentCapture";
import OrderPaymentRefundProvider from "./OrderPaymentRefund";
-import OrderReleaseMutationProvider from "./OrderRelease";
+import OrderVoidMutationProvider from "./OrderVoid";
import OrderShippingMethodUpdateProvider from "./OrderShippingUpdate";
import OrderUpdateProvider from "./OrderUpdate";
import {
@@ -106,9 +106,9 @@ interface OrderOperationsProps extends MutationProviderProps {
OrderMarkAsPaid,
OrderMarkAsPaidVariables
>;
- orderRelease: PartialMutationProviderOutput<
- OrderRelease,
- OrderReleaseVariables
+ orderVoid: PartialMutationProviderOutput<
+ OrderVoid,
+ OrderVoidVariables
>;
orderUpdate: PartialMutationProviderOutput<
OrderUpdate,
@@ -147,7 +147,7 @@ interface OrderOperationsProps extends MutationProviderProps {
onOrderFulfillmentCreate: (data: OrderCreateFulfillment) => void;
onOrderFulfillmentUpdate: (data: OrderFulfillmentUpdateTracking) => void;
onOrderCancel: (data: OrderCancel) => void;
- onOrderRelease: (data: OrderRelease) => void;
+ onOrderVoid: (data: OrderVoid) => void;
onOrderMarkAsPaid: (data: OrderMarkAsPaid) => void;
onNoteAdd: (data: OrderAddNote) => void;
onPaymentCapture: (data: OrderCapture) => void;
@@ -173,7 +173,7 @@ const OrderOperations: React.StatelessComponent<OrderOperationsProps> = ({
onOrderLineAdd,
onOrderLineDelete,
onOrderLineUpdate,
- onOrderRelease,
+ onOrderVoid,
onPaymentCapture,
onPaymentRefund,
onShippingMethodUpdate,
@@ -184,8 +184,8 @@ const OrderOperations: React.StatelessComponent<OrderOperationsProps> = ({
onOrderFulfillmentUpdate,
onOrderMarkAsPaid
}) => (
- <OrderReleaseMutationProvider onError={onError} onSuccess={onOrderRelease}>
- {orderRelease => (
+ <OrderVoidMutationProvider onError={onError} onSuccess={onOrderVoid}>
+ {orderVoid => (
<OrderCancelMutationProvider onError={onError} onSuccess={onOrderCancel}>
{orderCancel => (
<OrderPaymentCaptureProvider
@@ -554,13 +554,13 @@ const OrderOperations: React.StatelessComponent<OrderOperationsProps> = ({
}
)
},
- orderRelease: {
+ orderVoid: {
data:
- orderRelease.data,
+ orderVoid.data,
loading:
- orderRelease.loading,
+ orderVoid.loading,
mutate: variables =>
- orderRelease.mutate(
+ orderVoid.mutate(
{
variables
}
@@ -624,6 +624,6 @@ const OrderOperations: React.StatelessComponent<OrderOperationsProps> = ({
)}
</OrderCancelMutationProvider>
)}
- </OrderReleaseMutationProvider>
+ </OrderVoidMutationProvider>
);
export default OrderOperations;
diff --git a/saleor/static/dashboard-next/orders/containers/OrderRelease.tsx b/saleor/static/dashboard-next/orders/containers/OrderRelease.tsx
deleted file mode 100644
index c8c39a0771..0000000000
--- a/saleor/static/dashboard-next/orders/containers/OrderRelease.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as React from "react";
-
-import { TypedOrderReleaseMutation } from "../mutations";
-import { OrderRelease, OrderReleaseVariables } from "../types/OrderRelease";
-
-import {
- PartialMutationProviderProps,
- PartialMutationProviderRenderProps
-} from "../..";
-
-interface OrderReleaseMutationProviderProps
- extends PartialMutationProviderProps<OrderRelease> {
- children: PartialMutationProviderRenderProps<
- OrderRelease,
- OrderReleaseVariables
- >;
-}
-
-const OrderReleaseMutationProvider: React.StatelessComponent<
- OrderReleaseMutationProviderProps
-> = ({ children, onError, onSuccess }) => (
- <TypedOrderReleaseMutation onCompleted={onSuccess} onError={onError}>
- {(mutate, { data, error, loading }) =>
- children({
- data,
- error,
- loading,
- mutate
- })
- }
- </TypedOrderReleaseMutation>
-);
-
-export default OrderReleaseMutationProvider;
diff --git a/saleor/static/dashboard-next/orders/containers/OrderVoid.tsx b/saleor/static/dashboard-next/orders/containers/OrderVoid.tsx
new file mode 100644
index 0000000000..0ce9dd121c
--- /dev/null
+++ b/saleor/static/dashboard-next/orders/containers/OrderVoid.tsx
@@ -0,0 +1,34 @@
+import * as React from "react";
+
+import { TypedOrderVoidMutation } from "../mutations";
+import { OrderVoid, OrderVoidVariables } from "../types/OrderVoid";
+
+import {
+ PartialMutationProviderProps,
+ PartialMutationProviderRenderProps
+} from "../..";
+
+interface OrderVoidMutationProviderProps
+ extends PartialMutationProviderProps<OrderVoid> {
+ children: PartialMutationProviderRenderProps<
+ OrderVoid,
+ OrderVoidVariables
+ >;
+}
+
+const OrderVoidMutationProvider: React.StatelessComponent<
+ OrderVoidMutationProviderProps
+> = ({ children, onError, onSuccess }) => (
+ <TypedOrderVoidMutation onCompleted={onSuccess} onError={onError}>
+ {(mutate, { data, error, loading }) =>
+ children({
+ data,
+ error,
+ loading,
+ mutate
+ })
+ }
+ </TypedOrderVoidMutation>
+);
+
+export default OrderVoidMutationProvider;
diff --git a/saleor/static/dashboard-next/orders/mutations.ts b/saleor/static/dashboard-next/orders/mutations.ts
index d23ba952d8..f117a0e7e6 100644
--- a/saleor/static/dashboard-next/orders/mutations.ts
+++ b/saleor/static/dashboard-next/orders/mutations.ts
@@ -48,7 +48,7 @@ import {
OrderMarkAsPaidVariables
} from "./types/OrderMarkAsPaid";
import { OrderRefund, OrderRefundVariables } from "./types/OrderRefund";
-import { OrderRelease, OrderReleaseVariables } from "./types/OrderRelease";
+import { OrderVoid, OrderVoidVariables } from "./types/OrderVoid";
import {
OrderShippingMethodUpdate,
OrderShippingMethodUpdateVariables
@@ -123,20 +123,20 @@ export const TypedOrderRefundMutation = TypedMutation<
OrderRefundVariables
>(orderRefundMutation);
-const orderReleaseMutation = gql`
+const orderVoidMutation = gql`
${fragmentOrderDetails}
- mutation OrderRelease($id: ID!) {
- orderRelease(id: $id) {
+ mutation OrderVoid($id: ID!) {
+ orderVoid(id: $id) {
order {
...OrderDetailsFragment
}
}
}
`;
-export const TypedOrderReleaseMutation = TypedMutation<
- OrderRelease,
- OrderReleaseVariables
->(orderReleaseMutation);
+export const TypedOrderVoidMutation = TypedMutation<
+ OrderVoid,
+ OrderVoidVariables
+>(orderVoidMutation);
const orderMarkAsPaidMutation = gql`
${fragmentOrderDetails}
diff --git a/saleor/static/dashboard-next/orders/types/OrderVoid.ts b/saleor/static/dashboard-next/orders/types/OrderVoid.ts
new file mode 100644
index 0000000000..951c99fe0b
--- /dev/null
+++ b/saleor/static/dashboard-next/orders/types/OrderVoid.ts
@@ -0,0 +1,267 @@
+/* tslint:disable */
+// This file was automatically generated and should not be edited.
+
+import { OrderEventsEmails, OrderEvents, FulfillmentStatus, PaymentChargeStatusEnum, OrderStatus } from "./../../types/globalTypes";
+
+// ====================================================
+// GraphQL mutation operation: OrderVoid
+// ====================================================
+
+export interface OrderVoid_orderVoid_order_billingAddress_country {
+ __typename: "CountryDisplay";
+ code: string;
+ country: string;
+}
+
+export interface OrderVoid_orderVoid_order_billingAddress {
+ __typename: "Address";
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: OrderVoid_orderVoid_order_billingAddress_country;
+ countryArea: string;
+ firstName: string;
+ id: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+}
+
+export interface OrderVoid_orderVoid_order_events_user {
+ __typename: "User";
+ email: string;
+}
+
+export interface OrderVoid_orderVoid_order_events {
+ __typename: "OrderEvent";
+ id: string;
+ amount: number | null;
+ date: any | null;
+ email: string | null;
+ emailType: OrderEventsEmails | null;
+ message: string | null;
+ quantity: number | null;
+ type: OrderEvents | null;
+ user: OrderVoid_orderVoid_order_events_user | null;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice_gross {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice_net {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice {
+ __typename: "TaxedMoney";
+ gross: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice_gross;
+ net: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice_net;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine {
+ __typename: "OrderLine";
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine_unitPrice | null;
+ thumbnailUrl: string | null;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node {
+ __typename: "FulfillmentLine";
+ id: string;
+ quantity: number;
+ orderLine: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines_edges {
+ __typename: "FulfillmentLineCountableEdge";
+ node: OrderVoid_orderVoid_order_fulfillments_lines_edges_node;
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments_lines {
+ __typename: "FulfillmentLineCountableConnection";
+ edges: OrderVoid_orderVoid_order_fulfillments_lines_edges[];
+}
+
+export interface OrderVoid_orderVoid_order_fulfillments {
+ __typename: "Fulfillment";
+ id: string;
+ lines: OrderVoid_orderVoid_order_fulfillments_lines | null;
+ fulfillmentOrder: number;
+ status: FulfillmentStatus;
+ trackingNumber: string;
+}
+
+export interface OrderVoid_orderVoid_order_lines_unitPrice_gross {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_lines_unitPrice_net {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_lines_unitPrice {
+ __typename: "TaxedMoney";
+ gross: OrderVoid_orderVoid_order_lines_unitPrice_gross;
+ net: OrderVoid_orderVoid_order_lines_unitPrice_net;
+}
+
+export interface OrderVoid_orderVoid_order_lines {
+ __typename: "OrderLine";
+ id: string;
+ productName: string;
+ productSku: string;
+ quantity: number;
+ quantityFulfilled: number;
+ unitPrice: OrderVoid_orderVoid_order_lines_unitPrice | null;
+ thumbnailUrl: string | null;
+}
+
+export interface OrderVoid_orderVoid_order_shippingAddress_country {
+ __typename: "CountryDisplay";
+ code: string;
+ country: string;
+}
+
+export interface OrderVoid_orderVoid_order_shippingAddress {
+ __typename: "Address";
+ city: string;
+ cityArea: string;
+ companyName: string;
+ country: OrderVoid_orderVoid_order_shippingAddress_country;
+ countryArea: string;
+ firstName: string;
+ id: string;
+ lastName: string;
+ phone: string | null;
+ postalCode: string;
+ streetAddress1: string;
+ streetAddress2: string;
+}
+
+export interface OrderVoid_orderVoid_order_shippingMethod {
+ __typename: "ShippingMethod";
+ id: string;
+}
+
+export interface OrderVoid_orderVoid_order_shippingPrice_gross {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_shippingPrice {
+ __typename: "TaxedMoney";
+ gross: OrderVoid_orderVoid_order_shippingPrice_gross;
+}
+
+export interface OrderVoid_orderVoid_order_subtotal_gross {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_subtotal {
+ __typename: "TaxedMoney";
+ gross: OrderVoid_orderVoid_order_subtotal_gross;
+}
+
+export interface OrderVoid_orderVoid_order_total_gross {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_total_tax {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_total {
+ __typename: "TaxedMoney";
+ gross: OrderVoid_orderVoid_order_total_gross;
+ tax: OrderVoid_orderVoid_order_total_tax;
+}
+
+export interface OrderVoid_orderVoid_order_totalAuthorized {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_totalCaptured {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_user {
+ __typename: "User";
+ id: string;
+ email: string;
+}
+
+export interface OrderVoid_orderVoid_order_availableShippingMethods_price {
+ __typename: "Money";
+ amount: number;
+ currency: string;
+}
+
+export interface OrderVoid_orderVoid_order_availableShippingMethods {
+ __typename: "ShippingMethod";
+ id: string;
+ name: string;
+ price: OrderVoid_orderVoid_order_availableShippingMethods_price | null;
+}
+
+export interface OrderVoid_orderVoid_order {
+ __typename: "Order";
+ id: string;
+ billingAddress: OrderVoid_orderVoid_order_billingAddress | null;
+ created: any;
+ events: (OrderVoid_orderVoid_order_events | null)[] | null;
+ fulfillments: (OrderVoid_orderVoid_order_fulfillments | null)[];
+ lines: (OrderVoid_orderVoid_order_lines | null)[];
+ number: string | null;
+ paymentStatus: PaymentChargeStatusEnum | null;
+ shippingAddress: OrderVoid_orderVoid_order_shippingAddress | null;
+ shippingMethod: OrderVoid_orderVoid_order_shippingMethod | null;
+ shippingMethodName: string | null;
+ shippingPrice: OrderVoid_orderVoid_order_shippingPrice | null;
+ status: OrderStatus;
+ subtotal: OrderVoid_orderVoid_order_subtotal | null;
+ total: OrderVoid_orderVoid_order_total | null;
+ totalAuthorized: OrderVoid_orderVoid_order_totalAuthorized | null;
+ totalCaptured: OrderVoid_orderVoid_order_totalCaptured | null;
+ user: OrderVoid_orderVoid_order_user | null;
+ userEmail: string | null;
+ availableShippingMethods: (OrderVoid_orderVoid_order_availableShippingMethods | null)[] | null;
+}
+
+export interface OrderVoid_orderVoid {
+ __typename: "OrderVoid";
+ order: OrderVoid_orderVoid_order | null;
+}
+
+export interface OrderVoid {
+ orderVoid: OrderVoid_orderVoid | null;
+}
+
+export interface OrderVoidVariables {
+ id: string;
+}
diff --git a/saleor/static/dashboard-next/orders/views/OrderDetails.tsx b/saleor/static/dashboard-next/orders/views/OrderDetails.tsx
index 69a6545253..43392dffd6 100644
--- a/saleor/static/dashboard-next/orders/views/OrderDetails.tsx
+++ b/saleor/static/dashboard-next/orders/views/OrderDetails.tsx
@@ -146,14 +146,11 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
});
navigate(orderListUrl);
};
- const handleOrderRelease = () => {
+ const handleOrderVoid = () => {
pushMessage({
- text: i18n.t(
- "Order payment successfully released",
- {
- context: "notification"
- }
- )
+ text: i18n.t("Order payment successfully voided", {
+ context: "notification"
+ })
});
};
const handleNoteAdd = (data: OrderAddNote) => {
@@ -348,7 +345,7 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
}
onNoteAdd={handleNoteAdd}
onOrderCancel={handleOrderCancel}
- onOrderRelease={handleOrderRelease}
+ onOrderVoid={handleOrderVoid}
onPaymentCapture={handlePaymentCapture}
onPaymentRefund={handlePaymentRefund}
onUpdate={handleUpdate}
@@ -374,7 +371,7 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
orderLineUpdate,
orderPaymentCapture,
orderPaymentRefund,
- orderRelease,
+ orderVoid,
orderShippingMethodUpdate,
orderUpdate,
orderFulfillmentCancel,
@@ -456,9 +453,7 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
id
})
}
- onPaymentRelease={() =>
- orderRelease.mutate({ id })
- }
+ onPaymentVoid={() => orderVoid.mutate({ id })}
onPaymentRefund={variables =>
orderPaymentRefund.mutate({
...variables,
diff --git a/saleor/static/dashboard-next/storybook/config.js b/saleor/static/dashboard-next/storybook/config.js
index ac48676a0e..4dce8ca9d5 100644
--- a/saleor/static/dashboard-next/storybook/config.js
+++ b/saleor/static/dashboard-next/storybook/config.js
@@ -86,7 +86,7 @@ function loadStories() {
require("./stories/orders/OrderHistory");
require("./stories/orders/OrderListPage");
require("./stories/orders/OrderPaymentDialog");
- require("./stories/orders/OrderPaymentReleaseDialog");
+ require("./stories/orders/OrderPaymentVoidDialog");
require("./stories/orders/OrderProductAddDialog");
require("./stories/orders/OrderShippingMethodEditDialog");
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
index 9ba9952fa9..cd97e429fe 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderDetailsPage.tsx
@@ -28,7 +28,7 @@ const props: OrderDetailsPageProps = {
onPaymentCapture: undefined,
onPaymentPaid: undefined,
onPaymentRefund: undefined,
- onPaymentRelease: undefined,
+ onPaymentVoid: undefined,
onProductClick: undefined,
onShippingAddressEdit: undefined,
order
diff --git a/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentReleaseDialog.tsx b/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentVoidDialog.tsx
similarity index 58%
rename from saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentReleaseDialog.tsx
rename to saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentVoidDialog.tsx
index d731a50b37..9e491bbf94 100644
--- a/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentReleaseDialog.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/orders/OrderPaymentVoidDialog.tsx
@@ -1,13 +1,13 @@
import { storiesOf } from "@storybook/react";
import * as React from "react";
-import OrderPaymentReleaseDialog from "../../../orders/components/OrderPaymentReleaseDialog";
+import OrderPaymentVoidDialog from "../../../orders/components/OrderPaymentVoidDialog";
import Decorator from "../../Decorator";
-storiesOf("Orders / OrderPaymentReleaseDialog", module)
+storiesOf("Orders / OrderPaymentVoidDialog", module)
.addDecorator(Decorator)
.add("default", () => (
- <OrderPaymentReleaseDialog
+ <OrderPaymentVoidDialog
open={true}
onConfirm={undefined}
onClose={undefined}
diff --git a/saleor/static/dashboard-next/types/globalTypes.ts b/saleor/static/dashboard-next/types/globalTypes.ts
index 89b47fd5d8..2ef964781a 100644
--- a/saleor/static/dashboard-next/types/globalTypes.ts
+++ b/saleor/static/dashboard-next/types/globalTypes.ts
@@ -7,17 +7,17 @@
export enum AttributeTypeEnum {
PRODUCT = "PRODUCT",
- VARIANT = "VARIANT",
+ VARIANT = "VARIANT"
}
export enum AuthorizationKeyType {
FACEBOOK = "FACEBOOK",
- GOOGLE_OAUTH2 = "GOOGLE_OAUTH2",
+ GOOGLE_OAUTH2 = "GOOGLE_OAUTH2"
}
export enum FulfillmentStatus {
CANCELED = "CANCELED",
- FULFILLED = "FULFILLED",
+ FULFILLED = "FULFILLED"
}
export enum OrderEvents {
@@ -33,18 +33,18 @@ export enum OrderEvents {
OVERSOLD_ITEMS = "OVERSOLD_ITEMS",
PAYMENT_CAPTURED = "PAYMENT_CAPTURED",
PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
- PAYMENT_RELEASED = "PAYMENT_RELEASED",
+ PAYMENT_VOIDED = "PAYMENT_VOIDED",
PLACED = "PLACED",
PLACED_FROM_DRAFT = "PLACED_FROM_DRAFT",
TRACKING_UPDATED = "TRACKING_UPDATED",
- UPDATED = "UPDATED",
+ UPDATED = "UPDATED"
}
export enum OrderEventsEmails {
FULFILLMENT = "FULFILLMENT",
ORDER = "ORDER",
PAYMENT = "PAYMENT",
- SHIPPING = "SHIPPING",
+ SHIPPING = "SHIPPING"
}
export enum OrderStatus {
@@ -52,13 +52,13 @@ export enum OrderStatus {
DRAFT = "DRAFT",
FULFILLED = "FULFILLED",
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED",
- UNFULFILLED = "UNFULFILLED",
+ UNFULFILLED = "UNFULFILLED"
}
export enum PaymentChargeStatusEnum {
CHARGED = "CHARGED",
FULLY_REFUNDED = "FULLY_REFUNDED",
- NOT_CHARGED = "NOT_CHARGED",
+ NOT_CHARGED = "NOT_CHARGED"
}
export enum PermissionEnum {
@@ -71,7 +71,7 @@ export enum PermissionEnum {
MANAGE_SETTINGS = "MANAGE_SETTINGS",
MANAGE_SHIPPING = "MANAGE_SHIPPING",
MANAGE_STAFF = "MANAGE_STAFF",
- MANAGE_USERS = "MANAGE_USERS",
+ MANAGE_USERS = "MANAGE_USERS"
}
export enum TaxRateType {
@@ -98,14 +98,14 @@ export enum TaxRateType {
RESTAURANTS = "RESTAURANTS",
SOCIAL_HOUSING = "SOCIAL_HOUSING",
STANDARD = "STANDARD",
- WATER = "WATER",
+ WATER = "WATER"
}
export enum WeightUnitsEnum {
g = "g",
kg = "kg",
lb = "lb",
- oz = "oz",
+ oz = "oz"
}
export interface AddressInput {