diff --git a/docs/src/components/mdx/sdk-components.tsx b/docs/src/components/mdx/sdk-components.tsx index 602d9c5ea..351dccd00 100644 --- a/docs/src/components/mdx/sdk-components.tsx +++ b/docs/src/components/mdx/sdk-components.tsx @@ -180,9 +180,9 @@ function ClickableCodeblock({ if (node.properties.style) { node.properties.style = (node.properties.style as string).replace(/background[^;]*;?/g, ''); } - // Add line-height CSS for consistent rendering + // Add line-height CSS for consistent rendering and preserve whitespace const existingStyle = (node.properties.style as string) || ''; - node.properties.style = `${existingStyle}; line-height: 1.5; font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;`; + node.properties.style = `${existingStyle}; line-height: 1.5; font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; white-space: pre;`; } }] }); diff --git a/docs/templates/sdk/types/api-key.mdx b/docs/templates/sdk/types/api-key.mdx index 74a76cdd1..6d97cc226 100644 --- a/docs/templates/sdk/types/api-key.mdx +++ b/docs/templates/sdk/types/api-key.mdx @@ -28,27 +28,27 @@ API keys can be obtained through: ### Table of Contents = { - id: string; //$stack-link-to:#apikeyid - description: string; //$stack-link-to:#apikeydescription - expiresAt?: Date; //$stack-link-to:#apikeyexpiresat - manuallyRevokedAt: Date | null; //$stack-link-to:#apikeymanuallyrevokedat - createdAt: Date; //$stack-link-to:#apikeycreatedat - value: IsFirstView extends true ? string : { lastFour: string }; //$stack-link-to:#apikeyvalue - - // User or Team properties based on Type - ...(Type extends "user" ? { - type: "user"; - userId: string; //$stack-link-to:#apikeyuserid - } : { - type: "team"; - teamId: string; //$stack-link-to:#apikeyteamid - }) - - // Methods - isValid(): boolean; //$stack-link-to:#apikeyisvalid - whyInvalid(): "manually-revoked" | "expired" | null; //$stack-link-to:#apikeywhyinvalid - revoke(): Promise; //$stack-link-to:#apikeyrevoke - update(options): Promise; //$stack-link-to:#apikeyupdateoptions + id: string; //$stack-link-to:#apikeyid + description: string; //$stack-link-to:#apikeydescription + expiresAt?: Date; //$stack-link-to:#apikeyexpiresat + manuallyRevokedAt: Date | null; //$stack-link-to:#apikeymanuallyrevokedat + createdAt: Date; //$stack-link-to:#apikeycreatedat + value: IsFirstView extends true ? string : { lastFour: string }; //$stack-link-to:#apikeyvalue + + // User or Team properties based on Type + ...(Type extends "user" ? { + type: "user"; + userId: string; //$stack-link-to:#apikeyuserid + } : { + type: "team"; + teamId: string; //$stack-link-to:#apikeyteamid + }) + + // Methods + isValid(): boolean; //$stack-link-to:#apikeyisvalid + whyInvalid(): "manually-revoked" | "expired" | null; //$stack-link-to:#apikeywhyinvalid + revoke(): Promise; //$stack-link-to:#apikeyrevoke + update(options): Promise; //$stack-link-to:#apikeyupdateoptions };`} /> --- diff --git a/docs/templates/sdk/types/contact-channel.mdx b/docs/templates/sdk/types/contact-channel.mdx index 0432b2ff3..a15116ab2 100644 --- a/docs/templates/sdk/types/contact-channel.mdx +++ b/docs/templates/sdk/types/contact-channel.mdx @@ -21,16 +21,16 @@ or [`user.useContactChannels()`](../types/user.mdx#currentuserusecontactchannels ### Table of Contents ; //$stack-link-to:#contactchannelsendverificationemail - update(options): Promise; //$stack-link-to:#contactchannelupdateoptions - delete(): Promise; //$stack-link-to:#contactchanneldelete + sendVerificationEmail(): Promise; //$stack-link-to:#contactchannelsendverificationemail + update(options): Promise; //$stack-link-to:#contactchannelupdateoptions + delete(): Promise; //$stack-link-to:#contactchanneldelete };`} /> @@ -239,11 +239,11 @@ or [`serverUser.useContactChannels()`](../types/user.mdx#serveruserusecontactcha ### Table of Contents ; //$stack-link-to:#servercontactchannelupdateoptions - };`} /> + // Inherits all properties from ContactChannel + & ContactChannel //$stack-link-to:#contactchannel + & { + update(options): Promise; //$stack-link-to:#servercontactchannelupdateoptions + };`} /> --- diff --git a/docs/templates/sdk/types/project.mdx b/docs/templates/sdk/types/project.mdx index 48a322059..cbb2079f8 100644 --- a/docs/templates/sdk/types/project.mdx +++ b/docs/templates/sdk/types/project.mdx @@ -12,9 +12,9 @@ or [`stackApp.useProject()`](../objects/stack-app.mdx#stackappuseproject) {/* TH ### Table of Contents --- diff --git a/docs/templates/sdk/types/team-permission.mdx b/docs/templates/sdk/types/team-permission.mdx index bb5840250..e39454a7b 100644 --- a/docs/templates/sdk/types/team-permission.mdx +++ b/docs/templates/sdk/types/team-permission.mdx @@ -10,7 +10,7 @@ You can get `TeamPermission` objects by calling functions such as `user.getPermi ### Table of Contents --- diff --git a/docs/templates/sdk/types/team-profile.mdx b/docs/templates/sdk/types/team-profile.mdx index 41b33fc23..0c6d5dfa8 100644 --- a/docs/templates/sdk/types/team-profile.mdx +++ b/docs/templates/sdk/types/team-profile.mdx @@ -16,8 +16,8 @@ The `TeamProfile` object represents the profile of a user within the context of ### Table of Contents --- @@ -59,7 +59,7 @@ The `ServerTeamProfile` object is currently the same as `TeamProfile`. ### Table of Contents + // Inherits all functionality from TeamProfile + & TeamProfile; //$stack-link-to:#teamprofile`} /> --- diff --git a/docs/templates/sdk/types/team-user.mdx b/docs/templates/sdk/types/team-user.mdx index 66fbc2886..1b9f7902c 100644 --- a/docs/templates/sdk/types/team-user.mdx +++ b/docs/templates/sdk/types/team-user.mdx @@ -20,8 +20,8 @@ It is usually obtained by calling ### Table of Contents --- @@ -65,13 +65,13 @@ It is usually obtained by calling `serverTeam.listUsers()` on a [`ServerTeam` ob ### Table of Contents + // Inherits all functionality from TeamUser + & TeamUser //$stack-link-to:#teamuser + // Inherits all functionality from ServerUser + & ServerUser //$stack-link-to:./user#serveruser + & { + teamProfile: ServerTeamProfile; //$stack-link-to:#serverteamuserteamprofile + };`} /> --- diff --git a/docs/templates/sdk/types/team.mdx b/docs/templates/sdk/types/team.mdx index 372ba46c8..308a07c1c 100644 --- a/docs/templates/sdk/types/team.mdx +++ b/docs/templates/sdk/types/team.mdx @@ -22,25 +22,25 @@ You can get `Team` objects with the ### Table of Contents ; //$stack-link-to:#teamupdatedata - inviteUser(options): Promise; //$stack-link-to:#teaminviteuseroptions - listUsers(): Promise; //$stack-link-to:#teamlistusers - // NEXT_LINE_PLATFORM react-like - ⤷ useUsers(): TeamUser[]; //$stack-link-to:#teamuseusers - listInvitations(): Promise<{ ... }[]>; //$stack-link-to:#teamlistinvitations - // NEXT_LINE_PLATFORM react-like - ⤷ useInvitations(): { ... }[]; //$stack-link-to:#teamuseinvitations - - createApiKey(options): Promise; //$stack-link-to:#teamcreateapikeyoptions - listApiKeys(): Promise; //$stack-link-to:#teamlistapikeys - // NEXT_LINE_PLATFORM react-like - ⤷ useApiKeys(): TeamApiKey[]; //$stack-link-to:#teamuseapikeys + update(data): Promise; //$stack-link-to:#teamupdatedata + inviteUser(options): Promise; //$stack-link-to:#teaminviteuseroptions + listUsers(): Promise; //$stack-link-to:#teamlistusers + // NEXT_LINE_PLATFORM react-like + ⤷ useUsers(): TeamUser[]; //$stack-link-to:#teamuseusers + listInvitations(): Promise<{ ... }[]>; //$stack-link-to:#teamlistinvitations + // NEXT_LINE_PLATFORM react-like + ⤷ useInvitations(): { ... }[]; //$stack-link-to:#teamuseinvitations + + createApiKey(options): Promise; //$stack-link-to:#teamcreateapikeyoptions + listApiKeys(): Promise; //$stack-link-to:#teamlistapikeys + // NEXT_LINE_PLATFORM react-like + ⤷ useApiKeys(): TeamApiKey[]; //$stack-link-to:#teamuseapikeys };`} /> @@ -489,19 +489,19 @@ Calling `serverUser.getTeam(...)` and `serverUser.listTeams()` will return `Serv ### Table of Contents ; //$stack-link-to:#serverteamlistusers - // NEXT_LINE_PLATFORM react-like - ⤷ useUsers(): ServerTeamUser[]; //$stack-link-to:#serverteamuseusers - addUser(userId): Promise; //$stack-link-to:#serverteamadduseruserid - removeUser(userId): Promise; //$stack-link-to:#serverteamremoveuseruserid - delete(): Promise; //$stack-link-to:#serverteamdelete - };`} /> + listUsers(): Promise; //$stack-link-to:#serverteamlistusers + // NEXT_LINE_PLATFORM react-like + ⤷ useUsers(): ServerTeamUser[]; //$stack-link-to:#serverteamuseusers + addUser(userId): Promise; //$stack-link-to:#serverteamadduseruserid + removeUser(userId): Promise; //$stack-link-to:#serverteamremoveuseruserid + delete(): Promise; //$stack-link-to:#serverteamdelete + };`} />