Skip to content

Commit cf48e67

Browse files
Merge pull request #6 from IcePanel/fern-bot/2026-06-24_22-55-54_880
SDK regeneration
2 parents 0eda555 + f74174c commit cf48e67

22 files changed

Lines changed: 1233 additions & 6 deletions

.fern/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"nanoid": "^5.1.6"
1414
}
1515
},
16-
"originGitCommit": "d8e4d8d4fcd255a3d1f4d5eb9576541c52344397",
16+
"originGitCommit": "447d88dac4171fb46496cef5d53dc215e826b570",
1717
"originGitCommitIsDirty": false,
1818
"invokedBy": "manual",
19-
"sdkVersion": "0.1.8"
19+
"sdkVersion": "0.1.9"
2020
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@icepanel/sdk",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"private": false,
55
"repository": {
66
"type": "git",

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
6161
{
6262
"X-Fern-Language": "JavaScript",
6363
"X-Fern-SDK-Name": "@icepanel/sdk",
64-
"X-Fern-SDK-Version": "0.1.8",
65-
"User-Agent": "@icepanel/sdk/0.1.8",
64+
"X-Fern-SDK-Version": "0.1.9",
65+
"User-Agent": "@icepanel/sdk/0.1.9",
6666
"X-Fern-Runtime": core.RUNTIME.type,
6767
"X-Fern-Runtime-Version": core.RUNTIME.version,
6868
},

src/api/resources/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ export * as teams from "./teams/index.js";
2424
export * from "./teams/types/index.js";
2525
export * as versions from "./versions/index.js";
2626
export * from "./versions/types/index.js";
27+
export * as webhookEvents from "./webhookEvents/index.js";
28+
export * from "./webhookEvents/types/index.js";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
export * from "./index.js";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types/index.js";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types.js";
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
import type * as IcePanel from "../../../index.js";
4+
5+
export interface OnModelConnectionPayloadAfter {
6+
id: string;
7+
landscapeId?: string | undefined;
8+
versionId?: string | undefined;
9+
}
10+
11+
export interface OnModelConnectionPayloadBefore {
12+
id: string;
13+
landscapeId?: string | undefined;
14+
versionId?: string | undefined;
15+
}
16+
17+
export const OnModelConnectionPayloadCollection = {
18+
ModelConnection: "model-connection",
19+
} as const;
20+
export type OnModelConnectionPayloadCollection =
21+
(typeof OnModelConnectionPayloadCollection)[keyof typeof OnModelConnectionPayloadCollection];
22+
23+
export const OnModelConnectionPayloadOperation = {
24+
Created: "created",
25+
Updated: "updated",
26+
Deleted: "deleted",
27+
} as const;
28+
export type OnModelConnectionPayloadOperation =
29+
(typeof OnModelConnectionPayloadOperation)[keyof typeof OnModelConnectionPayloadOperation];
30+
31+
export interface OnModelConnectionPayload {
32+
after?: IcePanel.OnModelConnectionPayloadAfter | undefined;
33+
before?: IcePanel.OnModelConnectionPayloadBefore | undefined;
34+
collection: IcePanel.OnModelConnectionPayloadCollection;
35+
operation: IcePanel.OnModelConnectionPayloadOperation;
36+
organizationId: string;
37+
resourceId: string;
38+
subscriptionId: string;
39+
}
40+
41+
export interface OnModelObjectPayloadAfter {
42+
id: string;
43+
landscapeId?: string | undefined;
44+
versionId?: string | undefined;
45+
}
46+
47+
export interface OnModelObjectPayloadBefore {
48+
id: string;
49+
landscapeId?: string | undefined;
50+
versionId?: string | undefined;
51+
}
52+
53+
export const OnModelObjectPayloadCollection = {
54+
ModelObject: "model-object",
55+
} as const;
56+
export type OnModelObjectPayloadCollection =
57+
(typeof OnModelObjectPayloadCollection)[keyof typeof OnModelObjectPayloadCollection];
58+
59+
export const OnModelObjectPayloadOperation = {
60+
Created: "created",
61+
Updated: "updated",
62+
Deleted: "deleted",
63+
} as const;
64+
export type OnModelObjectPayloadOperation =
65+
(typeof OnModelObjectPayloadOperation)[keyof typeof OnModelObjectPayloadOperation];
66+
67+
export interface OnModelObjectPayload {
68+
after?: IcePanel.OnModelObjectPayloadAfter | undefined;
69+
before?: IcePanel.OnModelObjectPayloadBefore | undefined;
70+
collection: IcePanel.OnModelObjectPayloadCollection;
71+
operation: IcePanel.OnModelObjectPayloadOperation;
72+
organizationId: string;
73+
resourceId: string;
74+
subscriptionId: string;
75+
}

src/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export * from "./pagination/index.js";
66
export * from "./runtime/index.js";
77
export * as url from "./url/index.js";
88
export * from "./utils/index.js";
9+
export * from "./webhooks/index.js";
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { RUNTIME } from "../runtime/index.js";
2+
import type { SignatureEncoding } from "./types.js";
3+
4+
export type HmacAlgorithm = "sha256" | "sha1" | "sha384" | "sha512";
5+
6+
export interface ComputeHmacSignatureArgs {
7+
payload: string;
8+
secret: string;
9+
algorithm: HmacAlgorithm;
10+
encoding: SignatureEncoding;
11+
}
12+
13+
function hmacAlgorithmToSubtleName(algorithm: HmacAlgorithm): string {
14+
switch (algorithm) {
15+
case "sha1":
16+
return "SHA-1";
17+
case "sha256":
18+
return "SHA-256";
19+
case "sha384":
20+
return "SHA-384";
21+
case "sha512":
22+
return "SHA-512";
23+
}
24+
}
25+
26+
export async function computeHmacSignature(args: ComputeHmacSignatureArgs): Promise<string> {
27+
if (RUNTIME.type === "node") {
28+
const crypto = await import("crypto");
29+
const hmac = crypto.createHmac(args.algorithm, args.secret);
30+
hmac.update(args.payload);
31+
return hmac.digest(args.encoding);
32+
}
33+
34+
const subtle = globalThis.crypto.subtle;
35+
const enc = new TextEncoder();
36+
const keyMaterial = await subtle.importKey(
37+
"raw",
38+
enc.encode(args.secret),
39+
{ name: "HMAC", hash: hmacAlgorithmToSubtleName(args.algorithm) },
40+
false,
41+
["sign"],
42+
);
43+
const signatureBuffer = await subtle.sign("HMAC", keyMaterial, enc.encode(args.payload));
44+
const bytes = new Uint8Array(signatureBuffer);
45+
if (args.encoding === "hex") {
46+
return Array.from(bytes)
47+
.map((b) => b.toString(16).padStart(2, "0"))
48+
.join("");
49+
}
50+
// base64
51+
let binary = "";
52+
for (const byte of bytes) {
53+
binary += String.fromCharCode(byte);
54+
}
55+
return btoa(binary);
56+
}

0 commit comments

Comments
 (0)