Skip to content

Commit

Permalink
Invite template id (#423)
Browse files Browse the repository at this point in the history
related to descope/etc#8535
  • Loading branch information
aviadl authored Dec 13, 2024
1 parent 0727db8 commit 5099c5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/management/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
sendMail?: boolean; // send invite via mail, default is according to project settings
sendSMS?: boolean; // send invite via text message, default is according to project settings
templateOptions?: TemplateOptions;
templateId?: string;
},
): Promise<SdkResponse<UserResponse>>;
function invite(
Expand All @@ -224,6 +225,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
middleName?: string,
familyName?: string,
additionalLoginIds?: string[],
templateId?: string,
): Promise<SdkResponse<UserResponse>>;

function invite(
Expand All @@ -244,6 +246,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
middleName?: string,
familyName?: string,
additionalLoginIds?: string[],
templateId?: string,
): Promise<SdkResponse<UserResponse>> {
// We support both the old and new parameters forms of invite user
// 1. The new form - invite(loginId, { email, phone, ... }})
Expand All @@ -269,6 +272,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
sendMail,
sendSMS,
additionalLoginIds,
templateId,
}
: {
loginId,
Expand Down Expand Up @@ -429,6 +433,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
sendMail?: boolean, // send invite via mail, default is according to project settings
sendSMS?: boolean, // send invite via text message, default is according to project settings
templateOptions?: TemplateOptions,
templateId?: string,
): Promise<SdkResponse<InviteBatchResponse>> =>
transformResponse<InviteBatchResponse, InviteBatchResponse>(
sdk.httpClient.post(
Expand All @@ -447,6 +452,7 @@ const withUser = (sdk: CoreSdk, managementKey?: string) => {
sendMail,
sendSMS,
templateOptions,
templateId,
},
{ token: managementKey },
),
Expand Down

0 comments on commit 5099c5a

Please sign in to comment.