Skip to content
Open
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
88 changes: 45 additions & 43 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,56 +22,58 @@ export type WorkflowSettings = {
action: "stop" | "continue";
};

bindings?: {
/**
* Exposes the id token to the workflow
*/
"kinde.idToken"?: {
/**
* {boolean} reset all claims to default value on workflow start, default is false
*/
resetClaims?: boolean;
};
/**
* Exposes the access token to the workflow
*/
"kinde.accessToken"?: {
/**
* {boolean} reset all claims to default value on workflow start, default is false
*/
resetClaims?: boolean;
};
"kinde.m2mToken"?: {
/**
* {boolean} reset all claims to default value on workflow start, default is false
*/
resetClaims?: boolean;
};
/**
* Exposes the console methods to the workflow
*/
console?: {};
/**
* Exposes the fetch method to call extenal APIs to the workflow
*/
"kinde.fetch"?: {};
/**
* Exposes access to the kinde environment variables
*/
"kinde.env"?: {};
bindings?: KindeBindings;
};

export interface KindeBindings {
/**
* Exposes the id token to the workflow
*/
"kinde.idToken"?: {
/**
* Exposes access to the kinde environment variables
* {boolean} reset all claims to default value on workflow start, default is false
*/
"kinde.auth"?: {};
resetClaims?: boolean;
};
/**
* Exposes the access token to the workflow
*/
"kinde.accessToken"?: {
/**
* Exposes access to the kinde localization
* {boolean} reset all claims to default value on workflow start, default is false
*/
"kinde.localization": {};
resetClaims?: boolean;
};
"kinde.m2mToken"?: {
/**
* Add URL tooling
* {boolean} reset all claims to default value on workflow start, default is false
*/
url?: {};
resetClaims?: boolean;
};
/**
* Exposes the console methods to the workflow
*/
console?: {};
/**
* Exposes the fetch method to call extenal APIs to the workflow
*/
"kinde.fetch"?: {};
/**
* Exposes access to the kinde environment variables
*/
"kinde.env"?: {};
/**
* Exposes access to the kinde environment variables
*/
"kinde.auth"?: {};
Comment on lines +65 to +68
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect documentation for "kinde.auth" binding.

The documentation appears to be incorrectly copied from "kinde.env". Update it to accurately describe the authentication binding's purpose.

   /**
-   * Exposes access to the kinde environment variables
+   * Exposes authentication methods for user authentication state management
    */
   "kinde.auth"?: {};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* Exposes access to the kinde environment variables
*/
"kinde.auth"?: {};
/**
* Exposes authentication methods for user authentication state management
*/
"kinde.auth"?: {};
🧰 Tools
🪛 Biome (1.9.4)

[error] 68-68: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

🪛 GitHub Actions: Build and test

[warning] Code style issues found. Prettier formatting rules are not met.

/**
* Exposes access to the kinde localization
*/
"kinde.localization"?: {};
/**
* Add URL tooling
*/
url?: {};
};

export enum WorkflowTrigger {
Expand Down