Skip to content

Commit

Permalink
Support signing up with organization membership. (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandan-bhat authored Jun 14, 2024
1 parent e6dced1 commit b79404e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 26 deletions.
7 changes: 7 additions & 0 deletions src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ClientCreateOidcLogout,
ClientOidcLogout,
ClientUpdateOidcLogout,
PostOrganizations201ResponseEnabledConnectionsInnerConnection,
} from './management/__generated/models/index.js';

/**
Expand Down Expand Up @@ -42,3 +43,9 @@ export type ClientOidcBackchannelLogout = ClientOidcLogout;
* @deprecated Use {@link ClientUpdateOidcLogout} instead.
*/
export type ClientUpdateOidcBackchannelLogout = ClientUpdateOidcLogout;
/**
* @deprecated use {@link PostOrganizations201ResponseEnabledConnectionsInnerConnection} instead.
*/
// eslint-disable-next-line
export type GetEnabledConnections200ResponseOneOfInnerConnection =
PostOrganizations201ResponseEnabledConnectionsInnerConnection;
81 changes: 56 additions & 25 deletions src/management/__generated/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4889,29 +4889,18 @@ export interface GetEnabledConnections200ResponseOneOfInner {
*/
assign_membership_on_login: boolean;
/**
* Enables showing a button for the connection in the organization login page. If false, it will be usable only by HRD.
* Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
*
*/
show_as_button: boolean;
/**
*/
connection: GetEnabledConnections200ResponseOneOfInnerConnection;
}
/**
*
*/
export interface GetEnabledConnections200ResponseOneOfInnerConnection {
[key: string]: any | any;
/**
* The name of the enabled connection.
* Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.
*
*/
name: string;
is_signup_enabled: boolean;
/**
* The strategy of the enabled connection.
*
*/
strategy: string;
connection: PostOrganizations201ResponseEnabledConnectionsInnerConnection;
}
/**
*
Expand Down Expand Up @@ -7546,7 +7535,12 @@ export interface PatchEnabledConnectionsByConnectionIdRequest {
*/
assign_membership_on_login?: boolean;
/**
* Enables showing a button for the connection in the organization login page. If false, it will be usable only by HRD.
* Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.
*
*/
is_signup_enabled?: boolean;
/**
* Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
*
*/
show_as_button?: boolean;
Expand Down Expand Up @@ -8801,7 +8795,12 @@ export interface PostEnabledConnectionsRequest {
*/
assign_membership_on_login?: boolean;
/**
* Enables showing a button for the connection in the organization login page. If false, it will be usable only by HRD.
* Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.
*
*/
is_signup_enabled?: boolean;
/**
* Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
*
*/
show_as_button?: boolean;
Expand Down Expand Up @@ -9494,10 +9493,34 @@ export interface PostOrganizations201ResponseEnabledConnectionsInner {
*/
assign_membership_on_login: boolean;
/**
* Enables showing a button for the connection in the organization login page. If false, it will be usable only by HRD.
* Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
*
*/
show_as_button: boolean;
/**
* Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.
*
*/
is_signup_enabled: boolean;
/**
*/
connection: PostOrganizations201ResponseEnabledConnectionsInnerConnection;
}
/**
*
*/
export interface PostOrganizations201ResponseEnabledConnectionsInnerConnection {
[key: string]: any | any;
/**
* The name of the enabled connection.
*
*/
name: string;
/**
* The strategy of the enabled connection.
*
*/
strategy: string;
}
/**
*
Expand Down Expand Up @@ -9555,10 +9578,15 @@ export interface PostOrganizationsRequestEnabledConnectionsInner {
*/
assign_membership_on_login?: boolean;
/**
* Enables showing a button for the connection in the organization login page. If false, it will be usable only by HRD.
* Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.
*
*/
show_as_button?: boolean;
/**
* Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.
*
*/
is_signup_enabled?: boolean;
}
/**
*
Expand Down Expand Up @@ -10424,8 +10452,8 @@ export type ResourceServerSigningAlgEnum =
(typeof ResourceServerSigningAlgEnum)[keyof typeof ResourceServerSigningAlgEnum];

export const ResourceServerTokenDialectEnum = {
token: 'access_token',
token_authz: 'access_token_authz',
access_token: 'access_token',
access_token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
} as const;
Expand Down Expand Up @@ -10500,8 +10528,8 @@ export type ResourceServerCreateSigningAlgEnum =
(typeof ResourceServerCreateSigningAlgEnum)[keyof typeof ResourceServerCreateSigningAlgEnum];

export const ResourceServerCreateTokenDialectEnum = {
token: 'access_token',
token_authz: 'access_token_authz',
access_token: 'access_token',
access_token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
} as const;
Expand Down Expand Up @@ -10571,8 +10599,8 @@ export type ResourceServerUpdateSigningAlgEnum =
(typeof ResourceServerUpdateSigningAlgEnum)[keyof typeof ResourceServerUpdateSigningAlgEnum];

export const ResourceServerUpdateTokenDialectEnum = {
token: 'access_token',
token_authz: 'access_token_authz',
access_token: 'access_token',
access_token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
} as const;
Expand Down Expand Up @@ -13764,6 +13792,7 @@ export const GetPartialsPromptEnum = {
signup: 'signup',
signup_id: 'signup-id',
signup_password: 'signup-password',
customized_consent: 'customized-consent',
} as const;
export type GetPartialsPromptEnum =
(typeof GetPartialsPromptEnum)[keyof typeof GetPartialsPromptEnum];
Expand Down Expand Up @@ -13889,6 +13918,7 @@ export interface PutCustomTextByLanguageRequest {
*/
language: PutCustomTextByLanguageLanguageEnum;
}

/**
*
*/
Expand All @@ -13899,6 +13929,7 @@ export const PutPartialsPromptEnum = {
signup: 'signup',
signup_id: 'signup-id',
signup_password: 'signup-password',
customized_consent: 'customized-consent',
} as const;
export type PutPartialsPromptEnum =
(typeof PutPartialsPromptEnum)[keyof typeof PutPartialsPromptEnum];
Expand Down
9 changes: 8 additions & 1 deletion test/management/organizations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ describe('OrganizationsManager', () => {
id: 'org_id',
connectionId: 'conn_id',
show_as_button: false,
is_signup_enabled: true,
};

beforeEach(() => {
Expand Down Expand Up @@ -485,7 +486,12 @@ describe('OrganizationsManager', () => {
id: 'org_123',
};

const body = { connection_id: '123', assign_membership_on_login: false, show_as_button: false };
const body = {
connection_id: '123',
assign_membership_on_login: false,
show_as_button: false,
is_signup_enabled: true,
};

beforeEach(() => {
request = nock(API_URL).post(`/organizations/${data.id}/enabled_connections`).reply(200, {});
Expand Down Expand Up @@ -553,6 +559,7 @@ describe('OrganizationsManager', () => {
id: 'org_123',
connectionId: '123',
show_as_button: false,
is_signup_enabled: true,
};
const body = { assign_membership_on_login: false };

Expand Down

0 comments on commit b79404e

Please sign in to comment.