@shopify/shop-minis-cli 0.0.37 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +78 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/launch.json +29 -0
- package/.vscode/settings.json +8 -0
- package/.vscode/shop-minis-cli.code-workspace +8 -0
- package/build/commands/cancel-submission/cancel-submission.d.ts +1 -0
- package/build/commands/cancel-submission/cancel-submission.js +57 -0
- package/build/commands/cancel-submission/cancel-submission.js.map +1 -0
- package/build/commands/cancel-submission/index.d.ts +2 -0
- package/build/commands/cancel-submission/index.js +18 -0
- package/build/commands/cancel-submission/index.js.map +1 -0
- package/build/commands/cancel-submission/types.d.ts +3 -0
- package/build/commands/cancel-submission/types.js +2 -0
- package/build/commands/cancel-submission/types.js.map +1 -0
- package/build/commands/check-submission/index.d.ts +2 -0
- package/build/commands/check-submission/index.js +55 -0
- package/build/commands/check-submission/index.js.map +1 -0
- package/build/commands/check-submission/types.d.ts +3 -0
- package/build/commands/check-submission/types.js +2 -0
- package/build/commands/check-submission/types.js.map +1 -0
- package/build/commands/codemod/index.d.ts +3 -0
- package/build/commands/codemod/index.js +47 -0
- package/build/commands/codemod/index.js.map +1 -0
- package/build/commands/codemod/releases/index.d.ts +7 -0
- package/build/commands/codemod/releases/index.js +58 -0
- package/build/commands/codemod/releases/index.js.map +1 -0
- package/build/commands/codemod/releases/types.d.ts +9 -0
- package/build/commands/codemod/releases/types.js +2 -0
- package/build/commands/codemod/releases/types.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-42/index.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-42/index.js +46 -0
- package/build/commands/codemod/releases/v0-0-42/index.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.d.ts +7 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.js +83 -0
- package/build/commands/codemod/releases/v0-0-42/reset-files.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-43.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-43.js +32 -0
- package/build/commands/codemod/releases/v0-0-43.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-44.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-44.js +214 -0
- package/build/commands/codemod/releases/v0-0-44.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-45.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-45.js +23 -0
- package/build/commands/codemod/releases/v0-0-45.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-50.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-50.js +34 -0
- package/build/commands/codemod/releases/v0-0-50.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-54.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-54.js +70 -0
- package/build/commands/codemod/releases/v0-0-54.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-56.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-56.js +48 -0
- package/build/commands/codemod/releases/v0-0-56.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-57.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-57.js +41 -0
- package/build/commands/codemod/releases/v0-0-57.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-58.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-58.js +68 -0
- package/build/commands/codemod/releases/v0-0-58.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-61.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-61.js +30 -0
- package/build/commands/codemod/releases/v0-0-61.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-63.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-63.js +42 -0
- package/build/commands/codemod/releases/v0-0-63.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-64.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-64.js +47 -0
- package/build/commands/codemod/releases/v0-0-64.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-75.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-75.js +30 -0
- package/build/commands/codemod/releases/v0-0-75.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-76.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-76.js +32 -0
- package/build/commands/codemod/releases/v0-0-76.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-77.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-77.js +39 -0
- package/build/commands/codemod/releases/v0-0-77.js.map +1 -0
- package/build/commands/codemod/releases/v0-0-79.d.ts +3 -0
- package/build/commands/codemod/releases/v0-0-79.js +35 -0
- package/build/commands/codemod/releases/v0-0-79.js.map +1 -0
- package/build/commands/config.d.ts +14 -0
- package/build/commands/config.js +42 -0
- package/build/commands/config.js.map +1 -0
- package/build/commands/create-mini/index.js +84 -68
- package/build/commands/create-mini/index.js.map +1 -1
- package/build/commands/create-mini/utils/template-app.d.ts +1 -1
- package/build/commands/create-mini/utils/template-app.js +38 -38
- package/build/commands/create-mini/utils/template-app.js.map +1 -1
- package/build/commands/dev/index.d.ts +3 -0
- package/build/commands/dev/index.js +51 -22
- package/build/commands/dev/index.js.map +1 -1
- package/build/commands/dev/utils/android.d.ts +6 -4
- package/build/commands/dev/utils/android.js +55 -67
- package/build/commands/dev/utils/android.js.map +1 -1
- package/build/commands/dev/utils/binaries.d.ts +2 -80
- package/build/commands/dev/utils/binaries.js +10 -166
- package/build/commands/dev/utils/binaries.js.map +1 -1
- package/build/commands/dev/utils/build-type.d.ts +2 -0
- package/build/commands/dev/utils/build-type.js +14 -0
- package/build/commands/dev/utils/build-type.js.map +1 -0
- package/build/commands/dev/utils/deeplink.d.ts +3 -3
- package/build/commands/dev/utils/deeplink.js +13 -18
- package/build/commands/dev/utils/deeplink.js.map +1 -1
- package/build/commands/dev/utils/interactive-terminal.d.ts +4 -2
- package/build/commands/dev/utils/interactive-terminal.js +66 -107
- package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
- package/build/commands/dev/utils/metro/metro-config.js +17 -20
- package/build/commands/dev/utils/metro/metro-config.js.map +1 -1
- package/build/commands/dev/utils/metro/metro-reporter.d.ts +3 -4
- package/build/commands/dev/utils/metro/metro-reporter.js +6 -13
- package/build/commands/dev/utils/metro/metro-reporter.js.map +1 -1
- package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +1 -0
- package/build/commands/dev/utils/metro/metro-server-middleware.js +11 -12
- package/build/commands/dev/utils/metro/metro-server-middleware.js.map +1 -1
- package/build/commands/dev/utils/metro/metro-server.d.ts +2 -2
- package/build/commands/dev/utils/metro/metro-server.js +7 -14
- package/build/commands/dev/utils/metro/metro-server.js.map +1 -1
- package/build/commands/dev/utils/network.d.ts +20 -0
- package/build/commands/dev/utils/network.js +122 -0
- package/build/commands/dev/utils/network.js.map +1 -0
- package/build/commands/dev/utils/platform.d.ts +18 -0
- package/build/commands/dev/utils/platform.js +41 -0
- package/build/commands/dev/utils/platform.js.map +1 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.d.ts +1 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.js +12 -0
- package/build/commands/dev/utils/prompt-binary-upgrade.js.map +1 -0
- package/build/commands/dev/utils/qr-code.js +3 -10
- package/build/commands/dev/utils/qr-code.js.map +1 -1
- package/build/commands/dev/utils/simulator.d.ts +5 -2
- package/build/commands/dev/utils/simulator.js +43 -37
- package/build/commands/dev/utils/simulator.js.map +1 -1
- package/build/commands/dev/utils/start-app/config.d.ts +5 -0
- package/build/commands/dev/utils/start-app/config.js +25 -0
- package/build/commands/dev/utils/start-app/config.js.map +1 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.d.ts +2 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.js +94 -0
- package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -0
- package/build/commands/dev/utils/start-app/start-app.d.ts +2 -0
- package/build/commands/dev/utils/start-app/start-app.js +10 -0
- package/build/commands/dev/utils/start-app/start-app.js.map +1 -0
- package/build/commands/dev/utils/start-app/types.d.ts +20 -0
- package/build/commands/dev/utils/start-app/types.js +2 -0
- package/build/commands/dev/utils/start-app/types.js.map +1 -0
- package/build/commands/dev/utils/types.d.ts +24 -0
- package/build/commands/dev/utils/types.js +7 -0
- package/build/commands/dev/utils/types.js.map +1 -0
- package/build/commands/dev/utils/version.d.ts +64 -0
- package/build/commands/dev/utils/version.js +101 -0
- package/build/commands/dev/utils/version.js.map +1 -0
- package/build/commands/dev/utils/with-retries.js +1 -5
- package/build/commands/dev/utils/with-retries.js.map +1 -1
- package/build/commands/doctor/index.d.ts +6 -0
- package/build/commands/doctor/index.js +21 -0
- package/build/commands/doctor/index.js.map +1 -0
- package/build/commands/doctor/utils/diagnose-dependencies.d.ts +7 -0
- package/build/commands/doctor/utils/diagnose-dependencies.js +108 -0
- package/build/commands/doctor/utils/diagnose-dependencies.js.map +1 -0
- package/build/commands/generate-graphql-types/index.d.ts +1 -0
- package/build/commands/generate-graphql-types/index.js +43 -27
- package/build/commands/generate-graphql-types/index.js.map +1 -1
- package/build/commands/info/index.d.ts +3 -0
- package/build/commands/info/index.js +42 -0
- package/build/commands/info/index.js.map +1 -0
- package/build/commands/setup/index.d.ts +2 -0
- package/build/commands/setup/index.js +81 -0
- package/build/commands/setup/index.js.map +1 -0
- package/build/commands/submit/config.d.ts +9 -0
- package/build/commands/submit/config.js +18 -0
- package/build/commands/submit/config.js.map +1 -0
- package/build/commands/submit/errors.d.ts +19 -0
- package/build/commands/submit/errors.js +87 -0
- package/build/commands/submit/errors.js.map +1 -0
- package/build/commands/submit/gcs.d.ts +6 -0
- package/build/commands/submit/gcs.js +10 -0
- package/build/commands/submit/gcs.js.map +1 -0
- package/build/commands/submit/index.d.ts +2 -0
- package/build/commands/submit/index.js +25 -0
- package/build/commands/submit/index.js.map +1 -0
- package/build/commands/submit/submit.d.ts +5 -0
- package/build/commands/submit/submit.js +222 -0
- package/build/commands/submit/submit.js.map +1 -0
- package/build/commands/submit/tasks.d.ts +37 -0
- package/build/commands/submit/tasks.js +91 -0
- package/build/commands/submit/tasks.js.map +1 -0
- package/build/commands/submit/types.d.ts +14 -0
- package/build/commands/submit/types.js +2 -0
- package/build/commands/submit/types.js.map +1 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.d.ts +1 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.js +58 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.js.map +1 -0
- package/build/commands/submit/utils/request-entry-point-params.d.ts +1 -0
- package/build/commands/submit/utils/request-entry-point-params.js +41 -0
- package/build/commands/submit/utils/request-entry-point-params.js.map +1 -0
- package/build/commands/submit/validation.d.ts +1 -0
- package/build/commands/submit/validation.js +11 -0
- package/build/commands/submit/validation.js.map +1 -0
- package/build/commands/upgrade/index.d.ts +13 -0
- package/build/commands/upgrade/index.js +53 -0
- package/build/commands/upgrade/index.js.map +1 -0
- package/build/commands/upgrade/utils/cli.d.ts +1 -0
- package/build/commands/upgrade/utils/cli.js +15 -0
- package/build/commands/upgrade/utils/cli.js.map +1 -0
- package/build/commands/validate-manifest/index.d.ts +3 -0
- package/build/commands/validate-manifest/index.js +29 -0
- package/build/commands/validate-manifest/index.js.map +1 -0
- package/build/data/accept-invitation.d.ts +4 -0
- package/build/data/accept-invitation.js +16 -0
- package/build/data/accept-invitation.js.map +1 -0
- package/build/data/cancel-submission.d.ts +22 -0
- package/build/data/cancel-submission.js +26 -0
- package/build/data/cancel-submission.js.map +1 -0
- package/build/data/create-submission.d.ts +20 -0
- package/build/data/create-submission.js +27 -0
- package/build/data/create-submission.js.map +1 -0
- package/build/data/create-upload.d.ts +21 -0
- package/build/data/create-upload.js +40 -0
- package/build/data/create-upload.js.map +1 -0
- package/build/data/get-submissions.d.ts +27 -0
- package/build/data/get-submissions.js +33 -0
- package/build/data/get-submissions.js.map +1 -0
- package/build/data/gql-client.d.ts +8 -0
- package/build/data/gql-client.js +9 -0
- package/build/data/gql-client.js.map +1 -0
- package/build/data/mini.d.ts +5 -0
- package/build/data/mini.js +14 -0
- package/build/data/mini.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.d.ts +13 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js +7 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/fragment-masking.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +75 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +24 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +1570 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +1062 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.d.ts +2 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.js +3 -0
- package/build/data/types/autogenerated/shop-minis-admin-api/index.js.map +1 -0
- package/build/dev-panel/asset-manifest.json +6 -9
- package/build/dev-panel/index.html +1 -1
- package/build/dev-panel/static/css/{main.31436fe3.css → main.7f1ee407.css} +2 -2
- package/build/dev-panel/static/css/main.7f1ee407.css.map +1 -0
- package/build/dev-panel/static/js/{main.27f47095.js → main.6625699c.js} +3 -3
- package/build/dev-panel/static/js/main.6625699c.js.map +1 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +30 -15
- package/build/index.js.map +1 -1
- package/build/schemas/manifest.schema.json +198 -0
- package/build/utils/archive.d.ts +30 -0
- package/build/utils/archive.js +38 -0
- package/build/utils/archive.js.map +1 -0
- package/build/utils/common-tasks.d.ts +1 -0
- package/build/utils/common-tasks.js +49 -0
- package/build/utils/common-tasks.js.map +1 -0
- package/build/utils/development-params.d.ts +13 -0
- package/build/utils/development-params.js +42 -0
- package/build/utils/development-params.js.map +1 -0
- package/build/{commands/utils → utils}/exec-async-child-process.d.ts +1 -1
- package/build/{commands/utils → utils}/exec-async-child-process.js +6 -13
- package/build/utils/exec-async-child-process.js.map +1 -0
- package/build/utils/file.d.ts +1 -0
- package/build/utils/file.js +7 -0
- package/build/utils/file.js.map +1 -0
- package/build/utils/minis-manifest.d.ts +6 -0
- package/build/utils/minis-manifest.js +56 -0
- package/build/utils/minis-manifest.js.map +1 -0
- package/build/utils/package-manager.d.ts +38 -0
- package/build/utils/package-manager.js +98 -0
- package/build/utils/package-manager.js.map +1 -0
- package/build/utils/patch-package.d.ts +5 -0
- package/build/utils/patch-package.js +76 -0
- package/build/utils/patch-package.js.map +1 -0
- package/build/utils/replace-strings-in-template.d.ts +1 -0
- package/build/utils/replace-strings-in-template.js +15 -0
- package/build/utils/replace-strings-in-template.js.map +1 -0
- package/build/utils/semver.d.ts +1 -0
- package/build/utils/semver.js +19 -0
- package/build/utils/semver.js.map +1 -0
- package/build/{commands/utils → utils}/wrap-with-loading-indicator.d.ts +1 -1
- package/build/utils/wrap-with-loading-indicator.js +16 -0
- package/build/utils/wrap-with-loading-indicator.js.map +1 -0
- package/package.json +35 -28
- package/scripts/graphql-codegen.ts +23 -0
- package/scripts/test-template.ts +63 -0
- package/shipit.alpha.yml +3 -0
- package/templates/__template_blank/src/index.tsx +5 -4
- package/templates/__template_blank/src/types.ts +1 -1
- package/templates/__template_common/.eslintrc.js +16 -0
- package/templates/__template_common/assets.d.ts +14 -0
- package/templates/__template_common/babel.config.js +3 -17
- package/templates/__template_common/gitignore +2 -0
- package/templates/__template_common/index.tsx +3 -6
- package/templates/__template_common/metro.config.js +4 -30
- package/templates/__template_common/package.json +17 -47
- package/templates/__template_common/src/manifest.json +1 -27
- package/templates/__template_hello_world/src/components/ComponentLink.ts +31 -19
- package/templates/__template_hello_world/src/components/ComponentListItem.tsx +1 -0
- package/templates/__template_hello_world/src/components/FeaturedComponents.tsx +4 -2
- package/templates/__template_hello_world/src/components/quiz/ImageCarouselSlide.tsx +54 -0
- package/templates/__template_hello_world/src/components/quiz/MultipleChoiceSlide.tsx +77 -0
- package/templates/__template_hello_world/src/components/quiz/QuizProvider.tsx +64 -0
- package/templates/__template_hello_world/src/components/quiz/QuizSlide.tsx +79 -0
- package/templates/__template_hello_world/src/components/quiz/QuizSlideCommander.tsx +35 -0
- package/templates/__template_hello_world/src/components/quiz/TextFieldSlide.tsx +84 -0
- package/templates/__template_hello_world/src/components/quiz/TextSlide.tsx +6 -0
- package/templates/__template_hello_world/src/components/quiz/types.ts +72 -0
- package/templates/__template_hello_world/src/data/Test.graphql.d.ts +69 -76
- package/templates/__template_hello_world/src/data/TestProducts.graphql +30 -0
- package/templates/__template_hello_world/src/data/TestProducts.graphql.d.ts +159 -81
- package/templates/__template_hello_world/src/fixtures/mocked-products-with-variants.ts +274 -0
- package/templates/__template_hello_world/src/hooks/useQuizData.ts +26 -0
- package/templates/__template_hello_world/src/hooks/useQuizState.ts +27 -0
- package/templates/__template_hello_world/src/index.tsx +6 -5
- package/templates/__template_hello_world/src/routes.tsx +46 -22
- package/templates/__template_hello_world/src/screens/AccordionScreen.tsx +73 -0
- package/templates/__template_hello_world/src/screens/BottomSheetScreen.tsx +6 -5
- package/templates/__template_hello_world/src/screens/HomeScreen.tsx +14 -3
- package/templates/__template_hello_world/src/screens/{ImageCarouselScreen.tsx → ImageMultipleChoiceScreen.tsx} +4 -6
- package/templates/__template_hello_world/src/screens/InputScreen.tsx +13 -70
- package/templates/__template_hello_world/src/screens/QuizResultScreen.tsx +82 -0
- package/templates/__template_hello_world/src/screens/QuizScreen.tsx +40 -0
- package/templates/__template_hello_world/src/screens/QuizSlideScreen.tsx +150 -0
- package/templates/__template_hello_world/src/screens/ShopActionsScreen.tsx +48 -0
- package/templates/__template_hello_world/src/screens/VariantPickerScreen.tsx +120 -0
- package/templates/__template_hello_world/src/types.ts +27 -24
- package/templates/__template_hello_world/src/utils/mockQuizData.ts +330 -0
- package/templates/__template_hello_world/src/utils/quizUtils.ts +75 -0
- package/templates/__template_snowboardz/src/components/SkillLevelIcon.tsx +1 -4
- package/templates/__template_snowboardz/src/components/SkillLevelPicker.tsx +7 -1
- package/templates/__template_snowboardz/src/data/TestProducts.graphql +1 -1
- package/templates/__template_snowboardz/src/data/TestProducts.graphql.d.ts +84 -74
- package/templates/__template_snowboardz/src/index.tsx +6 -5
- package/templates/__template_snowboardz/src/routes.tsx +2 -2
- package/templates/__template_snowboardz/src/types.ts +3 -3
- package/build/commands/check/index.d.ts +0 -5
- package/build/commands/check/index.js +0 -77
- package/build/commands/check/index.js.map +0 -1
- package/build/commands/check/utils/versions.d.ts +0 -1
- package/build/commands/check/utils/versions.js +0 -14
- package/build/commands/check/utils/versions.js.map +0 -1
- package/build/commands/dev/utils/binaries.test.d.ts +0 -1
- package/build/commands/dev/utils/binaries.test.js +0 -275
- package/build/commands/dev/utils/binaries.test.js.map +0 -1
- package/build/commands/dev/utils/minis-manifest.d.ts +0 -1
- package/build/commands/dev/utils/minis-manifest.js +0 -24
- package/build/commands/dev/utils/minis-manifest.js.map +0 -1
- package/build/commands/utils/exec-async-child-process.js.map +0 -1
- package/build/commands/utils/wrap-with-loading-indicator.js +0 -23
- package/build/commands/utils/wrap-with-loading-indicator.js.map +0 -1
- package/build/dev-panel/middleware.d.ts +0 -4
- package/build/dev-panel/middleware.js +0 -11
- package/build/dev-panel/middleware.js.map +0 -1
- package/build/dev-panel/static/css/main.31436fe3.css.map +0 -1
- package/build/dev-panel/static/js/main.27f47095.js.map +0 -1
- package/build/dev-panel/static/media/bottomsheet.fe525b8722f6d504a185.png +0 -0
- package/build/dev-panel/static/media/navigation.597434370a97c328a970.png +0 -0
- package/build/dev-panel/static/media/stories.a425b6972a5338fabdad.png +0 -0
- package/templates/__template_blank/src/custom.d.ts +0 -4
- package/templates/__template_common/.eslintrc.json +0 -132
- package/templates/__template_common/patches/react-native+0.68.5.patch +0 -173
- package/templates/__template_hello_world/src/utils/getFlagEmoji.spec.tsx +0 -19
- /package/build/dev-panel/static/js/{main.27f47095.js.LICENSE.txt → main.6625699c.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {ItemValue} from '@react-native-community/picker/typings/Picker'
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
countryCodesAndPhonePrefixes,
|
|
5
|
+
getFlagEmoji,
|
|
6
|
+
Picker,
|
|
7
|
+
TextField,
|
|
8
|
+
} from '@shopify/shop-minis-platform-sdk'
|
|
9
|
+
import {ComponentProps, useCallback, useEffect, useState} from 'react'
|
|
10
|
+
|
|
11
|
+
import {QuizSlide, QuizSlideProps} from './QuizSlide'
|
|
12
|
+
import {SlideLogic} from './types'
|
|
13
|
+
|
|
14
|
+
interface Item {
|
|
15
|
+
value: string
|
|
16
|
+
label: string
|
|
17
|
+
selected?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const countryData: Item[] = countryCodesAndPhonePrefixes.map(
|
|
21
|
+
({code, name}) => ({
|
|
22
|
+
value: code,
|
|
23
|
+
label: `${name} ${getFlagEmoji(code)}`,
|
|
24
|
+
})
|
|
25
|
+
)
|
|
26
|
+
export interface TextFieldSlideProps extends SlideLogic<string> {
|
|
27
|
+
quizSlideProps: QuizSlideProps
|
|
28
|
+
textFieldProps: ComponentProps<typeof TextField>
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const TextFieldSlide = ({
|
|
32
|
+
quizSlideProps,
|
|
33
|
+
textFieldProps,
|
|
34
|
+
determineCtaDisabled,
|
|
35
|
+
handleAnswerSelection,
|
|
36
|
+
}: TextFieldSlideProps) => {
|
|
37
|
+
const [showCountryPicker, setShowCountryPicker] = useState(false)
|
|
38
|
+
const [selectedCountry, setSelectedCountry] = useState<string>()
|
|
39
|
+
|
|
40
|
+
const [fieldValue, setFieldValue] = useState<string>()
|
|
41
|
+
|
|
42
|
+
const [isCtaDisabled, setCtaDisabled] = useState(
|
|
43
|
+
quizSlideProps.ctaDisabled ?? false
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
const handleChange = useCallback((newTextValue: string) => {
|
|
47
|
+
setFieldValue(newTextValue)
|
|
48
|
+
}, [])
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (handleAnswerSelection === undefined || fieldValue === undefined) return
|
|
52
|
+
|
|
53
|
+
handleAnswerSelection(fieldValue)
|
|
54
|
+
}, [fieldValue, handleAnswerSelection])
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (determineCtaDisabled === undefined || fieldValue === undefined) return
|
|
58
|
+
|
|
59
|
+
setCtaDisabled(determineCtaDisabled(fieldValue))
|
|
60
|
+
}, [determineCtaDisabled, fieldValue])
|
|
61
|
+
|
|
62
|
+
const textFieldComponent = (
|
|
63
|
+
<TextField {...textFieldProps} onChangeText={handleChange} />
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<>
|
|
68
|
+
<QuizSlide {...quizSlideProps} ctaDisabled={isCtaDisabled}>
|
|
69
|
+
<Box marginBottom="xl">{textFieldComponent}</Box>
|
|
70
|
+
</QuizSlide>
|
|
71
|
+
{showCountryPicker ? (
|
|
72
|
+
<Picker
|
|
73
|
+
headerText="Choose Your Country"
|
|
74
|
+
items={countryData}
|
|
75
|
+
handleDismiss={() => setShowCountryPicker(false)}
|
|
76
|
+
selectedValue={selectedCountry}
|
|
77
|
+
onValueChange={(value: ItemValue) => {
|
|
78
|
+
setSelectedCountry(value.toString())
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
) : null}
|
|
82
|
+
</>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type {ImageCarouselSlideProps} from './ImageCarouselSlide'
|
|
2
|
+
import type {MultipleChoiceSlideProps} from './MultipleChoiceSlide'
|
|
3
|
+
import type {TextFieldSlideProps} from './TextFieldSlide'
|
|
4
|
+
|
|
5
|
+
export interface QuizSlideType {
|
|
6
|
+
mainText: string
|
|
7
|
+
ctaOnPressHandler?: () => void
|
|
8
|
+
ctaDisabled?: boolean
|
|
9
|
+
subText?: string
|
|
10
|
+
ctaText?: string // default to 'next'
|
|
11
|
+
isTallSlide?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TextSlideProps extends SlideLogic<string> {
|
|
15
|
+
quizSlideProps: QuizSlideType
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type QuizSlideScreenType =
|
|
19
|
+
| 'TextSlide'
|
|
20
|
+
| 'TextFieldSlide'
|
|
21
|
+
| 'MultipleChoiceSlide'
|
|
22
|
+
| 'ImageCarouselSlide'
|
|
23
|
+
|
|
24
|
+
export interface SlideInformation {
|
|
25
|
+
id: string
|
|
26
|
+
type: QuizSlideScreenType
|
|
27
|
+
// When adding the slide props, we get a dependency cycle
|
|
28
|
+
props:
|
|
29
|
+
| TextSlideProps
|
|
30
|
+
| TextFieldSlideProps
|
|
31
|
+
| MultipleChoiceSlideProps
|
|
32
|
+
| ImageCarouselSlideProps
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface QuizData {
|
|
36
|
+
slides: SlideInformation[]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface SlideLogic<T extends QuizAnswerType> {
|
|
40
|
+
handleAnswerSelection?: (answer: T) => void
|
|
41
|
+
determineNextSlide?: (answer: T) => string
|
|
42
|
+
determineCtaDisabled?: (answer: T) => boolean
|
|
43
|
+
nextSlideId?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @react-navigation/native-stack requires a `type` instead of an `interface`
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
48
|
+
export type QuizStackParamList = {
|
|
49
|
+
'QuizScreen.QuizResult': undefined
|
|
50
|
+
'QuizScreen.QuizSlide': {
|
|
51
|
+
slideIndex: number
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SlideChoiceConsequence {
|
|
56
|
+
nextSlideId?: string
|
|
57
|
+
skipSlideIds?: [string]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type QuizAnswerType = string | number | number[]
|
|
61
|
+
|
|
62
|
+
export type DetermineNextSlide<T> = (answer: T) => string
|
|
63
|
+
|
|
64
|
+
export interface QuizResultEntry {
|
|
65
|
+
slideType: QuizSlideScreenType
|
|
66
|
+
answer: QuizAnswerType
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// key is the ID of the question
|
|
70
|
+
export type QuizResult = Record<string, QuizResultEntry>
|
|
71
|
+
|
|
72
|
+
export type QuizDataState = 'Loading' | 'Ready'
|
|
@@ -1,114 +1,107 @@
|
|
|
1
|
-
import {DocumentNode} from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Decimal,
|
|
5
|
-
CurrencyCode,
|
|
6
|
-
} from '@shopify/shop-minis-platform-sdk/api/types'
|
|
1
|
+
import { DocumentNode } from "graphql-typed";
|
|
2
|
+
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
3
|
+
import { URL, Decimal, CurrencyCode } from "@shopify/shop-minis-platform-sdk/api/types";
|
|
7
4
|
export namespace HelloWorldTestQueryPartialData {
|
|
8
5
|
export interface ShopProductFeaturedImage {
|
|
9
|
-
__typename?:
|
|
10
|
-
id?: string | null
|
|
11
|
-
altText?: string | null
|
|
12
|
-
url?: URL | null
|
|
6
|
+
__typename?: "Image" | null;
|
|
7
|
+
id?: string | null;
|
|
8
|
+
altText?: string | null;
|
|
9
|
+
url?: URL | null;
|
|
13
10
|
}
|
|
14
11
|
export interface ShopProductDefaultVariantCompareAtPrice {
|
|
15
|
-
__typename?:
|
|
16
|
-
amount?: Decimal | null
|
|
17
|
-
currencyCode?: CurrencyCode | null
|
|
12
|
+
__typename?: "Money" | null;
|
|
13
|
+
amount?: Decimal | null;
|
|
14
|
+
currencyCode?: CurrencyCode | null;
|
|
18
15
|
}
|
|
19
16
|
export interface ShopProductDefaultVariantPrice {
|
|
20
|
-
__typename?:
|
|
21
|
-
amount?: Decimal | null
|
|
22
|
-
currencyCode?: CurrencyCode | null
|
|
17
|
+
__typename?: "Money" | null;
|
|
18
|
+
amount?: Decimal | null;
|
|
19
|
+
currencyCode?: CurrencyCode | null;
|
|
23
20
|
}
|
|
24
21
|
export interface ShopProductDefaultVariantImage {
|
|
25
|
-
__typename?:
|
|
26
|
-
id?: string | null
|
|
27
|
-
altText?: string | null
|
|
28
|
-
url?: URL | null
|
|
22
|
+
__typename?: "Image" | null;
|
|
23
|
+
id?: string | null;
|
|
24
|
+
altText?: string | null;
|
|
25
|
+
url?: URL | null;
|
|
29
26
|
}
|
|
30
27
|
export interface ShopProductDefaultVariant {
|
|
31
|
-
__typename?:
|
|
32
|
-
id?: string | null
|
|
33
|
-
title?: string | null
|
|
34
|
-
isFavorited?: boolean | null
|
|
35
|
-
compareAtPrice?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantCompareAtPrice | null
|
|
36
|
-
price?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantPrice | null
|
|
37
|
-
image?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantImage | null
|
|
28
|
+
__typename?: "ProductVariant" | null;
|
|
29
|
+
id?: string | null;
|
|
30
|
+
title?: string | null;
|
|
31
|
+
isFavorited?: boolean | null;
|
|
32
|
+
compareAtPrice?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantCompareAtPrice | null;
|
|
33
|
+
price?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantPrice | null;
|
|
34
|
+
image?: HelloWorldTestQueryPartialData.ShopProductDefaultVariantImage | null;
|
|
38
35
|
}
|
|
39
36
|
export interface ShopProduct {
|
|
40
|
-
__typename?:
|
|
41
|
-
id?: string | null
|
|
42
|
-
title?: string | null
|
|
43
|
-
featuredImage?: HelloWorldTestQueryPartialData.ShopProductFeaturedImage | null
|
|
44
|
-
defaultVariant?: HelloWorldTestQueryPartialData.ShopProductDefaultVariant | null
|
|
37
|
+
__typename?: "Product" | null;
|
|
38
|
+
id?: string | null;
|
|
39
|
+
title?: string | null;
|
|
40
|
+
featuredImage?: HelloWorldTestQueryPartialData.ShopProductFeaturedImage | null;
|
|
41
|
+
defaultVariant?: HelloWorldTestQueryPartialData.ShopProductDefaultVariant | null;
|
|
45
42
|
}
|
|
46
43
|
export interface Shop {
|
|
47
|
-
__typename?:
|
|
48
|
-
id?: string | null
|
|
49
|
-
name?: string | null
|
|
50
|
-
product?: HelloWorldTestQueryPartialData.ShopProduct | null
|
|
44
|
+
__typename?: "Shop" | null;
|
|
45
|
+
id?: string | null;
|
|
46
|
+
name?: string | null;
|
|
47
|
+
product?: HelloWorldTestQueryPartialData.ShopProduct | null;
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
export interface HelloWorldTestQueryPartialData {
|
|
54
|
-
shop?: HelloWorldTestQueryPartialData.Shop | null
|
|
51
|
+
shop?: HelloWorldTestQueryPartialData.Shop | null;
|
|
55
52
|
}
|
|
56
53
|
export namespace HelloWorldTestQueryData {
|
|
57
54
|
export interface Variables {
|
|
58
|
-
shopId: string
|
|
59
|
-
productId: string
|
|
55
|
+
shopId: string;
|
|
56
|
+
productId: string;
|
|
60
57
|
}
|
|
61
58
|
export interface ShopProductFeaturedImage {
|
|
62
|
-
__typename:
|
|
63
|
-
id?: string | null
|
|
64
|
-
altText?: string | null
|
|
65
|
-
url: URL
|
|
59
|
+
__typename: "Image";
|
|
60
|
+
id?: string | null;
|
|
61
|
+
altText?: string | null;
|
|
62
|
+
url: URL;
|
|
66
63
|
}
|
|
67
64
|
export interface ShopProductDefaultVariantCompareAtPrice {
|
|
68
|
-
__typename:
|
|
69
|
-
amount: Decimal
|
|
70
|
-
currencyCode: CurrencyCode
|
|
65
|
+
__typename: "Money";
|
|
66
|
+
amount: Decimal;
|
|
67
|
+
currencyCode: CurrencyCode;
|
|
71
68
|
}
|
|
72
69
|
export interface ShopProductDefaultVariantPrice {
|
|
73
|
-
__typename:
|
|
74
|
-
amount: Decimal
|
|
75
|
-
currencyCode: CurrencyCode
|
|
70
|
+
__typename: "Money";
|
|
71
|
+
amount: Decimal;
|
|
72
|
+
currencyCode: CurrencyCode;
|
|
76
73
|
}
|
|
77
74
|
export interface ShopProductDefaultVariantImage {
|
|
78
|
-
__typename:
|
|
79
|
-
id?: string | null
|
|
80
|
-
altText?: string | null
|
|
81
|
-
url: URL
|
|
75
|
+
__typename: "Image";
|
|
76
|
+
id?: string | null;
|
|
77
|
+
altText?: string | null;
|
|
78
|
+
url: URL;
|
|
82
79
|
}
|
|
83
80
|
export interface ShopProductDefaultVariant {
|
|
84
|
-
__typename:
|
|
85
|
-
id: string
|
|
86
|
-
title: string
|
|
87
|
-
isFavorited: boolean
|
|
88
|
-
compareAtPrice?: HelloWorldTestQueryData.ShopProductDefaultVariantCompareAtPrice | null
|
|
89
|
-
price: HelloWorldTestQueryData.ShopProductDefaultVariantPrice
|
|
90
|
-
image?: HelloWorldTestQueryData.ShopProductDefaultVariantImage | null
|
|
81
|
+
__typename: "ProductVariant";
|
|
82
|
+
id: string;
|
|
83
|
+
title: string;
|
|
84
|
+
isFavorited: boolean;
|
|
85
|
+
compareAtPrice?: HelloWorldTestQueryData.ShopProductDefaultVariantCompareAtPrice | null;
|
|
86
|
+
price: HelloWorldTestQueryData.ShopProductDefaultVariantPrice;
|
|
87
|
+
image?: HelloWorldTestQueryData.ShopProductDefaultVariantImage | null;
|
|
91
88
|
}
|
|
92
89
|
export interface ShopProduct {
|
|
93
|
-
__typename:
|
|
94
|
-
id: string
|
|
95
|
-
title: string
|
|
96
|
-
featuredImage?: HelloWorldTestQueryData.ShopProductFeaturedImage | null
|
|
97
|
-
defaultVariant: HelloWorldTestQueryData.ShopProductDefaultVariant
|
|
90
|
+
__typename: "Product";
|
|
91
|
+
id: string;
|
|
92
|
+
title: string;
|
|
93
|
+
featuredImage?: HelloWorldTestQueryData.ShopProductFeaturedImage | null;
|
|
94
|
+
defaultVariant: HelloWorldTestQueryData.ShopProductDefaultVariant;
|
|
98
95
|
}
|
|
99
96
|
export interface Shop {
|
|
100
|
-
__typename:
|
|
101
|
-
id: string
|
|
102
|
-
name: string
|
|
103
|
-
product?: HelloWorldTestQueryData.ShopProduct | null
|
|
97
|
+
__typename: "Shop";
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
product?: HelloWorldTestQueryData.ShopProduct | null;
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
export interface HelloWorldTestQueryData {
|
|
107
|
-
shop?: HelloWorldTestQueryData.Shop | null
|
|
104
|
+
shop?: HelloWorldTestQueryData.Shop | null;
|
|
108
105
|
}
|
|
109
|
-
declare const document: DocumentNode<
|
|
110
|
-
|
|
111
|
-
HelloWorldTestQueryData.Variables,
|
|
112
|
-
HelloWorldTestQueryPartialData
|
|
113
|
-
>
|
|
114
|
-
export default document
|
|
106
|
+
declare const document: DocumentNode<HelloWorldTestQueryData, HelloWorldTestQueryData.Variables, HelloWorldTestQueryPartialData> & TypedDocumentNode<HelloWorldTestQueryData, HelloWorldTestQueryData.Variables>;
|
|
107
|
+
export default document;
|
|
@@ -11,6 +11,32 @@ query HelloWorldTestProducts($shopId: ID!, $productIds: [ID!]!) {
|
|
|
11
11
|
altText
|
|
12
12
|
url
|
|
13
13
|
}
|
|
14
|
+
options {
|
|
15
|
+
id
|
|
16
|
+
name
|
|
17
|
+
values
|
|
18
|
+
}
|
|
19
|
+
variants {
|
|
20
|
+
nodes {
|
|
21
|
+
id
|
|
22
|
+
image {
|
|
23
|
+
id
|
|
24
|
+
altText
|
|
25
|
+
url
|
|
26
|
+
}
|
|
27
|
+
selectedOptions {
|
|
28
|
+
name
|
|
29
|
+
value
|
|
30
|
+
}
|
|
31
|
+
title
|
|
32
|
+
currentlyNotInStock
|
|
33
|
+
availableForSale
|
|
34
|
+
price {
|
|
35
|
+
amount
|
|
36
|
+
currencyCode
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
14
40
|
defaultVariant {
|
|
15
41
|
id
|
|
16
42
|
title
|
|
@@ -28,6 +54,10 @@ query HelloWorldTestProducts($shopId: ID!, $productIds: [ID!]!) {
|
|
|
28
54
|
altText
|
|
29
55
|
url
|
|
30
56
|
}
|
|
57
|
+
selectedOptions {
|
|
58
|
+
name
|
|
59
|
+
value
|
|
60
|
+
}
|
|
31
61
|
}
|
|
32
62
|
}
|
|
33
63
|
}
|
|
@@ -1,119 +1,197 @@
|
|
|
1
|
-
import {DocumentNode} from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Decimal,
|
|
5
|
-
CurrencyCode,
|
|
6
|
-
} from '@shopify/shop-minis-platform-sdk/api/types'
|
|
7
|
-
|
|
1
|
+
import { DocumentNode } from "graphql-typed";
|
|
2
|
+
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
3
|
+
import { URL, Decimal, CurrencyCode } from "@shopify/shop-minis-platform-sdk/api/types";
|
|
8
4
|
export namespace HelloWorldTestProductsQueryPartialData {
|
|
9
5
|
export interface ShopProductsByIdsFeaturedImage {
|
|
10
|
-
__typename?:
|
|
11
|
-
id?: string | null
|
|
12
|
-
altText?: string | null
|
|
13
|
-
url?: URL | null
|
|
6
|
+
__typename?: "Image" | null;
|
|
7
|
+
id?: string | null;
|
|
8
|
+
altText?: string | null;
|
|
9
|
+
url?: URL | null;
|
|
10
|
+
}
|
|
11
|
+
export interface ShopProductsByIdsOptions {
|
|
12
|
+
__typename?: "ProductOption" | null;
|
|
13
|
+
id?: string | null;
|
|
14
|
+
name?: string | null;
|
|
15
|
+
values?: (string | null)[] | null;
|
|
16
|
+
}
|
|
17
|
+
export interface ShopProductsByIdsVariantsNodesImage {
|
|
18
|
+
__typename?: "Image" | null;
|
|
19
|
+
id?: string | null;
|
|
20
|
+
altText?: string | null;
|
|
21
|
+
url?: URL | null;
|
|
22
|
+
}
|
|
23
|
+
export interface ShopProductsByIdsVariantsNodesSelectedOptions {
|
|
24
|
+
__typename?: "SelectedOption" | null;
|
|
25
|
+
name?: string | null;
|
|
26
|
+
value?: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface ShopProductsByIdsVariantsNodesPrice {
|
|
29
|
+
__typename?: "Money" | null;
|
|
30
|
+
amount?: Decimal | null;
|
|
31
|
+
currencyCode?: CurrencyCode | null;
|
|
32
|
+
}
|
|
33
|
+
export interface ShopProductsByIdsVariantsNodes {
|
|
34
|
+
__typename?: "ProductVariant" | null;
|
|
35
|
+
id?: string | null;
|
|
36
|
+
image?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsVariantsNodesImage | null;
|
|
37
|
+
selectedOptions?: (HelloWorldTestProductsQueryPartialData.ShopProductsByIdsVariantsNodesSelectedOptions | null)[] | null;
|
|
38
|
+
title?: string | null;
|
|
39
|
+
currentlyNotInStock?: boolean | null;
|
|
40
|
+
availableForSale?: boolean | null;
|
|
41
|
+
price?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsVariantsNodesPrice | null;
|
|
42
|
+
}
|
|
43
|
+
export interface ShopProductsByIdsVariants {
|
|
44
|
+
__typename?: "ProductVariantConnection" | null;
|
|
45
|
+
nodes?: (HelloWorldTestProductsQueryPartialData.ShopProductsByIdsVariantsNodes | null)[] | null;
|
|
14
46
|
}
|
|
15
47
|
export interface ShopProductsByIdsDefaultVariantCompareAtPrice {
|
|
16
|
-
__typename?:
|
|
17
|
-
amount?: Decimal | null
|
|
18
|
-
currencyCode?: CurrencyCode | null
|
|
48
|
+
__typename?: "Money" | null;
|
|
49
|
+
amount?: Decimal | null;
|
|
50
|
+
currencyCode?: CurrencyCode | null;
|
|
19
51
|
}
|
|
20
52
|
export interface ShopProductsByIdsDefaultVariantPrice {
|
|
21
|
-
__typename?:
|
|
22
|
-
amount?: Decimal | null
|
|
23
|
-
currencyCode?: CurrencyCode | null
|
|
53
|
+
__typename?: "Money" | null;
|
|
54
|
+
amount?: Decimal | null;
|
|
55
|
+
currencyCode?: CurrencyCode | null;
|
|
24
56
|
}
|
|
25
57
|
export interface ShopProductsByIdsDefaultVariantImage {
|
|
26
|
-
__typename?:
|
|
27
|
-
id?: string | null
|
|
28
|
-
altText?: string | null
|
|
29
|
-
url?: URL | null
|
|
58
|
+
__typename?: "Image" | null;
|
|
59
|
+
id?: string | null;
|
|
60
|
+
altText?: string | null;
|
|
61
|
+
url?: URL | null;
|
|
62
|
+
}
|
|
63
|
+
export interface ShopProductsByIdsDefaultVariantSelectedOptions {
|
|
64
|
+
__typename?: "SelectedOption" | null;
|
|
65
|
+
name?: string | null;
|
|
66
|
+
value?: string | null;
|
|
30
67
|
}
|
|
31
68
|
export interface ShopProductsByIdsDefaultVariant {
|
|
32
|
-
__typename?:
|
|
33
|
-
id?: string | null
|
|
34
|
-
title?: string | null
|
|
35
|
-
isFavorited?: boolean | null
|
|
36
|
-
compareAtPrice?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantCompareAtPrice | null
|
|
37
|
-
price?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantPrice | null
|
|
38
|
-
image?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantImage | null
|
|
69
|
+
__typename?: "ProductVariant" | null;
|
|
70
|
+
id?: string | null;
|
|
71
|
+
title?: string | null;
|
|
72
|
+
isFavorited?: boolean | null;
|
|
73
|
+
compareAtPrice?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantCompareAtPrice | null;
|
|
74
|
+
price?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantPrice | null;
|
|
75
|
+
image?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantImage | null;
|
|
76
|
+
selectedOptions?: (HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariantSelectedOptions | null)[] | null;
|
|
39
77
|
}
|
|
40
78
|
export interface ShopProductsByIds {
|
|
41
|
-
__typename?:
|
|
42
|
-
id?: string | null
|
|
43
|
-
title?: string | null
|
|
44
|
-
tags?: (string | null)[] | null
|
|
45
|
-
featuredImage?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsFeaturedImage | null
|
|
46
|
-
|
|
79
|
+
__typename?: "Product" | null;
|
|
80
|
+
id?: string | null;
|
|
81
|
+
title?: string | null;
|
|
82
|
+
tags?: (string | null)[] | null;
|
|
83
|
+
featuredImage?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsFeaturedImage | null;
|
|
84
|
+
options?: (HelloWorldTestProductsQueryPartialData.ShopProductsByIdsOptions | null)[] | null;
|
|
85
|
+
variants?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsVariants | null;
|
|
86
|
+
defaultVariant?: HelloWorldTestProductsQueryPartialData.ShopProductsByIdsDefaultVariant | null;
|
|
47
87
|
}
|
|
48
88
|
export interface Shop {
|
|
49
|
-
__typename?:
|
|
50
|
-
id?: string | null
|
|
51
|
-
name?: string | null
|
|
52
|
-
productsByIds?:
|
|
53
|
-
| (HelloWorldTestProductsQueryPartialData.ShopProductsByIds | null)[]
|
|
54
|
-
| null
|
|
89
|
+
__typename?: "Shop" | null;
|
|
90
|
+
id?: string | null;
|
|
91
|
+
name?: string | null;
|
|
92
|
+
productsByIds?: (HelloWorldTestProductsQueryPartialData.ShopProductsByIds | null)[] | null;
|
|
55
93
|
}
|
|
56
94
|
}
|
|
57
95
|
export interface HelloWorldTestProductsQueryPartialData {
|
|
58
|
-
shop?: HelloWorldTestProductsQueryPartialData.Shop | null
|
|
96
|
+
shop?: HelloWorldTestProductsQueryPartialData.Shop | null;
|
|
59
97
|
}
|
|
60
98
|
export namespace HelloWorldTestProductsQueryData {
|
|
61
99
|
export interface Variables {
|
|
62
|
-
shopId: string
|
|
63
|
-
productIds: string[]
|
|
100
|
+
shopId: string;
|
|
101
|
+
productIds: string[];
|
|
64
102
|
}
|
|
65
103
|
export interface ShopProductsByIdsFeaturedImage {
|
|
66
|
-
__typename:
|
|
67
|
-
id?: string | null
|
|
68
|
-
altText?: string | null
|
|
69
|
-
url: URL
|
|
104
|
+
__typename: "Image";
|
|
105
|
+
id?: string | null;
|
|
106
|
+
altText?: string | null;
|
|
107
|
+
url: URL;
|
|
108
|
+
}
|
|
109
|
+
export interface ShopProductsByIdsOptions {
|
|
110
|
+
__typename: "ProductOption";
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
values: string[];
|
|
114
|
+
}
|
|
115
|
+
export interface ShopProductsByIdsVariantsNodesImage {
|
|
116
|
+
__typename: "Image";
|
|
117
|
+
id?: string | null;
|
|
118
|
+
altText?: string | null;
|
|
119
|
+
url: URL;
|
|
120
|
+
}
|
|
121
|
+
export interface ShopProductsByIdsVariantsNodesSelectedOptions {
|
|
122
|
+
__typename: "SelectedOption";
|
|
123
|
+
name: string;
|
|
124
|
+
value: string;
|
|
125
|
+
}
|
|
126
|
+
export interface ShopProductsByIdsVariantsNodesPrice {
|
|
127
|
+
__typename: "Money";
|
|
128
|
+
amount: Decimal;
|
|
129
|
+
currencyCode: CurrencyCode;
|
|
130
|
+
}
|
|
131
|
+
export interface ShopProductsByIdsVariantsNodes {
|
|
132
|
+
__typename: "ProductVariant";
|
|
133
|
+
id: string;
|
|
134
|
+
image?: HelloWorldTestProductsQueryData.ShopProductsByIdsVariantsNodesImage | null;
|
|
135
|
+
selectedOptions: HelloWorldTestProductsQueryData.ShopProductsByIdsVariantsNodesSelectedOptions[];
|
|
136
|
+
title: string;
|
|
137
|
+
currentlyNotInStock: boolean;
|
|
138
|
+
availableForSale: boolean;
|
|
139
|
+
price: HelloWorldTestProductsQueryData.ShopProductsByIdsVariantsNodesPrice;
|
|
140
|
+
}
|
|
141
|
+
export interface ShopProductsByIdsVariants {
|
|
142
|
+
__typename: "ProductVariantConnection";
|
|
143
|
+
nodes: HelloWorldTestProductsQueryData.ShopProductsByIdsVariantsNodes[];
|
|
70
144
|
}
|
|
71
145
|
export interface ShopProductsByIdsDefaultVariantCompareAtPrice {
|
|
72
|
-
__typename:
|
|
73
|
-
amount: Decimal
|
|
74
|
-
currencyCode: CurrencyCode
|
|
146
|
+
__typename: "Money";
|
|
147
|
+
amount: Decimal;
|
|
148
|
+
currencyCode: CurrencyCode;
|
|
75
149
|
}
|
|
76
150
|
export interface ShopProductsByIdsDefaultVariantPrice {
|
|
77
|
-
__typename:
|
|
78
|
-
amount: Decimal
|
|
79
|
-
currencyCode: CurrencyCode
|
|
151
|
+
__typename: "Money";
|
|
152
|
+
amount: Decimal;
|
|
153
|
+
currencyCode: CurrencyCode;
|
|
80
154
|
}
|
|
81
155
|
export interface ShopProductsByIdsDefaultVariantImage {
|
|
82
|
-
__typename:
|
|
83
|
-
id?: string | null
|
|
84
|
-
altText?: string | null
|
|
85
|
-
url: URL
|
|
156
|
+
__typename: "Image";
|
|
157
|
+
id?: string | null;
|
|
158
|
+
altText?: string | null;
|
|
159
|
+
url: URL;
|
|
160
|
+
}
|
|
161
|
+
export interface ShopProductsByIdsDefaultVariantSelectedOptions {
|
|
162
|
+
__typename: "SelectedOption";
|
|
163
|
+
name: string;
|
|
164
|
+
value: string;
|
|
86
165
|
}
|
|
87
166
|
export interface ShopProductsByIdsDefaultVariant {
|
|
88
|
-
__typename:
|
|
89
|
-
id: string
|
|
90
|
-
title: string
|
|
91
|
-
isFavorited: boolean
|
|
92
|
-
compareAtPrice?: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantCompareAtPrice | null
|
|
93
|
-
price: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantPrice
|
|
94
|
-
image?: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantImage | null
|
|
167
|
+
__typename: "ProductVariant";
|
|
168
|
+
id: string;
|
|
169
|
+
title: string;
|
|
170
|
+
isFavorited: boolean;
|
|
171
|
+
compareAtPrice?: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantCompareAtPrice | null;
|
|
172
|
+
price: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantPrice;
|
|
173
|
+
image?: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantImage | null;
|
|
174
|
+
selectedOptions: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariantSelectedOptions[];
|
|
95
175
|
}
|
|
96
176
|
export interface ShopProductsByIds {
|
|
97
|
-
__typename:
|
|
98
|
-
id: string
|
|
99
|
-
title: string
|
|
100
|
-
tags: string[]
|
|
101
|
-
featuredImage?: HelloWorldTestProductsQueryData.ShopProductsByIdsFeaturedImage | null
|
|
102
|
-
|
|
177
|
+
__typename: "Product";
|
|
178
|
+
id: string;
|
|
179
|
+
title: string;
|
|
180
|
+
tags: string[];
|
|
181
|
+
featuredImage?: HelloWorldTestProductsQueryData.ShopProductsByIdsFeaturedImage | null;
|
|
182
|
+
options: HelloWorldTestProductsQueryData.ShopProductsByIdsOptions[];
|
|
183
|
+
variants: HelloWorldTestProductsQueryData.ShopProductsByIdsVariants;
|
|
184
|
+
defaultVariant: HelloWorldTestProductsQueryData.ShopProductsByIdsDefaultVariant;
|
|
103
185
|
}
|
|
104
186
|
export interface Shop {
|
|
105
|
-
__typename:
|
|
106
|
-
id: string
|
|
107
|
-
name: string
|
|
108
|
-
productsByIds: (HelloWorldTestProductsQueryData.ShopProductsByIds | null)[]
|
|
187
|
+
__typename: "Shop";
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
productsByIds: (HelloWorldTestProductsQueryData.ShopProductsByIds | null)[];
|
|
109
191
|
}
|
|
110
192
|
}
|
|
111
193
|
export interface HelloWorldTestProductsQueryData {
|
|
112
|
-
shop?: HelloWorldTestProductsQueryData.Shop | null
|
|
194
|
+
shop?: HelloWorldTestProductsQueryData.Shop | null;
|
|
113
195
|
}
|
|
114
|
-
declare const document: DocumentNode<
|
|
115
|
-
|
|
116
|
-
HelloWorldTestProductsQueryData.Variables,
|
|
117
|
-
HelloWorldTestProductsQueryPartialData
|
|
118
|
-
>
|
|
119
|
-
export default document
|
|
196
|
+
declare const document: DocumentNode<HelloWorldTestProductsQueryData, HelloWorldTestProductsQueryData.Variables, HelloWorldTestProductsQueryPartialData> & TypedDocumentNode<HelloWorldTestProductsQueryData, HelloWorldTestProductsQueryData.Variables>;
|
|
197
|
+
export default document;
|