Skip to content

Commit f8cd508

Browse files
committed
update typescript client constants
1 parent 2b7544d commit f8cd508

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

deltachat-jsonrpc/typescript/scripts/generate-constants.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,30 @@ const constants = data
4040
key.startsWith("DC_DOWNLOAD") ||
4141
key.startsWith("DC_INFO_") ||
4242
(key.startsWith("DC_MSG") && !key.startsWith("DC_MSG_ID")) ||
43-
key.startsWith("DC_QR_")
43+
key.startsWith("DC_QR_") ||
44+
key.startsWith("DC_CHAT_TYPE")
4445
);
4546
})
4647
.map((row) => {
47-
return ` ${row.key}: ${row.value}`;
48+
return ` ${row.key} = ${row.value}`;
4849
})
4950
.join(",\n");
5051

5152
writeFileSync(
5253
resolve(__dirname, "../generated/constants.ts"),
53-
`// Generated!\n\nexport enum C {\n${constants.replace(/:/g, " =")},\n}\n`,
54+
`// Generated!
55+
56+
export enum C {
57+
${constants},
58+
/** @deprecated 10-8-2025 compare string directly with \`== "Group"\` */
59+
DC_CHAT_TYPE_GROUP = "Group",
60+
/** @deprecated 10-8-2025 compare string directly with \`== "InBroadcast"\`*/
61+
DC_CHAT_TYPE_IN_BROADCAST = "InBroadcast",
62+
/** @deprecated 10-8-2025 compare string directly with \`== "Mailinglist"\` */
63+
DC_CHAT_TYPE_MAILINGLIST = "Mailinglist",
64+
/** @deprecated 10-8-2025 compare string directly with \`== "OutBroadcast"\` */
65+
DC_CHAT_TYPE_OUT_BROADCAST = "OutBroadcast",
66+
/** @deprecated 10-8-2025 compare string directly with \`== "Single"\` */
67+
DC_CHAT_TYPE_SINGLE = "Single",
68+
}\n`,
5469
);

0 commit comments

Comments
 (0)