Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/_publish-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install Dependencies
run: sudo apt-get install pcregrep

- name: Set up Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 26
cache: "npm"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 26
cache: "npm"
Expand All @@ -27,7 +27,7 @@ jobs:
npm run docs:dist

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
27 changes: 2 additions & 25 deletions .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Run Betterleaks
id: betterleaks
continue-on-error: true
# version 0.1.0
uses: dortort/betterleaks-action@cd0b905aa4befb8f42f8b1ab98150180c9e77515
with:
version: "v1.9.0"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Betterleaks report
if: always()
uses: actions/upload-artifact@v7
with:
name: betterleaks-report
path: betterleaks-report.sarif
if-no-files-found: warn

- name: Fail if Betterleaks found leaks
if: steps.betterleaks.outcome == 'failure'
run: exit 1
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 26
cache: "npm"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/_test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down Expand Up @@ -84,12 +84,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/_test-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down Expand Up @@ -58,12 +58,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:

jobs:
publish_docs:
uses: mindee/mindee-api-nodejs/.github/workflows/_publish-docs.yml@main
uses: ./.github/workflows/_publish-docs.yml
secrets: inherit
publish_guide:
uses: mindee/mindee-api-nodejs/.github/workflows/_publish-guide.yml@main
uses: ./.github/workflows/_publish-guide.yml
needs: publish_docs
secrets: inherit
publish_code:
uses: mindee/mindee-api-nodejs/.github/workflows/_publish-code.yml@main
uses: ./.github/workflows/_publish-code.yml
secrets: inherit
21 changes: 14 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@ permissions:
pull-requests: read

jobs:
static_analysis:
workflow-lint:
uses: mindee/client-lib-actions/.github/workflows/workflow-lint.yml@main
betterleaks:
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
needs: workflow-lint
secrets: inherit
static-analysis:
uses: ./.github/workflows/_static-analysis.yml
test_units:
needs: workflow-lint
test-units:
uses: ./.github/workflows/_test-units.yml
needs: static_analysis
needs: [ betterleaks, static-analysis ]
secrets: inherit
test_smoke:
test-smoke:
uses: ./.github/workflows/_test-smoke.yml
needs: static_analysis
needs: [ betterleaks, static-analysis ]
secrets: inherit
test_integrations:
test-integrations:
uses: ./.github/workflows/_test-integrations.yml
needs: test_units
needs: test-units
secrets: inherit
16 changes: 10 additions & 6 deletions .github/workflows/push-main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ on:
- main

jobs:
static_analysis:
uses: mindee/mindee-api-nodejs/.github/workflows/_static-analysis.yml@main
test_units:
uses: mindee/mindee-api-nodejs/.github/workflows/_test-units.yml@main
needs: static_analysis
betterleaks:
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
secrets: inherit
static-analysis:
uses: ./.github/workflows/_static-analysis.yml
secrets: inherit
test-units:
uses: ./.github/workflows/_test-units.yml
needs: [ betterleaks, static-analysis ]
secrets: inherit
tag:
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
needs: test_units
needs: test-units
release:
uses: mindee/client-lib-actions/.github/workflows/create-release.yml@main
needs: tag
Expand Down
20 changes: 0 additions & 20 deletions src/v1/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from "./http/index.js";
import {
AsyncPredictResponse,
ExecutionPriority,
FeedbackResponse,
Inference,
PredictResponse,
Expand Down Expand Up @@ -66,25 +65,6 @@ export interface PredictOptions extends BaseOptions {
workflowId?: string;
}

/**
* Options relating to workflows.
* @category Workflow
*/
export interface WorkflowOptions extends BaseOptions {
/**
* Alias to give to the document.
*/
alias?: string;
/**
* Priority to give to the document.
*/
priority?: ExecutionPriority;
/**
* A unique, encrypted URL for accessing the document validation interface without requiring authentication.
*/
publicUrl?: string;
}

/**
* Timer options forwarded to `setTimeout` in polling loops.
*/
Expand Down
19 changes: 0 additions & 19 deletions src/v1/http/httpParams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { InputSource, PageOptions } from "@/input/index.js";
import { ExecutionPriority } from "@/v1/parsing/common/index.js";

interface HTTPParams {
/**
Expand Down Expand Up @@ -37,21 +36,3 @@ export interface PredictParams extends HTTPParams {
*/
workflowId?: string;
}

/**
* Parameters sent to workflow execution endpoints.
*/
export interface WorkflowParams extends HTTPParams {
/**
* Custom alias assigned to the submitted file.
*/
alias?: string;
/**
* Processing priority of the workflow execution.
*/
priority?: ExecutionPriority;
/**
* Whether to request a public validation URL.
*/
publicUrl?: string;
}
2 changes: 1 addition & 1 deletion src/v1/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export {
MindeeHttp504Error,
handleError,
} from "./errors.js";
export type { PredictParams, WorkflowParams } from "./httpParams.js";
export type { PredictParams } from "./httpParams.js";
3 changes: 1 addition & 2 deletions src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export { LocalResponse } from "./parsing/localResponse.js";
export { Client } from "./client.js";
export type {
OptionalAsyncOptions,
PredictOptions,
WorkflowOptions
PredictOptions
} from "./client.js";
export {
AsyncPredictResponse,
Expand Down
94 changes: 0 additions & 94 deletions src/v1/parsing/common/execution.ts

This file was deleted.

Loading
Loading