@shopify/shopify-api 6.0.1 → 6.0.2
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/CHANGELOG.md +10 -2
- package/README.md +16 -47
- package/docs/reference/README.md +18 -0
- package/docs/reference/auth/README.md +14 -0
- package/docs/reference/billing/README.md +14 -0
- package/docs/reference/clients/README.md +12 -0
- package/docs/reference/session/README.md +11 -0
- package/docs/reference/utils/README.md +12 -0
- package/docs/reference/webhooks/README.md +13 -0
- package/lib/auth/decode-host.d.ts +2 -0
- package/lib/auth/decode-host.d.ts.map +1 -0
- package/lib/auth/decode-host.js +12 -0
- package/lib/auth/decode-host.js.map +1 -0
- package/lib/auth/get-embedded-app-url.d.ts.map +1 -1
- package/lib/auth/get-embedded-app-url.js +2 -5
- package/lib/auth/get-embedded-app-url.js.map +1 -1
- package/lib/deprecated-v5-types.d.ts +59 -0
- package/lib/deprecated-v5-types.d.ts.map +1 -0
- package/lib/deprecated-v5-types.js +3 -0
- package/lib/deprecated-v5-types.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/session/session.d.ts.map +1 -1
- package/lib/session/session.js +4 -0
- package/lib/session/session.js.map +1 -1
- package/lib/utils/shop-validator.d.ts +1 -1
- package/lib/utils/shop-validator.d.ts.map +1 -1
- package/lib/utils/shop-validator.js +9 -2
- package/lib/utils/shop-validator.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/webhooks/process.js +1 -1
- package/lib/webhooks/process.js.map +1 -1
- package/package.json +1 -1
- package/rest/admin/2022-01/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-01/assigned_fulfillment_order.js +2 -2
- package/rest/admin/2022-01/assigned_fulfillment_order.js.map +1 -1
- package/rest/admin/2022-01/customer.d.ts +5 -1
- package/rest/admin/2022-01/customer.d.ts.map +1 -1
- package/rest/admin/2022-01/customer.js +5 -5
- package/rest/admin/2022-01/customer.js.map +1 -1
- package/rest/admin/2022-04/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-04/assigned_fulfillment_order.js +2 -2
- package/rest/admin/2022-04/assigned_fulfillment_order.js.map +1 -1
- package/rest/admin/2022-04/customer.d.ts +5 -1
- package/rest/admin/2022-04/customer.d.ts.map +1 -1
- package/rest/admin/2022-04/customer.js +5 -5
- package/rest/admin/2022-04/customer.js.map +1 -1
- package/rest/admin/2022-07/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-07/assigned_fulfillment_order.js +2 -2
- package/rest/admin/2022-07/assigned_fulfillment_order.js.map +1 -1
- package/rest/admin/2022-07/customer.d.ts +5 -1
- package/rest/admin/2022-07/customer.d.ts.map +1 -1
- package/rest/admin/2022-07/customer.js +5 -5
- package/rest/admin/2022-07/customer.js.map +1 -1
- package/rest/admin/2022-10/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-10/assigned_fulfillment_order.js +2 -2
- package/rest/admin/2022-10/assigned_fulfillment_order.js.map +1 -1
- package/rest/admin/2022-10/customer.d.ts +5 -1
- package/rest/admin/2022-10/customer.d.ts.map +1 -1
- package/rest/admin/2022-10/customer.js +5 -5
- package/rest/admin/2022-10/customer.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## [6.0.2] - 2022-12-08
|
|
11
|
+
|
|
12
|
+
- [Patch] Raise an `InvalidSession` if `Session.fromPropertyArray` receive an object that is not an array
|
|
13
|
+
- [Patch] Validate content of host parameter using sanitizeShop regex [#634](https://github.com/Shopify/shopify-api-js/pull/634)
|
|
14
|
+
- [Patch] Use the GraphQL format of webhook topics in the error message [#626](https://github.com/Shopify/shopify-api-js/pull/626)
|
|
15
|
+
- [Patch] Export deprecation notices for v5 main interface [#639](https://github.com/Shopify/shopify-api-js/pull/639)
|
|
16
|
+
- [Patch] Fixed an issue when parsing the response body in the AssignedFulfillmentOrder REST resource [#644](https://github.com/Shopify/shopify-api-js/pull/644)
|
|
17
|
+
|
|
10
18
|
## [6.0.1] - 2022-12-08
|
|
11
19
|
|
|
12
20
|
- [Patch] Auto-detect session type in auth callback, deprecate `isOnline` argument [#628](https://github.com/Shopify/shopify-api-js/pull/628)
|
|
@@ -144,9 +152,9 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
|
144
152
|
|
|
145
153
|
- Add a 5 second `clockTolerance` to fix `jwt not active` error [#227](https://github.com/Shopify/shopify-api-js/pull/227)
|
|
146
154
|
- ⚠️ [Breaking] Change default for OAuth.beginAuth to online sessions [#203](https://github.com/Shopify/shopify-api-js/pull/203)
|
|
147
|
-
- see [oauth.md](
|
|
155
|
+
- see [oauth.md](./docs/guides/oauth.md) for updated docs
|
|
148
156
|
- ⚠️ [Breaking] Return and delete session in `validateAuthCallback` [#217](https://github.com/Shopify/shopify-api-js/pull/217)
|
|
149
|
-
- see [oauth.md](
|
|
157
|
+
- see [oauth.md](./docs/guides/oauth.md) for updated usage
|
|
150
158
|
- ⚠️ [Breaking] Extract `addHandler` and `getHandler` methods for webhooks out of `register` [#205](https://github.com/Shopify/shopify-api-js/pull/205)
|
|
151
159
|
- ⚠️ [Breaking] Sessions no longer default to `false` for `isOnline` [#169](https://github.com/Shopify/shopify-api-js/pull/169)
|
|
152
160
|
- Required `Session` arguments must be passed to the constructor [#169](https://github.com/Shopify/shopify-api-js/pull/169)
|
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Next, configure the library - you'll need some values in advance:
|
|
|
63
63
|
- Your app's API secret from Partners dashboard
|
|
64
64
|
- The [scopes](https://shopify.dev/api/usage/access-scopes) you need for your app
|
|
65
65
|
|
|
66
|
-
Call `shopifyApi` to create your library object before setting up your app itself:
|
|
66
|
+
Call `shopifyApi` ([see reference](./docs/reference/shopifyApi.md)) to create your library object before setting up your app itself:
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
69
|
import '@shopify/shopify-api/adapters/node';
|
|
@@ -85,59 +85,28 @@ const app = express();
|
|
|
85
85
|
### Next steps
|
|
86
86
|
|
|
87
87
|
Once you configure your app, you can use this package to access the Shopify APIs.
|
|
88
|
-
See the
|
|
88
|
+
See the [reference documentation](./docs/reference/README.md) for details on all the methods provided by this package.
|
|
89
|
+
|
|
90
|
+
See the specific documentation in the [Guides section](#guides) for high-level instructions on how to get API access tokens and use them to query the APIs.
|
|
89
91
|
|
|
90
92
|
As a general rule, apps will want to interact with the Admin API to fetch / submit data to Shopify.
|
|
91
93
|
To do that, apps will need to:
|
|
92
94
|
|
|
93
|
-
1. Create an Admin API access token by going through [the OAuth flow](docs/
|
|
95
|
+
1. Create an Admin API access token by going through [the OAuth flow](docs/guides/oauth.md).
|
|
94
96
|
1. Set up its own endpoints to:
|
|
95
|
-
1. [Fetch the current session](docs/
|
|
96
|
-
1. Create a [REST](docs/
|
|
97
|
+
1. [Fetch the current session](docs/guides/oauth.md#using-sessions) created in the OAuth process.
|
|
98
|
+
1. Create a [REST](docs/reference/clients/Rest.md) or [GraphQL](docs/reference/clients/Graphql.md) API client.
|
|
97
99
|
1. Use the client to query the appropriate [Admin API](https://shopify.dev/api/admin).
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
| hostName | `string` | Yes | - | App host name in the format `my-host-name.com`. Do **not** include the scheme or leading or trailing slashes |
|
|
109
|
-
| hostScheme | `"https" \| "http"` | No | `"https"` | The scheme for your app's public URL |
|
|
110
|
-
| apiVersion | `ApiVersion` | No | `LATEST_API_VERSION` | API version your app will be querying. E.g. `ApiVersion.January20` |
|
|
111
|
-
| isEmbeddedApp | `boolean` | No | `true` | Whether your app will run within the Shopify Admin |
|
|
112
|
-
| isPrivateApp | `boolean` | No | `false` | Whether you are building a private app for a store |
|
|
113
|
-
| userAgentPrefix | `string` | No | `undefined` | Any prefix you wish to include in the `User-Agent` for requests made by the library |
|
|
114
|
-
| privateAppStorefrontAccessToken | `string` | No | `undefined` | Fixed Storefront API access token for private apps |
|
|
115
|
-
| customShopDomains | `(RegExp \| string)[]` | No | `undefined` | Use this if you need to allow values other than `myshopify.com` |
|
|
116
|
-
| billing | `BillingConfig` | No | `undefined` | Billing configurations. [See documentation](docs/usage/billing.md) for full description |
|
|
117
|
-
| restResources | `ShopifyRestResources` | No | - | Mounts the given REST resources onto the object. Must use the same version as `apiVersion`. Learn more about [using REST resources](docs/usage/rest.md#using-rest-resources) |
|
|
118
|
-
| logger | `{[key: string]: any}` | No | - | Tweaks the behaviour of the package's internal logging to make it easier to debug applications |
|
|
119
|
-
| logger.log | `AsyncFunction` | No | `() => Promise<void>` | Async callback function used for logging, which takes in a `LogSeverity` value and a formatted `message`. Defaults to using `console` calls matching the severity parameter |
|
|
120
|
-
| logger.level | `LogSeverity` | No | `LogSeverity.Info` | Minimum severity for which to trigger the log function |
|
|
121
|
-
| logger.httpRequests | `boolean` | No | `false` | Whether to log **ALL** HTTP requests made by the package. Only works if `level` is `Debug` |
|
|
122
|
-
| logger.timestamps | `boolean` | No | `false` | Whether to add the current timestamp to every log call |
|
|
123
|
-
|
|
124
|
-
## Features
|
|
125
|
-
|
|
126
|
-
- [OAuth](docs/usage/oauth.md)
|
|
127
|
-
- [Start endpoint](docs/usage/oauth.md#start-endpoint)
|
|
128
|
-
- [Callback endpoint](docs/usage/oauth.md#callback-endpoint)
|
|
129
|
-
- [Using sessions](docs/usage/oauth.md#using-sessions)
|
|
130
|
-
- [Detecting scope changes](docs/usage/oauth.md#detecting-scope-changes)
|
|
131
|
-
- [REST Admin API client](docs/usage/rest.md)
|
|
132
|
-
- [Using REST resources](docs/usage/rest.md#using-rest-resources)
|
|
133
|
-
- [GraphQL Admin API client](docs/usage/graphql.md)
|
|
134
|
-
- [GraphqL Storefront API client](docs/usage/storefront.md)
|
|
135
|
-
- [Webhooks](docs/usage/webhooks.md)
|
|
136
|
-
- [Register a Webhook](docs/usage/webhooks.md#register-a-webhook)
|
|
137
|
-
- [Process a Webhook](docs/usage/webhooks.md#process-a-webhook)
|
|
138
|
-
- [Billing](docs/usage/billing.md)
|
|
139
|
-
- [Adding custom runtimes](docs/usage/runtimes.md)
|
|
140
|
-
- [Customizing logging configuration](docs/usage/logger.md)
|
|
101
|
+
## Guides
|
|
102
|
+
|
|
103
|
+
- [Performing OAuth](docs/guides/oauth.md)
|
|
104
|
+
- [Storing sessions](docs/guides/session-storage.md)
|
|
105
|
+
- [Setting up webhooks](docs/guides/webhooks.md)
|
|
106
|
+
- [Using REST resources](docs/guides/rest-resources.md)
|
|
107
|
+
- [Configuring Billing](docs/guides/billing.md)
|
|
108
|
+
- [Adding custom runtimes](docs/guides/runtimes.md)
|
|
109
|
+
- [Customizing logging configuration](docs/guides/logger.md)
|
|
141
110
|
|
|
142
111
|
## Migrating to v6
|
|
143
112
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Library reference
|
|
2
|
+
|
|
3
|
+
This section of the documentation provides thorough details on the parameters and response formats for each of the main components exported by the library.
|
|
4
|
+
|
|
5
|
+
## [shopifyApi](./shopifyApi.md)
|
|
6
|
+
|
|
7
|
+
| Property | Description |
|
|
8
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| config | The options used to set up the object, containing the parameters of this function. |
|
|
10
|
+
| [auth](./auth/README.md) | Object containing functions to authenticate with Shopify APIs. |
|
|
11
|
+
| [clients](./clients/README.md) | Object containing clients to access Shopify APIs. |
|
|
12
|
+
| [session](./session/README.md) | Object containing functions to manage Shopify sessions. |
|
|
13
|
+
| [webhooks](./webhooks/README.md) | Object containing functions to configure and handle Shopify webhooks. |
|
|
14
|
+
| [billing](./billing/README.md) | Object containing functions to enable apps to bill merchants. |
|
|
15
|
+
| [utils](./utils/README.md) | Object containing general functions to help build apps. |
|
|
16
|
+
| [rest](../guides/rest-resources.md) | Object containing OO representations of the Admin REST API. See the [API reference documentation](https://shopify.dev/api/admin-rest) for details. |
|
|
17
|
+
|
|
18
|
+
[Back to main page](../../README.md)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# shopify.auth
|
|
2
|
+
|
|
3
|
+
This object contains functions used to authenticate apps, and redirect users to Shopify.
|
|
4
|
+
|
|
5
|
+
| Property | Description |
|
|
6
|
+
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| [begin](./begin.md) | Redirect the user to Shopify to request authorization for the app. |
|
|
8
|
+
| [callback](./callback.md) | Receive Shopify's callback after the user approves the app installation. |
|
|
9
|
+
| [nonce](./nonce.md) | Generates a random string of characters to be used as the state value for OAuth. |
|
|
10
|
+
| [safeCompare](./safeCompare.md) | Compares two strings or arrays in a way that's safe against timing attacks. |
|
|
11
|
+
| [getEmbeddedAppUrl](./getEmbeddedAppUrl.md) | Builds a URL to redirect the user back to the right Shopify surface based on the current request. |
|
|
12
|
+
| [buildEmbeddedAppUrl](./buildEmbeddedAppUrl.md) | Constructs the appropriate Shopify URL to redirect to. |
|
|
13
|
+
|
|
14
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# shopify.billing
|
|
2
|
+
|
|
3
|
+
This object contains functions used to create and check billing charges with Shopify, based on the plans defined in the [`billing`](../shopifyApi.md#billing) configuration.
|
|
4
|
+
|
|
5
|
+
Learn more about [how billing on Shopify works](https://shopify.dev/apps/billing).
|
|
6
|
+
|
|
7
|
+
> **Note**: this package uses the GraphQL Admin API to look for and/or request payments, which means an app must go through OAuth before it can charge merchants.
|
|
8
|
+
|
|
9
|
+
| Property | Description |
|
|
10
|
+
| ----------------------- | --------------------------------------------------------------- |
|
|
11
|
+
| [check](./check.md) | Checks if the current shop has paid for any of the given plans. |
|
|
12
|
+
| [request](./request.md) | Requests a new payment for the given payment plan. |
|
|
13
|
+
|
|
14
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# shopify.clients
|
|
2
|
+
|
|
3
|
+
This object contains functions used to authenticate apps, and redirect users to Shopify.
|
|
4
|
+
|
|
5
|
+
| Property | Description |
|
|
6
|
+
| --------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| [Rest](./Rest.md) | Class that can interact with the [Shopify Admin REST API](https://shopify.dev/api/admin-rest). |
|
|
8
|
+
| [Graphql](./Graphql.md) | Class that can interact with the [Shopify Admin GraphQL API](https://shopify.dev/api/admin-graphql). |
|
|
9
|
+
| [Storefront](./Storefront.md) | Class that can interact with the [Shopify Storefront API](https://shopify.dev/api/storefront). |
|
|
10
|
+
| [graphqlProxy](./graphqlProxy.md) | Creates a proxy that forwards requests to the GraphQL API and returns the response from Shopify. |
|
|
11
|
+
|
|
12
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# shopify.session
|
|
2
|
+
|
|
3
|
+
This object contains functions used to authenticate apps, and redirect users to Shopify.
|
|
4
|
+
|
|
5
|
+
| Property | Description |
|
|
6
|
+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| [getCurrentId](./getCurrentId.md) | Extracts a Shopify session id for the current request when there is user interaction with the app. |
|
|
8
|
+
| [getOfflineId](./getOfflineId.md) | Builds the session id for the given shop, for background tasks that don't involve user interaction. |
|
|
9
|
+
| [decodeSessionToken](./decodeSessionToken.md) | Extracts and validates the session token JWT from App Bridge requests. |
|
|
10
|
+
|
|
11
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# shopify.utils
|
|
2
|
+
|
|
3
|
+
This object contains generic helper functions that might simplify app code.
|
|
4
|
+
|
|
5
|
+
| Property | Description |
|
|
6
|
+
| ------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
7
|
+
| [sanitizeShop](./sanitizeShop.md) | Validates and sanitizes Shopify shop domains to make user input safer. |
|
|
8
|
+
| [sanitizeHost](./sanitizeHost.md) | Validates and sanitizes the `host` argument from Shopify for embedded apps. |
|
|
9
|
+
| [validateHmac](./validateHmac.md) | Validates the HMAC signature in requests from Shopify. |
|
|
10
|
+
| [versionCompatible](./versionCompatible.md) | Checks whether the given API version is compatible with the current library version. |
|
|
11
|
+
|
|
12
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# shopify.webhooks
|
|
2
|
+
|
|
3
|
+
This object contains functions used to configure, register and process webhooks.
|
|
4
|
+
|
|
5
|
+
| Property | Description |
|
|
6
|
+
| ------------------------------------- | ------------------------------------------------------ |
|
|
7
|
+
| [addHandlers](./addHandlers.md) | Add handlers to the webhook registry. |
|
|
8
|
+
| [getTopicsAdded](./getTopicsAdded.md) | Fetch the topics that have been added to the registry. |
|
|
9
|
+
| [getHandlers](./getHandlers.md) | Get the configured handlers for the given topic. |
|
|
10
|
+
| [register](./register.md) | Register the configured handlers with Shopify. |
|
|
11
|
+
| [process](./process.md) | Validate and process a webhook request from Shopify. |
|
|
12
|
+
|
|
13
|
+
[Back to shopifyApi](../shopifyApi.md)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode-host.d.ts","sourceRoot":"","sources":["decode-host.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeHost = void 0;
|
|
4
|
+
function decodeHost(host) {
|
|
5
|
+
// eslint-disable-next-line no-warning-comments
|
|
6
|
+
// TODO Remove the Buffer.from call when dropping Node 14 support
|
|
7
|
+
return typeof atob === 'undefined'
|
|
8
|
+
? Buffer.from(host, 'base64').toString()
|
|
9
|
+
: atob(host);
|
|
10
|
+
}
|
|
11
|
+
exports.decodeHost = decodeHost;
|
|
12
|
+
//# sourceMappingURL=decode-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode-host.js","sourceRoot":"","sources":["decode-host.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,IAAY;IACrC,+CAA+C;IAC/C,iEAAiE;IACjE,OAAO,OAAO,IAAI,KAAK,WAAW;QAChC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE;QACxC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC;AAND,gCAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-embedded-app-url.d.ts","sourceRoot":"","sources":["get-embedded-app-url.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"get-embedded-app-url.d.ts","sourceRoot":"","sources":["get-embedded-app-url.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAK9C,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAEhD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,wBACvB,uBAAuB,KAAG,QAAQ,MAAM,CAAC,CA0B1E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,UAC3C,MAAM,KAAG,MAAM,CAM9B"}
|
|
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var ShopifyErrors = tslib_1.__importStar(require("../error"));
|
|
6
6
|
var http_1 = require("../../runtime/http");
|
|
7
7
|
var shop_validator_1 = require("../utils/shop-validator");
|
|
8
|
+
var decode_host_1 = require("./decode-host");
|
|
8
9
|
function getEmbeddedAppUrl(config) {
|
|
9
10
|
var _this = this;
|
|
10
11
|
return function (_a) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
@@ -35,11 +36,7 @@ exports.getEmbeddedAppUrl = getEmbeddedAppUrl;
|
|
|
35
36
|
function buildEmbeddedAppUrl(config) {
|
|
36
37
|
return function (host) {
|
|
37
38
|
(0, shop_validator_1.sanitizeHost)(config)(host, true);
|
|
38
|
-
|
|
39
|
-
// TODO Remove the Buffer.from call when dropping Node 14 support
|
|
40
|
-
var decodedHost = typeof atob === 'undefined'
|
|
41
|
-
? Buffer.from(host, 'base64').toString()
|
|
42
|
-
: atob(host);
|
|
39
|
+
var decodedHost = (0, decode_host_1.decodeHost)(host);
|
|
43
40
|
return "https://".concat(decodedHost, "/apps/").concat(config.apiKey);
|
|
44
41
|
};
|
|
45
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-embedded-app-url.js","sourceRoot":"","sources":["get-embedded-app-url.ts"],"names":[],"mappings":";;;;AAAA,8DAA0C;AAE1C,2CAA0D;AAC1D,0DAAqD;
|
|
1
|
+
{"version":3,"file":"get-embedded-app-url.js","sourceRoot":"","sources":["get-embedded-app-url.ts"],"names":[],"mappings":";;;;AAAA,8DAA0C;AAE1C,2CAA0D;AAC1D,0DAAqD;AAErD,6CAAyC;AAGzC,SAAgB,iBAAiB,CAAC,MAAuB;IAAzD,iBA2BC;IA1BC,OAAO,UAAO,EAAyC;;YAArC,WAAW,sBAAf,EAAgB,CAAD;;;wBACX,qBAAM,IAAA,6BAAsB,EAAC,WAAW,CAAC,EAAA;;oBAAnD,OAAO,GAAG,SAAyC;oBAEzD,IAAI,CAAC,OAAO,EAAE;wBACZ,MAAM,IAAI,aAAa,CAAC,uBAAuB,CAC7C,sDAAsD,CACvD,CAAC;qBACH;oBAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;wBAChB,MAAM,IAAI,aAAa,CAAC,mBAAmB,CACzC,gCAAgC,CACjC,CAAC;qBACH;oBAEK,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAW,OAAO,CAAC,OAAO,CAAC,IAAI,CAAE,CAAC,CAAC;oBAC9D,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;oBAE1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;wBAC5B,MAAM,IAAI,aAAa,CAAC,mBAAmB,CACzC,iDAAiD,CAClD,CAAC;qBACH;oBAED,sBAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAC;;;SAC1C,CAAC;AACJ,CAAC;AA3BD,8CA2BC;AAED,SAAgB,mBAAmB,CAAC,MAAuB;IACzD,OAAO,UAAC,IAAY;QAClB,IAAA,6BAAY,EAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjC,IAAM,WAAW,GAAG,IAAA,wBAAU,EAAC,IAAI,CAAC,CAAC;QAErC,OAAO,kBAAW,WAAW,mBAAS,MAAM,CAAC,MAAM,CAAE,CAAC;IACxD,CAAC,CAAC;AACJ,CAAC;AAPD,kDAOC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface DeprecatedV5Types {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
* `Shopify.Context` is now `Shopify.config` and its API has changed.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md
|
|
7
|
+
*/
|
|
8
|
+
Context?: never;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* `Shopify.Auth` is now `Shopify.auth` and its API has changed.
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#changes-to-authentication-functions
|
|
14
|
+
*/
|
|
15
|
+
Auth?: never;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
* `Shopify.Billing` is now `Shopify.billing` and its API has changed.
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#billing
|
|
21
|
+
*/
|
|
22
|
+
Billing?: never;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
* `Shopify.Session` is now `Shopify.session` and its API has changed.
|
|
26
|
+
*
|
|
27
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#changes-to-session-and-sessionstorage
|
|
28
|
+
*/
|
|
29
|
+
Session?: never;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
* `Shopify.Clients` is now `Shopify.clients` and its API has changed.
|
|
33
|
+
*
|
|
34
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#changes-to-api-clients
|
|
35
|
+
*/
|
|
36
|
+
Clients?: never;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
39
|
+
* `Shopify.Utils` is now `Shopify.utils` and its API has changed.
|
|
40
|
+
*
|
|
41
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#utility-functions
|
|
42
|
+
*/
|
|
43
|
+
Utils?: never;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated
|
|
46
|
+
* `Shopify.Webhooks` is now `Shopify.webhooks` and its API has changed.
|
|
47
|
+
*
|
|
48
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#changes-to-webhook-functions
|
|
49
|
+
*/
|
|
50
|
+
Webhooks?: never;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
* `Shopify.Errors` was deprecated, error classes are now exported directly from the package.
|
|
54
|
+
*
|
|
55
|
+
* @see https://github.com/Shopify/shopify-api-js/blob/main/docs/migrating-to-v6.md#simplified-namespace-for-errors
|
|
56
|
+
*/
|
|
57
|
+
Errors?: never;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=deprecated-v5-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-v5-types.d.ts","sourceRoot":"","sources":["deprecated-v5-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-v5-types.js","sourceRoot":"","sources":["deprecated-v5-types.ts"],"names":[],"mappings":""}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ShopifyRestResources } from '../rest/types';
|
|
2
|
+
import { DeprecatedV5Types } from './deprecated-v5-types';
|
|
2
3
|
import { ConfigParams, ConfigInterface } from './base-types';
|
|
3
4
|
import { ShopifyClients } from './clients';
|
|
4
5
|
import { ShopifyAuth } from './auth';
|
|
@@ -15,6 +16,7 @@ export * from './base-types';
|
|
|
15
16
|
export * from './session/types';
|
|
16
17
|
export * from './auth/types';
|
|
17
18
|
export * from './webhooks/types';
|
|
19
|
+
export declare const Shopify: DeprecatedV5Types;
|
|
18
20
|
export interface Shopify<T extends ShopifyRestResources = ShopifyRestResources> {
|
|
19
21
|
config: ConfigInterface;
|
|
20
22
|
clients: ShopifyClients;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAgB,cAAc,EAAC,MAAM,WAAW,CAAC;AACxD,OAAO,EAAc,WAAW,EAAC,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,EAAe,YAAY,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAkB,eAAe,EAAC,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,EAAS,aAAa,EAAC,MAAM,UAAU,CAAC;AAE/C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAElC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAgB,cAAc,EAAC,MAAM,WAAW,CAAC;AACxD,OAAO,EAAc,WAAW,EAAC,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,EAAe,YAAY,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAkB,eAAe,EAAC,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAiB,cAAc,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,EAAS,aAAa,EAAC,MAAM,UAAU,CAAC;AAE/C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAElC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AAIjC,eAAO,MAAM,OAAO,EAAE,iBAAsB,CAAC;AAE7C,MAAM,WAAW,OAAO,CACtB,CAAC,SAAS,oBAAoB,GAAG,oBAAoB;IAErD,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC;CACT;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,oBAAoB,EACvD,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GACtB,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shopifyApi = void 0;
|
|
3
|
+
exports.shopifyApi = exports.Shopify = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var load_rest_resources_1 = require("../rest/load-rest-resources");
|
|
6
6
|
var config_1 = require("./config");
|
|
@@ -19,6 +19,9 @@ tslib_1.__exportStar(require("./base-types"), exports);
|
|
|
19
19
|
tslib_1.__exportStar(require("./session/types"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./auth/types"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./webhooks/types"), exports);
|
|
22
|
+
// Temporarily export the deprecated v5 types as a Shopify object (as opposed to the type above) to help folks find
|
|
23
|
+
// the migration guide.
|
|
24
|
+
exports.Shopify = {};
|
|
22
25
|
function shopifyApi(config) {
|
|
23
26
|
var restResources = config.restResources, libConfig = tslib_1.__rest(config, ["restResources"]);
|
|
24
27
|
var validatedConfig = (0, config_1.validateConfig)(libConfig);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,mEAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,mEAA8D;AAK9D,mCAAwC;AACxC,qCAAwD;AACxD,+BAAgD;AAChD,qCAAyD;AACzD,iCAAmD;AACnD,uCAA4D;AAC5D,qCAAyD;AACzD,mCAA+C;AAE/C,kDAAwB;AACxB,4DAAkC;AAElC,wDAA8B;AAC9B,kDAAwB;AACxB,uDAA6B;AAC7B,0DAAgC;AAChC,uDAA6B;AAC7B,2DAAiC;AAEjC,mHAAmH;AACnH,uBAAuB;AACV,QAAA,OAAO,GAAsB,EAAE,CAAC;AAgB7C,SAAgB,UAAU,CACxB,MAAuB;IAEhB,IAAA,aAAa,GAAkB,MAAM,cAAxB,EAAK,SAAS,kBAAI,MAAM,EAAtC,iBAA6B,CAAD,CAAW;IAC7C,IAAM,eAAe,GAAG,IAAA,uBAAc,EAAC,SAAS,CAAC,CAAC;IAElD,IAAM,OAAO,GAAe;QAC1B,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,IAAA,uBAAa,EAAC,eAAe,CAAC;QACvC,IAAI,EAAE,IAAA,kBAAW,EAAC,eAAe,CAAC;QAClC,OAAO,EAAE,IAAA,wBAAc,EAAC,eAAe,CAAC;QACxC,KAAK,EAAE,IAAA,oBAAY,EAAC,eAAe,CAAC;QACpC,QAAQ,EAAE,IAAA,0BAAe,EAAC,eAAe,CAAC;QAC1C,OAAO,EAAE,IAAA,wBAAc,EAAC,eAAe,CAAC;QACxC,MAAM,EAAE,IAAA,eAAM,EAAC,eAAe,CAAC;QAC/B,IAAI,EAAE,EAAO;KACd,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,OAAO,CAAC,IAAI,GAAG,IAAA,uCAAiB,EAAC;YAC/B,SAAS,EAAE,aAAa;YACxB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI;SACjC,CAAM,CAAC;KACT;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AA3BD,gCA2BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["session.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAYtC;;GAEG;AACH,qBAAa,OAAO;WACJ,iBAAiB,CAC7B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,GAC7C,OAAO;IAuDV,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;gBAE/B,MAAM,EAAE,aAAa;IAI1B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO;IAezD,QAAQ,IAAI,aAAa;IAuBzB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO;IAoB3C,eAAe,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE;CAsBhE"}
|
package/lib/session/session.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Session = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
+
var error_1 = require("../error");
|
|
5
6
|
var scopes_1 = require("../auth/scopes");
|
|
6
7
|
var propertiesToSave = [
|
|
7
8
|
'id',
|
|
@@ -21,6 +22,9 @@ var Session = /** @class */ (function () {
|
|
|
21
22
|
Object.assign(this, params);
|
|
22
23
|
}
|
|
23
24
|
Session.fromPropertyArray = function (entries) {
|
|
25
|
+
if (!Array.isArray(entries)) {
|
|
26
|
+
throw new error_1.InvalidSession('The parameter is not an array: a Session cannot be created from this object.');
|
|
27
|
+
}
|
|
24
28
|
var obj = Object.fromEntries(entries
|
|
25
29
|
.filter(function (_a) {
|
|
26
30
|
var _b = tslib_1.__read(_a, 2), _key = _b[0], value = _b[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["session.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["session.ts"],"names":[],"mappings":";;;;AAAA,kCAAwC;AAExC,yCAA0C;AAI1C,IAAM,gBAAgB,GAAG;IACvB,IAAI;IACJ,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,aAAa;IACb,SAAS;IACT,kBAAkB;CACnB,CAAC;AACF;;GAEG;AACH;IAmEE,iBAAY,MAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,E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
|
|
2
2
|
export declare function sanitizeShop(config: ConfigInterface): (shop: string, throwOnInvalid?: boolean) => string | null;
|
|
3
|
-
export declare function sanitizeHost(
|
|
3
|
+
export declare function sanitizeHost(config: ConfigInterface): (host: string, throwOnInvalid?: boolean) => string | null;
|
|
4
4
|
//# sourceMappingURL=shop-validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-validator.d.ts","sourceRoot":"","sources":["shop-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"shop-validator.d.ts","sourceRoot":"","sources":["shop-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAI9C,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,UACpC,MAAM,+BAA2B,MAAM,GAAG,IAAI,CAqB7D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,UACpC,MAAM,+BAA2B,MAAM,GAAG,IAAI,CAgB7D"}
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sanitizeHost = exports.sanitizeShop = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var error_1 = require("../error");
|
|
6
|
+
var decode_host_1 = require("../auth/decode-host");
|
|
6
7
|
function sanitizeShop(config) {
|
|
7
8
|
return function (shop, throwOnInvalid) {
|
|
8
9
|
if (throwOnInvalid === void 0) { throwOnInvalid = false; }
|
|
9
|
-
var domainsRegex = ['myshopify\\.com', 'myshopify\\.io'];
|
|
10
|
+
var domainsRegex = ['myshopify\\.com', 'shopify\\.com', 'myshopify\\.io'];
|
|
10
11
|
if (config.customShopDomains) {
|
|
11
12
|
domainsRegex.push.apply(domainsRegex, tslib_1.__spreadArray([], tslib_1.__read(config.customShopDomains.map(function (regex) {
|
|
12
13
|
return typeof regex === 'string' ? regex : regex.source;
|
|
@@ -21,11 +22,17 @@ function sanitizeShop(config) {
|
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
exports.sanitizeShop = sanitizeShop;
|
|
24
|
-
function sanitizeHost(
|
|
25
|
+
function sanitizeHost(config) {
|
|
25
26
|
return function (host, throwOnInvalid) {
|
|
26
27
|
if (throwOnInvalid === void 0) { throwOnInvalid = false; }
|
|
27
28
|
var base64regex = /^[0-9a-zA-Z+/]+={0,2}$/;
|
|
28
29
|
var sanitizedHost = base64regex.test(host) ? host : null;
|
|
30
|
+
if (sanitizedHost) {
|
|
31
|
+
var url = new URL("https://".concat((0, decode_host_1.decodeHost)(sanitizedHost)));
|
|
32
|
+
if (!sanitizeShop(config)(url.hostname, false)) {
|
|
33
|
+
sanitizedHost = null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
29
36
|
if (!sanitizedHost && throwOnInvalid) {
|
|
30
37
|
throw new error_1.InvalidHostError('Received invalid host argument');
|
|
31
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-validator.js","sourceRoot":"","sources":["shop-validator.ts"],"names":[],"mappings":";;;;AACA,kCAA4D;
|
|
1
|
+
{"version":3,"file":"shop-validator.js","sourceRoot":"","sources":["shop-validator.ts"],"names":[],"mappings":";;;;AACA,kCAA4D;AAC5D,mDAA+C;AAE/C,SAAgB,YAAY,CAAC,MAAuB;IAClD,OAAO,UAAC,IAAY,EAAE,cAAsB;QAAtB,+BAAA,EAAA,sBAAsB;QAC1C,IAAM,YAAY,GAAG,CAAC,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;QAC5E,IAAI,MAAM,CAAC,iBAAiB,EAAE;YAC5B,YAAY,CAAC,IAAI,OAAjB,YAAY,2CACP,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAC,KAAK;gBACpC,OAAA,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAA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OPIFY_API_LIBRARY_VERSION = "6.0.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
package/lib/webhooks/process.js
CHANGED
|
@@ -88,7 +88,7 @@ function process(config, webhookRegistry) {
|
|
|
88
88
|
if (!found) {
|
|
89
89
|
log.debug('No HTTP handlers found', loggingContext);
|
|
90
90
|
response.statusCode = network_1.StatusCode.NotFound;
|
|
91
|
-
errorMessage = "No HTTP webhooks registered for topic ".concat(
|
|
91
|
+
errorMessage = "No HTTP webhooks registered for topic ".concat(graphqlTopic);
|
|
92
92
|
}
|
|
93
93
|
return [3 /*break*/, 14];
|
|
94
94
|
case 13:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["process.ts"],"names":[],"mappings":";;;;;AAAA,4CAA4C;AAE5C,2CAS4B;AAC5B,+CAAsD;AACtD,oDAAsD;AACtD,kCAAuC;AAEvC,2DAAuD;AACvD,8DAA0C;AAC1C,oCAAiC;AAEjC,iCAA8E;AAC9E,uCAA2C;AAE3C,SAAgB,OAAO,CACrB,MAAuB,EACvB,eAAgC;IAEhC,OAAO,SAAe,OAAO,CAAC,EAGP;QAFrB,IAAA,OAAO,aAAA,EACJ,WAAW,sBAFc,WAG7B,CADe;;;;;;4BAEqB,qBAAM,IAAA,6BAAsB,EAC7D,WAAW,CACZ,EAAA;;wBAFK,OAAO,GAAsB,SAElC;wBACK,QAAQ,GAAuB;4BACnC,UAAU,EAAE,oBAAU,CAAC,EAAE;4BACzB,UAAU,EAAE,gBAAgB,CAAC,oBAAU,CAAC,EAAE,CAAC;4BAC3C,OAAO,EAAE,EAAE;yBACZ,CAAC;wBAEI,YAAY,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;wBAC5D,SAAS,GACd,YAAY,UADE,EAAE,UAAU,GAC1B,YAAY,WADc,EAAE,MAAM,GAClC,YAAY,OADsB,EAAE,IAAI,GACxC,YA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AS,GAAG,KAAK,CAAC;QACzB,MAAM,CAAC,YAAY,GAAG,8CAA8C,CAAC;KACtE;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAe,iBAAiB,CAC9B,MAAc,EACd,OAAe,EACf,IAAY;;;;;wBAEU,qBAAM,IAAA,yBAAgB,EAC1C,MAAM,EACN,OAAO,EACP,kBAAU,CAAC,MAAM,CAClB,EAAA;;oBAJK,aAAa,GAAG,SAIrB;oBAED,sBAAO,IAAA,0BAAW,EAAC,aAAa,EAAE,IAAI,CAAC,EAAC;;;;CACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/shopify-api",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Shopify API Library for Node - accelerate development with support for authentication, graphql proxy, webhooks",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assigned_fulfillment_order.d.ts","sourceRoot":"","sources":["assigned_fulfillment_order.ts"],"names":[],"mappings":"AAAA;;wHAEwH;AAExH,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAChC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAE9C,UAAU,OAAO;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACnD;AAED,qBAAa,wBAAyB,SAAQ,IAAI;IAChD,OAAc,WAAW,aAAwB;IAEjD,SAAS,C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IAAI,CAAC;IAC7C,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,EAAE,GAAG,IAAI,CAAC;IAC9C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -31,8 +31,8 @@ var AssignedFulfillmentOrder = /** @class */ (function (_super) {
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
AssignedFulfillmentOrder.API_VERSION = types_1.ApiVersion.January22;
|
|
34
|
-
AssignedFulfillmentOrder.NAME = '
|
|
35
|
-
AssignedFulfillmentOrder.PLURAL_NAME = '
|
|
34
|
+
AssignedFulfillmentOrder.NAME = 'fulfillment_order';
|
|
35
|
+
AssignedFulfillmentOrder.PLURAL_NAME = 'fulfillment_orders';
|
|
36
36
|
AssignedFulfillmentOrder.HAS_ONE = {};
|
|
37
37
|
AssignedFulfillmentOrder.HAS_MANY = {};
|
|
38
38
|
AssignedFulfillmentOrder.PATHS = [
|