diff --git a/.github/workflows/release-typescript.yml b/.github/workflows/release-typescript.yml index 59fce2f..20b936b 100644 --- a/.github/workflows/release-typescript.yml +++ b/.github/workflows/release-typescript.yml @@ -26,7 +26,7 @@ jobs: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug + fern generate --api core --group ts-sdk --version ${{ inputs.version }} --log-level debug - name: Update Code Snippets env: diff --git a/fern/generators.yml b/fern/apis/core/generators.yml similarity index 96% rename from fern/generators.yml rename to fern/apis/core/generators.yml index 0f7d901..245b4cd 100644 --- a/fern/generators.yml +++ b/fern/apis/core/generators.yml @@ -18,7 +18,7 @@ api: api: https://sandboxapi.givechariot.com login: https://chariot-sandbox.us.auth0.com specs: - - openapi: ../specs/v1.yaml + - openapi: ../../../specs/v1.yaml overrides: ./openapi-overrides.yml groups: ts-sdk: diff --git a/fern/openapi-overrides.yml b/fern/apis/core/openapi-overrides.yml similarity index 100% rename from fern/openapi-overrides.yml rename to fern/apis/core/openapi-overrides.yml diff --git a/fern/apis/webhook/generators.yml b/fern/apis/webhook/generators.yml new file mode 100644 index 0000000..481d23e --- /dev/null +++ b/fern/apis/webhook/generators.yml @@ -0,0 +1,3 @@ +api: + specs: + - openapi: ../../../specs/webhooks.yml diff --git a/fern/versions/v1/docs.yml b/fern/versions/v1/docs.yml index 5577f70..02f1d7c 100644 --- a/fern/versions/v1/docs.yml +++ b/fern/versions/v1/docs.yml @@ -46,6 +46,7 @@ navigation: - page: Managing Transactions path: ./pages/implementation-guide/transactions.mdx - api: API Reference + api-name: core display-errors: true snippets: typescript: "@chariot-giving/typescript-sdk" @@ -62,4 +63,6 @@ navigation: - unintegrated_grants: title: Unintegrated Grants - DAFs: - title: Donor Advised Funds \ No newline at end of file + title: Donor Advised Funds + - api: Webhook Reference + api-name: webhook \ No newline at end of file diff --git a/specs/webhooks.yml b/specs/webhooks.yml new file mode 100644 index 0000000..942b22a --- /dev/null +++ b/specs/webhooks.yml @@ -0,0 +1,27 @@ +openapi: 3.0.0 +info: + title: Chariot Webhooks API + version: "v1" + description: The Chariot Webhook Endpoints. + termsOfService: https://www.givechariot.com/legal-nonprofit +paths: + /payment/updated/: + post: + summary: Payment Initiated + x-fern-webhook: true # tells fern its a webhook + operationId: payment_initiated + x-fern-sdk-group-name: payments + x-fern-sdk-method-name: updated + requestBody: + content: + application/json: + schema: + type: object + properties: + amount: + type: number + currency: + $ref: '#/components/schemas/Currency' + required: + - amount + - currency \ No newline at end of file