@sprucelabs/spruce-invite-utils 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
- import { PromptForLoginAndConfirmOptions } from '../../loggingInAndConfirmingJoin/LoginAndConfirmJoinController';
1
+ import { LoginAndConfirmJoinOptions, PromptForLoginAndConfirmOptions } from '../../loggingInAndConfirmingJoin/LoginAndConfirmJoinController';
2
2
  export default class LoginAndConfirmTestFixture {
3
3
  private static hitCount;
4
4
  private static wasBeforeEachCalled;
5
5
  static lastPromptOptions?: PromptForLoginAndConfirmOptions;
6
+ static lastFactoryOptions?: LoginAndConfirmJoinOptions;
6
7
  static beforeEach(): void;
7
8
  static getHitCount(): number;
8
9
  private static assertBeforeEachWasCalled;
@@ -33,6 +33,9 @@ exports.default = LoginAndConfirmTestFixture;
33
33
  LoginAndConfirmTestFixture.hitCount = 0;
34
34
  LoginAndConfirmTestFixture.wasBeforeEachCalled = false;
35
35
  class CountingLoginAndConfirmController {
36
+ constructor(options) {
37
+ LoginAndConfirmTestFixture.lastFactoryOptions = options;
38
+ }
36
39
  async promptForLoginAndConfirmJoin(options) {
37
40
  //@ts-ignore
38
41
  LoginAndConfirmTestFixture.hitCount++;
@@ -1,8 +1,9 @@
1
- import { PromptForLoginAndConfirmOptions } from '../../loggingInAndConfirmingJoin/LoginAndConfirmJoinController';
1
+ import { LoginAndConfirmJoinOptions, PromptForLoginAndConfirmOptions } from '../../loggingInAndConfirmingJoin/LoginAndConfirmJoinController';
2
2
  export default class LoginAndConfirmTestFixture {
3
3
  private static hitCount;
4
4
  private static wasBeforeEachCalled;
5
5
  static lastPromptOptions?: PromptForLoginAndConfirmOptions;
6
+ static lastFactoryOptions?: LoginAndConfirmJoinOptions;
6
7
  static beforeEach(): void;
7
8
  static getHitCount(): number;
8
9
  private static assertBeforeEachWasCalled;
@@ -36,6 +36,9 @@ export default class LoginAndConfirmTestFixture {
36
36
  LoginAndConfirmTestFixture.hitCount = 0;
37
37
  LoginAndConfirmTestFixture.wasBeforeEachCalled = false;
38
38
  class CountingLoginAndConfirmController {
39
+ constructor(options) {
40
+ LoginAndConfirmTestFixture.lastFactoryOptions = options;
41
+ }
39
42
  promptForLoginAndConfirmJoin(options) {
40
43
  return __awaiter(this, void 0, void 0, function* () {
41
44
  //@ts-ignore
@@ -12,7 +12,7 @@ export default class LoginAndConfirmJoinControllerImpl implements LoginAndConfir
12
12
  private locationId?;
13
13
  private confirmJoinContext?;
14
14
  protected constructor(options: LoginAndConfirmJoinOptions);
15
- static setClass(Class?: new () => LoginAndConfirmJoinController): void;
15
+ static setClass(Class?: LoginAndConfirmJoinConstructor): void;
16
16
  static Controller(options: LoginAndConfirmJoinOptions): LoginAndConfirmJoinController;
17
17
  promptForLoginAndConfirmJoin(options?: PromptForLoginAndConfirmOptions): Promise<boolean>;
18
18
  private listRoles;
@@ -27,7 +27,7 @@ export interface LoginAndConfirmJoinOptions {
27
27
  locationId?: string;
28
28
  connectToApi: ConnectToApi;
29
29
  }
30
- export declare type LoginAndConfirmJoinConstructor = new () => LoginAndConfirmJoinController;
30
+ export declare type LoginAndConfirmJoinConstructor = new (options: LoginAndConfirmJoinOptions) => LoginAndConfirmJoinController;
31
31
  declare type ConnectToApi = () => Promise<MercuryClient>;
32
32
  export declare type InviteViewContext = SpruceSchemas.Invite.v2021_12_16.InviteViewContext;
33
33
  export interface PromptForLoginAndConfirmOptions {
@@ -12,7 +12,7 @@ export default class LoginAndConfirmJoinControllerImpl implements LoginAndConfir
12
12
  private locationId?;
13
13
  private confirmJoinContext?;
14
14
  protected constructor(options: LoginAndConfirmJoinOptions);
15
- static setClass(Class?: new () => LoginAndConfirmJoinController): void;
15
+ static setClass(Class?: LoginAndConfirmJoinConstructor): void;
16
16
  static Controller(options: LoginAndConfirmJoinOptions): LoginAndConfirmJoinController;
17
17
  promptForLoginAndConfirmJoin(options?: PromptForLoginAndConfirmOptions): Promise<boolean>;
18
18
  private listRoles;
@@ -27,7 +27,7 @@ export interface LoginAndConfirmJoinOptions {
27
27
  locationId?: string;
28
28
  connectToApi: ConnectToApi;
29
29
  }
30
- export declare type LoginAndConfirmJoinConstructor = new () => LoginAndConfirmJoinController;
30
+ export declare type LoginAndConfirmJoinConstructor = new (options: LoginAndConfirmJoinOptions) => LoginAndConfirmJoinController;
31
31
  declare type ConnectToApi = () => Promise<MercuryClient>;
32
32
  export declare type InviteViewContext = SpruceSchemas.Invite.v2021_12_16.InviteViewContext;
33
33
  export interface PromptForLoginAndConfirmOptions {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-invite-utils",
3
3
  "description": "Invite Utilities",
4
- "version": "3.4.3",
4
+ "version": "3.5.0",
5
5
  "skill": {
6
6
  "namespace": "invite"
7
7
  },