This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createAdminApiClient } from '@shopify/admin-api-client'; | |
| // wrap graph API client so you can use it like admin.graphql | |
| async function query(operation, options) { | |
| const client = createAdminApiClient({ | |
| storeDomain: `${shop}.myshopify.com`, | |
| apiVersion: '2023-04', | |
| accessToken: token, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Get Subscription status | |
| */ | |
| async function getSubscriptionStatus(shop, accessToken) { | |
| // create a new client | |
| const client = new Shopify.Clients.Graphql(shop, accessToken); | |
| try { | |
| // return the products, see https://shopify.dev/docs/api/admin-graphql/2024-01/objects/AppSubscription |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Stages a file for upload | |
| */ | |
| router.post('/file/stage', async (ctx, next) => { | |
| let params = ctx.request.body, obj = {}; | |
| // decode jwt | |
| let decoded = jwt.read(ctx.request.header.authorization); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% comment %} | |
| © Sections Pro. You are free to use this section in your store. You may not redistribute this section in another Shopify app. | |
| {% endcomment %} | |
| {% assign short_id = section.id | slice: -3, 3 %} | |
| <style> | |
| :root { | |
| --sp-clip-{{ short_id }}: {{ section.settings.start_percent }}%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% comment %} | |
| © Sections Pro. You are free to use this section in your store. You may not redistribute this section in another Shopify app. | |
| {% endcomment %} | |
| <style> | |
| {%- capture sp_content -%} | |
| {% if section.settings.override_fonts %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style>:root{--pb-section-width:1000px;--pb-table-padding-vertical:7.5px;--pb-table-padding-horizontal:7.5px}:root.pb-dark{--pb-headline-color:#fff;--pb-text-color:#fff;--pb-link-color:#40AADF;--pb-tab-active-color:#fff;--pb-tab-inactive-color:#f0f0f0;--pb-tab-border-color:#f0f0f0;--pb-section-margin-bottom:25px;--pb-element-margin-bottom:15px;--pb-section-background-color:transparent;--pb-section-featured-background-color:#37465B;--pb-divider-color:#fff;--pb-primary-button-border-color:#555;--pb-primary-button-color:#fff;--pb-primary-button-background-color:#111;--pb-secondary-button-color:#111;--pb-secondary-button-background-color:#fff;--pb-secondary-button-border-color:#111;--pb-table-table-head-background-color:#f8f8f8;--pb-table-table-alt-background-color:#f8f8f8;--pb-shadow-color:#333;--pb-shadow-hover-color:#555;--pb-selector-color:#f0f0f0;--pb-sticky-background-color:#888;--pb-card-background-color:#111;--pb-hero-background-color:#111;--pb-featured-background-color:#011B47}body .pagebuilder-hero-bloc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style>{{ shop.metafields.pagebuilder.styles }}</style> | |
| <script>document.documentElement.classList.add("{{ shop.metafields.pagebuilder.theme }}");</script> | |
| <!-- profitpages template: {{ template.name }} content source: {{ block.settings.content_source }} --> | |
| {% if block.settings.content_source == "shared" %} | |
| {% if template.name == "page" %} | |
| {{ shop.metafields.pagebuilder.page_content }} | |
| {% endif %} | |
| {% if template.name == "product" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fetch from 'node-fetch'; | |
| // prod | |
| var accessToken = ``; | |
| var shop = ``; | |
| var subscriptionId = ``; | |
| console.log(`Removing subscription for ${shop}...`); | |
| (async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .app-vitals { | |
| position: fixed; | |
| left: calc(50% - 250px); | |
| bottom: 5px; | |
| width: 500px; | |
| background-color: #111; | |
| color: #fff; | |
| padding: 5px; | |
| border-radius: 5px; | |
| font-size: 11px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import OpenAI from "openai"; | |
| import Configuration from "openai"; | |
| import * as fs from 'node:fs'; | |
| /* | |
| * Configs | |
| */ | |
| const configuration = new Configuration({ | |
| apiKey: `API_KEY` | |
| }); |
NewerOlder