├── .env.example ├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── _developer └── README.md ├── bun.lock ├── package.json ├── scripts ├── jsdocs_creator.js ├── typescript_types_creator.js ├── webhookTopics.js └── webhook_trigger_creator.js ├── server └── index.js ├── shopify.app.toml └── types ├── .gitkeep ├── 2024-07 ├── webhooks.js └── webhooks.ts ├── 2024-10 ├── webhooks.js └── webhooks.ts └── 2025-04 ├── webhooks.js └── webhooks.ts /.env.example: -------------------------------------------------------------------------------- 1 | TUNNEL_URL= 2 | API_VERSION= 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | ## Dev only folders 4 | shopify.app.toml 5 | sanity/ 6 | mental_well_being/ 7 | emotional_stability/ 8 | 9 | ## Generated files that may contain secrets 10 | config/webhook_trigger.md 11 | 12 | # Logs 13 | logs 14 | *.log 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | lerna-debug.log* 19 | .pnpm-debug.log* 20 | 21 | # Diagnostic reports (https://nodejs.org/api/report.html) 22 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 23 | 24 | # Runtime data 25 | pids 26 | *.pid 27 | *.seed 28 | *.pid.lock 29 | 30 | # Directory for instrumented libs generated by jscoverage/JSCover 31 | lib-cov 32 | 33 | # Coverage directory used by tools like istanbul 34 | coverage 35 | *.lcov 36 | 37 | # nyc test coverage 38 | .nyc_output 39 | 40 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 41 | .grunt 42 | 43 | # Bower dependency directory (https://bower.io/) 44 | bower_components 45 | 46 | # node-waf configuration 47 | .lock-wscript 48 | 49 | # Compiled binary addons (https://nodejs.org/api/addons.html) 50 | build/Release 51 | 52 | # Dependency directories 53 | package-lock.json 54 | bun.lockb 55 | node_modules/ 56 | jspm_packages/ 57 | 58 | # Snowpack dependency directory (https://snowpack.dev/) 59 | web_modules/ 60 | 61 | # TypeScript cache 62 | *.tsbuildinfo 63 | 64 | # Optional npm cache directory 65 | .npm 66 | 67 | # Optional eslint cache 68 | .eslintcache 69 | 70 | # Optional stylelint cache 71 | .stylelintcache 72 | 73 | # Microbundle cache 74 | .rpt2_cache/ 75 | .rts2_cache_cjs/ 76 | .rts2_cache_es/ 77 | .rts2_cache_umd/ 78 | 79 | # Optional REPL history 80 | .node_repl_history 81 | 82 | # Output of 'npm pack' 83 | *.tgz 84 | 85 | # Yarn Integrity file 86 | .yarn-integrity 87 | 88 | # dotenv environment variable files 89 | .env 90 | .env.development.local 91 | .env.test.local 92 | .env.production.local 93 | .env.local 94 | 95 | # parcel-bundler cache (https://parceljs.org/) 96 | .cache 97 | .parcel-cache 98 | 99 | # Next.js build output 100 | .next 101 | out 102 | 103 | # Nuxt.js build / generate output 104 | .nuxt 105 | dist 106 | 107 | # Gatsby files 108 | .cache/ 109 | # Comment in the public line in if your project uses Gatsby and not Next.js 110 | # https://nextjs.org/blog/next-9-1#public-directory-support 111 | # public 112 | 113 | # vuepress build output 114 | .vuepress/dist 115 | 116 | # vuepress v2.x temp and cache directory 117 | .temp 118 | .cache 119 | 120 | # Docusaurus cache and generated files 121 | .docusaurus 122 | 123 | # Serverless directories 124 | .serverless/ 125 | 126 | # FuseBox cache 127 | .fusebox/ 128 | 129 | # DynamoDB Local files 130 | .dynamodb/ 131 | 132 | # TernJS port file 133 | .tern-port 134 | 135 | # Stores VSCode versions used for testing VSCode extensions 136 | .vscode-test 137 | 138 | # yarn v2 139 | .yarn/cache 140 | .yarn/unplugged 141 | .yarn/build-state.yml 142 | .yarn/install-state.gz 143 | .pnp.* 144 | 145 | # Misc 146 | .DS_Store 147 | .shopify 148 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | ## Prettier will ignore following files and directories 2 | payloads/ 3 | node_modules/ 4 | package-lock.json -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "singleQuote": false, 4 | "trailingComma": "es5", 5 | "semi": true, 6 | "bracketSpacing": true, 7 | "arrowParens": "always" 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Harshdeep Singh Hura 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shop Utils 2 | 3 | Generate related types, with some inconsistencies, in JSDocs and TypeScript types. Scripts auto generate so naming conventions could be way off. 4 | 5 | ## How To Use 6 | 7 | 1. Create the `.env` file based on `.env.example` 8 | - `TUNNEL_URL`: The tunnel URL, I prefer Cloudflare Tunnels. 9 | - `API_VERSION`: The API version. Example: `2025-04` 10 | 2. Run `bun run cloudflare` to start the tunnel and then `bun run start` to start the Express server. 11 | - We're exposing a simple Express server via Cloudflare Tunnels to accept all incoming webhooks. We do not care about verifying it since this is a test app and we're triggering it manually. 12 | 3. Run `bun run triggers` 13 | - This will create a new file called `config/webhook_trigger.md`. Copy just one line from it and pass an incorrect topic. This will force the CLI to give you a list of all current webhook topics. Pass it on to `scripts/webhookTopics.js` as an array. 14 | 4. Run `bun run triggers` again 15 | - This will create an updated `config/webhook_trigger.md` file. 16 | 5. Copy the contents of `config/webhook_trigger.md` and paste it in your Terminal. 17 | - This will take a while to get started. This queues all webhooks that we start recieving from Shopify. 18 | 6. Once the CLI is done, run `bun run create` to generate JSDocs and TypeScript types. 19 | 20 | ## Boilerplates 21 | 22 | - [Express.js x MongoDB](https://github.com/kinngh/shopify-node-express-mongodb-app): Starter template built on React.js, Express.js and MongoDB. 23 | - [Next.js x Prisma ORM](https://github.com/kinngh/shopify-nextjs-prisma-app): Starter template built on Next.js and Prisma ORM. 24 | - [Polaris Playground](https://github.com/kinngh/shopify-polaris-playground): A Next.js and Polaris installation that mimics Shopify's Admin UI so you can build your UI offline, and drag it to the Next.js repo in one go. 25 | 26 | ## Notes 27 | 28 | If you want JSDocs/TS types, head over [here](./types/) 29 | -------------------------------------------------------------------------------- /_developer/README.md: -------------------------------------------------------------------------------- 1 | # `_developer` 2 | 3 | - All generated webhook files go here, so the scripts/jsdocs_creator can actually run 4 | -------------------------------------------------------------------------------- /bun.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1, 3 | "workspaces": { 4 | "": { 5 | "name": "shop-utils", 6 | "dependencies": { 7 | "dotenv": "^16.4.7", 8 | "express": "^5.1.0", 9 | "npm-check-updates": "^17.1.16", 10 | "prettier": "^3.5.3", 11 | }, 12 | }, 13 | }, 14 | "packages": { 15 | "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], 16 | 17 | "body-parser": ["body-parser@2.2.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.0", "http-errors": "^2.0.0", "iconv-lite": "^0.6.3", "on-finished": "^2.4.1", "qs": "^6.14.0", "raw-body": "^3.0.0", "type-is": "^2.0.0" } }, "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg=="], 18 | 19 | "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], 20 | 21 | "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], 22 | 23 | "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], 24 | 25 | "content-disposition": ["content-disposition@1.0.0", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg=="], 26 | 27 | "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], 28 | 29 | "cookie": ["cookie@0.7.1", "", {}, "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w=="], 30 | 31 | "cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], 32 | 33 | "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], 34 | 35 | "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], 36 | 37 | "dotenv": ["dotenv@16.4.7", "", {}, "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ=="], 38 | 39 | "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], 40 | 41 | "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], 42 | 43 | "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], 44 | 45 | "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], 46 | 47 | "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], 48 | 49 | "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], 50 | 51 | "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], 52 | 53 | "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], 54 | 55 | "express": ["express@5.1.0", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.0", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA=="], 56 | 57 | "finalhandler": ["finalhandler@2.1.0", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q=="], 58 | 59 | "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], 60 | 61 | "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], 62 | 63 | "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], 64 | 65 | "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], 66 | 67 | "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], 68 | 69 | "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], 70 | 71 | "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], 72 | 73 | "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], 74 | 75 | "http-errors": ["http-errors@2.0.0", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="], 76 | 77 | "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], 78 | 79 | "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], 80 | 81 | "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], 82 | 83 | "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], 84 | 85 | "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], 86 | 87 | "media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="], 88 | 89 | "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], 90 | 91 | "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], 92 | 93 | "mime-types": ["mime-types@3.0.1", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA=="], 94 | 95 | "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], 96 | 97 | "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], 98 | 99 | "npm-check-updates": ["npm-check-updates@17.1.16", "", { "bin": { "npm-check-updates": "build/cli.js", "ncu": "build/cli.js" } }, "sha512-9nohkfjLRzLfsLVGbO34eXBejvrOOTuw5tvNammH73KEFG5XlFoi3G2TgjTExHtnrKWCbZ+mTT+dbNeSjASIPw=="], 100 | 101 | "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], 102 | 103 | "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], 104 | 105 | "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], 106 | 107 | "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], 108 | 109 | "path-to-regexp": ["path-to-regexp@8.2.0", "", {}, "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ=="], 110 | 111 | "prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="], 112 | 113 | "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], 114 | 115 | "qs": ["qs@6.14.0", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w=="], 116 | 117 | "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], 118 | 119 | "raw-body": ["raw-body@3.0.0", "", { "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", "iconv-lite": "0.6.3", "unpipe": "1.0.0" } }, "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g=="], 120 | 121 | "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], 122 | 123 | "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], 124 | 125 | "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], 126 | 127 | "send": ["send@1.2.0", "", { "dependencies": { "debug": "^4.3.5", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.0", "mime-types": "^3.0.1", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.1" } }, "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw=="], 128 | 129 | "serve-static": ["serve-static@2.2.0", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ=="], 130 | 131 | "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], 132 | 133 | "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], 134 | 135 | "side-channel-list": ["side-channel-list@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" } }, "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA=="], 136 | 137 | "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], 138 | 139 | "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], 140 | 141 | "statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="], 142 | 143 | "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], 144 | 145 | "type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="], 146 | 147 | "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], 148 | 149 | "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], 150 | 151 | "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shop-utils", 3 | "version": "2024.07.15", 4 | "description": "Generate mostly correct types for webhooks in JSDocs and TypeScript types.", 5 | "main": "index.js", 6 | "scripts": { 7 | "pretty": "prettier --write ./", 8 | "update": "ncu -u", 9 | "cloudflare": "cloudflared tunnel --url localhost:3000", 10 | "------> Run In Index <------": "", 11 | "start": "bun server/index.js", 12 | "triggers": "bun scripts/webhook_trigger_creator.js", 13 | "create": "bun scripts/jsdocs_creator.js; bun scripts/typescript_types_creator.js" 14 | }, 15 | "dependencies": { 16 | "dotenv": "^16.4.7", 17 | "express": "^5.1.0", 18 | "npm-check-updates": "^17.1.16", 19 | "prettier": "^3.5.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /scripts/jsdocs_creator.js: -------------------------------------------------------------------------------- 1 | import fs from "fs/promises"; 2 | import path from "path"; 3 | import "dotenv/config"; 4 | 5 | const apiVersion = process.env.API_VERSION; 6 | 7 | const dirPath = path.resolve(process.cwd(), "_developer"); 8 | const outputPath = path.resolve( 9 | process.cwd(), 10 | `types/${apiVersion}/webhooks.js` 11 | ); 12 | 13 | let typedefs = {}; 14 | 15 | const generateJSDocForObject = (object, parent = "") => { 16 | let docComment = `/** 17 | * @typedef {Object} ${parent} 18 | `; 19 | for (const key in object) { 20 | let value = object[key]; 21 | let type = Array.isArray(value) ? "Array" : typeof value; 22 | 23 | if (value === null) { 24 | type = "null|string"; 25 | docComment += ` * @property {${type}} ${key}\n`; 26 | } else if (type === "object") { 27 | const nestedTypeName = `${parent}_${key}`; 28 | docComment += ` * @property {${nestedTypeName}} ${key}\n`; 29 | typedefs[nestedTypeName] = generateJSDocForObject(value, nestedTypeName); 30 | } else if (type === "Array" && value.length > 0) { 31 | const arrayType = 32 | typeof value[0] === "object" ? "Object" : typeof value[0]; 33 | 34 | if (arrayType === "Object") { 35 | const nestedTypeName = `${parent}_${key}`; 36 | docComment += ` * @property {Array<${nestedTypeName}>} ${key}\n`; 37 | typedefs[nestedTypeName] = generateJSDocForObject( 38 | value[0], 39 | nestedTypeName 40 | ); 41 | } else { 42 | docComment += ` * @property {Array<${arrayType}>} ${key}\n`; 43 | } 44 | } else { 45 | docComment += ` * @property {${type}} ${key}\n`; 46 | } 47 | } 48 | 49 | docComment += " */\n"; 50 | return docComment; 51 | }; 52 | 53 | const convertToJSDoc = async () => { 54 | try { 55 | await fs.mkdir(path.dirname(outputPath), { recursive: true }); 56 | 57 | const files = await fs.readdir(dirPath); 58 | const jsonFiles = files.filter((file) => file.endsWith(".json")); 59 | 60 | let jsDocs = ""; 61 | 62 | for (const file of jsonFiles) { 63 | const filePath = path.join(dirPath, file); 64 | let data = await fs.readFile(filePath, "utf-8"); 65 | 66 | // Find the first occurrence of an opening curly brace 67 | const firstBraceIndex = data.indexOf("{"); 68 | 69 | // If there is an opening brace, ignore everything before it 70 | if (firstBraceIndex !== -1) { 71 | data = data.substring(firstBraceIndex); 72 | } 73 | 74 | // Parse the remaining string as JSON 75 | const jsonData = JSON.parse(data); 76 | 77 | const title = file.replace(".json", ""); // Using file name as title 78 | typedefs[title] = generateJSDocForObject(jsonData, title); 79 | } 80 | 81 | for (const key in typedefs) { 82 | jsDocs += typedefs[key]; 83 | } 84 | 85 | await fs.writeFile(outputPath, `${jsDocs}\n\nexport {};`, "utf-8"); 86 | } catch (error) { 87 | console.error(`Error: ${error}`); 88 | } 89 | }; 90 | 91 | convertToJSDoc(); 92 | -------------------------------------------------------------------------------- /scripts/typescript_types_creator.js: -------------------------------------------------------------------------------- 1 | import fs from "fs/promises"; 2 | import path from "path"; 3 | import "dotenv/config"; 4 | 5 | const apiVersion = process.env.API_VERSION; 6 | 7 | const dirPath = path.resolve(process.cwd(), "_developer"); 8 | const outputPath = path.resolve( 9 | process.cwd(), 10 | `types/${apiVersion}/webhooks.ts` 11 | ); 12 | 13 | const determineType = (value, parentName) => { 14 | if (Array.isArray(value)) { 15 | if (value.length === 0) { 16 | return "any[]"; 17 | } 18 | const elementType = determineType(value[0], parentName); 19 | return `${elementType}[]`; 20 | } else if (value === null) { 21 | return "null | string"; 22 | } else if (typeof value === "object" && value !== null) { 23 | return generateTypeScriptTypesForObject(value, false, parentName); 24 | } else { 25 | return typeof value; 26 | } 27 | }; 28 | 29 | const generateTypeScriptTypesForObject = ( 30 | object, 31 | exportType, 32 | parentName = "" 33 | ) => { 34 | let tsType = ""; 35 | let innerContent = ""; 36 | 37 | for (const key in object) { 38 | const value = object[key]; 39 | const type = determineType(value, `${parentName}_${key}`); 40 | innerContent += ` ${key}: ${type};\n`; 41 | } 42 | 43 | if (exportType) { 44 | tsType = `export interface ${parentName} {\n${innerContent}}\n`; 45 | } else { 46 | tsType = `{${innerContent}}`; 47 | } 48 | 49 | return tsType; 50 | }; 51 | 52 | const convertToJsonTypes = async () => { 53 | try { 54 | await fs.mkdir(path.dirname(outputPath), { recursive: true }); 55 | 56 | const files = await fs.readdir(dirPath); 57 | const jsonFiles = files.filter((file) => file.endsWith(".json")); 58 | 59 | let tsTypes = ""; 60 | 61 | for (const file of jsonFiles) { 62 | const filePath = path.join(dirPath, file); 63 | let data = await fs.readFile(filePath, "utf-8"); 64 | 65 | const firstBraceIndex = data.indexOf("{"); 66 | 67 | if (firstBraceIndex !== -1) { 68 | data = data.substring(firstBraceIndex); 69 | } 70 | 71 | const jsonData = JSON.parse(data); 72 | 73 | const title = file.replace(".json", ""); 74 | const tsType = generateTypeScriptTypesForObject(jsonData, true, title); 75 | tsTypes += `// Types for ${title}\n${tsType}\n`; 76 | } 77 | 78 | await fs.writeFile(outputPath, tsTypes, "utf-8"); 79 | } catch (error) { 80 | console.error(`Error: ${error}`); 81 | } 82 | }; 83 | 84 | convertToJsonTypes(); 85 | -------------------------------------------------------------------------------- /scripts/webhookTopics.js: -------------------------------------------------------------------------------- 1 | const webhookTopics = [ 2 | "app/scopes_update", 3 | "app/uninstalled", 4 | "app_purchases_one_time/update", 5 | "app_subscriptions/approaching_capped_amount", 6 | "app_subscriptions/update", 7 | "audit_events/admin_api_activity", 8 | "bulk_operations/finish", 9 | "carts/create", 10 | "carts/update", 11 | "channels/delete", 12 | "checkout_and_accounts_configurations/update", 13 | "checkouts/create", 14 | "checkouts/delete", 15 | "checkouts/update", 16 | "collection_listings/add", 17 | "collection_listings/remove", 18 | "collection_listings/update", 19 | "collection_publications/create", 20 | "collection_publications/delete", 21 | "collection_publications/update", 22 | "collections/create", 23 | "collections/delete", 24 | "collections/update", 25 | "companies/create", 26 | "companies/delete", 27 | "companies/update", 28 | "company_contact_roles/assign", 29 | "company_contact_roles/revoke", 30 | "company_contacts/create", 31 | "company_contacts/delete", 32 | "company_contacts/update", 33 | "company_locations/create", 34 | "company_locations/delete", 35 | "company_locations/update", 36 | "customer.joined_segment", 37 | "customer.left_segment", 38 | "customer.tags_added", 39 | "customer.tags_removed", 40 | "customer_account_settings/update", 41 | "customer_groups/create", 42 | "customer_groups/delete", 43 | "customer_groups/update", 44 | "customer_payment_methods/create", 45 | "customer_payment_methods/revoke", 46 | "customer_payment_methods/update", 47 | "customers/create", 48 | "customers/data_request", 49 | "customers/delete", 50 | "customers/disable", 51 | "customers/enable", 52 | "customers/merge", 53 | "customers/purchasing_summary", 54 | "customers/redact", 55 | "customers/update", 56 | "customers_email_marketing_consent/update", 57 | "customers_marketing_consent/update", 58 | "delivery_promise_settings/update", 59 | "discounts/create", 60 | "discounts/delete", 61 | "discounts/redeemcode_added", 62 | "discounts/redeemcode_removed", 63 | "discounts/update", 64 | "disputes/create", 65 | "disputes/update", 66 | "domains/create", 67 | "domains/destroy", 68 | "domains/update", 69 | "draft_orders/create", 70 | "draft_orders/delete", 71 | "draft_orders/update", 72 | "finance_app_staff_member/delete", 73 | "finance_app_staff_member/grant", 74 | "finance_app_staff_member/revoke", 75 | "finance_app_staff_member/update", 76 | "finance_kyc_information/update", 77 | "fulfillment_events/create", 78 | "fulfillment_events/delete", 79 | "fulfillment_holds/added", 80 | "fulfillment_holds/released", 81 | "fulfillment_orders/cancellation_request_accepted", 82 | "fulfillment_orders/cancellation_request_rejected", 83 | "fulfillment_orders/cancellation_request_submitted", 84 | "fulfillment_orders/cancelled", 85 | "fulfillment_orders/fulfillment_request_accepted", 86 | "fulfillment_orders/fulfillment_request_rejected", 87 | "fulfillment_orders/fulfillment_request_submitted", 88 | "fulfillment_orders/fulfillment_service_failed_to_complete", 89 | "fulfillment_orders/hold_released", 90 | "fulfillment_orders/line_items_prepared_for_local_delivery", 91 | "fulfillment_orders/line_items_prepared_for_pickup", 92 | "fulfillment_orders/merged", 93 | "fulfillment_orders/moved", 94 | "fulfillment_orders/order_routing_complete", 95 | "fulfillment_orders/placed_on_hold", 96 | "fulfillment_orders/rescheduled", 97 | "fulfillment_orders/scheduled_fulfillment_order_ready", 98 | "fulfillment_orders/split", 99 | "fulfillments/create", 100 | "fulfillments/update", 101 | "inventory_items/create", 102 | "inventory_items/delete", 103 | "inventory_items/update", 104 | "inventory_levels/connect", 105 | "inventory_levels/disconnect", 106 | "inventory_levels/update", 107 | "locales/create", 108 | "locales/update", 109 | "locations/activate", 110 | "locations/create", 111 | "locations/deactivate", 112 | "locations/delete", 113 | "locations/update", 114 | "markets/create", 115 | "markets/delete", 116 | "markets/update", 117 | "markets_backup_region/update", 118 | "metafield_definitions/create", 119 | "metafield_definitions/delete", 120 | "metafield_definitions/update", 121 | "metaobjects/create", 122 | "metaobjects/delete", 123 | "metaobjects/update", 124 | "order_transactions/create", 125 | "orders/cancelled", 126 | "orders/create", 127 | "orders/delete", 128 | "orders/edited", 129 | "orders/fulfilled", 130 | "orders/paid", 131 | "orders/partially_fulfilled", 132 | "orders/risk_assessment_changed", 133 | "orders/shopify_protect_eligibility_changed", 134 | "orders/updated", 135 | "payment_schedules/due", 136 | "payment_terms/create", 137 | "payment_terms/delete", 138 | "payment_terms/update", 139 | "product_feeds/create", 140 | "product_feeds/full_sync", 141 | "product_feeds/full_sync_finish", 142 | "product_feeds/incremental_sync", 143 | "product_feeds/update", 144 | "product_listings/add", 145 | "product_listings/remove", 146 | "product_listings/update", 147 | "product_publications/create", 148 | "product_publications/delete", 149 | "product_publications/update", 150 | "products/create", 151 | "products/delete", 152 | "products/update", 153 | "profiles/create", 154 | "profiles/delete", 155 | "profiles/update", 156 | "refunds/create", 157 | "returns/approve", 158 | "returns/cancel", 159 | "returns/close", 160 | "returns/decline", 161 | "returns/reopen", 162 | "returns/request", 163 | "returns/update", 164 | "reverse_deliveries/attach_deliverable", 165 | "reverse_fulfillment_orders/dispose", 166 | "scheduled_product_listings/add", 167 | "scheduled_product_listings/remove", 168 | "scheduled_product_listings/update", 169 | "segments/create", 170 | "segments/delete", 171 | "segments/update", 172 | "selling_plan_groups/create", 173 | "selling_plan_groups/delete", 174 | "selling_plan_groups/update", 175 | "shipping_addresses/create", 176 | "shipping_addresses/update", 177 | "shop/redact", 178 | "shop/update", 179 | "subscription_billing_attempts/challenged", 180 | "subscription_billing_attempts/failure", 181 | "subscription_billing_attempts/success", 182 | "subscription_billing_cycle_edits/create", 183 | "subscription_billing_cycle_edits/delete", 184 | "subscription_billing_cycle_edits/update", 185 | "subscription_billing_cycles/skip", 186 | "subscription_billing_cycles/unskip", 187 | "subscription_contracts/activate", 188 | "subscription_contracts/cancel", 189 | "subscription_contracts/create", 190 | "subscription_contracts/expire", 191 | "subscription_contracts/fail", 192 | "subscription_contracts/pause", 193 | "subscription_contracts/update", 194 | "tax_services/create", 195 | "tax_services/update", 196 | "tender_transactions/create", 197 | "themes/create", 198 | "themes/delete", 199 | "themes/publish", 200 | "themes/update", 201 | "variants/in_stock", 202 | "variants/out_of_stock", 203 | ]; 204 | 205 | export default webhookTopics; 206 | -------------------------------------------------------------------------------- /scripts/webhook_trigger_creator.js: -------------------------------------------------------------------------------- 1 | import "dotenv/config"; 2 | import fs from "fs"; 3 | import path from "path"; 4 | import webhookTopics from "./webhookTopics.js"; 5 | 6 | const tunnelUrl = process.env.TUNNEL_URL; 7 | const apiVersion = process.env.API_VERSION; 8 | const clientSecret = "asdasdasd"; 9 | 10 | const commandLines = webhookTopics 11 | .map((topic) => { 12 | return `shopify app webhook trigger --topic=${topic} --api-version=${apiVersion} --client-secret=${clientSecret} --delivery-method=http --address=${tunnelUrl}/webhooks/${topic.toUpperCase().replaceAll("/", "_").replaceAll(".", "_")}`; 13 | }) 14 | .join("\n"); 15 | 16 | const dirPath = path.dirname("config/webhook_trigger.md"); 17 | 18 | fs.mkdir(dirPath, { recursive: true }, (err) => { 19 | if (err) { 20 | console.error("Error creating directory", err); 21 | return; 22 | } 23 | 24 | fs.writeFile( 25 | "config/webhook_trigger.md", 26 | `\`\`\`bash\n${commandLines}\n\`\`\``, 27 | (err) => { 28 | if (err) { 29 | console.error("Error writing to file", err); 30 | } else { 31 | console.log("Commands written to config/webhook_trigger.md"); 32 | } 33 | } 34 | ); 35 | }); 36 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | import Express from "express"; 2 | import fs from "fs"; 3 | 4 | const app = Express(); 5 | 6 | app.use(Express.json()); 7 | 8 | app.post("/webhooks/:topic", async (req, res) => { 9 | try { 10 | const topic = req.params.topic; 11 | fs.writeFile( 12 | `${process.cwd()}/_developer/${topic}.json`, 13 | JSON.stringify(req.body, null, 2), 14 | (err) => { 15 | if (err) { 16 | console.log("Error happened writing to file", topic); 17 | return; 18 | } 19 | console.log(`File ${topic}.json written successfully`); 20 | } 21 | ); 22 | 23 | return res.status(200).send({ message: "ok" }); 24 | } catch (e) { 25 | console.error(`---> ERROR: ${req.params.topic}`); 26 | return res.status(500).send({ error: true }); 27 | } 28 | }); 29 | 30 | app.listen(3000, () => { 31 | console.log("Express running on port 3000"); 32 | }); 33 | -------------------------------------------------------------------------------- /shopify.app.toml: -------------------------------------------------------------------------------- 1 | # Even though it has no config, it's still necessary to have it in here. 2 | # Or the CLI is going to cry about it. -------------------------------------------------------------------------------- /types/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kinngh/shop-utils/02aa414ecd07fd57e583031547fe270c5e7c728f/types/.gitkeep -------------------------------------------------------------------------------- /types/2024-07/webhooks.ts: -------------------------------------------------------------------------------- 1 | // Types for RETURNS_APPROVE 2 | export interface RETURNS_APPROVE { 3 | id: number; 4 | admin_graphql_api_id: string; 5 | status: string; 6 | order: { id: number; admin_graphql_api_id: string }; 7 | total_return_line_items: number; 8 | name: null | string; 9 | return_line_items: { 10 | id: number; 11 | admin_graphql_api_id: string; 12 | fulfillment_line_item: { 13 | id: number; 14 | admin_graphql_api_id: string; 15 | line_item: { id: number; admin_graphql_api_id: string }; 16 | }; 17 | quantity: number; 18 | return_reason: string; 19 | return_reason_note: string; 20 | customer_note: null | string; 21 | restocking_fee: { 22 | id: number; 23 | admin_graphql_api_id: string; 24 | price: { 25 | shop_money: { amount: string; currency_code: string }; 26 | presentment_money: { amount: string; currency_code: string }; 27 | }; 28 | }; 29 | }[]; 30 | return_shipping_fees: { 31 | id: number; 32 | admin_graphql_api_id: string; 33 | price: { 34 | shop_money: { amount: string; currency_code: string }; 35 | presentment_money: { amount: string; currency_code: string }; 36 | }; 37 | }[]; 38 | exchange_line_items: { 39 | id: number; 40 | admin_graphql_api_id: string; 41 | line_item: null | string; 42 | }[]; 43 | total_exchange_line_items: number; 44 | } 45 | 46 | // Types for FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED 47 | export interface FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED { 48 | fulfillment_order: { id: string; status: string; request_status: string }; 49 | message: string; 50 | } 51 | 52 | // Types for METAOBJECTS_DELETE 53 | export interface METAOBJECTS_DELETE { 54 | id: string; 55 | type: string; 56 | handle: string; 57 | created_by_app_id: string; 58 | } 59 | 60 | // Types for CUSTOMERS_MERGE 61 | export interface CUSTOMERS_MERGE { 62 | admin_graphql_api_customer_kept_id: string; 63 | admin_graphql_api_customer_deleted_id: string; 64 | admin_graphql_api_job_id: null | string; 65 | status: string; 66 | errors: { customer_ids: number[]; field: string; message: string }[]; 67 | } 68 | 69 | // Types for SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED 70 | export interface SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED { 71 | id: null | string; 72 | admin_graphql_api_id: null | string; 73 | idempotency_key: string; 74 | order_id: number; 75 | admin_graphql_api_order_id: string; 76 | subscription_contract_id: number; 77 | admin_graphql_api_subscription_contract_id: string; 78 | ready: boolean; 79 | error_message: null | string; 80 | error_code: null | string; 81 | } 82 | 83 | // Types for FULFILLMENT_ORDERS_HOLD_RELEASED 84 | export interface FULFILLMENT_ORDERS_HOLD_RELEASED { 85 | fulfillment_order: { id: string; status: string }; 86 | } 87 | 88 | // Types for PAYMENT_TERMS_UPDATE 89 | export interface PAYMENT_TERMS_UPDATE { 90 | id: number; 91 | payment_terms_name: string; 92 | payment_terms_type: string; 93 | due_in_days: number; 94 | created_at: string; 95 | updated_at: string; 96 | payment_schedules: { 97 | id: number; 98 | payment_terms_id: number; 99 | amount: string; 100 | currency: string; 101 | issued_at: string; 102 | due_at: string; 103 | completed_at: string; 104 | created_at: string; 105 | updated_at: string; 106 | admin_graphql_api_id: string; 107 | }[]; 108 | admin_graphql_api_id: string; 109 | } 110 | 111 | // Types for FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE 112 | export interface FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE { 113 | fulfillment_order: { id: string; status: string }; 114 | message: string; 115 | } 116 | 117 | // Types for INVENTORY_LEVELS_DISCONNECT 118 | export interface INVENTORY_LEVELS_DISCONNECT { 119 | inventory_item_id: number; 120 | location_id: number; 121 | } 122 | 123 | // Types for CHECKOUTS_CREATE 124 | export interface CHECKOUTS_CREATE { 125 | id: number; 126 | token: string; 127 | cart_token: string; 128 | email: string; 129 | gateway: null | string; 130 | buyer_accepts_marketing: boolean; 131 | created_at: string; 132 | updated_at: string; 133 | landing_site: null | string; 134 | note: null | string; 135 | note_attributes: any[]; 136 | referring_site: null | string; 137 | shipping_lines: any[]; 138 | taxes_included: boolean; 139 | total_weight: number; 140 | currency: string; 141 | completed_at: null | string; 142 | closed_at: null | string; 143 | user_id: null | string; 144 | location_id: null | string; 145 | source_identifier: null | string; 146 | source_url: null | string; 147 | device_id: null | string; 148 | phone: null | string; 149 | customer_locale: null | string; 150 | line_items: { 151 | applied_discounts: any[]; 152 | discount_allocations: any[]; 153 | key: string; 154 | destination_location_id: number; 155 | fulfillment_service: string; 156 | gift_card: boolean; 157 | grams: number; 158 | origin_location_id: number; 159 | presentment_title: string; 160 | presentment_variant_title: string; 161 | product_id: number; 162 | properties: null | string; 163 | quantity: number; 164 | requires_shipping: boolean; 165 | sku: string; 166 | tax_lines: { 167 | price: string; 168 | position: number; 169 | rate: number; 170 | title: string; 171 | source: string; 172 | zone: string; 173 | jurisdiction_id: null | string; 174 | jurisdiction_type: null | string; 175 | jurisdiction_source: null | string; 176 | reporting_taxable_amount: null | string; 177 | reporting_non_taxable_amount: null | string; 178 | reporting_exempt_amount: null | string; 179 | reporting_jurisdiction_name: null | string; 180 | reporting_jurisdiction_type: null | string; 181 | reporting_jurisdiction_code: null | string; 182 | tax_api_client_id: null | string; 183 | tax_calculation_price: string; 184 | tax_registration_id: null | string; 185 | compare_at: number; 186 | channel_liable: boolean; 187 | }[]; 188 | taxable: boolean; 189 | title: string; 190 | variant_id: number; 191 | variant_title: string; 192 | variant_price: string; 193 | vendor: string; 194 | user_id: null | string; 195 | unit_price_measurement: { 196 | measured_type: null | string; 197 | quantity_value: null | string; 198 | quantity_unit: null | string; 199 | reference_value: null | string; 200 | reference_unit: null | string; 201 | }; 202 | rank: null | string; 203 | compare_at_price: null | string; 204 | line_price: string; 205 | price: string; 206 | }[]; 207 | name: string; 208 | source: null | string; 209 | abandoned_checkout_url: string; 210 | discount_codes: any[]; 211 | tax_lines: { 212 | price: string; 213 | rate: number; 214 | title: string; 215 | channel_liable: boolean; 216 | }[]; 217 | source_name: string; 218 | presentment_currency: string; 219 | buyer_accepts_sms_marketing: boolean; 220 | sms_marketing_phone: null | string; 221 | total_discounts: string; 222 | total_line_items_price: string; 223 | total_price: string; 224 | total_tax: string; 225 | subtotal_price: string; 226 | total_duties: null | string; 227 | reservation_token: null | string; 228 | billing_address: { 229 | first_name: string; 230 | address1: string; 231 | phone: string; 232 | city: string; 233 | zip: string; 234 | province: string; 235 | country: string; 236 | last_name: string; 237 | address2: null | string; 238 | company: string; 239 | latitude: null | string; 240 | longitude: null | string; 241 | name: string; 242 | country_code: string; 243 | province_code: string; 244 | }; 245 | shipping_address: { 246 | first_name: string; 247 | address1: string; 248 | phone: string; 249 | city: string; 250 | zip: string; 251 | province: string; 252 | country: string; 253 | last_name: string; 254 | address2: null | string; 255 | company: string; 256 | latitude: null | string; 257 | longitude: null | string; 258 | name: string; 259 | country_code: string; 260 | province_code: string; 261 | }; 262 | customer: { 263 | id: number; 264 | email: string; 265 | created_at: null | string; 266 | updated_at: null | string; 267 | first_name: string; 268 | last_name: string; 269 | orders_count: number; 270 | state: string; 271 | total_spent: string; 272 | last_order_id: null | string; 273 | note: null | string; 274 | verified_email: boolean; 275 | multipass_identifier: null | string; 276 | tax_exempt: boolean; 277 | tags: string; 278 | last_order_name: null | string; 279 | currency: string; 280 | phone: null | string; 281 | tax_exemptions: any[]; 282 | email_marketing_consent: { 283 | state: string; 284 | opt_in_level: null | string; 285 | consent_updated_at: null | string; 286 | }; 287 | sms_marketing_consent: null | string; 288 | admin_graphql_api_id: string; 289 | default_address: { 290 | id: null | string; 291 | customer_id: number; 292 | first_name: null | string; 293 | last_name: null | string; 294 | company: null | string; 295 | address1: string; 296 | address2: null | string; 297 | city: string; 298 | province: string; 299 | country: string; 300 | zip: string; 301 | phone: string; 302 | name: string; 303 | province_code: string; 304 | country_code: string; 305 | country_name: string; 306 | default: boolean; 307 | }; 308 | }; 309 | } 310 | 311 | // Types for ORDERS_RISK_ASSESSMENT_CHANGED 312 | export interface ORDERS_RISK_ASSESSMENT_CHANGED { 313 | provider_id: null | string; 314 | provider_title: null | string; 315 | risk_level: string; 316 | created_at: null | string; 317 | } 318 | 319 | // Types for RETURNS_DECLINE 320 | export interface RETURNS_DECLINE { 321 | id: number; 322 | admin_graphql_api_id: string; 323 | status: string; 324 | decline: { reason: string; note: string }; 325 | } 326 | 327 | // Types for PRODUCT_FEEDS_FULL_SYNC 328 | export interface PRODUCT_FEEDS_FULL_SYNC { 329 | metadata: { 330 | action: string; 331 | type: string; 332 | resource: string; 333 | fullSyncId: string; 334 | truncatedFields: any[]; 335 | occurred_at: string; 336 | }; 337 | productFeed: { 338 | id: string; 339 | shop_id: string; 340 | country: string; 341 | language: string; 342 | }; 343 | product: { 344 | id: string; 345 | title: string; 346 | description: string; 347 | onlineStoreUrl: string; 348 | createdAt: string; 349 | updatedAt: string; 350 | isPublished: boolean; 351 | publishedAt: string; 352 | productType: string; 353 | vendor: string; 354 | handle: string; 355 | images: { 356 | edges: { 357 | node: { id: string; url: string; height: number; width: number }; 358 | }[]; 359 | }; 360 | options: { name: string; values: string[] }[]; 361 | seo: { title: string; description: string }; 362 | tags: string[]; 363 | variants: { 364 | edges: { 365 | node: { 366 | id: string; 367 | title: string; 368 | price: { amount: string; currencyCode: string }; 369 | compareAtPrice: null | string; 370 | sku: string; 371 | barcode: null | string; 372 | quantityAvailable: number; 373 | availableForSale: boolean; 374 | weight: number; 375 | weightUnit: string; 376 | requireShipping: boolean; 377 | inventoryPolicy: string; 378 | createdAt: string; 379 | updatedAt: string; 380 | image: { id: string; url: string; height: number; width: number }; 381 | selectedOptions: { name: string; value: string }[]; 382 | }; 383 | }[]; 384 | }; 385 | }; 386 | } 387 | 388 | // Types for THEMES_CREATE 389 | export interface THEMES_CREATE { 390 | id: number; 391 | name: string; 392 | created_at: string; 393 | updated_at: string; 394 | role: string; 395 | theme_store_id: number; 396 | previewable: boolean; 397 | processing: boolean; 398 | admin_graphql_api_id: string; 399 | } 400 | 401 | // Types for ORDERS_PAID 402 | export interface ORDERS_PAID { 403 | id: number; 404 | admin_graphql_api_id: string; 405 | app_id: null | string; 406 | browser_ip: null | string; 407 | buyer_accepts_marketing: boolean; 408 | cancel_reason: string; 409 | cancelled_at: string; 410 | cart_token: null | string; 411 | checkout_id: null | string; 412 | checkout_token: null | string; 413 | client_details: null | string; 414 | closed_at: null | string; 415 | confirmation_number: null | string; 416 | confirmed: boolean; 417 | contact_email: string; 418 | created_at: string; 419 | currency: string; 420 | current_subtotal_price: string; 421 | current_subtotal_price_set: { 422 | shop_money: { amount: string; currency_code: string }; 423 | presentment_money: { amount: string; currency_code: string }; 424 | }; 425 | current_total_additional_fees_set: null | string; 426 | current_total_discounts: string; 427 | current_total_discounts_set: { 428 | shop_money: { amount: string; currency_code: string }; 429 | presentment_money: { amount: string; currency_code: string }; 430 | }; 431 | current_total_duties_set: null | string; 432 | current_total_price: string; 433 | current_total_price_set: { 434 | shop_money: { amount: string; currency_code: string }; 435 | presentment_money: { amount: string; currency_code: string }; 436 | }; 437 | current_total_tax: string; 438 | current_total_tax_set: { 439 | shop_money: { amount: string; currency_code: string }; 440 | presentment_money: { amount: string; currency_code: string }; 441 | }; 442 | customer_locale: string; 443 | device_id: null | string; 444 | discount_codes: any[]; 445 | email: string; 446 | estimated_taxes: boolean; 447 | financial_status: string; 448 | fulfillment_status: string; 449 | landing_site: null | string; 450 | landing_site_ref: null | string; 451 | location_id: null | string; 452 | merchant_of_record_app_id: null | string; 453 | name: string; 454 | note: null | string; 455 | note_attributes: any[]; 456 | number: number; 457 | order_number: number; 458 | order_status_url: string; 459 | original_total_additional_fees_set: null | string; 460 | original_total_duties_set: null | string; 461 | payment_gateway_names: string[]; 462 | phone: null | string; 463 | po_number: null | string; 464 | presentment_currency: string; 465 | processed_at: string; 466 | reference: null | string; 467 | referring_site: null | string; 468 | source_identifier: null | string; 469 | source_name: string; 470 | source_url: null | string; 471 | subtotal_price: string; 472 | subtotal_price_set: { 473 | shop_money: { amount: string; currency_code: string }; 474 | presentment_money: { amount: string; currency_code: string }; 475 | }; 476 | tags: string; 477 | tax_exempt: boolean; 478 | tax_lines: any[]; 479 | taxes_included: boolean; 480 | test: boolean; 481 | token: string; 482 | total_discounts: string; 483 | total_discounts_set: { 484 | shop_money: { amount: string; currency_code: string }; 485 | presentment_money: { amount: string; currency_code: string }; 486 | }; 487 | total_line_items_price: string; 488 | total_line_items_price_set: { 489 | shop_money: { amount: string; currency_code: string }; 490 | presentment_money: { amount: string; currency_code: string }; 491 | }; 492 | total_outstanding: string; 493 | total_price: string; 494 | total_price_set: { 495 | shop_money: { amount: string; currency_code: string }; 496 | presentment_money: { amount: string; currency_code: string }; 497 | }; 498 | total_shipping_price_set: { 499 | shop_money: { amount: string; currency_code: string }; 500 | presentment_money: { amount: string; currency_code: string }; 501 | }; 502 | total_tax: string; 503 | total_tax_set: { 504 | shop_money: { amount: string; currency_code: string }; 505 | presentment_money: { amount: string; currency_code: string }; 506 | }; 507 | total_tip_received: string; 508 | total_weight: number; 509 | updated_at: string; 510 | user_id: null | string; 511 | billing_address: { 512 | first_name: string; 513 | address1: string; 514 | phone: string; 515 | city: string; 516 | zip: string; 517 | province: string; 518 | country: string; 519 | last_name: string; 520 | address2: null | string; 521 | company: string; 522 | latitude: null | string; 523 | longitude: null | string; 524 | name: string; 525 | country_code: string; 526 | province_code: string; 527 | }; 528 | customer: { 529 | id: number; 530 | email: string; 531 | created_at: null | string; 532 | updated_at: null | string; 533 | first_name: string; 534 | last_name: string; 535 | state: string; 536 | note: null | string; 537 | verified_email: boolean; 538 | multipass_identifier: null | string; 539 | tax_exempt: boolean; 540 | phone: null | string; 541 | email_marketing_consent: { 542 | state: string; 543 | opt_in_level: null | string; 544 | consent_updated_at: null | string; 545 | }; 546 | sms_marketing_consent: null | string; 547 | tags: string; 548 | currency: string; 549 | tax_exemptions: any[]; 550 | admin_graphql_api_id: string; 551 | default_address: { 552 | id: number; 553 | customer_id: number; 554 | first_name: null | string; 555 | last_name: null | string; 556 | company: null | string; 557 | address1: string; 558 | address2: null | string; 559 | city: string; 560 | province: string; 561 | country: string; 562 | zip: string; 563 | phone: string; 564 | name: string; 565 | province_code: string; 566 | country_code: string; 567 | country_name: string; 568 | default: boolean; 569 | }; 570 | }; 571 | discount_applications: any[]; 572 | fulfillments: any[]; 573 | line_items: { 574 | id: number; 575 | admin_graphql_api_id: string; 576 | attributed_staffs: { id: string; quantity: number }[]; 577 | current_quantity: number; 578 | fulfillable_quantity: number; 579 | fulfillment_service: string; 580 | fulfillment_status: null | string; 581 | gift_card: boolean; 582 | grams: number; 583 | name: string; 584 | price: string; 585 | price_set: { 586 | shop_money: { amount: string; currency_code: string }; 587 | presentment_money: { amount: string; currency_code: string }; 588 | }; 589 | product_exists: boolean; 590 | product_id: number; 591 | properties: any[]; 592 | quantity: number; 593 | requires_shipping: boolean; 594 | sku: string; 595 | taxable: boolean; 596 | title: string; 597 | total_discount: string; 598 | total_discount_set: { 599 | shop_money: { amount: string; currency_code: string }; 600 | presentment_money: { amount: string; currency_code: string }; 601 | }; 602 | variant_id: number; 603 | variant_inventory_management: string; 604 | variant_title: null | string; 605 | vendor: null | string; 606 | tax_lines: any[]; 607 | duties: any[]; 608 | discount_allocations: any[]; 609 | }[]; 610 | payment_terms: null | string; 611 | refunds: any[]; 612 | shipping_address: { 613 | first_name: string; 614 | address1: string; 615 | phone: string; 616 | city: string; 617 | zip: string; 618 | province: string; 619 | country: string; 620 | last_name: string; 621 | address2: null | string; 622 | company: string; 623 | latitude: null | string; 624 | longitude: null | string; 625 | name: string; 626 | country_code: string; 627 | province_code: string; 628 | }; 629 | shipping_lines: { 630 | id: number; 631 | carrier_identifier: null | string; 632 | code: null | string; 633 | discounted_price: string; 634 | discounted_price_set: { 635 | shop_money: { amount: string; currency_code: string }; 636 | presentment_money: { amount: string; currency_code: string }; 637 | }; 638 | is_removed: boolean; 639 | phone: null | string; 640 | price: string; 641 | price_set: { 642 | shop_money: { amount: string; currency_code: string }; 643 | presentment_money: { amount: string; currency_code: string }; 644 | }; 645 | requested_fulfillment_service_id: null | string; 646 | source: string; 647 | title: string; 648 | tax_lines: any[]; 649 | discount_allocations: any[]; 650 | }[]; 651 | } 652 | 653 | // Types for CUSTOMER_PAYMENT_METHODS_CREATE 654 | export interface CUSTOMER_PAYMENT_METHODS_CREATE {} 655 | 656 | // Types for SUBSCRIPTION_CONTRACTS_PAUSE 657 | export interface SUBSCRIPTION_CONTRACTS_PAUSE { 658 | admin_graphql_api_id: string; 659 | id: number; 660 | billing_policy: { 661 | interval: string; 662 | interval_count: number; 663 | min_cycles: number; 664 | max_cycles: number; 665 | }; 666 | currency_code: string; 667 | customer_id: number; 668 | admin_graphql_api_customer_id: string; 669 | delivery_policy: { interval: string; interval_count: number }; 670 | status: string; 671 | admin_graphql_api_origin_order_id: string; 672 | origin_order_id: number; 673 | revision_id: string; 674 | } 675 | 676 | // Types for COMPANIES_DELETE 677 | export interface COMPANIES_DELETE { 678 | name: string; 679 | note: string; 680 | external_id: string; 681 | main_contact_admin_graphql_api_id: string; 682 | created_at: string; 683 | updated_at: string; 684 | customer_since: string; 685 | admin_graphql_api_id: string; 686 | } 687 | 688 | // Types for COMPANY_CONTACTS_CREATE 689 | export interface COMPANY_CONTACTS_CREATE { 690 | customer_admin_graphql_api_id: string; 691 | title: string; 692 | locale: string; 693 | created_at: string; 694 | updated_at: string; 695 | admin_graphql_api_id: string; 696 | company: { 697 | name: string; 698 | note: string; 699 | external_id: string; 700 | main_contact_admin_graphql_api_id: string; 701 | created_at: string; 702 | updated_at: string; 703 | customer_since: string; 704 | admin_graphql_api_id: string; 705 | }; 706 | } 707 | 708 | // Types for ORDERS_EDITED 709 | export interface ORDERS_EDITED { 710 | order_edit: { 711 | id: number; 712 | app_id: null | string; 713 | created_at: string; 714 | committed_at: string; 715 | notify_customer: boolean; 716 | order_id: number; 717 | staff_note: string; 718 | user_id: null | string; 719 | line_items: { 720 | additions: { id: number; delta: number }[]; 721 | removals: { id: number; delta: number }[]; 722 | }; 723 | discounts: { line_item: { additions: any[]; removals: any[] } }; 724 | shipping_lines: { additions: any[]; removals: any[] }; 725 | }; 726 | } 727 | 728 | // Types for PAYMENT_SCHEDULES_DUE 729 | export interface PAYMENT_SCHEDULES_DUE { 730 | id: number; 731 | payment_terms_id: number; 732 | amount: string; 733 | currency: string; 734 | issued_at: string; 735 | due_at: string; 736 | completed_at: string; 737 | created_at: string; 738 | updated_at: string; 739 | admin_graphql_api_id: string; 740 | } 741 | 742 | // Types for APP_PURCHASES_ONE_TIME_UPDATE 743 | export interface APP_PURCHASES_ONE_TIME_UPDATE { 744 | app_purchase_one_time: { 745 | admin_graphql_api_id: string; 746 | name: string; 747 | status: string; 748 | admin_graphql_api_shop_id: string; 749 | created_at: string; 750 | updated_at: string; 751 | }; 752 | } 753 | 754 | // Types for SELLING_PLAN_GROUPS_CREATE 755 | export interface SELLING_PLAN_GROUPS_CREATE { 756 | admin_graphql_api_id: string; 757 | id: number; 758 | name: string; 759 | merchant_code: string; 760 | admin_graphql_api_app: string; 761 | app_id: null | string; 762 | description: null | string; 763 | options: string[]; 764 | position: null | string; 765 | summary: string; 766 | selling_plans: { 767 | name: string; 768 | options: string[]; 769 | position: null | string; 770 | description: null | string; 771 | billing_policy: { 772 | interval: string; 773 | interval_count: number; 774 | min_cycles: null | string; 775 | max_cycles: null | string; 776 | }; 777 | delivery_policy: { 778 | interval: string; 779 | interval_count: number; 780 | anchors: any[]; 781 | cutoff: null | string; 782 | pre_anchor_behavior: string; 783 | }; 784 | pricing_policies: any[]; 785 | }[]; 786 | product_variants: any[]; 787 | products: any[]; 788 | } 789 | 790 | // Types for COMPANY_LOCATIONS_DELETE 791 | export interface COMPANY_LOCATIONS_DELETE { 792 | name: string; 793 | external_id: string; 794 | phone: string; 795 | locale: string; 796 | created_at: string; 797 | updated_at: string; 798 | note: string; 799 | buyer_experience_configuration: null | string; 800 | admin_graphql_api_id: string; 801 | tax_exemptions: string[]; 802 | company: { 803 | name: string; 804 | note: string; 805 | external_id: string; 806 | main_contact_admin_graphql_api_id: string; 807 | created_at: string; 808 | updated_at: string; 809 | customer_since: string; 810 | admin_graphql_api_id: string; 811 | }; 812 | billing_address: { 813 | address1: string; 814 | city: string; 815 | province: string; 816 | country: string; 817 | zip: string; 818 | recipient: string; 819 | first_name: null | string; 820 | last_name: null | string; 821 | address2: null | string; 822 | phone: string; 823 | zone_code: string; 824 | country_code: string; 825 | created_at: string; 826 | updated_at: string; 827 | admin_graphql_api_id: string; 828 | company_admin_graphql_api_id: string; 829 | }; 830 | shipping_address: { 831 | address1: string; 832 | city: string; 833 | province: string; 834 | country: string; 835 | zip: string; 836 | recipient: string; 837 | first_name: null | string; 838 | last_name: null | string; 839 | address2: null | string; 840 | phone: string; 841 | zone_code: string; 842 | country_code: string; 843 | created_at: string; 844 | updated_at: string; 845 | admin_graphql_api_id: string; 846 | company_admin_graphql_api_id: string; 847 | }; 848 | tax_registration: { tax_id: string }; 849 | } 850 | 851 | // Types for SHIPPING_ADDRESSES_CREATE 852 | export interface SHIPPING_ADDRESSES_CREATE {} 853 | 854 | // Types for ORDERS_FULFILLED 855 | export interface ORDERS_FULFILLED { 856 | id: number; 857 | admin_graphql_api_id: string; 858 | app_id: null | string; 859 | browser_ip: null | string; 860 | buyer_accepts_marketing: boolean; 861 | cancel_reason: string; 862 | cancelled_at: string; 863 | cart_token: null | string; 864 | checkout_id: null | string; 865 | checkout_token: null | string; 866 | client_details: null | string; 867 | closed_at: null | string; 868 | confirmation_number: null | string; 869 | confirmed: boolean; 870 | contact_email: string; 871 | created_at: string; 872 | currency: string; 873 | current_subtotal_price: string; 874 | current_subtotal_price_set: { 875 | shop_money: { amount: string; currency_code: string }; 876 | presentment_money: { amount: string; currency_code: string }; 877 | }; 878 | current_total_additional_fees_set: null | string; 879 | current_total_discounts: string; 880 | current_total_discounts_set: { 881 | shop_money: { amount: string; currency_code: string }; 882 | presentment_money: { amount: string; currency_code: string }; 883 | }; 884 | current_total_duties_set: null | string; 885 | current_total_price: string; 886 | current_total_price_set: { 887 | shop_money: { amount: string; currency_code: string }; 888 | presentment_money: { amount: string; currency_code: string }; 889 | }; 890 | current_total_tax: string; 891 | current_total_tax_set: { 892 | shop_money: { amount: string; currency_code: string }; 893 | presentment_money: { amount: string; currency_code: string }; 894 | }; 895 | customer_locale: string; 896 | device_id: null | string; 897 | discount_codes: any[]; 898 | email: string; 899 | estimated_taxes: boolean; 900 | financial_status: string; 901 | fulfillment_status: string; 902 | landing_site: null | string; 903 | landing_site_ref: null | string; 904 | location_id: null | string; 905 | merchant_of_record_app_id: null | string; 906 | name: string; 907 | note: null | string; 908 | note_attributes: any[]; 909 | number: number; 910 | order_number: number; 911 | order_status_url: string; 912 | original_total_additional_fees_set: null | string; 913 | original_total_duties_set: null | string; 914 | payment_gateway_names: string[]; 915 | phone: null | string; 916 | po_number: null | string; 917 | presentment_currency: string; 918 | processed_at: string; 919 | reference: null | string; 920 | referring_site: null | string; 921 | source_identifier: null | string; 922 | source_name: string; 923 | source_url: null | string; 924 | subtotal_price: string; 925 | subtotal_price_set: { 926 | shop_money: { amount: string; currency_code: string }; 927 | presentment_money: { amount: string; currency_code: string }; 928 | }; 929 | tags: string; 930 | tax_exempt: boolean; 931 | tax_lines: any[]; 932 | taxes_included: boolean; 933 | test: boolean; 934 | token: string; 935 | total_discounts: string; 936 | total_discounts_set: { 937 | shop_money: { amount: string; currency_code: string }; 938 | presentment_money: { amount: string; currency_code: string }; 939 | }; 940 | total_line_items_price: string; 941 | total_line_items_price_set: { 942 | shop_money: { amount: string; currency_code: string }; 943 | presentment_money: { amount: string; currency_code: string }; 944 | }; 945 | total_outstanding: string; 946 | total_price: string; 947 | total_price_set: { 948 | shop_money: { amount: string; currency_code: string }; 949 | presentment_money: { amount: string; currency_code: string }; 950 | }; 951 | total_shipping_price_set: { 952 | shop_money: { amount: string; currency_code: string }; 953 | presentment_money: { amount: string; currency_code: string }; 954 | }; 955 | total_tax: string; 956 | total_tax_set: { 957 | shop_money: { amount: string; currency_code: string }; 958 | presentment_money: { amount: string; currency_code: string }; 959 | }; 960 | total_tip_received: string; 961 | total_weight: number; 962 | updated_at: string; 963 | user_id: null | string; 964 | billing_address: { 965 | first_name: string; 966 | address1: string; 967 | phone: string; 968 | city: string; 969 | zip: string; 970 | province: string; 971 | country: string; 972 | last_name: string; 973 | address2: null | string; 974 | company: string; 975 | latitude: null | string; 976 | longitude: null | string; 977 | name: string; 978 | country_code: string; 979 | province_code: string; 980 | }; 981 | customer: { 982 | id: number; 983 | email: string; 984 | created_at: null | string; 985 | updated_at: null | string; 986 | first_name: string; 987 | last_name: string; 988 | state: string; 989 | note: null | string; 990 | verified_email: boolean; 991 | multipass_identifier: null | string; 992 | tax_exempt: boolean; 993 | phone: null | string; 994 | email_marketing_consent: { 995 | state: string; 996 | opt_in_level: null | string; 997 | consent_updated_at: null | string; 998 | }; 999 | sms_marketing_consent: null | string; 1000 | tags: string; 1001 | currency: string; 1002 | tax_exemptions: any[]; 1003 | admin_graphql_api_id: string; 1004 | default_address: { 1005 | id: number; 1006 | customer_id: number; 1007 | first_name: null | string; 1008 | last_name: null | string; 1009 | company: null | string; 1010 | address1: string; 1011 | address2: null | string; 1012 | city: string; 1013 | province: string; 1014 | country: string; 1015 | zip: string; 1016 | phone: string; 1017 | name: string; 1018 | province_code: string; 1019 | country_code: string; 1020 | country_name: string; 1021 | default: boolean; 1022 | }; 1023 | }; 1024 | discount_applications: any[]; 1025 | fulfillments: any[]; 1026 | line_items: { 1027 | id: number; 1028 | admin_graphql_api_id: string; 1029 | attributed_staffs: { id: string; quantity: number }[]; 1030 | current_quantity: number; 1031 | fulfillable_quantity: number; 1032 | fulfillment_service: string; 1033 | fulfillment_status: null | string; 1034 | gift_card: boolean; 1035 | grams: number; 1036 | name: string; 1037 | price: string; 1038 | price_set: { 1039 | shop_money: { amount: string; currency_code: string }; 1040 | presentment_money: { amount: string; currency_code: string }; 1041 | }; 1042 | product_exists: boolean; 1043 | product_id: number; 1044 | properties: any[]; 1045 | quantity: number; 1046 | requires_shipping: boolean; 1047 | sku: string; 1048 | taxable: boolean; 1049 | title: string; 1050 | total_discount: string; 1051 | total_discount_set: { 1052 | shop_money: { amount: string; currency_code: string }; 1053 | presentment_money: { amount: string; currency_code: string }; 1054 | }; 1055 | variant_id: number; 1056 | variant_inventory_management: string; 1057 | variant_title: null | string; 1058 | vendor: null | string; 1059 | tax_lines: any[]; 1060 | duties: any[]; 1061 | discount_allocations: any[]; 1062 | }[]; 1063 | payment_terms: null | string; 1064 | refunds: any[]; 1065 | shipping_address: { 1066 | first_name: string; 1067 | address1: string; 1068 | phone: string; 1069 | city: string; 1070 | zip: string; 1071 | province: string; 1072 | country: string; 1073 | last_name: string; 1074 | address2: null | string; 1075 | company: string; 1076 | latitude: null | string; 1077 | longitude: null | string; 1078 | name: string; 1079 | country_code: string; 1080 | province_code: string; 1081 | }; 1082 | shipping_lines: { 1083 | id: number; 1084 | carrier_identifier: null | string; 1085 | code: null | string; 1086 | discounted_price: string; 1087 | discounted_price_set: { 1088 | shop_money: { amount: string; currency_code: string }; 1089 | presentment_money: { amount: string; currency_code: string }; 1090 | }; 1091 | is_removed: boolean; 1092 | phone: null | string; 1093 | price: string; 1094 | price_set: { 1095 | shop_money: { amount: string; currency_code: string }; 1096 | presentment_money: { amount: string; currency_code: string }; 1097 | }; 1098 | requested_fulfillment_service_id: null | string; 1099 | source: string; 1100 | title: string; 1101 | tax_lines: any[]; 1102 | discount_allocations: any[]; 1103 | }[]; 1104 | } 1105 | 1106 | // Types for FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP 1107 | export interface FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP { 1108 | fulfillment_order: { 1109 | id: string; 1110 | status: string; 1111 | preparable: boolean; 1112 | delivery_method: { method_type: string }; 1113 | }; 1114 | } 1115 | 1116 | // Types for FULFILLMENT_ORDERS_SPLIT 1117 | export interface FULFILLMENT_ORDERS_SPLIT { 1118 | split_line_items: { id: string; quantity: number }[]; 1119 | fulfillment_order: { id: string; status: string }; 1120 | remaining_fulfillment_order: { id: string; status: string }; 1121 | replacement_fulfillment_order: { id: string; status: string }; 1122 | } 1123 | 1124 | // Types for ORDERS_PARTIALLY_FULFILLED 1125 | export interface ORDERS_PARTIALLY_FULFILLED { 1126 | id: number; 1127 | admin_graphql_api_id: string; 1128 | app_id: null | string; 1129 | browser_ip: null | string; 1130 | buyer_accepts_marketing: boolean; 1131 | cancel_reason: string; 1132 | cancelled_at: string; 1133 | cart_token: null | string; 1134 | checkout_id: null | string; 1135 | checkout_token: null | string; 1136 | client_details: null | string; 1137 | closed_at: null | string; 1138 | confirmation_number: null | string; 1139 | confirmed: boolean; 1140 | contact_email: string; 1141 | created_at: string; 1142 | currency: string; 1143 | current_subtotal_price: string; 1144 | current_subtotal_price_set: { 1145 | shop_money: { amount: string; currency_code: string }; 1146 | presentment_money: { amount: string; currency_code: string }; 1147 | }; 1148 | current_total_additional_fees_set: null | string; 1149 | current_total_discounts: string; 1150 | current_total_discounts_set: { 1151 | shop_money: { amount: string; currency_code: string }; 1152 | presentment_money: { amount: string; currency_code: string }; 1153 | }; 1154 | current_total_duties_set: null | string; 1155 | current_total_price: string; 1156 | current_total_price_set: { 1157 | shop_money: { amount: string; currency_code: string }; 1158 | presentment_money: { amount: string; currency_code: string }; 1159 | }; 1160 | current_total_tax: string; 1161 | current_total_tax_set: { 1162 | shop_money: { amount: string; currency_code: string }; 1163 | presentment_money: { amount: string; currency_code: string }; 1164 | }; 1165 | customer_locale: string; 1166 | device_id: null | string; 1167 | discount_codes: any[]; 1168 | email: string; 1169 | estimated_taxes: boolean; 1170 | financial_status: string; 1171 | fulfillment_status: string; 1172 | landing_site: null | string; 1173 | landing_site_ref: null | string; 1174 | location_id: null | string; 1175 | merchant_of_record_app_id: null | string; 1176 | name: string; 1177 | note: null | string; 1178 | note_attributes: any[]; 1179 | number: number; 1180 | order_number: number; 1181 | order_status_url: string; 1182 | original_total_additional_fees_set: null | string; 1183 | original_total_duties_set: null | string; 1184 | payment_gateway_names: string[]; 1185 | phone: null | string; 1186 | po_number: null | string; 1187 | presentment_currency: string; 1188 | processed_at: string; 1189 | reference: null | string; 1190 | referring_site: null | string; 1191 | source_identifier: null | string; 1192 | source_name: string; 1193 | source_url: null | string; 1194 | subtotal_price: string; 1195 | subtotal_price_set: { 1196 | shop_money: { amount: string; currency_code: string }; 1197 | presentment_money: { amount: string; currency_code: string }; 1198 | }; 1199 | tags: string; 1200 | tax_exempt: boolean; 1201 | tax_lines: any[]; 1202 | taxes_included: boolean; 1203 | test: boolean; 1204 | token: string; 1205 | total_discounts: string; 1206 | total_discounts_set: { 1207 | shop_money: { amount: string; currency_code: string }; 1208 | presentment_money: { amount: string; currency_code: string }; 1209 | }; 1210 | total_line_items_price: string; 1211 | total_line_items_price_set: { 1212 | shop_money: { amount: string; currency_code: string }; 1213 | presentment_money: { amount: string; currency_code: string }; 1214 | }; 1215 | total_outstanding: string; 1216 | total_price: string; 1217 | total_price_set: { 1218 | shop_money: { amount: string; currency_code: string }; 1219 | presentment_money: { amount: string; currency_code: string }; 1220 | }; 1221 | total_shipping_price_set: { 1222 | shop_money: { amount: string; currency_code: string }; 1223 | presentment_money: { amount: string; currency_code: string }; 1224 | }; 1225 | total_tax: string; 1226 | total_tax_set: { 1227 | shop_money: { amount: string; currency_code: string }; 1228 | presentment_money: { amount: string; currency_code: string }; 1229 | }; 1230 | total_tip_received: string; 1231 | total_weight: number; 1232 | updated_at: string; 1233 | user_id: null | string; 1234 | billing_address: { 1235 | first_name: string; 1236 | address1: string; 1237 | phone: string; 1238 | city: string; 1239 | zip: string; 1240 | province: string; 1241 | country: string; 1242 | last_name: string; 1243 | address2: null | string; 1244 | company: string; 1245 | latitude: null | string; 1246 | longitude: null | string; 1247 | name: string; 1248 | country_code: string; 1249 | province_code: string; 1250 | }; 1251 | customer: { 1252 | id: number; 1253 | email: string; 1254 | created_at: null | string; 1255 | updated_at: null | string; 1256 | first_name: string; 1257 | last_name: string; 1258 | state: string; 1259 | note: null | string; 1260 | verified_email: boolean; 1261 | multipass_identifier: null | string; 1262 | tax_exempt: boolean; 1263 | phone: null | string; 1264 | email_marketing_consent: { 1265 | state: string; 1266 | opt_in_level: null | string; 1267 | consent_updated_at: null | string; 1268 | }; 1269 | sms_marketing_consent: null | string; 1270 | tags: string; 1271 | currency: string; 1272 | tax_exemptions: any[]; 1273 | admin_graphql_api_id: string; 1274 | default_address: { 1275 | id: number; 1276 | customer_id: number; 1277 | first_name: null | string; 1278 | last_name: null | string; 1279 | company: null | string; 1280 | address1: string; 1281 | address2: null | string; 1282 | city: string; 1283 | province: string; 1284 | country: string; 1285 | zip: string; 1286 | phone: string; 1287 | name: string; 1288 | province_code: string; 1289 | country_code: string; 1290 | country_name: string; 1291 | default: boolean; 1292 | }; 1293 | }; 1294 | discount_applications: any[]; 1295 | fulfillments: any[]; 1296 | line_items: { 1297 | id: number; 1298 | admin_graphql_api_id: string; 1299 | attributed_staffs: { id: string; quantity: number }[]; 1300 | current_quantity: number; 1301 | fulfillable_quantity: number; 1302 | fulfillment_service: string; 1303 | fulfillment_status: null | string; 1304 | gift_card: boolean; 1305 | grams: number; 1306 | name: string; 1307 | price: string; 1308 | price_set: { 1309 | shop_money: { amount: string; currency_code: string }; 1310 | presentment_money: { amount: string; currency_code: string }; 1311 | }; 1312 | product_exists: boolean; 1313 | product_id: number; 1314 | properties: any[]; 1315 | quantity: number; 1316 | requires_shipping: boolean; 1317 | sku: string; 1318 | taxable: boolean; 1319 | title: string; 1320 | total_discount: string; 1321 | total_discount_set: { 1322 | shop_money: { amount: string; currency_code: string }; 1323 | presentment_money: { amount: string; currency_code: string }; 1324 | }; 1325 | variant_id: number; 1326 | variant_inventory_management: string; 1327 | variant_title: null | string; 1328 | vendor: null | string; 1329 | tax_lines: any[]; 1330 | duties: any[]; 1331 | discount_allocations: any[]; 1332 | }[]; 1333 | payment_terms: null | string; 1334 | refunds: any[]; 1335 | shipping_address: { 1336 | first_name: string; 1337 | address1: string; 1338 | phone: string; 1339 | city: string; 1340 | zip: string; 1341 | province: string; 1342 | country: string; 1343 | last_name: string; 1344 | address2: null | string; 1345 | company: string; 1346 | latitude: null | string; 1347 | longitude: null | string; 1348 | name: string; 1349 | country_code: string; 1350 | province_code: string; 1351 | }; 1352 | shipping_lines: { 1353 | id: number; 1354 | carrier_identifier: null | string; 1355 | code: null | string; 1356 | discounted_price: string; 1357 | discounted_price_set: { 1358 | shop_money: { amount: string; currency_code: string }; 1359 | presentment_money: { amount: string; currency_code: string }; 1360 | }; 1361 | is_removed: boolean; 1362 | phone: null | string; 1363 | price: string; 1364 | price_set: { 1365 | shop_money: { amount: string; currency_code: string }; 1366 | presentment_money: { amount: string; currency_code: string }; 1367 | }; 1368 | requested_fulfillment_service_id: null | string; 1369 | source: string; 1370 | title: string; 1371 | tax_lines: any[]; 1372 | discount_allocations: any[]; 1373 | }[]; 1374 | } 1375 | 1376 | // Types for LOCALES_CREATE 1377 | export interface LOCALES_CREATE { 1378 | locale: string; 1379 | published: boolean; 1380 | } 1381 | 1382 | // Types for DISPUTES_CREATE 1383 | export interface DISPUTES_CREATE { 1384 | id: number; 1385 | order_id: number; 1386 | type: string; 1387 | amount: string; 1388 | currency: string; 1389 | reason: string; 1390 | network_reason_code: string; 1391 | status: string; 1392 | evidence_due_by: string; 1393 | evidence_sent_on: null | string; 1394 | finalized_on: null | string; 1395 | initiated_at: string; 1396 | } 1397 | 1398 | // Types for SEGMENTS_UPDATE 1399 | export interface SEGMENTS_UPDATE { 1400 | id: number; 1401 | name: string; 1402 | query: string; 1403 | creationDate: string; 1404 | lastEditDate: string; 1405 | } 1406 | 1407 | // Types for FULFILLMENT_EVENTS_CREATE 1408 | export interface FULFILLMENT_EVENTS_CREATE { 1409 | id: number; 1410 | fulfillment_id: number; 1411 | status: string; 1412 | message: string; 1413 | happened_at: string; 1414 | city: null | string; 1415 | province: null | string; 1416 | country: string; 1417 | zip: null | string; 1418 | address1: null | string; 1419 | latitude: null | string; 1420 | longitude: null | string; 1421 | shop_id: number; 1422 | created_at: string; 1423 | updated_at: string; 1424 | estimated_delivery_at: null | string; 1425 | order_id: number; 1426 | admin_graphql_api_id: string; 1427 | } 1428 | 1429 | // Types for COMPANY_CONTACT_ROLES_ASSIGN 1430 | export interface COMPANY_CONTACT_ROLES_ASSIGN { 1431 | company_contact: { 1432 | customer_admin_graphql_api_id: string; 1433 | title: string; 1434 | locale: string; 1435 | created_at: string; 1436 | updated_at: string; 1437 | admin_graphql_api_id: string; 1438 | company: { 1439 | name: string; 1440 | note: string; 1441 | external_id: string; 1442 | main_contact_admin_graphql_api_id: string; 1443 | created_at: string; 1444 | updated_at: string; 1445 | customer_since: string; 1446 | admin_graphql_api_id: string; 1447 | }; 1448 | }; 1449 | company_location: { 1450 | name: string; 1451 | external_id: string; 1452 | phone: string; 1453 | locale: string; 1454 | created_at: string; 1455 | updated_at: string; 1456 | note: string; 1457 | buyer_experience_configuration: null | string; 1458 | admin_graphql_api_id: string; 1459 | tax_exemptions: string[]; 1460 | company: { 1461 | name: string; 1462 | note: string; 1463 | external_id: string; 1464 | main_contact_admin_graphql_api_id: string; 1465 | created_at: string; 1466 | updated_at: string; 1467 | customer_since: string; 1468 | admin_graphql_api_id: string; 1469 | }; 1470 | billing_address: { 1471 | address1: string; 1472 | city: string; 1473 | province: string; 1474 | country: string; 1475 | zip: string; 1476 | recipient: string; 1477 | first_name: null | string; 1478 | last_name: null | string; 1479 | address2: null | string; 1480 | phone: string; 1481 | zone_code: string; 1482 | country_code: string; 1483 | created_at: string; 1484 | updated_at: string; 1485 | admin_graphql_api_id: string; 1486 | company_admin_graphql_api_id: string; 1487 | }; 1488 | shipping_address: { 1489 | address1: string; 1490 | city: string; 1491 | province: string; 1492 | country: string; 1493 | zip: string; 1494 | recipient: string; 1495 | first_name: null | string; 1496 | last_name: null | string; 1497 | address2: null | string; 1498 | phone: string; 1499 | zone_code: string; 1500 | country_code: string; 1501 | created_at: string; 1502 | updated_at: string; 1503 | admin_graphql_api_id: string; 1504 | company_admin_graphql_api_id: string; 1505 | }; 1506 | tax_registration: { tax_id: string }; 1507 | }; 1508 | company_contact_role: { name: string }; 1509 | } 1510 | 1511 | // Types for CUSTOMER_GROUPS_CREATE 1512 | export interface CUSTOMER_GROUPS_CREATE { 1513 | id: number; 1514 | name: string; 1515 | created_at: string; 1516 | updated_at: string; 1517 | query: string; 1518 | } 1519 | 1520 | // Types for MARKETS_UPDATE 1521 | export interface MARKETS_UPDATE { 1522 | id: number; 1523 | name: string; 1524 | enabled: boolean; 1525 | regions: { country_code: string }[]; 1526 | } 1527 | 1528 | // Types for PRODUCT_PUBLICATIONS_DELETE 1529 | export interface PRODUCT_PUBLICATIONS_DELETE { 1530 | id: null | string; 1531 | } 1532 | 1533 | // Types for RETURNS_REQUEST 1534 | export interface RETURNS_REQUEST { 1535 | id: number; 1536 | admin_graphql_api_id: string; 1537 | status: string; 1538 | order: { id: number; admin_graphql_api_id: string }; 1539 | total_return_line_items: number; 1540 | name: null | string; 1541 | return_line_items: { 1542 | id: number; 1543 | admin_graphql_api_id: string; 1544 | fulfillment_line_item: { 1545 | id: number; 1546 | admin_graphql_api_id: string; 1547 | line_item: { id: number; admin_graphql_api_id: string }; 1548 | }; 1549 | quantity: number; 1550 | return_reason: string; 1551 | return_reason_note: string; 1552 | customer_note: null | string; 1553 | restocking_fee: null | string; 1554 | }[]; 1555 | return_shipping_fees: any[]; 1556 | exchange_line_items: any[]; 1557 | total_exchange_line_items: number; 1558 | } 1559 | 1560 | // Types for DRAFT_ORDERS_CREATE 1561 | export interface DRAFT_ORDERS_CREATE { 1562 | id: number; 1563 | note: null | string; 1564 | email: string; 1565 | taxes_included: boolean; 1566 | currency: string; 1567 | invoice_sent_at: null | string; 1568 | created_at: string; 1569 | updated_at: string; 1570 | tax_exempt: boolean; 1571 | completed_at: null | string; 1572 | name: string; 1573 | status: string; 1574 | line_items: { 1575 | id: number; 1576 | variant_id: number; 1577 | product_id: number; 1578 | title: string; 1579 | variant_title: string; 1580 | sku: string; 1581 | vendor: string; 1582 | quantity: number; 1583 | requires_shipping: boolean; 1584 | taxable: boolean; 1585 | gift_card: boolean; 1586 | fulfillment_service: string; 1587 | grams: number; 1588 | tax_lines: any[]; 1589 | applied_discount: null | string; 1590 | name: string; 1591 | properties: any[]; 1592 | custom: boolean; 1593 | price: string; 1594 | admin_graphql_api_id: string; 1595 | }[]; 1596 | shipping_address: { 1597 | first_name: string; 1598 | address1: string; 1599 | phone: string; 1600 | city: string; 1601 | zip: string; 1602 | province: string; 1603 | country: string; 1604 | last_name: string; 1605 | address2: null | string; 1606 | company: string; 1607 | latitude: null | string; 1608 | longitude: null | string; 1609 | name: string; 1610 | country_code: string; 1611 | province_code: string; 1612 | }; 1613 | billing_address: { 1614 | first_name: string; 1615 | address1: string; 1616 | phone: string; 1617 | city: string; 1618 | zip: string; 1619 | province: string; 1620 | country: string; 1621 | last_name: string; 1622 | address2: null | string; 1623 | company: string; 1624 | latitude: null | string; 1625 | longitude: null | string; 1626 | name: string; 1627 | country_code: string; 1628 | province_code: string; 1629 | }; 1630 | invoice_url: string; 1631 | applied_discount: { 1632 | description: string; 1633 | value: string; 1634 | title: string; 1635 | amount: string; 1636 | value_type: string; 1637 | }; 1638 | order_id: null | string; 1639 | shipping_line: { 1640 | title: string; 1641 | custom: boolean; 1642 | handle: null | string; 1643 | price: string; 1644 | }; 1645 | tax_lines: { rate: number; title: string; price: string }[]; 1646 | tags: string; 1647 | note_attributes: any[]; 1648 | total_price: string; 1649 | subtotal_price: string; 1650 | total_tax: string; 1651 | payment_terms: { 1652 | id: number; 1653 | payment_terms_name: string; 1654 | payment_terms_type: string; 1655 | due_in_days: number; 1656 | created_at: string; 1657 | updated_at: string; 1658 | payment_schedules: { 1659 | id: number; 1660 | created_at: string; 1661 | updated_at: string; 1662 | payment_terms_id: number; 1663 | reference_id: null | string; 1664 | reference_type: null | string; 1665 | issued_at: string; 1666 | due_at: string; 1667 | completed_at: string; 1668 | amount: string; 1669 | currency: string; 1670 | }[]; 1671 | }; 1672 | admin_graphql_api_id: string; 1673 | customer: { 1674 | id: number; 1675 | email: string; 1676 | created_at: null | string; 1677 | updated_at: null | string; 1678 | first_name: string; 1679 | last_name: string; 1680 | orders_count: number; 1681 | state: string; 1682 | total_spent: string; 1683 | last_order_id: null | string; 1684 | note: null | string; 1685 | verified_email: boolean; 1686 | multipass_identifier: null | string; 1687 | tax_exempt: boolean; 1688 | tags: string; 1689 | last_order_name: null | string; 1690 | currency: string; 1691 | phone: null | string; 1692 | tax_exemptions: any[]; 1693 | email_marketing_consent: { 1694 | state: string; 1695 | opt_in_level: null | string; 1696 | consent_updated_at: null | string; 1697 | }; 1698 | sms_marketing_consent: null | string; 1699 | admin_graphql_api_id: string; 1700 | default_address: { 1701 | id: null | string; 1702 | customer_id: number; 1703 | first_name: null | string; 1704 | last_name: null | string; 1705 | company: null | string; 1706 | address1: string; 1707 | address2: null | string; 1708 | city: string; 1709 | province: string; 1710 | country: string; 1711 | zip: string; 1712 | phone: string; 1713 | name: string; 1714 | province_code: string; 1715 | country_code: string; 1716 | country_name: string; 1717 | default: boolean; 1718 | }; 1719 | }; 1720 | } 1721 | 1722 | // Types for VARIANTS_IN_STOCK 1723 | export interface VARIANTS_IN_STOCK { 1724 | id: number; 1725 | product_id: number; 1726 | title: string; 1727 | price: string; 1728 | sku: string; 1729 | position: number; 1730 | inventory_policy: string; 1731 | compare_at_price: string; 1732 | option1: string; 1733 | option2: null | string; 1734 | option3: null | string; 1735 | created_at: string; 1736 | updated_at: string; 1737 | taxable: boolean; 1738 | barcode: null | string; 1739 | inventory_quantity: number; 1740 | old_inventory_quantity: number; 1741 | admin_graphql_api_id: string; 1742 | image_id: null | string; 1743 | } 1744 | 1745 | // Types for ATTRIBUTED_SESSIONS_LAST 1746 | export interface ATTRIBUTED_SESSIONS_LAST {} 1747 | 1748 | // Types for ORDERS_CREATE 1749 | export interface ORDERS_CREATE { 1750 | id: number; 1751 | admin_graphql_api_id: string; 1752 | app_id: null | string; 1753 | browser_ip: null | string; 1754 | buyer_accepts_marketing: boolean; 1755 | cancel_reason: string; 1756 | cancelled_at: string; 1757 | cart_token: null | string; 1758 | checkout_id: null | string; 1759 | checkout_token: null | string; 1760 | client_details: null | string; 1761 | closed_at: null | string; 1762 | confirmation_number: null | string; 1763 | confirmed: boolean; 1764 | contact_email: string; 1765 | created_at: string; 1766 | currency: string; 1767 | current_subtotal_price: string; 1768 | current_subtotal_price_set: { 1769 | shop_money: { amount: string; currency_code: string }; 1770 | presentment_money: { amount: string; currency_code: string }; 1771 | }; 1772 | current_total_additional_fees_set: null | string; 1773 | current_total_discounts: string; 1774 | current_total_discounts_set: { 1775 | shop_money: { amount: string; currency_code: string }; 1776 | presentment_money: { amount: string; currency_code: string }; 1777 | }; 1778 | current_total_duties_set: null | string; 1779 | current_total_price: string; 1780 | current_total_price_set: { 1781 | shop_money: { amount: string; currency_code: string }; 1782 | presentment_money: { amount: string; currency_code: string }; 1783 | }; 1784 | current_total_tax: string; 1785 | current_total_tax_set: { 1786 | shop_money: { amount: string; currency_code: string }; 1787 | presentment_money: { amount: string; currency_code: string }; 1788 | }; 1789 | customer_locale: string; 1790 | device_id: null | string; 1791 | discount_codes: any[]; 1792 | email: string; 1793 | estimated_taxes: boolean; 1794 | financial_status: string; 1795 | fulfillment_status: string; 1796 | landing_site: null | string; 1797 | landing_site_ref: null | string; 1798 | location_id: null | string; 1799 | merchant_of_record_app_id: null | string; 1800 | name: string; 1801 | note: null | string; 1802 | note_attributes: any[]; 1803 | number: number; 1804 | order_number: number; 1805 | order_status_url: string; 1806 | original_total_additional_fees_set: null | string; 1807 | original_total_duties_set: null | string; 1808 | payment_gateway_names: string[]; 1809 | phone: null | string; 1810 | po_number: null | string; 1811 | presentment_currency: string; 1812 | processed_at: string; 1813 | reference: null | string; 1814 | referring_site: null | string; 1815 | source_identifier: null | string; 1816 | source_name: string; 1817 | source_url: null | string; 1818 | subtotal_price: string; 1819 | subtotal_price_set: { 1820 | shop_money: { amount: string; currency_code: string }; 1821 | presentment_money: { amount: string; currency_code: string }; 1822 | }; 1823 | tags: string; 1824 | tax_exempt: boolean; 1825 | tax_lines: any[]; 1826 | taxes_included: boolean; 1827 | test: boolean; 1828 | token: string; 1829 | total_discounts: string; 1830 | total_discounts_set: { 1831 | shop_money: { amount: string; currency_code: string }; 1832 | presentment_money: { amount: string; currency_code: string }; 1833 | }; 1834 | total_line_items_price: string; 1835 | total_line_items_price_set: { 1836 | shop_money: { amount: string; currency_code: string }; 1837 | presentment_money: { amount: string; currency_code: string }; 1838 | }; 1839 | total_outstanding: string; 1840 | total_price: string; 1841 | total_price_set: { 1842 | shop_money: { amount: string; currency_code: string }; 1843 | presentment_money: { amount: string; currency_code: string }; 1844 | }; 1845 | total_shipping_price_set: { 1846 | shop_money: { amount: string; currency_code: string }; 1847 | presentment_money: { amount: string; currency_code: string }; 1848 | }; 1849 | total_tax: string; 1850 | total_tax_set: { 1851 | shop_money: { amount: string; currency_code: string }; 1852 | presentment_money: { amount: string; currency_code: string }; 1853 | }; 1854 | total_tip_received: string; 1855 | total_weight: number; 1856 | updated_at: string; 1857 | user_id: null | string; 1858 | billing_address: { 1859 | first_name: string; 1860 | address1: string; 1861 | phone: string; 1862 | city: string; 1863 | zip: string; 1864 | province: string; 1865 | country: string; 1866 | last_name: string; 1867 | address2: null | string; 1868 | company: string; 1869 | latitude: null | string; 1870 | longitude: null | string; 1871 | name: string; 1872 | country_code: string; 1873 | province_code: string; 1874 | }; 1875 | customer: { 1876 | id: number; 1877 | email: string; 1878 | created_at: null | string; 1879 | updated_at: null | string; 1880 | first_name: string; 1881 | last_name: string; 1882 | state: string; 1883 | note: null | string; 1884 | verified_email: boolean; 1885 | multipass_identifier: null | string; 1886 | tax_exempt: boolean; 1887 | phone: null | string; 1888 | email_marketing_consent: { 1889 | state: string; 1890 | opt_in_level: null | string; 1891 | consent_updated_at: null | string; 1892 | }; 1893 | sms_marketing_consent: null | string; 1894 | tags: string; 1895 | currency: string; 1896 | tax_exemptions: any[]; 1897 | admin_graphql_api_id: string; 1898 | default_address: { 1899 | id: number; 1900 | customer_id: number; 1901 | first_name: null | string; 1902 | last_name: null | string; 1903 | company: null | string; 1904 | address1: string; 1905 | address2: null | string; 1906 | city: string; 1907 | province: string; 1908 | country: string; 1909 | zip: string; 1910 | phone: string; 1911 | name: string; 1912 | province_code: string; 1913 | country_code: string; 1914 | country_name: string; 1915 | default: boolean; 1916 | }; 1917 | }; 1918 | discount_applications: any[]; 1919 | fulfillments: any[]; 1920 | line_items: { 1921 | id: number; 1922 | admin_graphql_api_id: string; 1923 | attributed_staffs: { id: string; quantity: number }[]; 1924 | current_quantity: number; 1925 | fulfillable_quantity: number; 1926 | fulfillment_service: string; 1927 | fulfillment_status: null | string; 1928 | gift_card: boolean; 1929 | grams: number; 1930 | name: string; 1931 | price: string; 1932 | price_set: { 1933 | shop_money: { amount: string; currency_code: string }; 1934 | presentment_money: { amount: string; currency_code: string }; 1935 | }; 1936 | product_exists: boolean; 1937 | product_id: number; 1938 | properties: any[]; 1939 | quantity: number; 1940 | requires_shipping: boolean; 1941 | sku: string; 1942 | taxable: boolean; 1943 | title: string; 1944 | total_discount: string; 1945 | total_discount_set: { 1946 | shop_money: { amount: string; currency_code: string }; 1947 | presentment_money: { amount: string; currency_code: string }; 1948 | }; 1949 | variant_id: number; 1950 | variant_inventory_management: string; 1951 | variant_title: null | string; 1952 | vendor: null | string; 1953 | tax_lines: any[]; 1954 | duties: any[]; 1955 | discount_allocations: any[]; 1956 | }[]; 1957 | payment_terms: null | string; 1958 | refunds: any[]; 1959 | shipping_address: { 1960 | first_name: string; 1961 | address1: string; 1962 | phone: string; 1963 | city: string; 1964 | zip: string; 1965 | province: string; 1966 | country: string; 1967 | last_name: string; 1968 | address2: null | string; 1969 | company: string; 1970 | latitude: null | string; 1971 | longitude: null | string; 1972 | name: string; 1973 | country_code: string; 1974 | province_code: string; 1975 | }; 1976 | shipping_lines: { 1977 | id: number; 1978 | carrier_identifier: null | string; 1979 | code: null | string; 1980 | discounted_price: string; 1981 | discounted_price_set: { 1982 | shop_money: { amount: string; currency_code: string }; 1983 | presentment_money: { amount: string; currency_code: string }; 1984 | }; 1985 | is_removed: boolean; 1986 | phone: null | string; 1987 | price: string; 1988 | price_set: { 1989 | shop_money: { amount: string; currency_code: string }; 1990 | presentment_money: { amount: string; currency_code: string }; 1991 | }; 1992 | requested_fulfillment_service_id: null | string; 1993 | source: string; 1994 | title: string; 1995 | tax_lines: any[]; 1996 | discount_allocations: any[]; 1997 | }[]; 1998 | } 1999 | 2000 | // Types for DOMAINS_DESTROY 2001 | export interface DOMAINS_DESTROY { 2002 | id: number; 2003 | host: string; 2004 | ssl_enabled: boolean; 2005 | localization: { 2006 | country: null | string; 2007 | default_locale: string; 2008 | alternate_locales: any[]; 2009 | }; 2010 | } 2011 | 2012 | // Types for FULFILLMENT_ORDERS_MOVED 2013 | export interface FULFILLMENT_ORDERS_MOVED { 2014 | original_fulfillment_order: { 2015 | id: string; 2016 | status: string; 2017 | assigned_location_id: string; 2018 | }; 2019 | moved_fulfillment_order: { 2020 | id: string; 2021 | status: string; 2022 | assigned_location_id: string; 2023 | }; 2024 | destination_location_id: string; 2025 | fulfillment_order_line_items_requested: { id: string; quantity: number }[]; 2026 | source_location: { id: string }; 2027 | } 2028 | 2029 | // Types for APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT 2030 | export interface APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT { 2031 | app_subscription: { 2032 | admin_graphql_api_id: string; 2033 | name: string; 2034 | balance_used: number; 2035 | capped_amount: string; 2036 | currency_code: string; 2037 | admin_graphql_api_shop_id: string; 2038 | created_at: string; 2039 | updated_at: string; 2040 | }; 2041 | } 2042 | 2043 | // Types for ORDERS_UPDATED 2044 | export interface ORDERS_UPDATED { 2045 | id: number; 2046 | admin_graphql_api_id: string; 2047 | app_id: null | string; 2048 | browser_ip: null | string; 2049 | buyer_accepts_marketing: boolean; 2050 | cancel_reason: string; 2051 | cancelled_at: string; 2052 | cart_token: null | string; 2053 | checkout_id: null | string; 2054 | checkout_token: null | string; 2055 | client_details: null | string; 2056 | closed_at: null | string; 2057 | confirmation_number: null | string; 2058 | confirmed: boolean; 2059 | contact_email: string; 2060 | created_at: string; 2061 | currency: string; 2062 | current_subtotal_price: string; 2063 | current_subtotal_price_set: { 2064 | shop_money: { amount: string; currency_code: string }; 2065 | presentment_money: { amount: string; currency_code: string }; 2066 | }; 2067 | current_total_additional_fees_set: null | string; 2068 | current_total_discounts: string; 2069 | current_total_discounts_set: { 2070 | shop_money: { amount: string; currency_code: string }; 2071 | presentment_money: { amount: string; currency_code: string }; 2072 | }; 2073 | current_total_duties_set: null | string; 2074 | current_total_price: string; 2075 | current_total_price_set: { 2076 | shop_money: { amount: string; currency_code: string }; 2077 | presentment_money: { amount: string; currency_code: string }; 2078 | }; 2079 | current_total_tax: string; 2080 | current_total_tax_set: { 2081 | shop_money: { amount: string; currency_code: string }; 2082 | presentment_money: { amount: string; currency_code: string }; 2083 | }; 2084 | customer_locale: string; 2085 | device_id: null | string; 2086 | discount_codes: any[]; 2087 | email: string; 2088 | estimated_taxes: boolean; 2089 | financial_status: string; 2090 | fulfillment_status: string; 2091 | landing_site: null | string; 2092 | landing_site_ref: null | string; 2093 | location_id: null | string; 2094 | merchant_of_record_app_id: null | string; 2095 | name: string; 2096 | note: null | string; 2097 | note_attributes: any[]; 2098 | number: number; 2099 | order_number: number; 2100 | order_status_url: string; 2101 | original_total_additional_fees_set: null | string; 2102 | original_total_duties_set: null | string; 2103 | payment_gateway_names: string[]; 2104 | phone: null | string; 2105 | po_number: null | string; 2106 | presentment_currency: string; 2107 | processed_at: string; 2108 | reference: null | string; 2109 | referring_site: null | string; 2110 | source_identifier: null | string; 2111 | source_name: string; 2112 | source_url: null | string; 2113 | subtotal_price: string; 2114 | subtotal_price_set: { 2115 | shop_money: { amount: string; currency_code: string }; 2116 | presentment_money: { amount: string; currency_code: string }; 2117 | }; 2118 | tags: string; 2119 | tax_exempt: boolean; 2120 | tax_lines: any[]; 2121 | taxes_included: boolean; 2122 | test: boolean; 2123 | token: string; 2124 | total_discounts: string; 2125 | total_discounts_set: { 2126 | shop_money: { amount: string; currency_code: string }; 2127 | presentment_money: { amount: string; currency_code: string }; 2128 | }; 2129 | total_line_items_price: string; 2130 | total_line_items_price_set: { 2131 | shop_money: { amount: string; currency_code: string }; 2132 | presentment_money: { amount: string; currency_code: string }; 2133 | }; 2134 | total_outstanding: string; 2135 | total_price: string; 2136 | total_price_set: { 2137 | shop_money: { amount: string; currency_code: string }; 2138 | presentment_money: { amount: string; currency_code: string }; 2139 | }; 2140 | total_shipping_price_set: { 2141 | shop_money: { amount: string; currency_code: string }; 2142 | presentment_money: { amount: string; currency_code: string }; 2143 | }; 2144 | total_tax: string; 2145 | total_tax_set: { 2146 | shop_money: { amount: string; currency_code: string }; 2147 | presentment_money: { amount: string; currency_code: string }; 2148 | }; 2149 | total_tip_received: string; 2150 | total_weight: number; 2151 | updated_at: string; 2152 | user_id: null | string; 2153 | billing_address: { 2154 | first_name: string; 2155 | address1: string; 2156 | phone: string; 2157 | city: string; 2158 | zip: string; 2159 | province: string; 2160 | country: string; 2161 | last_name: string; 2162 | address2: null | string; 2163 | company: string; 2164 | latitude: null | string; 2165 | longitude: null | string; 2166 | name: string; 2167 | country_code: string; 2168 | province_code: string; 2169 | }; 2170 | customer: { 2171 | id: number; 2172 | email: string; 2173 | created_at: null | string; 2174 | updated_at: null | string; 2175 | first_name: string; 2176 | last_name: string; 2177 | state: string; 2178 | note: null | string; 2179 | verified_email: boolean; 2180 | multipass_identifier: null | string; 2181 | tax_exempt: boolean; 2182 | phone: null | string; 2183 | email_marketing_consent: { 2184 | state: string; 2185 | opt_in_level: null | string; 2186 | consent_updated_at: null | string; 2187 | }; 2188 | sms_marketing_consent: null | string; 2189 | tags: string; 2190 | currency: string; 2191 | tax_exemptions: any[]; 2192 | admin_graphql_api_id: string; 2193 | default_address: { 2194 | id: number; 2195 | customer_id: number; 2196 | first_name: null | string; 2197 | last_name: null | string; 2198 | company: null | string; 2199 | address1: string; 2200 | address2: null | string; 2201 | city: string; 2202 | province: string; 2203 | country: string; 2204 | zip: string; 2205 | phone: string; 2206 | name: string; 2207 | province_code: string; 2208 | country_code: string; 2209 | country_name: string; 2210 | default: boolean; 2211 | }; 2212 | }; 2213 | discount_applications: any[]; 2214 | fulfillments: any[]; 2215 | line_items: { 2216 | id: number; 2217 | admin_graphql_api_id: string; 2218 | attributed_staffs: { id: string; quantity: number }[]; 2219 | current_quantity: number; 2220 | fulfillable_quantity: number; 2221 | fulfillment_service: string; 2222 | fulfillment_status: null | string; 2223 | gift_card: boolean; 2224 | grams: number; 2225 | name: string; 2226 | price: string; 2227 | price_set: { 2228 | shop_money: { amount: string; currency_code: string }; 2229 | presentment_money: { amount: string; currency_code: string }; 2230 | }; 2231 | product_exists: boolean; 2232 | product_id: number; 2233 | properties: any[]; 2234 | quantity: number; 2235 | requires_shipping: boolean; 2236 | sku: string; 2237 | taxable: boolean; 2238 | title: string; 2239 | total_discount: string; 2240 | total_discount_set: { 2241 | shop_money: { amount: string; currency_code: string }; 2242 | presentment_money: { amount: string; currency_code: string }; 2243 | }; 2244 | variant_id: number; 2245 | variant_inventory_management: string; 2246 | variant_title: null | string; 2247 | vendor: null | string; 2248 | tax_lines: any[]; 2249 | duties: any[]; 2250 | discount_allocations: any[]; 2251 | }[]; 2252 | payment_terms: null | string; 2253 | refunds: any[]; 2254 | shipping_address: { 2255 | first_name: string; 2256 | address1: string; 2257 | phone: string; 2258 | city: string; 2259 | zip: string; 2260 | province: string; 2261 | country: string; 2262 | last_name: string; 2263 | address2: null | string; 2264 | company: string; 2265 | latitude: null | string; 2266 | longitude: null | string; 2267 | name: string; 2268 | country_code: string; 2269 | province_code: string; 2270 | }; 2271 | shipping_lines: { 2272 | id: number; 2273 | carrier_identifier: null | string; 2274 | code: null | string; 2275 | discounted_price: string; 2276 | discounted_price_set: { 2277 | shop_money: { amount: string; currency_code: string }; 2278 | presentment_money: { amount: string; currency_code: string }; 2279 | }; 2280 | is_removed: boolean; 2281 | phone: null | string; 2282 | price: string; 2283 | price_set: { 2284 | shop_money: { amount: string; currency_code: string }; 2285 | presentment_money: { amount: string; currency_code: string }; 2286 | }; 2287 | requested_fulfillment_service_id: null | string; 2288 | source: string; 2289 | title: string; 2290 | tax_lines: any[]; 2291 | discount_allocations: any[]; 2292 | }[]; 2293 | } 2294 | 2295 | // Types for DISCOUNTS_CREATE 2296 | export interface DISCOUNTS_CREATE { 2297 | admin_graphql_api_id: string; 2298 | title: string; 2299 | status: string; 2300 | created_at: string; 2301 | updated_at: string; 2302 | } 2303 | 2304 | // Types for ORDER_TRANSACTIONS_CREATE 2305 | export interface ORDER_TRANSACTIONS_CREATE { 2306 | id: number; 2307 | order_id: number; 2308 | kind: string; 2309 | gateway: string; 2310 | status: string; 2311 | message: null | string; 2312 | created_at: string; 2313 | test: boolean; 2314 | authorization: string; 2315 | location_id: null | string; 2316 | user_id: null | string; 2317 | parent_id: null | string; 2318 | processed_at: null | string; 2319 | device_id: null | string; 2320 | error_code: null | string; 2321 | source_name: string; 2322 | payment_details: { 2323 | credit_card_bin: null | string; 2324 | avs_result_code: null | string; 2325 | cvv_result_code: null | string; 2326 | credit_card_number: string; 2327 | credit_card_company: string; 2328 | buyer_action_info: null | string; 2329 | credit_card_name: null | string; 2330 | credit_card_wallet: null | string; 2331 | credit_card_expiration_month: null | string; 2332 | credit_card_expiration_year: null | string; 2333 | payment_method_name: string; 2334 | }; 2335 | receipt: {}; 2336 | amount: string; 2337 | currency: string; 2338 | payment_id: string; 2339 | total_unsettled_set: { 2340 | presentment_money: { amount: string; currency: string }; 2341 | shop_money: { amount: string; currency: string }; 2342 | }; 2343 | manual_payment_gateway: boolean; 2344 | admin_graphql_api_id: string; 2345 | } 2346 | 2347 | // Types for DOMAINS_CREATE 2348 | export interface DOMAINS_CREATE { 2349 | id: number; 2350 | host: string; 2351 | ssl_enabled: boolean; 2352 | localization: { 2353 | country: null | string; 2354 | default_locale: string; 2355 | alternate_locales: any[]; 2356 | }; 2357 | } 2358 | 2359 | // Types for PRODUCT_FEEDS_FULL_SYNC_FINISH 2360 | export interface PRODUCT_FEEDS_FULL_SYNC_FINISH { 2361 | metadata: { 2362 | action: string; 2363 | type: string; 2364 | resource: string; 2365 | fullSyncId: string; 2366 | truncatedFields: any[]; 2367 | occurred_at: string; 2368 | }; 2369 | productFeed: { 2370 | id: string; 2371 | shop_id: string; 2372 | country: string; 2373 | language: string; 2374 | }; 2375 | fullSync: { 2376 | createdAt: string; 2377 | errorCode: null | string; 2378 | status: string; 2379 | count: number; 2380 | url: null | string; 2381 | }; 2382 | } 2383 | 2384 | // Types for COLLECTION_PUBLICATIONS_UPDATE 2385 | export interface COLLECTION_PUBLICATIONS_UPDATE { 2386 | id: null | string; 2387 | publication_id: null | string; 2388 | published_at: string; 2389 | published: boolean; 2390 | created_at: null | string; 2391 | updated_at: null | string; 2392 | collection_id: number; 2393 | } 2394 | 2395 | // Types for LOCATIONS_DELETE 2396 | export interface LOCATIONS_DELETE { 2397 | id: number; 2398 | } 2399 | 2400 | // Types for FULFILLMENTS_CREATE 2401 | export interface FULFILLMENTS_CREATE { 2402 | id: number; 2403 | order_id: number; 2404 | status: string; 2405 | created_at: string; 2406 | service: null | string; 2407 | updated_at: string; 2408 | tracking_company: string; 2409 | shipment_status: null | string; 2410 | location_id: null | string; 2411 | origin_address: null | string; 2412 | email: string; 2413 | destination: { 2414 | first_name: string; 2415 | address1: string; 2416 | phone: string; 2417 | city: string; 2418 | zip: string; 2419 | province: string; 2420 | country: string; 2421 | last_name: string; 2422 | address2: null | string; 2423 | company: string; 2424 | latitude: null | string; 2425 | longitude: null | string; 2426 | name: string; 2427 | country_code: string; 2428 | province_code: string; 2429 | }; 2430 | line_items: { 2431 | id: number; 2432 | variant_id: number; 2433 | title: string; 2434 | quantity: number; 2435 | sku: string; 2436 | variant_title: null | string; 2437 | vendor: null | string; 2438 | fulfillment_service: string; 2439 | product_id: number; 2440 | requires_shipping: boolean; 2441 | taxable: boolean; 2442 | gift_card: boolean; 2443 | name: string; 2444 | variant_inventory_management: string; 2445 | properties: any[]; 2446 | product_exists: boolean; 2447 | fulfillable_quantity: number; 2448 | grams: number; 2449 | price: string; 2450 | total_discount: string; 2451 | fulfillment_status: null | string; 2452 | price_set: { 2453 | shop_money: { amount: string; currency_code: string }; 2454 | presentment_money: { amount: string; currency_code: string }; 2455 | }; 2456 | total_discount_set: { 2457 | shop_money: { amount: string; currency_code: string }; 2458 | presentment_money: { amount: string; currency_code: string }; 2459 | }; 2460 | discount_allocations: any[]; 2461 | duties: any[]; 2462 | admin_graphql_api_id: string; 2463 | tax_lines: any[]; 2464 | }[]; 2465 | tracking_number: string; 2466 | tracking_numbers: string[]; 2467 | tracking_url: string; 2468 | tracking_urls: string[]; 2469 | receipt: {}; 2470 | name: string; 2471 | admin_graphql_api_id: string; 2472 | } 2473 | 2474 | // Types for CUSTOMERS_DELETE 2475 | export interface CUSTOMERS_DELETE { 2476 | id: number; 2477 | phone: null | string; 2478 | addresses: any[]; 2479 | tax_exemptions: any[]; 2480 | email_marketing_consent: null | string; 2481 | sms_marketing_consent: null | string; 2482 | admin_graphql_api_id: string; 2483 | } 2484 | 2485 | // Types for FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED 2486 | export interface FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED { 2487 | original_fulfillment_order: { 2488 | id: string; 2489 | status: string; 2490 | request_status: string; 2491 | }; 2492 | submitted_fulfillment_order: { 2493 | id: string; 2494 | status: string; 2495 | request_status: string; 2496 | }; 2497 | fulfillment_order_merchant_request: { id: string; message: string }; 2498 | } 2499 | 2500 | // Types for CUSTOMERS_ENABLE 2501 | export interface CUSTOMERS_ENABLE { 2502 | id: number; 2503 | email: string; 2504 | created_at: string; 2505 | updated_at: string; 2506 | first_name: string; 2507 | last_name: string; 2508 | orders_count: number; 2509 | state: string; 2510 | total_spent: string; 2511 | last_order_id: null | string; 2512 | note: string; 2513 | verified_email: boolean; 2514 | multipass_identifier: null | string; 2515 | tax_exempt: boolean; 2516 | tags: string; 2517 | last_order_name: null | string; 2518 | currency: string; 2519 | phone: null | string; 2520 | addresses: any[]; 2521 | tax_exemptions: any[]; 2522 | email_marketing_consent: null | string; 2523 | sms_marketing_consent: null | string; 2524 | admin_graphql_api_id: string; 2525 | } 2526 | 2527 | // Types for SUBSCRIPTION_BILLING_CYCLES_SKIP 2528 | export interface SUBSCRIPTION_BILLING_CYCLES_SKIP { 2529 | subscription_contract_id: number; 2530 | cycle_start_at: string; 2531 | cycle_end_at: string; 2532 | cycle_index: number; 2533 | contract_edit: null | string; 2534 | billing_attempt_expected_date: string; 2535 | skipped: boolean; 2536 | edited: boolean; 2537 | } 2538 | 2539 | // Types for SCHEDULED_PRODUCT_LISTINGS_ADD 2540 | export interface SCHEDULED_PRODUCT_LISTINGS_ADD { 2541 | scheduled_product_listing: { 2542 | product_id: number; 2543 | created_at: null | string; 2544 | updated_at: string; 2545 | body_html: string; 2546 | handle: string; 2547 | product_type: string; 2548 | title: string; 2549 | vendor: string; 2550 | available: boolean; 2551 | tags: string; 2552 | variants: { 2553 | id: number; 2554 | title: string; 2555 | option_values: { option_id: number; name: string; value: string }[]; 2556 | price: string; 2557 | formatted_price: string; 2558 | compare_at_price: string; 2559 | grams: number; 2560 | requires_shipping: boolean; 2561 | sku: string; 2562 | barcode: null | string; 2563 | taxable: boolean; 2564 | position: number; 2565 | available: boolean; 2566 | inventory_policy: string; 2567 | inventory_quantity: number; 2568 | inventory_management: string; 2569 | fulfillment_service: string; 2570 | weight: number; 2571 | weight_unit: string; 2572 | image_id: null | string; 2573 | created_at: string; 2574 | updated_at: string; 2575 | }[]; 2576 | publish_at: null | string; 2577 | images: any[]; 2578 | options: { 2579 | id: number; 2580 | name: string; 2581 | product_id: number; 2582 | position: number; 2583 | values: string[]; 2584 | }[]; 2585 | }; 2586 | } 2587 | 2588 | // Types for PROFILES_DELETE 2589 | export interface PROFILES_DELETE { 2590 | id: number; 2591 | } 2592 | 2593 | // Types for REVERSE_FULFILLMENT_ORDERS_DISPOSE 2594 | export interface REVERSE_FULFILLMENT_ORDERS_DISPOSE { 2595 | id: number; 2596 | admin_graphql_api_id: string; 2597 | dispositions: { 2598 | reverse_fulfillment_order_line_item: { 2599 | id: number; 2600 | admin_graphql_api_id: string; 2601 | }; 2602 | reverse_delivery_line_item: null | string; 2603 | type: string; 2604 | location: { id: number; admin_graphql_api_id: string }; 2605 | quantity: number; 2606 | }[]; 2607 | total_dispositions: number; 2608 | } 2609 | 2610 | // Types for PAYMENT_TERMS_CREATE 2611 | export interface PAYMENT_TERMS_CREATE { 2612 | id: number; 2613 | payment_terms_name: string; 2614 | payment_terms_type: string; 2615 | due_in_days: number; 2616 | created_at: string; 2617 | updated_at: string; 2618 | payment_schedules: { 2619 | id: number; 2620 | payment_terms_id: number; 2621 | amount: string; 2622 | currency: string; 2623 | issued_at: string; 2624 | due_at: string; 2625 | completed_at: string; 2626 | created_at: string; 2627 | updated_at: string; 2628 | admin_graphql_api_id: string; 2629 | }[]; 2630 | admin_graphql_api_id: string; 2631 | } 2632 | 2633 | // Types for PRODUCTS_DELETE 2634 | export interface PRODUCTS_DELETE { 2635 | id: number; 2636 | } 2637 | 2638 | // Types for CHECKOUTS_UPDATE 2639 | export interface CHECKOUTS_UPDATE { 2640 | id: number; 2641 | token: string; 2642 | cart_token: string; 2643 | email: string; 2644 | gateway: null | string; 2645 | buyer_accepts_marketing: boolean; 2646 | created_at: string; 2647 | updated_at: string; 2648 | landing_site: null | string; 2649 | note: null | string; 2650 | note_attributes: any[]; 2651 | referring_site: null | string; 2652 | shipping_lines: any[]; 2653 | taxes_included: boolean; 2654 | total_weight: number; 2655 | currency: string; 2656 | completed_at: null | string; 2657 | closed_at: null | string; 2658 | user_id: null | string; 2659 | location_id: null | string; 2660 | source_identifier: null | string; 2661 | source_url: null | string; 2662 | device_id: null | string; 2663 | phone: null | string; 2664 | customer_locale: null | string; 2665 | line_items: { 2666 | applied_discounts: any[]; 2667 | discount_allocations: any[]; 2668 | key: string; 2669 | destination_location_id: number; 2670 | fulfillment_service: string; 2671 | gift_card: boolean; 2672 | grams: number; 2673 | origin_location_id: number; 2674 | presentment_title: string; 2675 | presentment_variant_title: string; 2676 | product_id: number; 2677 | properties: null | string; 2678 | quantity: number; 2679 | requires_shipping: boolean; 2680 | sku: string; 2681 | tax_lines: { 2682 | price: string; 2683 | position: number; 2684 | rate: number; 2685 | title: string; 2686 | source: string; 2687 | zone: string; 2688 | jurisdiction_id: null | string; 2689 | jurisdiction_type: null | string; 2690 | jurisdiction_source: null | string; 2691 | reporting_taxable_amount: null | string; 2692 | reporting_non_taxable_amount: null | string; 2693 | reporting_exempt_amount: null | string; 2694 | reporting_jurisdiction_name: null | string; 2695 | reporting_jurisdiction_type: null | string; 2696 | reporting_jurisdiction_code: null | string; 2697 | tax_api_client_id: null | string; 2698 | tax_calculation_price: string; 2699 | tax_registration_id: null | string; 2700 | compare_at: number; 2701 | channel_liable: boolean; 2702 | }[]; 2703 | taxable: boolean; 2704 | title: string; 2705 | variant_id: number; 2706 | variant_title: string; 2707 | variant_price: string; 2708 | vendor: string; 2709 | user_id: null | string; 2710 | unit_price_measurement: { 2711 | measured_type: null | string; 2712 | quantity_value: null | string; 2713 | quantity_unit: null | string; 2714 | reference_value: null | string; 2715 | reference_unit: null | string; 2716 | }; 2717 | rank: null | string; 2718 | compare_at_price: null | string; 2719 | line_price: string; 2720 | price: string; 2721 | }[]; 2722 | name: string; 2723 | source: null | string; 2724 | abandoned_checkout_url: string; 2725 | discount_codes: any[]; 2726 | tax_lines: { 2727 | price: string; 2728 | rate: number; 2729 | title: string; 2730 | channel_liable: boolean; 2731 | }[]; 2732 | source_name: string; 2733 | presentment_currency: string; 2734 | buyer_accepts_sms_marketing: boolean; 2735 | sms_marketing_phone: null | string; 2736 | total_discounts: string; 2737 | total_line_items_price: string; 2738 | total_price: string; 2739 | total_tax: string; 2740 | subtotal_price: string; 2741 | total_duties: null | string; 2742 | reservation_token: null | string; 2743 | billing_address: { 2744 | first_name: string; 2745 | address1: string; 2746 | phone: string; 2747 | city: string; 2748 | zip: string; 2749 | province: string; 2750 | country: string; 2751 | last_name: string; 2752 | address2: null | string; 2753 | company: string; 2754 | latitude: null | string; 2755 | longitude: null | string; 2756 | name: string; 2757 | country_code: string; 2758 | province_code: string; 2759 | }; 2760 | shipping_address: { 2761 | first_name: string; 2762 | address1: string; 2763 | phone: string; 2764 | city: string; 2765 | zip: string; 2766 | province: string; 2767 | country: string; 2768 | last_name: string; 2769 | address2: null | string; 2770 | company: string; 2771 | latitude: null | string; 2772 | longitude: null | string; 2773 | name: string; 2774 | country_code: string; 2775 | province_code: string; 2776 | }; 2777 | customer: { 2778 | id: number; 2779 | email: string; 2780 | created_at: null | string; 2781 | updated_at: null | string; 2782 | first_name: string; 2783 | last_name: string; 2784 | orders_count: number; 2785 | state: string; 2786 | total_spent: string; 2787 | last_order_id: null | string; 2788 | note: null | string; 2789 | verified_email: boolean; 2790 | multipass_identifier: null | string; 2791 | tax_exempt: boolean; 2792 | tags: string; 2793 | last_order_name: null | string; 2794 | currency: string; 2795 | phone: null | string; 2796 | tax_exemptions: any[]; 2797 | email_marketing_consent: { 2798 | state: string; 2799 | opt_in_level: null | string; 2800 | consent_updated_at: null | string; 2801 | }; 2802 | sms_marketing_consent: null | string; 2803 | admin_graphql_api_id: string; 2804 | default_address: { 2805 | id: null | string; 2806 | customer_id: number; 2807 | first_name: null | string; 2808 | last_name: null | string; 2809 | company: null | string; 2810 | address1: string; 2811 | address2: null | string; 2812 | city: string; 2813 | province: string; 2814 | country: string; 2815 | zip: string; 2816 | phone: string; 2817 | name: string; 2818 | province_code: string; 2819 | country_code: string; 2820 | country_name: string; 2821 | default: boolean; 2822 | }; 2823 | }; 2824 | } 2825 | 2826 | // Types for APP_SUBSCRIPTIONS_UPDATE 2827 | export interface APP_SUBSCRIPTIONS_UPDATE { 2828 | app_subscription: { 2829 | admin_graphql_api_id: string; 2830 | name: string; 2831 | status: string; 2832 | admin_graphql_api_shop_id: string; 2833 | created_at: string; 2834 | updated_at: string; 2835 | currency: string; 2836 | capped_amount: string; 2837 | }; 2838 | } 2839 | 2840 | // Types for SUBSCRIPTION_BILLING_CYCLE_EDITS_DELETE 2841 | export interface SUBSCRIPTION_BILLING_CYCLE_EDITS_DELETE { 2842 | subscription_contract_id: number; 2843 | cycle_start_at: string; 2844 | cycle_end_at: string; 2845 | cycle_index: number; 2846 | contract_edit: null | string; 2847 | billing_attempt_expected_date: string; 2848 | skipped: boolean; 2849 | edited: boolean; 2850 | } 2851 | 2852 | // Types for FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED 2853 | export interface FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED { 2854 | fulfillment_order: { id: string; status: string; request_status: string }; 2855 | message: string; 2856 | } 2857 | 2858 | // Types for CUSTOMER_PAYMENT_METHODS_UPDATE 2859 | export interface CUSTOMER_PAYMENT_METHODS_UPDATE {} 2860 | 2861 | // Types for COLLECTION_LISTINGS_ADD 2862 | export interface COLLECTION_LISTINGS_ADD { 2863 | collection_listing: { 2864 | collection_id: number; 2865 | updated_at: null | string; 2866 | body_html: string; 2867 | default_product_image: null | string; 2868 | handle: string; 2869 | image: null | string; 2870 | title: string; 2871 | sort_order: null | string; 2872 | published_at: string; 2873 | }; 2874 | } 2875 | 2876 | // Types for FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED 2877 | export interface FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED { 2878 | fulfillment_order: { id: string; status: string; request_status: string }; 2879 | fulfillment_order_merchant_request: { id: string; message: string }; 2880 | } 2881 | 2882 | // Types for COMPANY_CONTACTS_UPDATE 2883 | export interface COMPANY_CONTACTS_UPDATE { 2884 | customer_admin_graphql_api_id: string; 2885 | title: string; 2886 | locale: string; 2887 | created_at: string; 2888 | updated_at: string; 2889 | admin_graphql_api_id: string; 2890 | company: { 2891 | name: string; 2892 | note: string; 2893 | external_id: string; 2894 | main_contact_admin_graphql_api_id: string; 2895 | created_at: string; 2896 | updated_at: string; 2897 | customer_since: string; 2898 | admin_graphql_api_id: string; 2899 | }; 2900 | } 2901 | 2902 | // Types for THEMES_UPDATE 2903 | export interface THEMES_UPDATE { 2904 | id: number; 2905 | name: string; 2906 | created_at: string; 2907 | updated_at: string; 2908 | role: string; 2909 | theme_store_id: number; 2910 | previewable: boolean; 2911 | processing: boolean; 2912 | admin_graphql_api_id: string; 2913 | } 2914 | 2915 | // Types for SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS 2916 | export interface SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS { 2917 | id: null | string; 2918 | admin_graphql_api_id: null | string; 2919 | idempotency_key: string; 2920 | order_id: number; 2921 | admin_graphql_api_order_id: string; 2922 | subscription_contract_id: number; 2923 | admin_graphql_api_subscription_contract_id: string; 2924 | ready: boolean; 2925 | error_message: null | string; 2926 | error_code: null | string; 2927 | } 2928 | 2929 | // Types for DISCOUNTS_REDEEMCODE_REMOVED 2930 | export interface DISCOUNTS_REDEEMCODE_REMOVED { 2931 | admin_graphql_api_id: string; 2932 | redeem_code: { id: string; code: string }; 2933 | updated_at: string; 2934 | } 2935 | 2936 | // Types for LOCALES_UPDATE 2937 | export interface LOCALES_UPDATE { 2938 | locale: string; 2939 | published: boolean; 2940 | } 2941 | 2942 | // Types for FULFILLMENT_ORDERS_RESCHEDULED 2943 | export interface FULFILLMENT_ORDERS_RESCHEDULED { 2944 | fulfillment_order: { id: string; status: string; fulfill_at: string }; 2945 | } 2946 | 2947 | // Types for SELLING_PLAN_GROUPS_UPDATE 2948 | export interface SELLING_PLAN_GROUPS_UPDATE { 2949 | admin_graphql_api_id: string; 2950 | id: number; 2951 | name: string; 2952 | merchant_code: string; 2953 | admin_graphql_api_app: string; 2954 | app_id: null | string; 2955 | description: null | string; 2956 | options: string[]; 2957 | position: null | string; 2958 | summary: string; 2959 | selling_plans: { 2960 | name: string; 2961 | options: string[]; 2962 | position: null | string; 2963 | description: null | string; 2964 | billing_policy: { 2965 | interval: string; 2966 | interval_count: number; 2967 | min_cycles: null | string; 2968 | max_cycles: null | string; 2969 | }; 2970 | delivery_policy: { 2971 | interval: string; 2972 | interval_count: number; 2973 | anchors: any[]; 2974 | cutoff: null | string; 2975 | pre_anchor_behavior: string; 2976 | }; 2977 | pricing_policies: any[]; 2978 | }[]; 2979 | product_variants: any[]; 2980 | products: any[]; 2981 | } 2982 | 2983 | // Types for SHIPPING_ADDRESSES_UPDATE 2984 | export interface SHIPPING_ADDRESSES_UPDATE {} 2985 | 2986 | // Types for MARKETS_CREATE 2987 | export interface MARKETS_CREATE { 2988 | id: number; 2989 | name: string; 2990 | enabled: boolean; 2991 | regions: { country_code: string }[]; 2992 | } 2993 | 2994 | // Types for DRAFT_ORDERS_UPDATE 2995 | export interface DRAFT_ORDERS_UPDATE { 2996 | id: number; 2997 | note: null | string; 2998 | email: string; 2999 | taxes_included: boolean; 3000 | currency: string; 3001 | invoice_sent_at: null | string; 3002 | created_at: string; 3003 | updated_at: string; 3004 | tax_exempt: boolean; 3005 | completed_at: null | string; 3006 | name: string; 3007 | status: string; 3008 | line_items: { 3009 | id: number; 3010 | variant_id: number; 3011 | product_id: number; 3012 | title: string; 3013 | variant_title: string; 3014 | sku: string; 3015 | vendor: string; 3016 | quantity: number; 3017 | requires_shipping: boolean; 3018 | taxable: boolean; 3019 | gift_card: boolean; 3020 | fulfillment_service: string; 3021 | grams: number; 3022 | tax_lines: any[]; 3023 | applied_discount: null | string; 3024 | name: string; 3025 | properties: any[]; 3026 | custom: boolean; 3027 | price: string; 3028 | admin_graphql_api_id: string; 3029 | }[]; 3030 | shipping_address: { 3031 | first_name: string; 3032 | address1: string; 3033 | phone: string; 3034 | city: string; 3035 | zip: string; 3036 | province: string; 3037 | country: string; 3038 | last_name: string; 3039 | address2: null | string; 3040 | company: string; 3041 | latitude: null | string; 3042 | longitude: null | string; 3043 | name: string; 3044 | country_code: string; 3045 | province_code: string; 3046 | }; 3047 | billing_address: { 3048 | first_name: string; 3049 | address1: string; 3050 | phone: string; 3051 | city: string; 3052 | zip: string; 3053 | province: string; 3054 | country: string; 3055 | last_name: string; 3056 | address2: null | string; 3057 | company: string; 3058 | latitude: null | string; 3059 | longitude: null | string; 3060 | name: string; 3061 | country_code: string; 3062 | province_code: string; 3063 | }; 3064 | invoice_url: string; 3065 | applied_discount: { 3066 | description: string; 3067 | value: string; 3068 | title: string; 3069 | amount: string; 3070 | value_type: string; 3071 | }; 3072 | order_id: null | string; 3073 | shipping_line: { 3074 | title: string; 3075 | custom: boolean; 3076 | handle: null | string; 3077 | price: string; 3078 | }; 3079 | tax_lines: { rate: number; title: string; price: string }[]; 3080 | tags: string; 3081 | note_attributes: any[]; 3082 | total_price: string; 3083 | subtotal_price: string; 3084 | total_tax: string; 3085 | payment_terms: { 3086 | id: number; 3087 | payment_terms_name: string; 3088 | payment_terms_type: string; 3089 | due_in_days: number; 3090 | created_at: string; 3091 | updated_at: string; 3092 | payment_schedules: { 3093 | id: number; 3094 | created_at: string; 3095 | updated_at: string; 3096 | payment_terms_id: number; 3097 | reference_id: null | string; 3098 | reference_type: null | string; 3099 | issued_at: string; 3100 | due_at: string; 3101 | completed_at: string; 3102 | amount: string; 3103 | currency: string; 3104 | }[]; 3105 | }; 3106 | admin_graphql_api_id: string; 3107 | customer: { 3108 | id: number; 3109 | email: string; 3110 | created_at: null | string; 3111 | updated_at: null | string; 3112 | first_name: string; 3113 | last_name: string; 3114 | orders_count: number; 3115 | state: string; 3116 | total_spent: string; 3117 | last_order_id: null | string; 3118 | note: null | string; 3119 | verified_email: boolean; 3120 | multipass_identifier: null | string; 3121 | tax_exempt: boolean; 3122 | tags: string; 3123 | last_order_name: null | string; 3124 | currency: string; 3125 | phone: null | string; 3126 | tax_exemptions: any[]; 3127 | email_marketing_consent: { 3128 | state: string; 3129 | opt_in_level: null | string; 3130 | consent_updated_at: null | string; 3131 | }; 3132 | sms_marketing_consent: null | string; 3133 | admin_graphql_api_id: string; 3134 | default_address: { 3135 | id: null | string; 3136 | customer_id: number; 3137 | first_name: null | string; 3138 | last_name: null | string; 3139 | company: null | string; 3140 | address1: string; 3141 | address2: null | string; 3142 | city: string; 3143 | province: string; 3144 | country: string; 3145 | zip: string; 3146 | phone: string; 3147 | name: string; 3148 | province_code: string; 3149 | country_code: string; 3150 | country_name: string; 3151 | default: boolean; 3152 | }; 3153 | }; 3154 | } 3155 | 3156 | // Types for INVENTORY_ITEMS_DELETE 3157 | export interface INVENTORY_ITEMS_DELETE { 3158 | id: number; 3159 | country_code_of_origin: null | string; 3160 | province_code_of_origin: null | string; 3161 | harmonized_system_code: null | string; 3162 | country_harmonized_system_codes: any[]; 3163 | admin_graphql_api_id: string; 3164 | } 3165 | 3166 | // Types for DISPUTES_UPDATE 3167 | export interface DISPUTES_UPDATE { 3168 | id: number; 3169 | order_id: number; 3170 | type: string; 3171 | amount: string; 3172 | currency: string; 3173 | reason: string; 3174 | network_reason_code: string; 3175 | status: string; 3176 | evidence_due_by: string; 3177 | evidence_sent_on: null | string; 3178 | finalized_on: null | string; 3179 | initiated_at: string; 3180 | } 3181 | 3182 | // Types for SEGMENTS_CREATE 3183 | export interface SEGMENTS_CREATE { 3184 | id: number; 3185 | name: string; 3186 | query: string; 3187 | creationDate: string; 3188 | lastEditDate: string; 3189 | } 3190 | 3191 | // Types for CUSTOMER_GROUPS_UPDATE 3192 | export interface CUSTOMER_GROUPS_UPDATE { 3193 | id: number; 3194 | name: string; 3195 | created_at: string; 3196 | updated_at: string; 3197 | query: string; 3198 | } 3199 | 3200 | // Types for CHANNELS_DELETE 3201 | export interface CHANNELS_DELETE { 3202 | id: string; 3203 | } 3204 | 3205 | // Types for CUSTOMER_ACCOUNT_SETTINGS_UPDATE 3206 | export interface CUSTOMER_ACCOUNT_SETTINGS_UPDATE { 3207 | url: null | string; 3208 | customer_accounts_version: string; 3209 | login_required_at_checkout: boolean; 3210 | login_links_visible_on_storefront_and_checkout: boolean; 3211 | } 3212 | 3213 | // Types for SUBSCRIPTION_CONTRACTS_ACTIVATE 3214 | export interface SUBSCRIPTION_CONTRACTS_ACTIVATE { 3215 | admin_graphql_api_id: string; 3216 | id: number; 3217 | billing_policy: { 3218 | interval: string; 3219 | interval_count: number; 3220 | min_cycles: number; 3221 | max_cycles: number; 3222 | }; 3223 | currency_code: string; 3224 | customer_id: number; 3225 | admin_graphql_api_customer_id: string; 3226 | delivery_policy: { interval: string; interval_count: number }; 3227 | status: string; 3228 | admin_graphql_api_origin_order_id: string; 3229 | origin_order_id: number; 3230 | revision_id: string; 3231 | } 3232 | 3233 | // Types for COLLECTIONS_DELETE 3234 | export interface COLLECTIONS_DELETE { 3235 | id: number; 3236 | published_scope: string; 3237 | admin_graphql_api_id: string; 3238 | } 3239 | 3240 | // Types for CUSTOMERS_EMAIL_MARKETING_CONSENT_UPDATE 3241 | export interface CUSTOMERS_EMAIL_MARKETING_CONSENT_UPDATE { 3242 | customer_id: number; 3243 | email_address: null | string; 3244 | email_marketing_consent: { 3245 | state: null | string; 3246 | opt_in_level: null | string; 3247 | consent_updated_at: null | string; 3248 | }; 3249 | } 3250 | 3251 | // Types for DISCOUNTS_UPDATE 3252 | export interface DISCOUNTS_UPDATE { 3253 | admin_graphql_api_id: string; 3254 | title: string; 3255 | status: string; 3256 | created_at: string; 3257 | updated_at: string; 3258 | } 3259 | 3260 | // Types for COLLECTION_PUBLICATIONS_CREATE 3261 | export interface COLLECTION_PUBLICATIONS_CREATE { 3262 | id: null | string; 3263 | publication_id: null | string; 3264 | published_at: string; 3265 | published: boolean; 3266 | created_at: null | string; 3267 | updated_at: null | string; 3268 | collection_id: number; 3269 | } 3270 | 3271 | // Types for DOMAINS_UPDATE 3272 | export interface DOMAINS_UPDATE { 3273 | id: number; 3274 | host: string; 3275 | ssl_enabled: boolean; 3276 | localization: { 3277 | country: null | string; 3278 | default_locale: string; 3279 | alternate_locales: any[]; 3280 | }; 3281 | } 3282 | 3283 | // Types for INVENTORY_LEVELS_CONNECT 3284 | export interface INVENTORY_LEVELS_CONNECT { 3285 | inventory_item_id: number; 3286 | location_id: number; 3287 | available: null | string; 3288 | updated_at: string; 3289 | admin_graphql_api_id: string; 3290 | } 3291 | 3292 | // Types for CUSTOMER_TAGS_ADDED 3293 | export interface CUSTOMER_TAGS_ADDED { 3294 | customerId: string; 3295 | tags: string[]; 3296 | occurredAt: string; 3297 | } 3298 | 3299 | // Types for FULFILLMENTS_UPDATE 3300 | export interface FULFILLMENTS_UPDATE { 3301 | id: number; 3302 | order_id: number; 3303 | status: string; 3304 | created_at: string; 3305 | service: null | string; 3306 | updated_at: string; 3307 | tracking_company: string; 3308 | shipment_status: null | string; 3309 | location_id: null | string; 3310 | origin_address: null | string; 3311 | email: string; 3312 | destination: { 3313 | first_name: string; 3314 | address1: string; 3315 | phone: string; 3316 | city: string; 3317 | zip: string; 3318 | province: string; 3319 | country: string; 3320 | last_name: string; 3321 | address2: null | string; 3322 | company: string; 3323 | latitude: null | string; 3324 | longitude: null | string; 3325 | name: string; 3326 | country_code: string; 3327 | province_code: string; 3328 | }; 3329 | line_items: { 3330 | id: number; 3331 | variant_id: number; 3332 | title: string; 3333 | quantity: number; 3334 | sku: string; 3335 | variant_title: null | string; 3336 | vendor: null | string; 3337 | fulfillment_service: string; 3338 | product_id: number; 3339 | requires_shipping: boolean; 3340 | taxable: boolean; 3341 | gift_card: boolean; 3342 | name: string; 3343 | variant_inventory_management: string; 3344 | properties: any[]; 3345 | product_exists: boolean; 3346 | fulfillable_quantity: number; 3347 | grams: number; 3348 | price: string; 3349 | total_discount: string; 3350 | fulfillment_status: null | string; 3351 | price_set: { 3352 | shop_money: { amount: string; currency_code: string }; 3353 | presentment_money: { amount: string; currency_code: string }; 3354 | }; 3355 | total_discount_set: { 3356 | shop_money: { amount: string; currency_code: string }; 3357 | presentment_money: { amount: string; currency_code: string }; 3358 | }; 3359 | discount_allocations: any[]; 3360 | duties: any[]; 3361 | admin_graphql_api_id: string; 3362 | tax_lines: any[]; 3363 | }[]; 3364 | tracking_number: string; 3365 | tracking_numbers: string[]; 3366 | tracking_url: string; 3367 | tracking_urls: string[]; 3368 | receipt: {}; 3369 | name: string; 3370 | admin_graphql_api_id: string; 3371 | } 3372 | 3373 | // Types for LOCATIONS_DEACTIVATE 3374 | export interface LOCATIONS_DEACTIVATE { 3375 | id: number; 3376 | name: string; 3377 | address1: string; 3378 | address2: string; 3379 | city: string; 3380 | zip: string; 3381 | province: string; 3382 | country: string; 3383 | phone: string; 3384 | created_at: string; 3385 | updated_at: string; 3386 | country_code: string; 3387 | country_name: string; 3388 | province_code: string; 3389 | legacy: boolean; 3390 | active: boolean; 3391 | admin_graphql_api_id: string; 3392 | } 3393 | 3394 | // Types for REFUNDS_CREATE 3395 | export interface REFUNDS_CREATE { 3396 | id: number; 3397 | order_id: number; 3398 | created_at: string; 3399 | note: string; 3400 | user_id: number; 3401 | processed_at: string; 3402 | restock: boolean; 3403 | duties: any[]; 3404 | total_duties_set: { 3405 | shop_money: { amount: string; currency_code: string }; 3406 | presentment_money: { amount: string; currency_code: string }; 3407 | }; 3408 | return: null | string; 3409 | refund_shipping_lines: any[]; 3410 | admin_graphql_api_id: string; 3411 | order_adjustments: any[]; 3412 | refund_line_items: { 3413 | id: number; 3414 | quantity: number; 3415 | line_item_id: number; 3416 | location_id: null | string; 3417 | restock_type: string; 3418 | subtotal: number; 3419 | total_tax: number; 3420 | subtotal_set: { 3421 | shop_money: { amount: string; currency_code: string }; 3422 | presentment_money: { amount: string; currency_code: string }; 3423 | }; 3424 | total_tax_set: { 3425 | shop_money: { amount: string; currency_code: string }; 3426 | presentment_money: { amount: string; currency_code: string }; 3427 | }; 3428 | line_item: { 3429 | id: number; 3430 | variant_id: number; 3431 | title: string; 3432 | quantity: number; 3433 | sku: string; 3434 | variant_title: null | string; 3435 | vendor: null | string; 3436 | fulfillment_service: string; 3437 | product_id: number; 3438 | requires_shipping: boolean; 3439 | taxable: boolean; 3440 | gift_card: boolean; 3441 | name: string; 3442 | variant_inventory_management: string; 3443 | properties: any[]; 3444 | product_exists: boolean; 3445 | fulfillable_quantity: number; 3446 | grams: number; 3447 | price: string; 3448 | total_discount: string; 3449 | fulfillment_status: null | string; 3450 | price_set: { 3451 | shop_money: { amount: string; currency_code: string }; 3452 | presentment_money: { amount: string; currency_code: string }; 3453 | }; 3454 | total_discount_set: { 3455 | shop_money: { amount: string; currency_code: string }; 3456 | presentment_money: { amount: string; currency_code: string }; 3457 | }; 3458 | discount_allocations: any[]; 3459 | duties: any[]; 3460 | admin_graphql_api_id: string; 3461 | tax_lines: any[]; 3462 | }; 3463 | }[]; 3464 | transactions: any[]; 3465 | } 3466 | 3467 | // Types for PRODUCTS_UPDATE 3468 | export interface PRODUCTS_UPDATE { 3469 | admin_graphql_api_id: string; 3470 | body_html: string; 3471 | created_at: null | string; 3472 | handle: string; 3473 | id: number; 3474 | product_type: string; 3475 | published_at: string; 3476 | template_suffix: null | string; 3477 | title: string; 3478 | updated_at: string; 3479 | vendor: string; 3480 | status: string; 3481 | published_scope: string; 3482 | tags: string; 3483 | variants: { 3484 | admin_graphql_api_id: string; 3485 | barcode: null | string; 3486 | compare_at_price: string; 3487 | created_at: string; 3488 | id: number; 3489 | inventory_policy: string; 3490 | position: number; 3491 | price: string; 3492 | product_id: number; 3493 | sku: string; 3494 | taxable: boolean; 3495 | title: string; 3496 | updated_at: string; 3497 | option1: string; 3498 | option2: null | string; 3499 | option3: null | string; 3500 | image_id: null | string; 3501 | inventory_item_id: null | string; 3502 | inventory_quantity: number; 3503 | old_inventory_quantity: number; 3504 | }[]; 3505 | options: any[]; 3506 | images: any[]; 3507 | image: null | string; 3508 | media: any[]; 3509 | variant_gids: { admin_graphql_api_id: string; updated_at: string }[]; 3510 | } 3511 | 3512 | // Types for CUSTOMERS_DISABLE 3513 | export interface CUSTOMERS_DISABLE { 3514 | id: number; 3515 | email: string; 3516 | created_at: string; 3517 | updated_at: string; 3518 | first_name: string; 3519 | last_name: string; 3520 | orders_count: number; 3521 | state: string; 3522 | total_spent: string; 3523 | last_order_id: null | string; 3524 | note: string; 3525 | verified_email: boolean; 3526 | multipass_identifier: null | string; 3527 | tax_exempt: boolean; 3528 | tags: string; 3529 | last_order_name: null | string; 3530 | currency: string; 3531 | phone: null | string; 3532 | addresses: any[]; 3533 | tax_exemptions: any[]; 3534 | email_marketing_consent: null | string; 3535 | sms_marketing_consent: null | string; 3536 | admin_graphql_api_id: string; 3537 | } 3538 | 3539 | // Types for CUSTOMER_PAYMENT_METHODS_REVOKE 3540 | export interface CUSTOMER_PAYMENT_METHODS_REVOKE {} 3541 | 3542 | // Types for PROFILES_UPDATE 3543 | export interface PROFILES_UPDATE { 3544 | id: number; 3545 | } 3546 | 3547 | // Types for METAOBJECTS_CREATE 3548 | export interface METAOBJECTS_CREATE { 3549 | type: string; 3550 | handle: string; 3551 | created_at: string; 3552 | updated_at: string; 3553 | display_name: string; 3554 | id: string; 3555 | definition_id: string; 3556 | fields: {}; 3557 | created_by_staff_id: string; 3558 | created_by_app_id: string; 3559 | capabilities: { publishable: { status: string } }; 3560 | } 3561 | 3562 | // Types for COLLECTION_LISTINGS_UPDATE 3563 | export interface COLLECTION_LISTINGS_UPDATE { 3564 | collection_listing: { 3565 | collection_id: number; 3566 | updated_at: null | string; 3567 | body_html: string; 3568 | default_product_image: null | string; 3569 | handle: string; 3570 | image: null | string; 3571 | title: string; 3572 | sort_order: null | string; 3573 | published_at: string; 3574 | }; 3575 | } 3576 | 3577 | // Types for THEMES_DELETE 3578 | export interface THEMES_DELETE { 3579 | id: number; 3580 | } 3581 | 3582 | // Types for SUBSCRIPTION_CONTRACTS_FAIL 3583 | export interface SUBSCRIPTION_CONTRACTS_FAIL { 3584 | admin_graphql_api_id: string; 3585 | id: number; 3586 | billing_policy: { 3587 | interval: string; 3588 | interval_count: number; 3589 | min_cycles: number; 3590 | max_cycles: number; 3591 | }; 3592 | currency_code: string; 3593 | customer_id: number; 3594 | admin_graphql_api_customer_id: string; 3595 | delivery_policy: { interval: string; interval_count: number }; 3596 | status: string; 3597 | admin_graphql_api_origin_order_id: string; 3598 | origin_order_id: number; 3599 | revision_id: string; 3600 | } 3601 | 3602 | // Types for SUBSCRIPTION_CONTRACTS_UPDATE 3603 | export interface SUBSCRIPTION_CONTRACTS_UPDATE { 3604 | admin_graphql_api_id: string; 3605 | id: number; 3606 | billing_policy: { 3607 | interval: string; 3608 | interval_count: number; 3609 | min_cycles: number; 3610 | max_cycles: number; 3611 | }; 3612 | currency_code: string; 3613 | customer_id: number; 3614 | admin_graphql_api_customer_id: string; 3615 | delivery_policy: { interval: string; interval_count: number }; 3616 | status: string; 3617 | admin_graphql_api_origin_order_id: string; 3618 | origin_order_id: number; 3619 | revision_id: string; 3620 | } 3621 | 3622 | // Types for COMPANIES_CREATE 3623 | export interface COMPANIES_CREATE { 3624 | name: string; 3625 | note: string; 3626 | external_id: string; 3627 | main_contact_admin_graphql_api_id: string; 3628 | created_at: string; 3629 | updated_at: string; 3630 | customer_since: string; 3631 | admin_graphql_api_id: string; 3632 | } 3633 | 3634 | // Types for COMPANY_CONTACTS_DELETE 3635 | export interface COMPANY_CONTACTS_DELETE { 3636 | customer_admin_graphql_api_id: string; 3637 | title: string; 3638 | locale: string; 3639 | created_at: string; 3640 | updated_at: string; 3641 | admin_graphql_api_id: string; 3642 | company: { 3643 | name: string; 3644 | note: string; 3645 | external_id: string; 3646 | main_contact_admin_graphql_api_id: string; 3647 | created_at: string; 3648 | updated_at: string; 3649 | customer_since: string; 3650 | admin_graphql_api_id: string; 3651 | }; 3652 | } 3653 | 3654 | // Types for SHOP_UPDATE 3655 | export interface SHOP_UPDATE { 3656 | id: number; 3657 | name: string; 3658 | email: string; 3659 | domain: null | string; 3660 | province: string; 3661 | country: string; 3662 | address1: string; 3663 | zip: string; 3664 | city: string; 3665 | source: null | string; 3666 | phone: string; 3667 | latitude: null | string; 3668 | longitude: null | string; 3669 | primary_locale: string; 3670 | address2: null | string; 3671 | created_at: null | string; 3672 | updated_at: null | string; 3673 | country_code: string; 3674 | country_name: string; 3675 | currency: string; 3676 | customer_email: string; 3677 | timezone: string; 3678 | iana_timezone: null | string; 3679 | shop_owner: string; 3680 | money_format: string; 3681 | money_with_currency_format: string; 3682 | weight_unit: string; 3683 | province_code: string; 3684 | taxes_included: null | string; 3685 | auto_configure_tax_inclusivity: null | string; 3686 | tax_shipping: null | string; 3687 | county_taxes: null | string; 3688 | plan_display_name: string; 3689 | plan_name: string; 3690 | has_discounts: boolean; 3691 | has_gift_cards: boolean; 3692 | myshopify_domain: null | string; 3693 | google_apps_domain: null | string; 3694 | google_apps_login_enabled: null | string; 3695 | money_in_emails_format: string; 3696 | money_with_currency_in_emails_format: string; 3697 | eligible_for_payments: boolean; 3698 | requires_extra_payments_agreement: boolean; 3699 | password_enabled: null | string; 3700 | has_storefront: boolean; 3701 | finances: boolean; 3702 | primary_location_id: number; 3703 | checkout_api_supported: boolean; 3704 | multi_location_enabled: boolean; 3705 | setup_required: boolean; 3706 | pre_launch_enabled: boolean; 3707 | enabled_presentment_currencies: string[]; 3708 | transactional_sms_disabled: boolean; 3709 | marketing_sms_consent_enabled_at_checkout: boolean; 3710 | } 3711 | 3712 | // Types for BULK_OPERATIONS_FINISH 3713 | export interface BULK_OPERATIONS_FINISH { 3714 | admin_graphql_api_id: string; 3715 | completed_at: string; 3716 | created_at: string; 3717 | error_code: null | string; 3718 | status: string; 3719 | type: string; 3720 | } 3721 | 3722 | // Types for CHECKOUTS_DELETE 3723 | export interface CHECKOUTS_DELETE { 3724 | id: number; 3725 | presentment_currency: string; 3726 | buyer_accepts_sms_marketing: boolean; 3727 | sms_marketing_phone: null | string; 3728 | total_discounts: string; 3729 | total_line_items_price: string; 3730 | total_price: string; 3731 | total_tax: string; 3732 | subtotal_price: string; 3733 | cart_token: string; 3734 | total_duties: null | string; 3735 | reservation_token: null | string; 3736 | } 3737 | 3738 | // Types for SUBSCRIPTION_BILLING_CYCLE_EDITS_UPDATE 3739 | export interface SUBSCRIPTION_BILLING_CYCLE_EDITS_UPDATE { 3740 | subscription_contract_id: number; 3741 | cycle_start_at: string; 3742 | cycle_end_at: string; 3743 | cycle_index: number; 3744 | contract_edit: null | string; 3745 | billing_attempt_expected_date: string; 3746 | skipped: boolean; 3747 | edited: boolean; 3748 | } 3749 | 3750 | // Types for FULFILLMENT_EVENTS_DELETE 3751 | export interface FULFILLMENT_EVENTS_DELETE { 3752 | id: number; 3753 | fulfillment_id: number; 3754 | status: string; 3755 | message: string; 3756 | happened_at: string; 3757 | city: null | string; 3758 | province: null | string; 3759 | country: string; 3760 | zip: null | string; 3761 | address1: null | string; 3762 | latitude: null | string; 3763 | longitude: null | string; 3764 | shop_id: number; 3765 | created_at: string; 3766 | updated_at: string; 3767 | estimated_delivery_at: null | string; 3768 | order_id: number; 3769 | admin_graphql_api_id: string; 3770 | } 3771 | 3772 | // Types for PRODUCT_LISTINGS_UPDATE 3773 | export interface PRODUCT_LISTINGS_UPDATE { 3774 | product_listing: { 3775 | product_id: number; 3776 | created_at: null | string; 3777 | updated_at: string; 3778 | body_html: string; 3779 | handle: string; 3780 | product_type: string; 3781 | title: string; 3782 | vendor: string; 3783 | available: boolean; 3784 | tags: string; 3785 | published_at: string; 3786 | variants: { 3787 | id: number; 3788 | title: string; 3789 | option_values: { option_id: number; name: string; value: string }[]; 3790 | price: string; 3791 | formatted_price: string; 3792 | compare_at_price: string; 3793 | grams: number; 3794 | requires_shipping: boolean; 3795 | sku: string; 3796 | barcode: null | string; 3797 | taxable: boolean; 3798 | position: number; 3799 | available: boolean; 3800 | inventory_policy: string; 3801 | inventory_quantity: number; 3802 | inventory_management: string; 3803 | fulfillment_service: string; 3804 | weight: number; 3805 | weight_unit: string; 3806 | image_id: null | string; 3807 | created_at: string; 3808 | updated_at: string; 3809 | }[]; 3810 | images: any[]; 3811 | options: { 3812 | id: number; 3813 | name: string; 3814 | product_id: number; 3815 | position: number; 3816 | values: string[]; 3817 | }[]; 3818 | }; 3819 | } 3820 | 3821 | // Types for SUBSCRIPTION_CONTRACTS_EXPIRE 3822 | export interface SUBSCRIPTION_CONTRACTS_EXPIRE { 3823 | admin_graphql_api_id: string; 3824 | id: number; 3825 | billing_policy: { 3826 | interval: string; 3827 | interval_count: number; 3828 | min_cycles: number; 3829 | max_cycles: number; 3830 | }; 3831 | currency_code: string; 3832 | customer_id: number; 3833 | admin_graphql_api_customer_id: string; 3834 | delivery_policy: { interval: string; interval_count: number }; 3835 | status: string; 3836 | admin_graphql_api_origin_order_id: string; 3837 | origin_order_id: number; 3838 | revision_id: string; 3839 | } 3840 | 3841 | // Types for ORDERS_SHOPIFY_PROTECT_ELIGIBILITY_CHANGED 3842 | export interface ORDERS_SHOPIFY_PROTECT_ELIGIBILITY_CHANGED { 3843 | order_id: number; 3844 | status: string; 3845 | eligibility: { status: string }; 3846 | } 3847 | 3848 | // Types for CUSTOMER_GROUPS_DELETE 3849 | export interface CUSTOMER_GROUPS_DELETE { 3850 | id: number; 3851 | } 3852 | 3853 | // Types for PRODUCT_PUBLICATIONS_CREATE 3854 | export interface PRODUCT_PUBLICATIONS_CREATE { 3855 | id: null | string; 3856 | publication_id: null | string; 3857 | published_at: string; 3858 | published: boolean; 3859 | created_at: null | string; 3860 | updated_at: null | string; 3861 | product_id: number; 3862 | } 3863 | 3864 | // Types for INVENTORY_ITEMS_UPDATE 3865 | export interface INVENTORY_ITEMS_UPDATE { 3866 | id: number; 3867 | sku: string; 3868 | created_at: string; 3869 | updated_at: string; 3870 | requires_shipping: boolean; 3871 | cost: null | string; 3872 | country_code_of_origin: null | string; 3873 | province_code_of_origin: null | string; 3874 | harmonized_system_code: null | string; 3875 | tracked: boolean; 3876 | country_harmonized_system_codes: any[]; 3877 | admin_graphql_api_id: string; 3878 | } 3879 | 3880 | // Types for CARTS_UPDATE 3881 | export interface CARTS_UPDATE { 3882 | id: string; 3883 | token: string; 3884 | line_items: { 3885 | id: number; 3886 | properties: {}; 3887 | quantity: number; 3888 | variant_id: number; 3889 | key: string; 3890 | discounted_price: string; 3891 | discounts: any[]; 3892 | gift_card: boolean; 3893 | grams: number; 3894 | line_price: string; 3895 | original_line_price: string; 3896 | original_price: string; 3897 | price: string; 3898 | product_id: number; 3899 | sku: string; 3900 | taxable: boolean; 3901 | title: string; 3902 | total_discount: string; 3903 | vendor: string; 3904 | discounted_price_set: { 3905 | shop_money: { amount: string; currency_code: string }; 3906 | presentment_money: { amount: string; currency_code: string }; 3907 | }; 3908 | line_price_set: { 3909 | shop_money: { amount: string; currency_code: string }; 3910 | presentment_money: { amount: string; currency_code: string }; 3911 | }; 3912 | original_line_price_set: { 3913 | shop_money: { amount: string; currency_code: string }; 3914 | presentment_money: { amount: string; currency_code: string }; 3915 | }; 3916 | price_set: { 3917 | shop_money: { amount: string; currency_code: string }; 3918 | presentment_money: { amount: string; currency_code: string }; 3919 | }; 3920 | total_discount_set: { 3921 | shop_money: { amount: string; currency_code: string }; 3922 | presentment_money: { amount: string; currency_code: string }; 3923 | }; 3924 | }[]; 3925 | note: null | string; 3926 | updated_at: string; 3927 | created_at: string; 3928 | } 3929 | 3930 | // Types for DRAFT_ORDERS_DELETE 3931 | export interface DRAFT_ORDERS_DELETE { 3932 | id: number; 3933 | } 3934 | 3935 | // Types for SELLING_PLAN_GROUPS_DELETE 3936 | export interface SELLING_PLAN_GROUPS_DELETE { 3937 | admin_graphql_api_id: string; 3938 | id: number; 3939 | } 3940 | 3941 | // Types for COMPANY_LOCATIONS_CREATE 3942 | export interface COMPANY_LOCATIONS_CREATE { 3943 | name: string; 3944 | external_id: string; 3945 | phone: string; 3946 | locale: string; 3947 | created_at: string; 3948 | updated_at: string; 3949 | note: string; 3950 | buyer_experience_configuration: null | string; 3951 | admin_graphql_api_id: string; 3952 | tax_exemptions: string[]; 3953 | company: { 3954 | name: string; 3955 | note: string; 3956 | external_id: string; 3957 | main_contact_admin_graphql_api_id: string; 3958 | created_at: string; 3959 | updated_at: string; 3960 | customer_since: string; 3961 | admin_graphql_api_id: string; 3962 | }; 3963 | billing_address: { 3964 | address1: string; 3965 | city: string; 3966 | province: string; 3967 | country: string; 3968 | zip: string; 3969 | recipient: string; 3970 | first_name: null | string; 3971 | last_name: null | string; 3972 | address2: null | string; 3973 | phone: string; 3974 | zone_code: string; 3975 | country_code: string; 3976 | created_at: string; 3977 | updated_at: string; 3978 | admin_graphql_api_id: string; 3979 | company_admin_graphql_api_id: string; 3980 | }; 3981 | shipping_address: { 3982 | address1: string; 3983 | city: string; 3984 | province: string; 3985 | country: string; 3986 | zip: string; 3987 | recipient: string; 3988 | first_name: null | string; 3989 | last_name: null | string; 3990 | address2: null | string; 3991 | phone: string; 3992 | zone_code: string; 3993 | country_code: string; 3994 | created_at: string; 3995 | updated_at: string; 3996 | admin_graphql_api_id: string; 3997 | company_admin_graphql_api_id: string; 3998 | }; 3999 | tax_registration: { tax_id: string }; 4000 | } 4001 | 4002 | // Types for FULFILLMENT_ORDERS_PLACED_ON_HOLD 4003 | export interface FULFILLMENT_ORDERS_PLACED_ON_HOLD { 4004 | fulfillment_order: { 4005 | id: string; 4006 | status: string; 4007 | fulfillment_holds: { id: string; reason: string; reason_notes: string }[]; 4008 | }; 4009 | remaining_fulfillment_order: { id: string; status: string }; 4010 | held_fulfillment_order_line_items: { id: string; quantity: number }[]; 4011 | } 4012 | 4013 | // Types for PRODUCT_FEEDS_CREATE 4014 | export interface PRODUCT_FEEDS_CREATE { 4015 | id: string; 4016 | country: string; 4017 | language: string; 4018 | status: string; 4019 | } 4020 | 4021 | // Types for TENDER_TRANSACTIONS_CREATE 4022 | export interface TENDER_TRANSACTIONS_CREATE { 4023 | id: number; 4024 | order_id: number; 4025 | amount: string; 4026 | currency: string; 4027 | user_id: null | string; 4028 | test: boolean; 4029 | processed_at: null | string; 4030 | remote_reference: string; 4031 | payment_details: null | string; 4032 | payment_method: string; 4033 | } 4034 | 4035 | // Types for PRODUCT_FEEDS_INCREMENTAL_SYNC 4036 | export interface PRODUCT_FEEDS_INCREMENTAL_SYNC { 4037 | metadata: { 4038 | action: string; 4039 | type: string; 4040 | resource: string; 4041 | truncatedFields: any[]; 4042 | occured_at: string; 4043 | }; 4044 | productFeed: { 4045 | id: string; 4046 | shop_id: string; 4047 | country: string; 4048 | language: string; 4049 | }; 4050 | product: { 4051 | id: string; 4052 | title: string; 4053 | description: string; 4054 | onlineStoreUrl: string; 4055 | createdAt: string; 4056 | updatedAt: string; 4057 | isPublished: boolean; 4058 | publishedAt: string; 4059 | productType: string; 4060 | vendor: string; 4061 | handle: string; 4062 | images: { 4063 | edges: { 4064 | node: { id: string; url: string; height: number; width: number }; 4065 | }[]; 4066 | }; 4067 | options: { name: string; values: string[] }[]; 4068 | seo: { title: string; description: string }; 4069 | tags: string[]; 4070 | variants: { 4071 | edges: { 4072 | node: { 4073 | id: string; 4074 | title: string; 4075 | price: { amount: string; currencyCode: string }; 4076 | compareAtPrice: null | string; 4077 | sku: string; 4078 | barcode: null | string; 4079 | quantityAvailable: number; 4080 | availableForSale: boolean; 4081 | weight: number; 4082 | weightUnit: string; 4083 | requireShipping: boolean; 4084 | inventoryPolicy: string; 4085 | createdAt: string; 4086 | updatedAt: string; 4087 | image: { id: string; url: string; height: number; width: number }; 4088 | selectedOptions: { name: string; value: string }[]; 4089 | }; 4090 | }[]; 4091 | }; 4092 | }; 4093 | } 4094 | 4095 | // Types for DISCOUNTS_DELETE 4096 | export interface DISCOUNTS_DELETE { 4097 | admin_graphql_api_id: string; 4098 | deleted_at: string; 4099 | } 4100 | 4101 | // Types for SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE 4102 | export interface SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE { 4103 | id: null | string; 4104 | admin_graphql_api_id: null | string; 4105 | idempotency_key: string; 4106 | order_id: number; 4107 | admin_graphql_api_order_id: string; 4108 | subscription_contract_id: number; 4109 | admin_graphql_api_subscription_contract_id: string; 4110 | ready: boolean; 4111 | error_message: null | string; 4112 | error_code: null | string; 4113 | } 4114 | 4115 | // Types for LOCATIONS_CREATE 4116 | export interface LOCATIONS_CREATE { 4117 | id: number; 4118 | name: string; 4119 | address1: string; 4120 | address2: string; 4121 | city: string; 4122 | zip: string; 4123 | province: string; 4124 | country: string; 4125 | phone: string; 4126 | created_at: string; 4127 | updated_at: string; 4128 | country_code: string; 4129 | country_name: string; 4130 | province_code: string; 4131 | legacy: boolean; 4132 | active: boolean; 4133 | admin_graphql_api_id: string; 4134 | } 4135 | 4136 | // Types for VARIANTS_OUT_OF_STOCK 4137 | export interface VARIANTS_OUT_OF_STOCK { 4138 | id: number; 4139 | product_id: number; 4140 | title: string; 4141 | price: string; 4142 | sku: string; 4143 | position: number; 4144 | inventory_policy: string; 4145 | compare_at_price: string; 4146 | option1: string; 4147 | option2: null | string; 4148 | option3: null | string; 4149 | created_at: string; 4150 | updated_at: string; 4151 | taxable: boolean; 4152 | barcode: null | string; 4153 | inventory_quantity: number; 4154 | old_inventory_quantity: number; 4155 | admin_graphql_api_id: string; 4156 | image_id: null | string; 4157 | } 4158 | 4159 | // Types for CUSTOMERS_CREATE 4160 | export interface CUSTOMERS_CREATE { 4161 | id: number; 4162 | email: string; 4163 | created_at: string; 4164 | updated_at: string; 4165 | first_name: string; 4166 | last_name: string; 4167 | orders_count: number; 4168 | state: string; 4169 | total_spent: string; 4170 | last_order_id: null | string; 4171 | note: string; 4172 | verified_email: boolean; 4173 | multipass_identifier: null | string; 4174 | tax_exempt: boolean; 4175 | tags: string; 4176 | last_order_name: null | string; 4177 | currency: string; 4178 | phone: null | string; 4179 | addresses: any[]; 4180 | tax_exemptions: any[]; 4181 | email_marketing_consent: null | string; 4182 | sms_marketing_consent: null | string; 4183 | admin_graphql_api_id: string; 4184 | } 4185 | 4186 | // Types for RETURNS_REOPEN 4187 | export interface RETURNS_REOPEN { 4188 | id: number; 4189 | admin_graphql_api_id: string; 4190 | status: string; 4191 | } 4192 | 4193 | // Types for SUBSCRIPTION_CONTRACTS_CANCEL 4194 | export interface SUBSCRIPTION_CONTRACTS_CANCEL { 4195 | admin_graphql_api_id: string; 4196 | id: number; 4197 | billing_policy: { 4198 | interval: string; 4199 | interval_count: number; 4200 | min_cycles: number; 4201 | max_cycles: number; 4202 | }; 4203 | currency_code: string; 4204 | customer_id: number; 4205 | admin_graphql_api_customer_id: string; 4206 | delivery_policy: { interval: string; interval_count: number }; 4207 | status: string; 4208 | admin_graphql_api_origin_order_id: string; 4209 | origin_order_id: number; 4210 | revision_id: string; 4211 | } 4212 | 4213 | // Types for COMPANY_CONTACT_ROLES_REVOKE 4214 | export interface COMPANY_CONTACT_ROLES_REVOKE { 4215 | company_contact: { 4216 | customer_admin_graphql_api_id: string; 4217 | title: string; 4218 | locale: string; 4219 | created_at: string; 4220 | updated_at: string; 4221 | admin_graphql_api_id: string; 4222 | company: { 4223 | name: string; 4224 | note: string; 4225 | external_id: string; 4226 | main_contact_admin_graphql_api_id: string; 4227 | created_at: string; 4228 | updated_at: string; 4229 | customer_since: string; 4230 | admin_graphql_api_id: string; 4231 | }; 4232 | }; 4233 | company_location: { 4234 | name: string; 4235 | external_id: string; 4236 | phone: string; 4237 | locale: string; 4238 | created_at: string; 4239 | updated_at: string; 4240 | note: string; 4241 | buyer_experience_configuration: null | string; 4242 | admin_graphql_api_id: string; 4243 | tax_exemptions: string[]; 4244 | company: { 4245 | name: string; 4246 | note: string; 4247 | external_id: string; 4248 | main_contact_admin_graphql_api_id: string; 4249 | created_at: string; 4250 | updated_at: string; 4251 | customer_since: string; 4252 | admin_graphql_api_id: string; 4253 | }; 4254 | billing_address: { 4255 | address1: string; 4256 | city: string; 4257 | province: string; 4258 | country: string; 4259 | zip: string; 4260 | recipient: string; 4261 | first_name: null | string; 4262 | last_name: null | string; 4263 | address2: null | string; 4264 | phone: string; 4265 | zone_code: string; 4266 | country_code: string; 4267 | created_at: string; 4268 | updated_at: string; 4269 | admin_graphql_api_id: string; 4270 | company_admin_graphql_api_id: string; 4271 | }; 4272 | shipping_address: { 4273 | address1: string; 4274 | city: string; 4275 | province: string; 4276 | country: string; 4277 | zip: string; 4278 | recipient: string; 4279 | first_name: null | string; 4280 | last_name: null | string; 4281 | address2: null | string; 4282 | phone: string; 4283 | zone_code: string; 4284 | country_code: string; 4285 | created_at: string; 4286 | updated_at: string; 4287 | admin_graphql_api_id: string; 4288 | company_admin_graphql_api_id: string; 4289 | }; 4290 | tax_registration: { tax_id: string }; 4291 | }; 4292 | company_contact_role: { name: string }; 4293 | } 4294 | 4295 | // Types for COLLECTIONS_UPDATE 4296 | export interface COLLECTIONS_UPDATE { 4297 | id: number; 4298 | handle: string; 4299 | title: string; 4300 | updated_at: string; 4301 | body_html: string; 4302 | published_at: string; 4303 | sort_order: null | string; 4304 | template_suffix: null | string; 4305 | published_scope: string; 4306 | admin_graphql_api_id: string; 4307 | } 4308 | 4309 | // Types for ORDERS_DELETE 4310 | export interface ORDERS_DELETE { 4311 | id: number; 4312 | } 4313 | 4314 | // Types for FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED 4315 | export interface FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED { 4316 | fulfillment_order: { id: string; status: string; request_status: string }; 4317 | message: string; 4318 | } 4319 | 4320 | // Types for SHOP_REDACT 4321 | export interface SHOP_REDACT { 4322 | shop_id: number; 4323 | shop_domain: string; 4324 | } 4325 | 4326 | // Types for FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY 4327 | export interface FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY { 4328 | fulfillment_order: { 4329 | id: string; 4330 | status: string; 4331 | preparable: boolean; 4332 | delivery_method: { method_type: string }; 4333 | }; 4334 | } 4335 | 4336 | // Types for SCHEDULED_PRODUCT_LISTINGS_REMOVE 4337 | export interface SCHEDULED_PRODUCT_LISTINGS_REMOVE { 4338 | scheduled_product_listing: { product_id: number }; 4339 | } 4340 | 4341 | // Types for LOCATIONS_ACTIVATE 4342 | export interface LOCATIONS_ACTIVATE { 4343 | id: number; 4344 | name: string; 4345 | address1: string; 4346 | address2: string; 4347 | city: string; 4348 | zip: string; 4349 | province: string; 4350 | country: string; 4351 | phone: string; 4352 | created_at: string; 4353 | updated_at: string; 4354 | country_code: string; 4355 | country_name: string; 4356 | province_code: string; 4357 | legacy: boolean; 4358 | active: boolean; 4359 | admin_graphql_api_id: string; 4360 | } 4361 | 4362 | // Types for PAYMENT_TERMS_DELETE 4363 | export interface PAYMENT_TERMS_DELETE { 4364 | id: number; 4365 | } 4366 | 4367 | // Types for RETURNS_CLOSE 4368 | export interface RETURNS_CLOSE { 4369 | id: number; 4370 | admin_graphql_api_id: string; 4371 | status: string; 4372 | } 4373 | 4374 | // Types for REVERSE_DELIVERIES_ATTACH_DELIVERABLE 4375 | export interface REVERSE_DELIVERIES_ATTACH_DELIVERABLE { 4376 | id: number; 4377 | admin_graphql_api_id: string; 4378 | return: { id: number; admin_graphql_api_id: string }; 4379 | shipping_deliverable: { 4380 | tracking: { 4381 | carrier_name: string; 4382 | tracking_number: string; 4383 | tracking_url: null | string; 4384 | }; 4385 | label: { public_file_url: null | string; created_at: null | string }; 4386 | }; 4387 | } 4388 | 4389 | // Types for SCHEDULED_PRODUCT_LISTINGS_UPDATE 4390 | export interface SCHEDULED_PRODUCT_LISTINGS_UPDATE { 4391 | scheduled_product_listing: { 4392 | product_id: number; 4393 | created_at: null | string; 4394 | updated_at: string; 4395 | body_html: string; 4396 | handle: string; 4397 | product_type: string; 4398 | title: string; 4399 | vendor: string; 4400 | available: boolean; 4401 | tags: string; 4402 | variants: { 4403 | id: number; 4404 | title: string; 4405 | option_values: { option_id: number; name: string; value: string }[]; 4406 | price: string; 4407 | formatted_price: string; 4408 | compare_at_price: string; 4409 | grams: number; 4410 | requires_shipping: boolean; 4411 | sku: string; 4412 | barcode: null | string; 4413 | taxable: boolean; 4414 | position: number; 4415 | available: boolean; 4416 | inventory_policy: string; 4417 | inventory_quantity: number; 4418 | inventory_management: string; 4419 | fulfillment_service: string; 4420 | weight: number; 4421 | weight_unit: string; 4422 | image_id: null | string; 4423 | created_at: string; 4424 | updated_at: string; 4425 | }[]; 4426 | publish_at: null | string; 4427 | images: any[]; 4428 | options: { 4429 | id: number; 4430 | name: string; 4431 | product_id: number; 4432 | position: number; 4433 | values: string[]; 4434 | }[]; 4435 | }; 4436 | } 4437 | 4438 | // Types for PRODUCTS_CREATE 4439 | export interface PRODUCTS_CREATE { 4440 | admin_graphql_api_id: string; 4441 | body_html: string; 4442 | created_at: null | string; 4443 | handle: string; 4444 | id: number; 4445 | product_type: string; 4446 | published_at: string; 4447 | template_suffix: null | string; 4448 | title: string; 4449 | updated_at: string; 4450 | vendor: string; 4451 | status: string; 4452 | published_scope: string; 4453 | tags: string; 4454 | variants: { 4455 | admin_graphql_api_id: string; 4456 | barcode: null | string; 4457 | compare_at_price: string; 4458 | created_at: string; 4459 | id: number; 4460 | inventory_policy: string; 4461 | position: number; 4462 | price: string; 4463 | product_id: number; 4464 | sku: string; 4465 | taxable: boolean; 4466 | title: string; 4467 | updated_at: string; 4468 | option1: string; 4469 | option2: null | string; 4470 | option3: null | string; 4471 | image_id: null | string; 4472 | inventory_item_id: null | string; 4473 | inventory_quantity: number; 4474 | old_inventory_quantity: number; 4475 | }[]; 4476 | options: any[]; 4477 | images: any[]; 4478 | image: null | string; 4479 | media: any[]; 4480 | variant_gids: { admin_graphql_api_id: string; updated_at: string }[]; 4481 | } 4482 | 4483 | // Types for ORDERS_CANCELLED 4484 | export interface ORDERS_CANCELLED { 4485 | id: number; 4486 | admin_graphql_api_id: string; 4487 | app_id: null | string; 4488 | browser_ip: null | string; 4489 | buyer_accepts_marketing: boolean; 4490 | cancel_reason: string; 4491 | cancelled_at: string; 4492 | cart_token: null | string; 4493 | checkout_id: null | string; 4494 | checkout_token: null | string; 4495 | client_details: null | string; 4496 | closed_at: null | string; 4497 | confirmation_number: null | string; 4498 | confirmed: boolean; 4499 | contact_email: string; 4500 | created_at: string; 4501 | currency: string; 4502 | current_subtotal_price: string; 4503 | current_subtotal_price_set: { 4504 | shop_money: { amount: string; currency_code: string }; 4505 | presentment_money: { amount: string; currency_code: string }; 4506 | }; 4507 | current_total_additional_fees_set: null | string; 4508 | current_total_discounts: string; 4509 | current_total_discounts_set: { 4510 | shop_money: { amount: string; currency_code: string }; 4511 | presentment_money: { amount: string; currency_code: string }; 4512 | }; 4513 | current_total_duties_set: null | string; 4514 | current_total_price: string; 4515 | current_total_price_set: { 4516 | shop_money: { amount: string; currency_code: string }; 4517 | presentment_money: { amount: string; currency_code: string }; 4518 | }; 4519 | current_total_tax: string; 4520 | current_total_tax_set: { 4521 | shop_money: { amount: string; currency_code: string }; 4522 | presentment_money: { amount: string; currency_code: string }; 4523 | }; 4524 | customer_locale: string; 4525 | device_id: null | string; 4526 | discount_codes: any[]; 4527 | email: string; 4528 | estimated_taxes: boolean; 4529 | financial_status: string; 4530 | fulfillment_status: string; 4531 | landing_site: null | string; 4532 | landing_site_ref: null | string; 4533 | location_id: null | string; 4534 | merchant_of_record_app_id: null | string; 4535 | name: string; 4536 | note: null | string; 4537 | note_attributes: any[]; 4538 | number: number; 4539 | order_number: number; 4540 | order_status_url: string; 4541 | original_total_additional_fees_set: null | string; 4542 | original_total_duties_set: null | string; 4543 | payment_gateway_names: string[]; 4544 | phone: null | string; 4545 | po_number: null | string; 4546 | presentment_currency: string; 4547 | processed_at: string; 4548 | reference: null | string; 4549 | referring_site: null | string; 4550 | source_identifier: null | string; 4551 | source_name: string; 4552 | source_url: null | string; 4553 | subtotal_price: string; 4554 | subtotal_price_set: { 4555 | shop_money: { amount: string; currency_code: string }; 4556 | presentment_money: { amount: string; currency_code: string }; 4557 | }; 4558 | tags: string; 4559 | tax_exempt: boolean; 4560 | tax_lines: any[]; 4561 | taxes_included: boolean; 4562 | test: boolean; 4563 | token: string; 4564 | total_discounts: string; 4565 | total_discounts_set: { 4566 | shop_money: { amount: string; currency_code: string }; 4567 | presentment_money: { amount: string; currency_code: string }; 4568 | }; 4569 | total_line_items_price: string; 4570 | total_line_items_price_set: { 4571 | shop_money: { amount: string; currency_code: string }; 4572 | presentment_money: { amount: string; currency_code: string }; 4573 | }; 4574 | total_outstanding: string; 4575 | total_price: string; 4576 | total_price_set: { 4577 | shop_money: { amount: string; currency_code: string }; 4578 | presentment_money: { amount: string; currency_code: string }; 4579 | }; 4580 | total_shipping_price_set: { 4581 | shop_money: { amount: string; currency_code: string }; 4582 | presentment_money: { amount: string; currency_code: string }; 4583 | }; 4584 | total_tax: string; 4585 | total_tax_set: { 4586 | shop_money: { amount: string; currency_code: string }; 4587 | presentment_money: { amount: string; currency_code: string }; 4588 | }; 4589 | total_tip_received: string; 4590 | total_weight: number; 4591 | updated_at: string; 4592 | user_id: null | string; 4593 | billing_address: { 4594 | first_name: string; 4595 | address1: string; 4596 | phone: string; 4597 | city: string; 4598 | zip: string; 4599 | province: string; 4600 | country: string; 4601 | last_name: string; 4602 | address2: null | string; 4603 | company: string; 4604 | latitude: null | string; 4605 | longitude: null | string; 4606 | name: string; 4607 | country_code: string; 4608 | province_code: string; 4609 | }; 4610 | customer: { 4611 | id: number; 4612 | email: string; 4613 | created_at: null | string; 4614 | updated_at: null | string; 4615 | first_name: string; 4616 | last_name: string; 4617 | state: string; 4618 | note: null | string; 4619 | verified_email: boolean; 4620 | multipass_identifier: null | string; 4621 | tax_exempt: boolean; 4622 | phone: null | string; 4623 | email_marketing_consent: { 4624 | state: string; 4625 | opt_in_level: null | string; 4626 | consent_updated_at: null | string; 4627 | }; 4628 | sms_marketing_consent: null | string; 4629 | tags: string; 4630 | currency: string; 4631 | tax_exemptions: any[]; 4632 | admin_graphql_api_id: string; 4633 | default_address: { 4634 | id: number; 4635 | customer_id: number; 4636 | first_name: null | string; 4637 | last_name: null | string; 4638 | company: null | string; 4639 | address1: string; 4640 | address2: null | string; 4641 | city: string; 4642 | province: string; 4643 | country: string; 4644 | zip: string; 4645 | phone: string; 4646 | name: string; 4647 | province_code: string; 4648 | country_code: string; 4649 | country_name: string; 4650 | default: boolean; 4651 | }; 4652 | }; 4653 | discount_applications: any[]; 4654 | fulfillments: any[]; 4655 | line_items: { 4656 | id: number; 4657 | admin_graphql_api_id: string; 4658 | attributed_staffs: { id: string; quantity: number }[]; 4659 | current_quantity: number; 4660 | fulfillable_quantity: number; 4661 | fulfillment_service: string; 4662 | fulfillment_status: null | string; 4663 | gift_card: boolean; 4664 | grams: number; 4665 | name: string; 4666 | price: string; 4667 | price_set: { 4668 | shop_money: { amount: string; currency_code: string }; 4669 | presentment_money: { amount: string; currency_code: string }; 4670 | }; 4671 | product_exists: boolean; 4672 | product_id: number; 4673 | properties: any[]; 4674 | quantity: number; 4675 | requires_shipping: boolean; 4676 | sku: string; 4677 | taxable: boolean; 4678 | title: string; 4679 | total_discount: string; 4680 | total_discount_set: { 4681 | shop_money: { amount: string; currency_code: string }; 4682 | presentment_money: { amount: string; currency_code: string }; 4683 | }; 4684 | variant_id: number; 4685 | variant_inventory_management: string; 4686 | variant_title: null | string; 4687 | vendor: null | string; 4688 | tax_lines: any[]; 4689 | duties: any[]; 4690 | discount_allocations: any[]; 4691 | }[]; 4692 | payment_terms: null | string; 4693 | refunds: any[]; 4694 | shipping_address: { 4695 | first_name: string; 4696 | address1: string; 4697 | phone: string; 4698 | city: string; 4699 | zip: string; 4700 | province: string; 4701 | country: string; 4702 | last_name: string; 4703 | address2: null | string; 4704 | company: string; 4705 | latitude: null | string; 4706 | longitude: null | string; 4707 | name: string; 4708 | country_code: string; 4709 | province_code: string; 4710 | }; 4711 | shipping_lines: { 4712 | id: number; 4713 | carrier_identifier: null | string; 4714 | code: null | string; 4715 | discounted_price: string; 4716 | discounted_price_set: { 4717 | shop_money: { amount: string; currency_code: string }; 4718 | presentment_money: { amount: string; currency_code: string }; 4719 | }; 4720 | is_removed: boolean; 4721 | phone: null | string; 4722 | price: string; 4723 | price_set: { 4724 | shop_money: { amount: string; currency_code: string }; 4725 | presentment_money: { amount: string; currency_code: string }; 4726 | }; 4727 | requested_fulfillment_service_id: null | string; 4728 | source: string; 4729 | title: string; 4730 | tax_lines: any[]; 4731 | discount_allocations: any[]; 4732 | }[]; 4733 | } 4734 | 4735 | // Types for CUSTOMER_TAGS_REMOVED 4736 | export interface CUSTOMER_TAGS_REMOVED { 4737 | customerId: string; 4738 | tags: string[]; 4739 | occurredAt: string; 4740 | } 4741 | 4742 | // Types for INVENTORY_LEVELS_UPDATE 4743 | export interface INVENTORY_LEVELS_UPDATE { 4744 | inventory_item_id: number; 4745 | location_id: number; 4746 | available: null | string; 4747 | updated_at: string; 4748 | admin_graphql_api_id: string; 4749 | } 4750 | 4751 | // Types for METAOBJECTS_UPDATE 4752 | export interface METAOBJECTS_UPDATE { 4753 | type: string; 4754 | handle: string; 4755 | created_at: string; 4756 | updated_at: string; 4757 | display_name: string; 4758 | id: string; 4759 | definition_id: string; 4760 | fields: {}; 4761 | created_by_staff_id: string; 4762 | created_by_app_id: string; 4763 | capabilities: { publishable: { status: string } }; 4764 | } 4765 | 4766 | // Types for PROFILES_CREATE 4767 | export interface PROFILES_CREATE { 4768 | id: number; 4769 | } 4770 | 4771 | // Types for THEMES_PUBLISH 4772 | export interface THEMES_PUBLISH { 4773 | id: number; 4774 | name: string; 4775 | created_at: string; 4776 | updated_at: string; 4777 | role: string; 4778 | theme_store_id: number; 4779 | previewable: boolean; 4780 | processing: boolean; 4781 | admin_graphql_api_id: string; 4782 | } 4783 | 4784 | // Types for COMPANIES_UPDATE 4785 | export interface COMPANIES_UPDATE { 4786 | name: string; 4787 | note: string; 4788 | external_id: string; 4789 | main_contact_admin_graphql_api_id: string; 4790 | created_at: string; 4791 | updated_at: string; 4792 | customer_since: string; 4793 | admin_graphql_api_id: string; 4794 | } 4795 | 4796 | // Types for PRODUCT_LISTINGS_ADD 4797 | export interface PRODUCT_LISTINGS_ADD { 4798 | product_listing: { 4799 | product_id: number; 4800 | created_at: null | string; 4801 | updated_at: string; 4802 | body_html: string; 4803 | handle: string; 4804 | product_type: string; 4805 | title: string; 4806 | vendor: string; 4807 | available: boolean; 4808 | tags: string; 4809 | published_at: string; 4810 | variants: { 4811 | id: number; 4812 | title: string; 4813 | option_values: { option_id: number; name: string; value: string }[]; 4814 | price: string; 4815 | formatted_price: string; 4816 | compare_at_price: string; 4817 | grams: number; 4818 | requires_shipping: boolean; 4819 | sku: string; 4820 | barcode: null | string; 4821 | taxable: boolean; 4822 | position: number; 4823 | available: boolean; 4824 | inventory_policy: string; 4825 | inventory_quantity: number; 4826 | inventory_management: string; 4827 | fulfillment_service: string; 4828 | weight: number; 4829 | weight_unit: string; 4830 | image_id: null | string; 4831 | created_at: string; 4832 | updated_at: string; 4833 | }[]; 4834 | images: any[]; 4835 | options: { 4836 | id: number; 4837 | name: string; 4838 | product_id: number; 4839 | position: number; 4840 | values: string[]; 4841 | }[]; 4842 | }; 4843 | } 4844 | 4845 | // Types for SUBSCRIPTION_BILLING_CYCLES_UNSKIP 4846 | export interface SUBSCRIPTION_BILLING_CYCLES_UNSKIP { 4847 | subscription_contract_id: number; 4848 | cycle_start_at: string; 4849 | cycle_end_at: string; 4850 | cycle_index: number; 4851 | contract_edit: null | string; 4852 | billing_attempt_expected_date: string; 4853 | skipped: boolean; 4854 | edited: boolean; 4855 | } 4856 | 4857 | // Types for SUBSCRIPTION_CONTRACTS_CREATE 4858 | export interface SUBSCRIPTION_CONTRACTS_CREATE { 4859 | admin_graphql_api_id: string; 4860 | id: number; 4861 | billing_policy: { 4862 | interval: string; 4863 | interval_count: number; 4864 | min_cycles: number; 4865 | max_cycles: number; 4866 | }; 4867 | currency_code: string; 4868 | customer_id: number; 4869 | admin_graphql_api_customer_id: string; 4870 | delivery_policy: { interval: string; interval_count: number }; 4871 | status: string; 4872 | admin_graphql_api_origin_order_id: string; 4873 | origin_order_id: number; 4874 | revision_id: string; 4875 | } 4876 | 4877 | // Types for CUSTOMERS_REDACT 4878 | export interface CUSTOMERS_REDACT { 4879 | shop_id: number; 4880 | shop_domain: string; 4881 | customer: { id: number; email: string; phone: string }; 4882 | orders_to_redact: number[]; 4883 | } 4884 | 4885 | // Types for SUBSCRIPTION_BILLING_CYCLE_EDITS_CREATE 4886 | export interface SUBSCRIPTION_BILLING_CYCLE_EDITS_CREATE { 4887 | subscription_contract_id: number; 4888 | cycle_start_at: string; 4889 | cycle_end_at: string; 4890 | cycle_index: number; 4891 | contract_edit: null | string; 4892 | billing_attempt_expected_date: string; 4893 | skipped: boolean; 4894 | edited: boolean; 4895 | } 4896 | 4897 | // Types for PRODUCT_LISTINGS_REMOVE 4898 | export interface PRODUCT_LISTINGS_REMOVE { 4899 | product_listing: { product_id: number }; 4900 | } 4901 | 4902 | // Types for RETURNS_UPDATE 4903 | export interface RETURNS_UPDATE { 4904 | admin_graphql_api_id: string; 4905 | return_line_items: { 4906 | removals: { admin_graphql_api_id: string; delta: number }[]; 4907 | }; 4908 | restocking_fees: { updates: any[]; removals: any[] }; 4909 | return_shipping_fees: { updates: any[]; removals: any[] }; 4910 | } 4911 | 4912 | // Types for MARKETS_DELETE 4913 | export interface MARKETS_DELETE { 4914 | id: number; 4915 | } 4916 | 4917 | // Types for PRODUCT_PUBLICATIONS_UPDATE 4918 | export interface PRODUCT_PUBLICATIONS_UPDATE { 4919 | id: null | string; 4920 | publication_id: null | string; 4921 | published_at: string; 4922 | published: boolean; 4923 | created_at: null | string; 4924 | updated_at: null | string; 4925 | product_id: number; 4926 | } 4927 | 4928 | // Types for CARTS_CREATE 4929 | export interface CARTS_CREATE { 4930 | id: string; 4931 | token: string; 4932 | line_items: { 4933 | id: number; 4934 | properties: {}; 4935 | quantity: number; 4936 | variant_id: number; 4937 | key: string; 4938 | discounted_price: string; 4939 | discounts: any[]; 4940 | gift_card: boolean; 4941 | grams: number; 4942 | line_price: string; 4943 | original_line_price: string; 4944 | original_price: string; 4945 | price: string; 4946 | product_id: number; 4947 | sku: string; 4948 | taxable: boolean; 4949 | title: string; 4950 | total_discount: string; 4951 | vendor: string; 4952 | discounted_price_set: { 4953 | shop_money: { amount: string; currency_code: string }; 4954 | presentment_money: { amount: string; currency_code: string }; 4955 | }; 4956 | line_price_set: { 4957 | shop_money: { amount: string; currency_code: string }; 4958 | presentment_money: { amount: string; currency_code: string }; 4959 | }; 4960 | original_line_price_set: { 4961 | shop_money: { amount: string; currency_code: string }; 4962 | presentment_money: { amount: string; currency_code: string }; 4963 | }; 4964 | price_set: { 4965 | shop_money: { amount: string; currency_code: string }; 4966 | presentment_money: { amount: string; currency_code: string }; 4967 | }; 4968 | total_discount_set: { 4969 | shop_money: { amount: string; currency_code: string }; 4970 | presentment_money: { amount: string; currency_code: string }; 4971 | }; 4972 | }[]; 4973 | note: null | string; 4974 | updated_at: string; 4975 | created_at: string; 4976 | } 4977 | 4978 | // Types for INVENTORY_ITEMS_CREATE 4979 | export interface INVENTORY_ITEMS_CREATE { 4980 | id: number; 4981 | sku: string; 4982 | created_at: string; 4983 | updated_at: string; 4984 | requires_shipping: boolean; 4985 | cost: null | string; 4986 | country_code_of_origin: null | string; 4987 | province_code_of_origin: null | string; 4988 | harmonized_system_code: null | string; 4989 | tracked: boolean; 4990 | country_harmonized_system_codes: any[]; 4991 | admin_graphql_api_id: string; 4992 | } 4993 | 4994 | // Types for FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE 4995 | export interface FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE { 4996 | fulfillment_order: { id: string; status: string }; 4997 | } 4998 | 4999 | // Types for SEGMENTS_DELETE 5000 | export interface SEGMENTS_DELETE { 5001 | id: number; 5002 | } 5003 | 5004 | // Types for APP_UNINSTALLED 5005 | export interface APP_UNINSTALLED { 5006 | id: number; 5007 | name: string; 5008 | email: string; 5009 | domain: null | string; 5010 | province: string; 5011 | country: string; 5012 | address1: string; 5013 | zip: string; 5014 | city: string; 5015 | source: null | string; 5016 | phone: string; 5017 | latitude: null | string; 5018 | longitude: null | string; 5019 | primary_locale: string; 5020 | address2: null | string; 5021 | created_at: null | string; 5022 | updated_at: null | string; 5023 | country_code: string; 5024 | country_name: string; 5025 | currency: string; 5026 | customer_email: string; 5027 | timezone: string; 5028 | iana_timezone: null | string; 5029 | shop_owner: string; 5030 | money_format: string; 5031 | money_with_currency_format: string; 5032 | weight_unit: string; 5033 | province_code: string; 5034 | taxes_included: null | string; 5035 | auto_configure_tax_inclusivity: null | string; 5036 | tax_shipping: null | string; 5037 | county_taxes: null | string; 5038 | plan_display_name: string; 5039 | plan_name: string; 5040 | has_discounts: boolean; 5041 | has_gift_cards: boolean; 5042 | myshopify_domain: null | string; 5043 | google_apps_domain: null | string; 5044 | google_apps_login_enabled: null | string; 5045 | money_in_emails_format: string; 5046 | money_with_currency_in_emails_format: string; 5047 | eligible_for_payments: boolean; 5048 | requires_extra_payments_agreement: boolean; 5049 | password_enabled: null | string; 5050 | has_storefront: boolean; 5051 | finances: boolean; 5052 | primary_location_id: number; 5053 | checkout_api_supported: boolean; 5054 | multi_location_enabled: boolean; 5055 | setup_required: boolean; 5056 | pre_launch_enabled: boolean; 5057 | enabled_presentment_currencies: string[]; 5058 | transactional_sms_disabled: boolean; 5059 | marketing_sms_consent_enabled_at_checkout: boolean; 5060 | } 5061 | 5062 | // Types for FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY 5063 | export interface FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY { 5064 | fulfillment_order: { id: string; status: string }; 5065 | } 5066 | 5067 | // Types for DISCOUNTS_REDEEMCODE_ADDED 5068 | export interface DISCOUNTS_REDEEMCODE_ADDED { 5069 | admin_graphql_api_id: string; 5070 | redeem_code: { id: string; code: string }; 5071 | updated_at: string; 5072 | } 5073 | 5074 | // Types for COMPANY_LOCATIONS_UPDATE 5075 | export interface COMPANY_LOCATIONS_UPDATE { 5076 | name: string; 5077 | external_id: string; 5078 | phone: string; 5079 | locale: string; 5080 | created_at: string; 5081 | updated_at: string; 5082 | note: string; 5083 | buyer_experience_configuration: null | string; 5084 | admin_graphql_api_id: string; 5085 | tax_exemptions: string[]; 5086 | company: { 5087 | name: string; 5088 | note: string; 5089 | external_id: string; 5090 | main_contact_admin_graphql_api_id: string; 5091 | created_at: string; 5092 | updated_at: string; 5093 | customer_since: string; 5094 | admin_graphql_api_id: string; 5095 | }; 5096 | billing_address: { 5097 | address1: string; 5098 | city: string; 5099 | province: string; 5100 | country: string; 5101 | zip: string; 5102 | recipient: string; 5103 | first_name: null | string; 5104 | last_name: null | string; 5105 | address2: null | string; 5106 | phone: string; 5107 | zone_code: string; 5108 | country_code: string; 5109 | created_at: string; 5110 | updated_at: string; 5111 | admin_graphql_api_id: string; 5112 | company_admin_graphql_api_id: string; 5113 | }; 5114 | shipping_address: { 5115 | address1: string; 5116 | city: string; 5117 | province: string; 5118 | country: string; 5119 | zip: string; 5120 | recipient: string; 5121 | first_name: null | string; 5122 | last_name: null | string; 5123 | address2: null | string; 5124 | phone: string; 5125 | zone_code: string; 5126 | country_code: string; 5127 | created_at: string; 5128 | updated_at: string; 5129 | admin_graphql_api_id: string; 5130 | company_admin_graphql_api_id: string; 5131 | }; 5132 | tax_registration: { tax_id: string }; 5133 | } 5134 | 5135 | // Types for FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED 5136 | export interface FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED { 5137 | fulfillment_order: { id: string; status: string }; 5138 | message: string; 5139 | } 5140 | 5141 | // Types for PRODUCT_FEEDS_UPDATE 5142 | export interface PRODUCT_FEEDS_UPDATE { 5143 | id: string; 5144 | country: string; 5145 | language: string; 5146 | status: string; 5147 | } 5148 | 5149 | // Types for ATTRIBUTED_SESSIONS_FIRST 5150 | export interface ATTRIBUTED_SESSIONS_FIRST {} 5151 | 5152 | // Types for CUSTOMERS_DATA_REQUEST 5153 | export interface CUSTOMERS_DATA_REQUEST { 5154 | shop_id: number; 5155 | shop_domain: string; 5156 | orders_requested: number[]; 5157 | customer: { id: number; email: string; phone: string }; 5158 | data_request: { id: number }; 5159 | } 5160 | 5161 | // Types for CUSTOMERS_MARKETING_CONSENT_UPDATE 5162 | export interface CUSTOMERS_MARKETING_CONSENT_UPDATE { 5163 | id: number; 5164 | phone: null | string; 5165 | sms_marketing_consent: { 5166 | state: null | string; 5167 | opt_in_level: null | string; 5168 | consent_updated_at: null | string; 5169 | consent_collected_from: string; 5170 | }; 5171 | } 5172 | 5173 | // Types for COLLECTION_PUBLICATIONS_DELETE 5174 | export interface COLLECTION_PUBLICATIONS_DELETE { 5175 | id: null | string; 5176 | } 5177 | 5178 | // Types for LOCATIONS_UPDATE 5179 | export interface LOCATIONS_UPDATE { 5180 | id: number; 5181 | name: string; 5182 | address1: string; 5183 | address2: string; 5184 | city: string; 5185 | zip: string; 5186 | province: string; 5187 | country: string; 5188 | phone: string; 5189 | created_at: string; 5190 | updated_at: string; 5191 | country_code: string; 5192 | country_name: string; 5193 | province_code: string; 5194 | legacy: boolean; 5195 | active: boolean; 5196 | admin_graphql_api_id: string; 5197 | } 5198 | 5199 | // Types for COLLECTION_LISTINGS_REMOVE 5200 | export interface COLLECTION_LISTINGS_REMOVE { 5201 | collection_listing: { collection_id: number }; 5202 | } 5203 | 5204 | // Types for CUSTOMERS_UPDATE 5205 | export interface CUSTOMERS_UPDATE { 5206 | id: number; 5207 | email: string; 5208 | created_at: string; 5209 | updated_at: string; 5210 | first_name: string; 5211 | last_name: string; 5212 | orders_count: number; 5213 | state: string; 5214 | total_spent: string; 5215 | last_order_id: null | string; 5216 | note: string; 5217 | verified_email: boolean; 5218 | multipass_identifier: null | string; 5219 | tax_exempt: boolean; 5220 | tags: string; 5221 | last_order_name: null | string; 5222 | currency: string; 5223 | phone: null | string; 5224 | addresses: any[]; 5225 | tax_exemptions: any[]; 5226 | email_marketing_consent: null | string; 5227 | sms_marketing_consent: null | string; 5228 | admin_graphql_api_id: string; 5229 | } 5230 | 5231 | // Types for FULFILLMENT_ORDERS_MERGED 5232 | export interface FULFILLMENT_ORDERS_MERGED { 5233 | merge_intents: { 5234 | fulfillment_order_id: number; 5235 | fulfillment_order_line_items: { id: number; quantity: number }[]; 5236 | }[]; 5237 | fulfillment_order_merges: { 5238 | fulfillment_order: { id: string; status: string }; 5239 | }; 5240 | } 5241 | 5242 | // Types for RETURNS_CANCEL 5243 | export interface RETURNS_CANCEL { 5244 | id: number; 5245 | admin_graphql_api_id: string; 5246 | status: string; 5247 | } 5248 | 5249 | // Types for FULFILLMENT_ORDERS_CANCELLED 5250 | export interface FULFILLMENT_ORDERS_CANCELLED { 5251 | fulfillment_order: { id: string; status: string }; 5252 | replacement_fulfillment_order: { id: string; status: string }; 5253 | } 5254 | 5255 | // Types for COLLECTIONS_CREATE 5256 | export interface COLLECTIONS_CREATE { 5257 | id: number; 5258 | handle: string; 5259 | title: string; 5260 | updated_at: string; 5261 | body_html: string; 5262 | published_at: string; 5263 | sort_order: null | string; 5264 | template_suffix: null | string; 5265 | published_scope: string; 5266 | admin_graphql_api_id: string; 5267 | } 5268 | --------------------------------------------------------------------------------