From 774cb7e9ad45790afa9587019660f764679890c4 Mon Sep 17 00:00:00 2001 From: linq-sdks-bot Date: Thu, 21 May 2026 00:00:04 +0000 Subject: [PATCH] feat: regenerate SDKs from updated API spec Stainless-Generated-From: fa53319149ba72e07078ffe292e4f81590db2304 --- .github/workflows/ci.yml | 42 +----- .github/workflows/release-doctor.yml | 2 + .github/workflows/release-please.yml | 20 +++ .github/workflows/stlc-promote.yml | 37 ----- .stats.yml | 3 - CHANGELOG.md | 204 --------------------------- bin/check-release-environment | 4 + release-please-config.json | 4 +- scripts/utils/upload-artifact.sh | 2 +- src/linq_api_v3/lib/.keep | 4 - uv.lock | 2 +- 11 files changed, 32 insertions(+), 292 deletions(-) create mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/stlc-promote.yml delete mode 100644 CHANGELOG.md delete mode 100644 src/linq_api_v3/lib/.keep diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5060f50..d2f2ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/linq-api-v3-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -41,7 +41,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/linq-api-v3-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -55,41 +55,3 @@ jobs: - name: Run build run: uv build - - - name: Get GitHub OIDC Token - if: |- - github.repository == 'stainless-sdks/linq-api-v3-python' && - !startsWith(github.ref, 'refs/heads/stl/') - id: github-oidc - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: core.setOutput('github_token', await core.getIDToken()); - - - name: Upload tarball - if: |- - github.repository == 'stainless-sdks/linq-api-v3-python' && - !startsWith(github.ref, 'refs/heads/stl/') - env: - URL: https://pkg.stainless.com/s - AUTH: ${{ steps.github-oidc.outputs.github_token }} - SHA: ${{ github.sha }} - run: ./scripts/utils/upload-artifact.sh - - test: - timeout-minutes: 10 - name: test - runs-on: ${{ github.repository == 'stainless-sdks/linq-api-v3-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Install uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - with: - version: '0.10.2' - - - name: Bootstrap - run: ./scripts/bootstrap - - - name: Run tests - run: ./scripts/test diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index d1f2ad8..b5ee763 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -17,3 +17,5 @@ jobs: - name: Check release environment run: | bash ./bin/check-release-environment + env: + RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..8c3c1d8 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,20 @@ +name: Release Please +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + if: github.repository == 'linq-team/linq-python' + runs-on: ubuntu-latest + + steps: + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 + id: release + with: + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} diff --git a/.github/workflows/stlc-promote.yml b/.github/workflows/stlc-promote.yml deleted file mode 100644 index 540e198..0000000 --- a/.github/workflows/stlc-promote.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Promote stage — install this file at .github/workflows/stlc-promote.yml in -# EACH SDK repo (linq-go, linq-node, linq-python). It is repo-agnostic. -# -# linq-sdks' "Build SDKs" workflow force-pushes regenerated code to the -# `stainless/release` branch here. This workflow turns that branch into a -# release PR against main. The force-push updates an already-open PR in place, -# so this only needs to create the PR the first time. -# -# Auth: the org-level STLC_ACTIONS_PAT secret (same PAT linq-sdks uses). A PAT, -# not GITHUB_TOKEN, so the release PR triggers this repo's CI checks. - -name: Open release PR - -on: - push: - branches: [stainless/release] - -jobs: - promote: - runs-on: ubuntu-latest - steps: - - name: Open or update the release PR - env: - GH_TOKEN: ${{ secrets.STLC_ACTIONS_PAT }} - REPO: ${{ github.repository }} - run: | - EXISTING=$(gh pr list --repo "$REPO" \ - --head stainless/release --base main --state open \ - --json number --jq '.[0].number // empty') - if [ -n "$EXISTING" ]; then - echo "Release PR #${EXISTING} already open — the force-push updated it." - exit 0 - fi - gh pr create --repo "$REPO" \ - --base main --head stainless/release \ - --title "Release: regenerated SDK" \ - --body "Regenerated by stlc from an updated API spec. Review the diff and merge to cut a release (release-please versions and publishes on merge)." diff --git a/.stats.yml b/.stats.yml index 388e0fc..397ee0a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-b35ddaee2c9dfbc09a716112fcf7c177cb4f86700e09febc020187e5a1b71c37.yml -openapi_spec_hash: cb1d354d0402d78acad35ef9fdbbbc95 -config_hash: 7a8a13d75aa72faddd9a7f82f580873c diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index a17bfe6..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,204 +0,0 @@ -# Changelog - -## 0.10.0 (2026-05-15) - -Full Changelog: [v0.9.0...v0.10.0](https://github.com/linq-team/linq-python/compare/v0.9.0...v0.10.0) - -### Features - -* **api:** add health_status field to phone_number response ([3467668](https://github.com/linq-team/linq-python/commit/3467668bdbcee3805c3f2b4a99c93f842454ee8b)) -* **api:** add health_status fields to PhoneNumber and webhook event ([dab602c](https://github.com/linq-team/linq-python/commit/dab602cb2f935e9c1bb6b00660adbaecfb001d18)) - - -### Bug Fixes - -* **types:** uppercase health_status enum values in chat-related models ([a763854](https://github.com/linq-team/linq-python/commit/a763854d1ca795bb1bb996058d97f306aef7b9e7)) - -## 0.9.0 (2026-05-13) - -Full Changelog: [v0.8.0...v0.9.0](https://github.com/linq-team/linq-python/compare/v0.8.0...v0.9.0) - -### Features - -* **api:** add delete endpoint ([1daeeb6](https://github.com/linq-team/linq-python/commit/1daeeb6eaa3bf3c3688de581b1cb35714fc9881b)) -* **internal/types:** support eagerly validating pydantic iterators ([ebac43c](https://github.com/linq-team/linq-python/commit/ebac43cb5d8a54eae38f50562ff1cf972c998a4a)) - - -### Bug Fixes - -* **client:** add missing f-string prefix in file type error message ([1fe708e](https://github.com/linq-team/linq-python/commit/1fe708e103ce31e536a237844bd7866ba98423a9)) - - -### Documentation - -* **api:** expand attachments resource documentation ([ec612eb](https://github.com/linq-team/linq-python/commit/ec612eb80312a4ebd49cea6028d99a9665f347d2)) -* **api:** mark status and is_archived fields as deprecated in attachments/chat ([36a77d9](https://github.com/linq-team/linq-python/commit/36a77d9e66f5cd7d52bd42f0e438f663ea8f10cf)) - -## 0.8.0 (2026-05-07) - -Full Changelog: [v0.7.0...v0.8.0](https://github.com/linq-team/linq-python/compare/v0.7.0...v0.8.0) - -### Features - -* **chat-service:** expose health_score.updated_at on chat reads + webhooks ([ae5f146](https://github.com/linq-team/linq-python/commit/ae5f1461f6468c48ec88d999d59293e2f364ddd6)) -* remove health_score from synapse — health_status is the contract ([5ec27d1](https://github.com/linq-team/linq-python/commit/5ec27d1544c85532b8d0344b3108a88cf474db90)) - - -### Bug Fixes - -* **chat-service:** stamp health_status from risk-service sync reply ([ff22296](https://github.com/linq-team/linq-python/commit/ff222969e755bd20e352de665b5e7fe47ea99705)) - - -### Chores - -* **internal:** reformat pyproject.toml ([3ab97d9](https://github.com/linq-team/linq-python/commit/3ab97d9f5daea08054fba6086ca2c1849289d8ff)) - - -### Documentation - -* **openapi:** add HealthStatus [BETA] + deprecate HealthScore ([d4e3711](https://github.com/linq-team/linq-python/commit/d4e37118b71348796cb029bed6f3b831c3996941)) -* **openapi:** add named examples to unblock docs OpExample ([6a37d71](https://github.com/linq-team/linq-python/commit/6a37d71c0aa57feefc85810a5012da74153b835f)) - -## 0.7.0 (2026-04-30) - -Full Changelog: [v0.6.0...v0.7.0](https://github.com/linq-team/linq-python/compare/v0.6.0...v0.7.0) - -### Features - -* [PoC] sync risk lookup on message.received via NATS req/reply ([8a0e4fb](https://github.com/linq-team/linq-python/commit/8a0e4fbac82a824759b563d3b241e513e85c53d3)) -* **webhooks:** nest health_score under chat (PLT-540) + remove standalone opt_out/opt_in webhooks ([59ab16c](https://github.com/linq-team/linq-python/commit/59ab16c54abb0cb25e68aed20acf9198611eaf48)) - -## 0.6.0 (2026-04-28) - -Full Changelog: [v0.5.0...v0.6.0](https://github.com/linq-team/linq-python/compare/v0.5.0...v0.6.0) - -### Features - -* support setting headers via env ([d4398f4](https://github.com/linq-team/linq-python/commit/d4398f434cc4a920f59625eee7be9f1cdef8725b)) - - -### Bug Fixes - -* **openapi:** enforce mutual exclusivity constraints on reaction and voice memo schemas ([e057279](https://github.com/linq-team/linq-python/commit/e05727975ba84c6a022bd8e8d7a9d212cd864082)) -* use correct field name format for multipart file arrays ([0e992dc](https://github.com/linq-team/linq-python/commit/0e992dc83b80f05698e9cc3d2e656f6ca890576a)) - -## 0.5.0 (2026-04-26) - -Full Changelog: [v0.4.1...v0.5.0](https://github.com/linq-team/linq-python/compare/v0.4.1...v0.5.0) - -### Features - -* **api:** update docs link ([1a8c502](https://github.com/linq-team/linq-python/commit/1a8c502a622035274cff32f279f5781b8a9bab0e)) - -## 0.4.1 (2026-04-25) - -Full Changelog: [v0.4.0...v0.4.1](https://github.com/linq-team/linq-python/compare/v0.4.0...v0.4.1) - -### Chores - -* configure new SDK language ([196bf69](https://github.com/linq-team/linq-python/commit/196bf69450146c67bf2b82da2a64e70a71d2600b)) - -## 0.4.0 (2026-04-24) - -Full Changelog: [v0.3.0...v0.4.0](https://github.com/linq-team/linq-python/compare/v0.3.0...v0.4.0) - -### Features - -* make compliance webhooks (message.opt_out/opt_in) GA ([1a5b0e6](https://github.com/linq-team/linq-python/commit/1a5b0e6d75f47b67cb2447e180712d334f7f06d0)) - - -### Documentation - -* **api:** add first outbound message link restriction note to POST /v3/chats ([f44e698](https://github.com/linq-team/linq-python/commit/f44e6989ce805821306fb22c62a38c0f251c2846)) - -## 0.3.0 (2026-04-23) - -Full Changelog: [v0.2.5...v0.3.0](https://github.com/linq-team/linq-python/compare/v0.2.5...v0.3.0) - -### Features - -* **api:** expose health_score on chats (BETA) ([b7d22d6](https://github.com/linq-team/linq-python/commit/b7d22d642e1192a77dd695c178eee322357de024)) - - -### Chores - -* **internal:** more robust bootstrap script ([b504bb9](https://github.com/linq-team/linq-python/commit/b504bb9f84501d3e20fe3654a67e739fa1986e77)) - -## 0.2.5 (2026-04-20) - -Full Changelog: [v0.2.4...v0.2.5](https://github.com/linq-team/linq-python/compare/v0.2.4...v0.2.5) - -### Documentation - -* **api:** document edit message limits (BUG-7607) ([f7838ae](https://github.com/linq-team/linq-python/commit/f7838ae0fd6155e6db6cc501798c7c7665a63631)) - -## 0.2.4 (2026-04-18) - -Full Changelog: [v0.2.3...v0.2.4](https://github.com/linq-team/linq-python/compare/v0.2.3...v0.2.4) - -### Bug Fixes - -* ensure file data are only sent as 1 parameter ([0e5a821](https://github.com/linq-team/linq-python/commit/0e5a8217fcab667939e6a211e4f3b9abab7acfca)) - - -### Performance Improvements - -* **client:** optimize file structure copying in multipart requests ([2d5ebac](https://github.com/linq-team/linq-python/commit/2d5ebacb793aa7f2f86b9e820db6e8f01b71605d)) - - -### Documentation - -* **openapi:** document typing indicator behavior and limitations ([3ea2cea](https://github.com/linq-team/linq-python/commit/3ea2ceaf47fd3a340a58e7334e58375f950862fc)) - -## 0.2.3 (2026-04-08) - -Full Changelog: [v0.2.2...v0.2.3](https://github.com/linq-team/linq-python/compare/v0.2.2...v0.2.3) - -### Bug Fixes - -* **api-service:** add created_at and make sent_at nullable in SentMessage ([fa68395](https://github.com/linq-team/linq-python/commit/fa683950b661507844f9d1f22c4716daf9805810)) -* block SMS group participant changes and fix e2e test failures ([e05f1af](https://github.com/linq-team/linq-python/commit/e05f1af36a6d37d13952bdad56f16b903bfccc34)) - -## 0.2.2 (2026-04-08) - -Full Changelog: [v0.2.1...v0.2.2](https://github.com/linq-team/linq-python/compare/v0.2.1...v0.2.2) - -### Bug Fixes - -* **client:** preserve hardcoded query params when merging with user params ([6c18c57](https://github.com/linq-team/linq-python/commit/6c18c57b5aa590fe7a096b98ef617f3be086d066)) - -## 0.2.1 (2026-04-07) - -Full Changelog: [v0.2.0...v0.2.1](https://github.com/linq-team/linq-python/compare/v0.2.0...v0.2.1) - -### Bug Fixes - -* add SVG support to synapse attachments ([c329c0a](https://github.com/linq-team/linq-python/commit/c329c0a19f398623d5035d1ff9e60375fc368f23)) - -## 0.2.0 (2026-04-04) - -Full Changelog: [v0.1.0...v0.2.0](https://github.com/linq-team/linq-python/compare/v0.1.0...v0.2.0) - -### Features - -* **api:** config cleanup ([6827b8f](https://github.com/linq-team/linq-python/commit/6827b8f725103369b7588c47daf86368f5f3f8f0)) - -## 0.1.0 (2026-04-01) - -Full Changelog: [v0.0.1...v0.1.0](https://github.com/linq-team/linq-python/compare/v0.0.1...v0.1.0) - -### Features - -* **api:** add python package ([1c8350d](https://github.com/linq-team/linq-python/commit/1c8350d60fecfea7afbc54268a4249238b2ef1cf)) - - -### Chores - -* configure new SDK language ([d9e49fb](https://github.com/linq-team/linq-python/commit/d9e49fb30147a79372eb95c1c0f5909e30f0ad79)) -* update SDK settings ([b06339c](https://github.com/linq-team/linq-python/commit/b06339c582a977a2e5d7039687fbfdaf44841f7c)) -* update SDK settings ([a969eea](https://github.com/linq-team/linq-python/commit/a969eea2ed010c55387c786702a36c4340084417)) - - -### Documentation - -* update contact card API docs with setup and sharing guidance ([37d3a46](https://github.com/linq-team/linq-python/commit/37d3a460564e68be034f53877c622e44822d1a24)) diff --git a/bin/check-release-environment b/bin/check-release-environment index 1e951e9..7edad7c 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,6 +2,10 @@ errors=() +if [ -z "${RELEASE_PLEASE_TOKEN}" ]; then + errors+=("The RELEASE_PLEASE_TOKEN secret has not been set. Create a fine-grained GitHub PAT and add it as a repository secret.") +fi + lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/release-please-config.json b/release-please-config.json index 226d852..3a1262a 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,11 +2,11 @@ "packages": { ".": {} }, - "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", "include-v-in-tag": true, "include-component-in-tag": false, "versioning": "prerelease", - "prerelease": true, + "prerelease": false, "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": false, "pull-request-header": "Automated Release PR", diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index 381c223..b0ed044 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \ if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/linq-api-v3-python/$SHA/$FILENAME'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/linq-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 diff --git a/src/linq_api_v3/lib/.keep b/src/linq_api_v3/lib/.keep deleted file mode 100644 index 5e2c99f..0000000 --- a/src/linq_api_v3/lib/.keep +++ /dev/null @@ -1,4 +0,0 @@ -File generated from our OpenAPI spec by Stainless. - -This directory can be used to store custom files to expand the SDK. -It is ignored by Stainless code generation and its content (other than this keep file) won't be touched. \ No newline at end of file diff --git a/uv.lock b/uv.lock index 532ea17..1a2dbac 100644 --- a/uv.lock +++ b/uv.lock @@ -518,7 +518,7 @@ wheels = [ [[package]] name = "linq-python" -version = "0.0.1" +version = "0.10.0" source = { editable = "." } dependencies = [ { name = "anyio" },