diff --git a/.changeset/kind-jeans-double.md b/.changeset/kind-jeans-double.md deleted file mode 100644 index 2ebedbf1..00000000 --- a/.changeset/kind-jeans-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@saleor/app-sdk": patch ---- - -Removed unused package.json's index and typing, which were never built and bundled diff --git a/.changeset/tender-news-do.md b/.changeset/tender-news-do.md new file mode 100644 index 00000000..ac8fb3a5 --- /dev/null +++ b/.changeset/tender-news-do.md @@ -0,0 +1,11 @@ +--- +"@saleor/app-sdk": minor +--- + +Changed the "query" field in the AppManifest webhook to be required. Previously, this field was optional. + +For subscription events, Saleor rejects webhooks without query, so this field was valid only with legacy non-subscription webhooks. + +Now, the query is obligatory. + +Warning: This can be a breaking change for some scenarios where legacy webhooks were used! diff --git a/.changeset/two-maps-divide.md b/.changeset/two-maps-divide.md deleted file mode 100644 index 06a19c53..00000000 --- a/.changeset/two-maps-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@saleor/app-sdk": patch ---- - -Updated dependencies diff --git a/.changeset/wise-wombats-bake.md b/.changeset/wise-wombats-bake.md deleted file mode 100644 index 77acc6de..00000000 --- a/.changeset/wise-wombats-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@saleor/app-sdk": patch ---- - -Removed exported "util" that was never bundled diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 146a1cf1..a54bb637 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,7 @@ jobs: run: pnpm test:ci - name: Generate coverage report uses: irongut/CodeCoverageSummary@v1.3.0 + if: ${{ github.actor != 'dependabot[bot]' }} with: filename: coverage/cobertura-coverage.xml format: markdown @@ -68,6 +69,7 @@ jobs: - name: Build project run: pnpm build - name: Creating .npmrc + if: ${{ github.actor != 'dependabot[bot]' }} run: | cat << EOF > "$HOME/.npmrc" //registry.npmjs.org/:_authToken=$NPM_TOKEN @@ -75,12 +77,16 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Release on @dev tag in npm + if: ${{ github.actor != 'dependabot[bot]' }} run: npx changeset version --snapshot pr && pnpm publish --tag dev --no-git-checks # Store package.json version in env - run: echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV + if: ${{ github.actor != 'dependabot[bot]' }} - run: echo '${{ fromJson(env.PACKAGE_JSON).version }}' + if: ${{ github.actor != 'dependabot[bot]' }} # Post a comment with released snapshot - name: Create with released tag + if: ${{ github.actor != 'dependabot[bot]' }} uses: peter-evans/create-or-update-comment@v2 with: issue-number: ${{ github.event.pull_request.number }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 211dc892..17a0d94c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # @saleor/app-sdk +## 0.43.1 + +### Patch Changes + +- 357557a: Removed unused package.json's index and typing, which were never built and bundled +- 8db1d56: Updated dependencies +- 357557a: Removed exported "util" that was never bundled + ## 0.43.0 ### Minor Changes diff --git a/package.json b/package.json index 9ae46cab..e362562a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@saleor/app-sdk", - "version": "0.43.0", + "version": "0.43.1", "description": "SDK for building great Saleor Apps", "scripts": { "prepublishOnly": "pnpm build", diff --git a/src/types.ts b/src/types.ts index f38fbcca..927d108d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -213,8 +213,17 @@ export interface WebhookManifest { name: string; asyncEvents?: AsyncWebhookEventType[]; syncEvents?: SyncWebhookEventType[]; - /** If query is not provided, the default webhook payload will be used */ - query?: string; + /** + * Query is required for a subscription. + * If you don't need a payload, you can provide empty query like this: + * + * subscription { + * event { + * __typename + * } + * } + */ + query: string; /** The full URL of the endpoint where request will be sent */ targetUrl: string; isActive?: boolean;