Fixed minor issues with alignment of types and such
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 31s

This commit is contained in:
Alan Bridgeman 2026-01-29 17:19:47 -06:00
parent 513387d70a
commit 90e5c7df03
2 changed files with 6 additions and 43 deletions

View file

@ -105,23 +105,6 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
private saveSecret: (secret: string) => void | Promise<void>; private saveSecret: (secret: string) => void | Promise<void>;
private options: OAuthAppOptions<TCustomClaims>; private options: OAuthAppOptions<TCustomClaims>;
/*private baseAppUrl?: URL;
private appAbbrv?: string;
private appName?: string | { [language: string]: string };
private contacts?: string[];
private scopes?: Scopes[];
private vault_type?: "azure" | "hashicorp" | "file";
private auth_default_method?: "query" | "form_post" | "PAR";
private auth_default_use_JWT?: boolean;
private auth_default_response_mode?: 'query' | 'fragment' | 'form_post';
private client_secret?: string;
private logo_url?: URL;
private tos_url?: URL;
private policy_url?: URL;
private webhooks?: Webhook[];
private subscriptionRequired?: boolean;
private subscriptionTiers?: AppSubscriptionTier[];
private addons?: Addon[];*/
private client: Client<TCustomClaims>; private client: Client<TCustomClaims>;
@ -152,7 +135,7 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
* @param saveSecret The callback to call to save the secret * @param saveSecret The callback to call to save the secret
* @param options The options for the OAuth app * @param options The options for the OAuth app
* @param options.baseAppUrl The base URL of the app * @param options.baseAppUrl The base URL of the app
* @param options.appAbbrv The abbreviation of the app (used for user properties associated with the app) * @param options.client_abbreviation The abbreviation of the app (used for user properties associated with the app)
* @param options.appName The name of the app * @param options.appName The name of the app
* @param options.contacts The email addresses of the contacts for the app * @param options.contacts The email addresses of the contacts for the app
* @param options.scopes The scopes an app token COULD ask for (token scopes would have to ask for this or a subset of this list) * @param options.scopes The scopes an app token COULD ask for (token scopes would have to ask for this or a subset of this list)
@ -165,8 +148,8 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
* @param options.tos_url The URL of the app's terms of service * @param options.tos_url The URL of the app's terms of service
* @param options.policy_url The URL of the app's privacy policy * @param options.policy_url The URL of the app's privacy policy
* @param options.webhooks The webhooks supported by the app * @param options.webhooks The webhooks supported by the app
* @param options.subscriptionRequired If a subscription is required * @param options.subscription_required If a subscription is required
* @param options.subscriptionTiers The subscription tiers available for the app * @param options.subscription_tiers The subscription tiers available for the app
* @param options.addons Addons offered by the app * @param options.addons Addons offered by the app
*/ */
constructor( constructor(
@ -178,26 +161,6 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
this.onAuth = onAuth; this.onAuth = onAuth;
this.saveSecret = saveSecret; this.saveSecret = saveSecret;
this.options = options ?? {} as OAuthAppOptions<TCustomClaims>; this.options = options ?? {} as OAuthAppOptions<TCustomClaims>;
/*if(typeof options !== 'undefined') {
this.baseAppUrl = options.baseAppUrl;
this.appAbbrv = options.appAbbrv;
this.appName = options.appName;
this.contacts = options.contacts;
this.scopes = options.scopes;
this.vault_type = options.vault_type;
this.auth_default_method = options.auth_default_method;
this.auth_default_use_JWT = options.auth_default_use_JWT;
this.auth_default_response_mode = options.auth_default_response_mode;
this.client_secret = options.client_secret;
this.logo_url = options.logo_url;
this.tos_url = options.tos_url;
this.policy_url = options.policy_url;
this.webhooks = options.webhooks;
this.subscriptionRequired = options.subscriptionRequired;
this.subscriptionTiers = options.subscriptionTiers;
this.addons = options.addons;
}*/
} }
/** Returns the OAuthApp's Client instance (which is useful for managing keys, creating resource request, etc...) */ /** Returns the OAuthApp's Client instance (which is useful for managing keys, creating resource request, etc...) */
@ -240,8 +203,8 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
this.saveSecret, this.saveSecret,
{ {
client_abbreviation: appAbbrv, client_abbreviation: appAbbrv,
subscription_required: this.options.subscriptionRequired ?? false, subscription_required: this.options.subscription_required ?? false,
subscription_tiers: this.options.subscriptionTiers, subscription_tiers: this.options.subscription_tiers,
addons: this.options.addons, addons: this.options.addons,
webhooks: this.options.webhooks webhooks: this.options.webhooks
} as TCustomClaims, } as TCustomClaims,

View file

@ -27,7 +27,7 @@ export interface BridgemanAccessibleAppClaims extends ClientCustomClaims {
* If we want to store some kind of ID for it, the property in the user might be `aepId`. * If we want to store some kind of ID for it, the property in the user might be `aepId`.
* And all apps would follow this pattern of `<abbreviation><property name>`. * And all apps would follow this pattern of `<abbreviation><property name>`.
*/ */
client_abbreviation: string; client_abbreviation?: string;
/** The webhooks registered for this app */ /** The webhooks registered for this app */
webhooks?: Webhook[]; webhooks?: Webhook[];