|
| 1 | +/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any, tsdoc/syntax */ |
| 2 | +import {JsonMapType} from '@shopify/cli-kit/node/toml' |
| 3 | + |
| 4 | +export type Maybe<T> = T | null |
| 5 | +export type InputMaybe<T> = Maybe<T> |
| 6 | +export type Exact<T extends {[key: string]: unknown}> = {[K in keyof T]: T[K]} |
| 7 | +export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {[SubKey in K]?: Maybe<T[SubKey]>} |
| 8 | +export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {[SubKey in K]: Maybe<T[SubKey]>} |
| 9 | +export type MakeEmpty<T extends {[key: string]: unknown}, K extends keyof T> = {[_ in K]?: never} |
| 10 | +export type Incremental<T> = T | {[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never} |
| 11 | +/** All built-in and custom scalars, mapped to their actual values */ |
| 12 | +export type Scalars = { |
| 13 | + ID: {input: string; output: string} |
| 14 | + String: {input: string; output: string} |
| 15 | + Boolean: {input: boolean; output: boolean} |
| 16 | + Int: {input: number; output: number} |
| 17 | + Float: {input: number; output: number} |
| 18 | + /** |
| 19 | + * An Amazon Web Services Amazon Resource Name (ARN), including the Region and account ID. |
| 20 | + * For more information, refer to [Amazon Resource Names](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). |
| 21 | + */ |
| 22 | + ARN: {input: any; output: any} |
| 23 | + /** |
| 24 | + * Represents non-fractional signed whole numeric values. Since the value may |
| 25 | + * exceed the size of a 32-bit integer, it's encoded as a string. |
| 26 | + */ |
| 27 | + BigInt: {input: any; output: any} |
| 28 | + /** |
| 29 | + * A string containing a hexadecimal representation of a color. |
| 30 | + * |
| 31 | + * For example, "#6A8D48". |
| 32 | + */ |
| 33 | + Color: {input: any; output: any} |
| 34 | + /** |
| 35 | + * Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string. |
| 36 | + * For example, September 7, 2019 is represented as `"2019-07-16"`. |
| 37 | + */ |
| 38 | + Date: {input: any; output: any} |
| 39 | + /** |
| 40 | + * Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. |
| 41 | + * For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is |
| 42 | + * represented as `"2019-09-07T15:50:00Z`". |
| 43 | + */ |
| 44 | + DateTime: {input: any; output: any} |
| 45 | + /** |
| 46 | + * A signed decimal number, which supports arbitrary precision and is serialized as a string. |
| 47 | + * |
| 48 | + * Example values: `"29.99"`, `"29.999"`. |
| 49 | + */ |
| 50 | + Decimal: {input: any; output: any} |
| 51 | + /** |
| 52 | + * A string containing a strict subset of HTML code. Non-allowed tags will be stripped out. |
| 53 | + * Allowed tags: |
| 54 | + * * `a` (allowed attributes: `href`, `target`) |
| 55 | + * * `b` |
| 56 | + * * `br` |
| 57 | + * * `em` |
| 58 | + * * `i` |
| 59 | + * * `strong` |
| 60 | + * * `u` |
| 61 | + * Use [HTML](https://shopify.dev/api/admin-graphql/latest/scalars/HTML) instead if you need to |
| 62 | + * include other HTML tags. |
| 63 | + * |
| 64 | + * Example value: `"Your current domain is <strong>example.myshopify.com</strong>."` |
| 65 | + */ |
| 66 | + FormattedString: {input: any; output: any} |
| 67 | + /** |
| 68 | + * A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a |
| 69 | + * complete list of HTML elements. |
| 70 | + * |
| 71 | + * Example value: `"<p>Grey cotton knit sweater.</p>"` |
| 72 | + */ |
| 73 | + HTML: {input: any; output: any} |
| 74 | + /** |
| 75 | + * A [JSON](https://www.json.org/json-en.html) object. |
| 76 | + * |
| 77 | + * Example value: |
| 78 | + * `{ |
| 79 | + * "product": { |
| 80 | + * "id": "gid://shopify/Product/1346443542550", |
| 81 | + * "title": "White T-shirt", |
| 82 | + * "options": [{ |
| 83 | + * "name": "Size", |
| 84 | + * "values": ["M", "L"] |
| 85 | + * }] |
| 86 | + * } |
| 87 | + * }` |
| 88 | + */ |
| 89 | + JSON: {input: JsonMapType | string; output: JsonMapType} |
| 90 | + /** A monetary value string without a currency symbol or code. Example value: `"100.57"`. */ |
| 91 | + Money: {input: any; output: any} |
| 92 | + /** A scalar value. */ |
| 93 | + Scalar: {input: any; output: any} |
| 94 | + /** |
| 95 | + * Represents a unique identifier in the Storefront API. A `StorefrontID` value can |
| 96 | + * be used wherever an ID is expected in the Storefront API. |
| 97 | + * |
| 98 | + * Example value: `"Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzEwMDc5Nzg1MTAw"`. |
| 99 | + */ |
| 100 | + StorefrontID: {input: any; output: any} |
| 101 | + /** |
| 102 | + * Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and |
| 103 | + * [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. |
| 104 | + * |
| 105 | + * For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host |
| 106 | + * (`example.myshopify.com`). |
| 107 | + */ |
| 108 | + URL: {input: string; output: string} |
| 109 | + /** |
| 110 | + * An unsigned 64-bit integer. Represents whole numeric values between 0 and 2^64 - 1 encoded as a string of base-10 digits. |
| 111 | + * |
| 112 | + * Example value: `"50"`. |
| 113 | + */ |
| 114 | + UnsignedInt64: {input: any; output: any} |
| 115 | + /** |
| 116 | + * Time between UTC time and a location's observed time, in the format `"+HH:MM"` or `"-HH:MM"`. |
| 117 | + * |
| 118 | + * Example value: `"-07:00"`. |
| 119 | + */ |
| 120 | + UtcOffset: {input: any; output: any} |
| 121 | +} |
| 122 | + |
| 123 | +/** Error codes for failed bulk operations. */ |
| 124 | +export type BulkOperationErrorCode = |
| 125 | + /** |
| 126 | + * The provided operation `query` returned access denied due to missing |
| 127 | + * [access scopes](https://shopify.dev/api/usage/access-scopes). |
| 128 | + * Review the requested object permissions and execute the query as a normal non-bulk GraphQL request to see more details. |
| 129 | + */ |
| 130 | + | 'ACCESS_DENIED' |
| 131 | + /** |
| 132 | + * The operation resulted in partial or incomplete data due to internal server errors during execution. |
| 133 | + * These errors might be intermittent, so you can try performing the same query again. |
| 134 | + */ |
| 135 | + | 'INTERNAL_SERVER_ERROR' |
| 136 | + /** |
| 137 | + * The operation resulted in partial or incomplete data due to query timeouts during execution. |
| 138 | + * In some cases, timeouts can be avoided by modifying your `query` to select fewer fields. |
| 139 | + */ |
| 140 | + | 'TIMEOUT' |
| 141 | + |
| 142 | +/** The valid values for the status of a bulk operation. */ |
| 143 | +export type BulkOperationStatus = |
| 144 | + /** The bulk operation has been canceled. */ |
| 145 | + | 'CANCELED' |
| 146 | + /** |
| 147 | + * Cancelation has been initiated on the bulk operation. There may be a short delay from when a cancelation |
| 148 | + * starts until the operation is actually canceled. |
| 149 | + */ |
| 150 | + | 'CANCELING' |
| 151 | + /** The bulk operation has successfully completed. */ |
| 152 | + | 'COMPLETED' |
| 153 | + /** The bulk operation has been created. */ |
| 154 | + | 'CREATED' |
| 155 | + /** The bulk operation URL has expired. */ |
| 156 | + | 'EXPIRED' |
| 157 | + /** |
| 158 | + * The bulk operation has failed. For information on why the operation failed, use |
| 159 | + * [BulkOperation.errorCode](https://shopify.dev/api/admin-graphql/latest/enums/bulkoperationerrorcode). |
| 160 | + */ |
| 161 | + | 'FAILED' |
| 162 | + /** The bulk operation is runnning. */ |
| 163 | + | 'RUNNING' |
| 164 | + |
| 165 | +/** The valid values for the bulk operation's type. */ |
| 166 | +export type BulkOperationType = |
| 167 | + /** The bulk operation is a mutation. */ |
| 168 | + | 'MUTATION' |
| 169 | + /** The bulk operation is a query. */ |
| 170 | + | 'QUERY' |
| 171 | + |
| 172 | +/** Possible error codes that can be returned by `BulkOperationUserError`. */ |
| 173 | +export type BulkOperationUserErrorCode = |
| 174 | + /** The input value is invalid. */ |
| 175 | + | 'INVALID' |
| 176 | + /** Bulk operations limit reached. Please try again later. */ |
| 177 | + | 'LIMIT_REACHED' |
| 178 | + /** A bulk operation is already in progress. */ |
| 179 | + | 'OPERATION_IN_PROGRESS' |
0 commit comments