Skip to content

Commit

Permalink
Merge pull request #643 from Shopify/improve_app_proxy_docs
Browse files Browse the repository at this point in the history
Improve app proxy docs
  • Loading branch information
paulomarg authored Feb 13, 2024
2 parents b74209c + 5bfd249 commit f0b182f
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .changeset/cool-humans-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
134 changes: 117 additions & 17 deletions packages/shopify-app-remix/docs/generated/generated_docs_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,7 @@
},
{
"name": "App proxy",
"description": "[App proxies](/docs/apps/online-store/app-proxies) take requests to Shopify links, and redirect them to external links. The `authenticate.public.appProxy` function validates requests made to app proxies, and returns a context to enable querying Shopify APIs.",
"description": "[App proxies](/docs/apps/online-store/app-proxies) take requests to Shopify links, and redirect them to external links.\nThe `authenticate.public.appProxy` function validates requests made to app proxies, and returns a context to enable querying Shopify APIs.\n\n> Note: If the store has not installed the app, store-related properties such as `admin` or `storefront` will be `undefined`",
"category": "Authenticate",
"subCategory": "Public",
"type": "object",
Expand Down Expand Up @@ -4493,14 +4493,14 @@
{
"filePath": "src/server/types.ts",
"syntaxKind": "MethodSignature",
"name": "__@iterator@176",
"name": "__@iterator@175",
"value": "() => IterableIterator<JSONValue>",
"description": "Iterator"
},
{
"filePath": "src/server/types.ts",
"syntaxKind": "PropertySignature",
"name": "__@unscopables@178",
"name": "__@unscopables@177",
"value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }",
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
},
Expand Down Expand Up @@ -6115,7 +6115,7 @@
"filePath": "../../node_modules/@shopify/shopify-api/lib/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "auth",
"value": "ShopifyAuth<Future>",
"value": "ShopifyAuth",
"description": ""
},
{
Expand Down Expand Up @@ -6168,7 +6168,7 @@
"description": ""
}
],
"value": "export interface Shopify<Params extends ConfigParams = ConfigParams, Resources extends ShopifyRestResources = ShopifyRestResources, Future extends FutureFlagOptions = FutureFlagOptions> {\n config: ConfigInterface<Params>;\n clients: ShopifyClients;\n auth: ShopifyAuth<Future>;\n session: ShopifySession;\n utils: ShopifyUtils;\n webhooks: ShopifyWebhooks;\n billing: ShopifyBilling;\n logger: ShopifyLogger;\n rest: Resources;\n flow: ShopifyFlow;\n}"
"value": "export interface Shopify<Params extends ConfigParams = ConfigParams, Resources extends ShopifyRestResources = ShopifyRestResources, _Future extends FutureFlagOptions = FutureFlagOptions> {\n config: ConfigInterface<Params>;\n clients: ShopifyClients;\n auth: ShopifyAuth;\n session: ShopifySession;\n utils: ShopifyUtils;\n webhooks: ShopifyWebhooks;\n billing: ShopifyBilling;\n logger: ShopifyLogger;\n rest: Resources;\n flow: ShopifyFlow;\n}"
},
"ConfigInterface": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/base-types.d.ts",
Expand Down Expand Up @@ -6697,7 +6697,7 @@
"filePath": "../../node_modules/@shopify/shopify-api/lib/billing/types.d.ts",
"syntaxKind": "TypeAliasDeclaration",
"name": "BillingConfigItem",
"value": "FeatureEnabled<Future, 'unstable_lineItemBilling'> extends true ? BillingConfigOneTimePlan | BillingConfigSubscriptionLineItemPlan : BillingConfigLegacyItem",
"value": "FeatureEnabled<Future, 'v10_lineItemBilling'> extends true ? BillingConfigOneTimePlan | BillingConfigSubscriptionLineItemPlan : BillingConfigLegacyItem",
"description": ""
},
"BillingConfigOneTimePlan": {
Expand Down Expand Up @@ -7354,10 +7354,60 @@
},
"ShopifyAuth": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "TypeAliasDeclaration",
"name": "ShopifyAuth",
"value": "{\n begin: OAuthBegin;\n callback: OAuthCallback;\n nonce: Nonce;\n safeCompare: SafeCompare;\n getEmbeddedAppUrl: GetEmbeddedAppUrl;\n buildEmbeddedAppUrl: BuildEmbeddedAppUrl;\n} & (FeatureEnabled<Future, 'unstable_tokenExchange'> extends true ? {\n tokenExchange: TokenExchange;\n} : Record<string, never>)",
"description": ""
"description": "",
"members": [
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "begin",
"value": "OAuthBegin",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "callback",
"value": "OAuthCallback",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "nonce",
"value": "Nonce",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "safeCompare",
"value": "SafeCompare",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "getEmbeddedAppUrl",
"value": "GetEmbeddedAppUrl",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "buildEmbeddedAppUrl",
"value": "BuildEmbeddedAppUrl",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "tokenExchange",
"value": "TokenExchange",
"description": ""
}
],
"value": "export interface ShopifyAuth {\n begin: OAuthBegin;\n callback: OAuthCallback;\n nonce: Nonce;\n safeCompare: SafeCompare;\n getEmbeddedAppUrl: GetEmbeddedAppUrl;\n buildEmbeddedAppUrl: BuildEmbeddedAppUrl;\n tokenExchange: TokenExchange;\n}"
},
"OAuthBegin": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/oauth.d.ts",
Expand Down Expand Up @@ -10763,7 +10813,7 @@
"filePath": "../../node_modules/@shopify/shopify-api/lib/billing/types.d.ts",
"syntaxKind": "TypeAliasDeclaration",
"name": "BillingConfigItem",
"value": "FeatureEnabled<Future, 'unstable_lineItemBilling'> extends true ? BillingConfigOneTimePlan | BillingConfigSubscriptionLineItemPlan : BillingConfigLegacyItem",
"value": "FeatureEnabled<Future, 'v10_lineItemBilling'> extends true ? BillingConfigOneTimePlan | BillingConfigSubscriptionLineItemPlan : BillingConfigLegacyItem",
"description": ""
},
"BillingConfigOneTimePlan": {
Expand Down Expand Up @@ -13031,14 +13081,14 @@
{
"filePath": "src/server/types.ts",
"syntaxKind": "MethodSignature",
"name": "__@iterator@176",
"name": "__@iterator@175",
"value": "() => IterableIterator<JSONValue>",
"description": "Iterator"
},
{
"filePath": "src/server/types.ts",
"syntaxKind": "PropertySignature",
"name": "__@unscopables@178",
"name": "__@unscopables@177",
"value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }",
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
},
Expand Down Expand Up @@ -13414,7 +13464,7 @@
"filePath": "../../node_modules/@shopify/shopify-api/lib/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "auth",
"value": "ShopifyAuth<Future>",
"value": "ShopifyAuth",
"description": ""
},
{
Expand Down Expand Up @@ -13467,7 +13517,7 @@
"description": ""
}
],
"value": "export interface Shopify<Params extends ConfigParams = ConfigParams, Resources extends ShopifyRestResources = ShopifyRestResources, Future extends FutureFlagOptions = FutureFlagOptions> {\n config: ConfigInterface<Params>;\n clients: ShopifyClients;\n auth: ShopifyAuth<Future>;\n session: ShopifySession;\n utils: ShopifyUtils;\n webhooks: ShopifyWebhooks;\n billing: ShopifyBilling;\n logger: ShopifyLogger;\n rest: Resources;\n flow: ShopifyFlow;\n}"
"value": "export interface Shopify<Params extends ConfigParams = ConfigParams, Resources extends ShopifyRestResources = ShopifyRestResources, _Future extends FutureFlagOptions = FutureFlagOptions> {\n config: ConfigInterface<Params>;\n clients: ShopifyClients;\n auth: ShopifyAuth;\n session: ShopifySession;\n utils: ShopifyUtils;\n webhooks: ShopifyWebhooks;\n billing: ShopifyBilling;\n logger: ShopifyLogger;\n rest: Resources;\n flow: ShopifyFlow;\n}"
},
"ConfigInterface": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/base-types.d.ts",
Expand Down Expand Up @@ -14207,10 +14257,60 @@
},
"ShopifyAuth": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "TypeAliasDeclaration",
"name": "ShopifyAuth",
"value": "{\n begin: OAuthBegin;\n callback: OAuthCallback;\n nonce: Nonce;\n safeCompare: SafeCompare;\n getEmbeddedAppUrl: GetEmbeddedAppUrl;\n buildEmbeddedAppUrl: BuildEmbeddedAppUrl;\n} & (FeatureEnabled<Future, 'unstable_tokenExchange'> extends true ? {\n tokenExchange: TokenExchange;\n} : Record<string, never>)",
"description": ""
"description": "",
"members": [
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "begin",
"value": "OAuthBegin",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "callback",
"value": "OAuthCallback",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "nonce",
"value": "Nonce",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "safeCompare",
"value": "SafeCompare",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "getEmbeddedAppUrl",
"value": "GetEmbeddedAppUrl",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "buildEmbeddedAppUrl",
"value": "BuildEmbeddedAppUrl",
"description": ""
},
{
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/index.d.ts",
"syntaxKind": "PropertySignature",
"name": "tokenExchange",
"value": "TokenExchange",
"description": ""
}
],
"value": "export interface ShopifyAuth {\n begin: OAuthBegin;\n callback: OAuthCallback;\n nonce: Nonce;\n safeCompare: SafeCompare;\n getEmbeddedAppUrl: GetEmbeddedAppUrl;\n buildEmbeddedAppUrl: BuildEmbeddedAppUrl;\n tokenExchange: TokenExchange;\n}"
},
"OAuthBegin": {
"filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/oauth.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
const data: ReferenceEntityTemplateSchema = {
name: 'App proxy',
description:
'[App proxies](/docs/apps/online-store/app-proxies) take requests to Shopify links, and redirect them to external links. The `authenticate.public.appProxy` function validates requests made to app proxies, and returns a context to enable querying Shopify APIs.',
'[App proxies](/docs/apps/online-store/app-proxies) take requests to Shopify links, and redirect them to external links.' +
'\nThe `authenticate.public.appProxy` function validates requests made to app proxies, and returns a context to enable querying Shopify APIs.' +
'\n\n> Note: If the store has not installed the app, store-related properties such as `admin` or `storefront` will be `undefined`',
category: 'Authenticate',
subCategory: 'Public',
type: 'object',
Expand Down

0 comments on commit f0b182f

Please sign in to comment.