Skip to content

Commit dcfbd9c

Browse files
committed
chore: add credential check param field
Signed-off-by: Donnie Adams <[email protected]>
1 parent 1f83238 commit dcfbd9c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/gptscript.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,7 @@ export type Credential = {
12381238
ephemeral: boolean
12391239
expiresAt?: Date | undefined
12401240
refreshToken?: string | undefined
1241+
checkParam?: string | undefined
12411242
}
12421243

12431244
// Types for OpenAI API-compatible models

tests/gptscript.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ describe("gptscript module", () => {
843843
ephemeral: false,
844844
expiresAt: new Date(Date.now() + 5000), // 5 seconds from now
845845
type: CredentialType.Tool,
846+
checkParam: "my-check-param",
846847
})
847848
} catch (e) {
848849
throw new Error("failed to create credential: " + e)
@@ -856,6 +857,8 @@ describe("gptscript module", () => {
856857
const result = await g.revealCredential(["default"], name)
857858
expect(result.env["TEST"]).toEqual(value)
858859
expect(result.expiresAt!.valueOf()).toBeLessThan(new Date().valueOf())
860+
expect(result.type).toEqual(CredentialType.Tool)
861+
expect(result.checkParam).toEqual("my-check-param")
859862
} catch (e) {
860863
throw new Error("failed to reveal credential: " + e)
861864
}

0 commit comments

Comments
 (0)