Skip to content

Commit 3345b62

Browse files
stainless-app[bot]meorphis
authored and
meorphis
committedMar 14, 2025
feat(api): api update
1 parent 308f177 commit 3345b62

File tree

6 files changed

+204
-6
lines changed

6 files changed

+204
-6
lines changed
 

‎.github/workflows/create-releases.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'openlayer-ai/openlayer-ts'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: stainless-api/trigger-release-please@v1
19+
id: release
20+
with:
21+
repo: ${{ github.event.repository.full_name }}
22+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
23+
24+
- name: Set up Node
25+
if: ${{ steps.release.outputs.releases_created }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '18'
29+
30+
- name: Install dependencies
31+
if: ${{ steps.release.outputs.releases_created }}
32+
run: |
33+
yarn install
34+
35+
- name: Publish to NPM
36+
if: ${{ steps.release.outputs.releases_created }}
37+
run: |
38+
bash ./bin/publish-npm
39+
env:
40+
NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
41+

‎.github/workflows/publish-npm.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# This workflow is triggered when a GitHub release is created.
2-
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3-
# You can run this workflow by navigating to https://github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
1+
# workflow for re-running publishing to NPM in case it fails for some reason
2+
# you can run this workflow by navigating to https://github.com/openlayer-ai/openlayer-ts/actions/workflows/publish-npm.yml
43
name: Publish NPM
54
on:
65
workflow_dispatch:
76

8-
release:
9-
types: [published]
10-
117
jobs:
128
publish:
139
name: publish

‎.github/workflows/release-doctor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21+
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
2122
NPM_TOKEN: ${{ secrets.OPENLAYER_NPM_TOKEN || secrets.NPM_TOKEN }}
2223

‎bin/check-release-environment

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
errors=()
44

5+
if [ -z "${STAINLESS_API_KEY}" ]; then
6+
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
7+
fi
8+
59
if [ -z "${NPM_TOKEN}" ]; then
610
errors+=("The OPENLAYER_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
711
fi

‎src/resources/inference-pipelines/inference-pipelines.ts

+72
Original file line numberDiff line numberDiff line change
@@ -275,26 +275,59 @@ export namespace InferencePipelineRetrieveResponse {
275275
}
276276

277277
export interface Workspace {
278+
/**
279+
* The workspace id.
280+
*/
278281
id: string;
279282

283+
/**
284+
* The workspace creator id.
285+
*/
280286
creatorId: string | null;
281287

288+
/**
289+
* The workspace creation date.
290+
*/
282291
dateCreated: string;
283292

293+
/**
294+
* The workspace last updated date.
295+
*/
284296
dateUpdated: string;
285297

298+
/**
299+
* The number of invites in the workspace.
300+
*/
286301
inviteCount: number;
287302

303+
/**
304+
* The number of members in the workspace.
305+
*/
288306
memberCount: number;
289307

308+
/**
309+
* The workspace name.
310+
*/
290311
name: string;
291312

313+
/**
314+
* The end date of the current billing period.
315+
*/
292316
periodEndDate: string | null;
293317

318+
/**
319+
* The start date of the current billing period.
320+
*/
294321
periodStartDate: string | null;
295322

323+
/**
324+
* The number of projects in the workspace.
325+
*/
296326
projectCount: number;
297327

328+
/**
329+
* The workspace slug.
330+
*/
298331
slug: string;
299332

300333
status:
@@ -309,6 +342,9 @@ export namespace InferencePipelineRetrieveResponse {
309342

310343
monthlyUsage?: Array<Workspace.MonthlyUsage>;
311344

345+
/**
346+
* Whether the workspace only allows SAML authentication.
347+
*/
312348
samlOnlyAccess?: boolean;
313349

314350
wildcardDomains?: Array<string>;
@@ -528,26 +564,59 @@ export namespace InferencePipelineUpdateResponse {
528564
}
529565

530566
export interface Workspace {
567+
/**
568+
* The workspace id.
569+
*/
531570
id: string;
532571

572+
/**
573+
* The workspace creator id.
574+
*/
533575
creatorId: string | null;
534576

577+
/**
578+
* The workspace creation date.
579+
*/
535580
dateCreated: string;
536581

582+
/**
583+
* The workspace last updated date.
584+
*/
537585
dateUpdated: string;
538586

587+
/**
588+
* The number of invites in the workspace.
589+
*/
539590
inviteCount: number;
540591

592+
/**
593+
* The number of members in the workspace.
594+
*/
541595
memberCount: number;
542596

597+
/**
598+
* The workspace name.
599+
*/
543600
name: string;
544601

602+
/**
603+
* The end date of the current billing period.
604+
*/
545605
periodEndDate: string | null;
546606

607+
/**
608+
* The start date of the current billing period.
609+
*/
547610
periodStartDate: string | null;
548611

612+
/**
613+
* The number of projects in the workspace.
614+
*/
549615
projectCount: number;
550616

617+
/**
618+
* The workspace slug.
619+
*/
551620
slug: string;
552621

553622
status:
@@ -562,6 +631,9 @@ export namespace InferencePipelineUpdateResponse {
562631

563632
monthlyUsage?: Array<Workspace.MonthlyUsage>;
564633

634+
/**
635+
* Whether the workspace only allows SAML authentication.
636+
*/
565637
samlOnlyAccess?: boolean;
566638

567639
wildcardDomains?: Array<string>;

‎src/resources/projects/inference-pipelines.ts

+84
Original file line numberDiff line numberDiff line change
@@ -240,26 +240,59 @@ export namespace InferencePipelineCreateResponse {
240240
}
241241

242242
export interface Workspace {
243+
/**
244+
* The workspace id.
245+
*/
243246
id: string;
244247

248+
/**
249+
* The workspace creator id.
250+
*/
245251
creatorId: string | null;
246252

253+
/**
254+
* The workspace creation date.
255+
*/
247256
dateCreated: string;
248257

258+
/**
259+
* The workspace last updated date.
260+
*/
249261
dateUpdated: string;
250262

263+
/**
264+
* The number of invites in the workspace.
265+
*/
251266
inviteCount: number;
252267

268+
/**
269+
* The number of members in the workspace.
270+
*/
253271
memberCount: number;
254272

273+
/**
274+
* The workspace name.
275+
*/
255276
name: string;
256277

278+
/**
279+
* The end date of the current billing period.
280+
*/
257281
periodEndDate: string | null;
258282

283+
/**
284+
* The start date of the current billing period.
285+
*/
259286
periodStartDate: string | null;
260287

288+
/**
289+
* The number of projects in the workspace.
290+
*/
261291
projectCount: number;
262292

293+
/**
294+
* The workspace slug.
295+
*/
263296
slug: string;
264297

265298
status:
@@ -274,6 +307,9 @@ export namespace InferencePipelineCreateResponse {
274307

275308
monthlyUsage?: Array<Workspace.MonthlyUsage>;
276309

310+
/**
311+
* Whether the workspace only allows SAML authentication.
312+
*/
277313
samlOnlyAccess?: boolean;
278314

279315
wildcardDomains?: Array<string>;
@@ -498,26 +534,59 @@ export namespace InferencePipelineListResponse {
498534
}
499535

500536
export interface Workspace {
537+
/**
538+
* The workspace id.
539+
*/
501540
id: string;
502541

542+
/**
543+
* The workspace creator id.
544+
*/
503545
creatorId: string | null;
504546

547+
/**
548+
* The workspace creation date.
549+
*/
505550
dateCreated: string;
506551

552+
/**
553+
* The workspace last updated date.
554+
*/
507555
dateUpdated: string;
508556

557+
/**
558+
* The number of invites in the workspace.
559+
*/
509560
inviteCount: number;
510561

562+
/**
563+
* The number of members in the workspace.
564+
*/
511565
memberCount: number;
512566

567+
/**
568+
* The workspace name.
569+
*/
513570
name: string;
514571

572+
/**
573+
* The end date of the current billing period.
574+
*/
515575
periodEndDate: string | null;
516576

577+
/**
578+
* The start date of the current billing period.
579+
*/
517580
periodStartDate: string | null;
518581

582+
/**
583+
* The number of projects in the workspace.
584+
*/
519585
projectCount: number;
520586

587+
/**
588+
* The workspace slug.
589+
*/
521590
slug: string;
522591

523592
status:
@@ -532,6 +601,9 @@ export namespace InferencePipelineListResponse {
532601

533602
monthlyUsage?: Array<Workspace.MonthlyUsage>;
534603

604+
/**
605+
* Whether the workspace only allows SAML authentication.
606+
*/
535607
samlOnlyAccess?: boolean;
536608

537609
wildcardDomains?: Array<string>;
@@ -584,12 +656,24 @@ export namespace InferencePipelineCreateParams {
584656
}
585657

586658
export interface Workspace {
659+
/**
660+
* The workspace name.
661+
*/
587662
name: string;
588663

664+
/**
665+
* The workspace slug.
666+
*/
589667
slug: string;
590668

669+
/**
670+
* The workspace invite code.
671+
*/
591672
inviteCode?: string;
592673

674+
/**
675+
* Whether the workspace only allows SAML authentication.
676+
*/
593677
samlOnlyAccess?: boolean;
594678

595679
wildcardDomains?: Array<string>;

0 commit comments

Comments
 (0)