@checkstack/backend-api 0.8.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/package.json +7 -7
- package/src/auth-strategy.ts +24 -0
- package/src/schema-utils.ts +3 -0
- package/src/zod-config.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @checkstack/backend-api
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 23c80bc: ### Jira Data Center Support
|
|
8
|
+
|
|
9
|
+
Added support for on-premise Jira Data Center installations alongside existing Jira Cloud support:
|
|
10
|
+
|
|
11
|
+
- **Authentication mode switching**: New `authMode` field (`cloud` | `datacenter`) on connection configuration. Cloud uses Basic Auth (email + API token), Data Center uses Bearer Auth (Personal Access Token).
|
|
12
|
+
- **API version routing**: Automatically selects REST API v3 for Cloud and v2 for Data Center.
|
|
13
|
+
- **Description format**: Cloud uses Atlassian Document Format (ADF), Data Center uses plain text.
|
|
14
|
+
- **Connection schema v2**: Backward-compatible — defaults to `cloud` mode for existing connections.
|
|
15
|
+
|
|
16
|
+
### DynamicForm `x-hidden-when` Conditional Visibility
|
|
17
|
+
|
|
18
|
+
New generic platform feature for conditionally hiding form fields based on sibling field values:
|
|
19
|
+
|
|
20
|
+
- Added `x-hidden-when` metadata extension to `ConfigMeta` and `JsonSchemaProperty`.
|
|
21
|
+
- DynamicForm automatically hides fields and skips their validation when conditions match.
|
|
22
|
+
- Used by Jira integration to hide the email field when `authMode` is `datacenter`.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- @checkstack/queue-api@0.2.9
|
|
27
|
+
|
|
28
|
+
## 0.9.0
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- c0c0ed2: Introduce generic "Login Flows" to allow authentication strategies to define their own interaction patterns (form, redirect, or oauth) during registration. This fixes an issue where LDAP login attempts were incorrectly routed through the standard social login flow by instead providing a dedicated credential collection form for LDAP.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- @checkstack/queue-api@0.2.8
|
|
37
|
+
|
|
3
38
|
## 0.8.2
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/backend-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"lint:code": "eslint . --max-warnings 0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@checkstack/common": "0.6.
|
|
13
|
-
"@checkstack/healthcheck-common": "0.8.
|
|
14
|
-
"@checkstack/queue-api": "0.2.
|
|
15
|
-
"@checkstack/signal-common": "0.1.
|
|
12
|
+
"@checkstack/common": "0.6.4",
|
|
13
|
+
"@checkstack/healthcheck-common": "0.8.4",
|
|
14
|
+
"@checkstack/queue-api": "0.2.7",
|
|
15
|
+
"@checkstack/signal-common": "0.1.8",
|
|
16
16
|
"@orpc/client": "^1.13.14",
|
|
17
17
|
"@orpc/contract": "^1.13.14",
|
|
18
18
|
"@orpc/openapi": "^1.13.2",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/bun": "latest",
|
|
28
|
-
"@checkstack/tsconfig": "0.0.
|
|
29
|
-
"@checkstack/scripts": "0.1.
|
|
28
|
+
"@checkstack/tsconfig": "0.0.4",
|
|
29
|
+
"@checkstack/scripts": "0.1.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"hono": "^4.12.14",
|
package/src/auth-strategy.ts
CHANGED
|
@@ -45,8 +45,32 @@ export interface AuthStrategy<Config = unknown> {
|
|
|
45
45
|
* Displayed in the StrategyConfigCard before the configuration form.
|
|
46
46
|
*/
|
|
47
47
|
adminInstructions?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines how the frontend should interact with this strategy during login.
|
|
51
|
+
* If not provided, it defaults to 'oauth' for non-credential strategies.
|
|
52
|
+
*/
|
|
53
|
+
clientFlow?: AuthClientFlow;
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Defines the interaction pattern for the frontend during login.
|
|
58
|
+
*/
|
|
59
|
+
export type AuthClientFlow =
|
|
60
|
+
| { type: "oauth" } // Standard Better-Auth social flow
|
|
61
|
+
| { type: "redirect"; target: string } // Redirects user to a custom URL
|
|
62
|
+
| {
|
|
63
|
+
type: "form";
|
|
64
|
+
target: string;
|
|
65
|
+
fields: Array<{
|
|
66
|
+
name: string;
|
|
67
|
+
label: string;
|
|
68
|
+
type: "text" | "password";
|
|
69
|
+
placeholder?: string;
|
|
70
|
+
}>;
|
|
71
|
+
} // Custom credential collection form
|
|
72
|
+
| { type: "credential" }; // Native internal credential flow (internal only)
|
|
73
|
+
|
|
50
74
|
/**
|
|
51
75
|
* Registry for authentication strategies.
|
|
52
76
|
* Allows plugins to register custom auth strategies.
|
package/src/schema-utils.ts
CHANGED
|
@@ -67,6 +67,9 @@ function addSchemaMetadata(
|
|
|
67
67
|
if (meta["x-editor-types"]) {
|
|
68
68
|
jsonField["x-editor-types"] = meta["x-editor-types"];
|
|
69
69
|
}
|
|
70
|
+
if (meta["x-hidden-when"]) {
|
|
71
|
+
jsonField["x-hidden-when"] = meta["x-hidden-when"];
|
|
72
|
+
}
|
|
70
73
|
if (meta["x-options-resolver"]) {
|
|
71
74
|
jsonField["x-options-resolver"] = meta["x-options-resolver"];
|
|
72
75
|
if (meta["x-depends-on"])
|
package/src/zod-config.ts
CHANGED
|
@@ -22,6 +22,13 @@ export interface ConfigMeta {
|
|
|
22
22
|
"x-depends-on"?: string[];
|
|
23
23
|
/** If true, renders a searchable/filterable dropdown */
|
|
24
24
|
"x-searchable"?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Conditionally hide this field based on sibling field values.
|
|
27
|
+
* Keys are sibling field names, values are arrays of values that trigger hiding.
|
|
28
|
+
* The field is hidden when any condition matches.
|
|
29
|
+
* @example { authMode: ["datacenter"] } — hides this field when authMode is "datacenter"
|
|
30
|
+
*/
|
|
31
|
+
"x-hidden-when"?: Record<string, string[]>;
|
|
25
32
|
/**
|
|
26
33
|
* Available editor types for this field. Renders a dropdown to select editor mode.
|
|
27
34
|
* When templateProperties are provided to DynamicForm, autocomplete works in all types.
|