Skip to content

Commit 448022a

Browse files
authored
Merge pull request #160 from flowglad/release-please--branches--main--changes--next--components--node
release: 0.19.0
2 parents 0cf61e5 + c122064 commit 448022a

40 files changed

+780
-142
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
lint:
1313
name: lint
1414
runs-on: ubuntu-latest
15-
16-
1715
steps:
1816
- uses: actions/checkout@v4
1917

@@ -31,8 +29,9 @@ jobs:
3129
build:
3230
name: build
3331
runs-on: ubuntu-latest
34-
35-
32+
permissions:
33+
contents: read
34+
id-token: write
3635
steps:
3736
- uses: actions/checkout@v4
3837

@@ -46,10 +45,24 @@ jobs:
4645

4746
- name: Check build
4847
run: ./scripts/build
48+
49+
- name: Get GitHub OIDC Token
50+
if: github.repository == 'stainless-sdks/flowglad-typescript'
51+
id: github-oidc
52+
uses: actions/github-script@v6
53+
with:
54+
script: core.setOutput('github_token', await core.getIDToken());
55+
56+
- name: Upload tarball
57+
if: github.repository == 'stainless-sdks/flowglad-typescript'
58+
env:
59+
URL: https://pkg.stainless.com/s
60+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
61+
SHA: ${{ github.sha }}
62+
run: ./scripts/utils/upload-artifact.sh
4963
test:
5064
name: test
5165
runs-on: ubuntu-latest
52-
5366
steps:
5467
- uses: actions/checkout@v4
5568

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.18.3"
2+
".": "0.19.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-a8b9652497ddf9bb09401c5baaac978f51ae807c12268d45a2ffaa94f2f289e2.yml
3-
openapi_spec_hash: 74e0b3380bf9e6ad197a1b232cd50cbc
4-
config_hash: 6f063dec3fcd13dc4e319af6a6486f59
1+
configured_endpoints: 46
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-c33de7567de263e6b5dde11d185128cffc46b51220921c663ff21aaa9662e105.yml
3+
openapi_spec_hash: fa9d7eeda6ebf7419218576074172593
4+
config_hash: 685a7225f4f24d19cb521bff0da5ef10

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
# Changelog
2+
## 0.19.0 (2025-04-10)
3+
4+
Full Changelog: [v0.18.3...v0.19.0](https://github.com/flowglad/flowglad-node/compare/v0.18.3...v0.19.0)
5+
6+
### Features
7+
8+
* **api:** create subscription ([a7966f4](https://github.com/flowglad/flowglad-node/commit/a7966f49eb35a9d7ab3fbe71da61c7aa85b8ca8e))
9+
10+
11+
### Bug Fixes
12+
13+
* **client:** send all configured auth headers ([#161](https://github.com/flowglad/flowglad-node/issues/161)) ([b3d6785](https://github.com/flowglad/flowglad-node/commit/b3d6785ee24ed8ed9e68b098cb98409147ab6bfb))
14+
* **mcp:** remove unused tools.ts ([#159](https://github.com/flowglad/flowglad-node/issues/159)) ([6d71ce3](https://github.com/flowglad/flowglad-node/commit/6d71ce3b5d5a2fb97a13cb28f92af4132645dfd5))
15+
16+
17+
### Chores
18+
19+
* **internal:** improve node 18 shims ([ea417c1](https://github.com/flowglad/flowglad-node/commit/ea417c1b26ae924d6de90d1679d38478f4a4190a))
20+
* **internal:** reduce CI branch coverage ([cdf1059](https://github.com/flowglad/flowglad-node/commit/cdf1059418db42cc2246c9c8ffb1d9442653438e))
21+
* **internal:** upload builds and expand CI branch coverage ([28e6aaf](https://github.com/flowglad/flowglad-node/commit/28e6aaff6edf957144169feba4c3041f4afef6cd))
22+
223
## 0.18.3 (2025-04-05)
324

425
Full Changelog: [v0.18.2...v0.18.3](https://github.com/flowglad/flowglad-node/compare/v0.18.2...v0.18.3)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,15 @@ Methods:
150150

151151
Types:
152152

153+
- <code><a href="./src/resources/subscriptions.ts">SubscriptionCreateResponse</a></code>
153154
- <code><a href="./src/resources/subscriptions.ts">SubscriptionRetrieveResponse</a></code>
154155
- <code><a href="./src/resources/subscriptions.ts">SubscriptionListResponse</a></code>
155156
- <code><a href="./src/resources/subscriptions.ts">SubscriptionAdjustResponse</a></code>
156157
- <code><a href="./src/resources/subscriptions.ts">SubscriptionCancelResponse</a></code>
157158

158159
Methods:
159160

161+
- <code title="post /api/v1/subscriptions">client.subscriptions.<a href="./src/resources/subscriptions.ts">create</a>({ ...params }) -> SubscriptionCreateResponse</code>
160162
- <code title="get /api/v1/subscriptions/{id}">client.subscriptions.<a href="./src/resources/subscriptions.ts">retrieve</a>(id) -> SubscriptionRetrieveResponse</code>
161163
- <code title="get /api/v1/subscriptions">client.subscriptions.<a href="./src/resources/subscriptions.ts">list</a>({ ...params }) -> SubscriptionListResponse</code>
162164
- <code title="post /api/v1/subscriptions/{id}/adjust">client.subscriptions.<a href="./src/resources/subscriptions.ts">adjust</a>(id, { ...params }) -> SubscriptionAdjustResponse</code>

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flowglad/node",
3-
"version": "0.18.3",
3+
"version": "0.19.0",
44
"description": "The official TypeScript library for the Flowglad API",
55
"author": "Flowglad <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -49,6 +49,10 @@
4949
"resolutions": {
5050
"synckit": "0.8.8"
5151
},
52+
"browser": {
53+
"./internal/shims/getBuiltinModule.mjs": "./internal/shims/nullGetBuiltinModule.mjs",
54+
"./internal/shims/getBuiltinModule.js": "./internal/shims/nullGetBuiltinModule.js"
55+
},
5256
"imports": {
5357
"@flowglad/node": ".",
5458
"@flowglad/node/*": "./src/*"

packages/mcp-server/src/tools.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ node scripts/utils/fix-index-exports.cjs
3535
cp tsconfig.dist-src.json dist/src/tsconfig.json
3636
cp src/internal/shim-types.d.ts dist/internal/shim-types.d.ts
3737
cp src/internal/shim-types.d.ts dist/internal/shim-types.d.mts
38-
mkdir -p dist/internal/shims
39-
cp src/internal/shims/*.{mjs,js,d.ts,d.mts} dist/internal/shims
4038

4139
node scripts/utils/postprocess-files.cjs
4240

scripts/utils/upload-artifact.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -exuo pipefail
3+
4+
RESPONSE=$(curl -X POST "$URL" \
5+
-H "Authorization: Bearer $AUTH" \
6+
-H "Content-Type: application/json")
7+
8+
SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url')
9+
10+
if [[ "$SIGNED_URL" == "null" ]]; then
11+
echo -e "\033[31mFailed to get signed URL.\033[0m"
12+
exit 1
13+
fi
14+
15+
UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \
16+
-H "Content-Type: application/gzip" \
17+
--data-binary @- "$SIGNED_URL" 2>&1)
18+
19+
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
20+
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
21+
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/flowglad-typescript/$SHA'\033[0m"
22+
else
23+
echo -e "\033[31mFailed to upload artifact.\033[0m"
24+
exit 1
25+
fi

src/client.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ import {
112112
SubscriptionAdjustResponse,
113113
SubscriptionCancelParams,
114114
SubscriptionCancelResponse,
115+
SubscriptionCreateParams,
116+
SubscriptionCreateResponse,
115117
SubscriptionListParams,
116118
SubscriptionListResponse,
117119
SubscriptionRetrieveResponse,
@@ -287,8 +289,8 @@ export class Flowglad {
287289
return;
288290
}
289291

290-
protected authHeaders(opts: FinalRequestOptions): Headers | undefined {
291-
return new Headers({ Authorization: this.apiKey });
292+
protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined {
293+
return buildHeaders([{ Authorization: this.apiKey }]);
292294
}
293295

294296
/**
@@ -917,10 +919,12 @@ export declare namespace Flowglad {
917919

918920
export {
919921
Subscriptions as Subscriptions,
922+
type SubscriptionCreateResponse as SubscriptionCreateResponse,
920923
type SubscriptionRetrieveResponse as SubscriptionRetrieveResponse,
921924
type SubscriptionListResponse as SubscriptionListResponse,
922925
type SubscriptionAdjustResponse as SubscriptionAdjustResponse,
923926
type SubscriptionCancelResponse as SubscriptionCancelResponse,
927+
type SubscriptionCreateParams as SubscriptionCreateParams,
924928
type SubscriptionListParams as SubscriptionListParams,
925929
type SubscriptionAdjustParams as SubscriptionAdjustParams,
926930
type SubscriptionCancelParams as SubscriptionCancelParams,

0 commit comments

Comments
 (0)