@sprucelabs/spruce-invite-utils 1.1.0 → 2.0.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,14 +1,16 @@
|
|
|
1
1
|
export declare type InviteRouteBuilderOptions = {
|
|
2
|
-
|
|
2
|
+
destinationAfterAccept: {
|
|
3
3
|
id: string;
|
|
4
|
+
args?: Record<string, any>;
|
|
4
5
|
};
|
|
5
6
|
organizationId?: string;
|
|
6
7
|
locationId?: string;
|
|
7
8
|
roleId?: string;
|
|
8
9
|
};
|
|
9
10
|
export default function buildRouteToCreateInvite(options: InviteRouteBuilderOptions): (string | {
|
|
10
|
-
|
|
11
|
+
destinationAfterAccept: {
|
|
11
12
|
id: string;
|
|
13
|
+
args?: Record<string, any> | undefined;
|
|
12
14
|
};
|
|
13
15
|
organizationId?: string | undefined;
|
|
14
16
|
locationId?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assertOptions } from '@sprucelabs/schema';
|
|
2
2
|
export default function buildRouteToCreateInvite(options) {
|
|
3
|
-
assertOptions(options, ['
|
|
3
|
+
assertOptions(options, ['destinationAfterAccept']);
|
|
4
4
|
if (options.locationId && !options.organizationId) {
|
|
5
5
|
throw new Error('If you supply a locationId, you have to also supply an organizationId.');
|
|
6
6
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export declare type InviteRouteBuilderOptions = {
|
|
2
|
-
|
|
2
|
+
destinationAfterAccept: {
|
|
3
3
|
id: string;
|
|
4
|
+
args?: Record<string, any>;
|
|
4
5
|
};
|
|
5
6
|
organizationId?: string;
|
|
6
7
|
locationId?: string;
|
|
7
8
|
roleId?: string;
|
|
8
9
|
};
|
|
9
10
|
export default function buildRouteToCreateInvite(options: InviteRouteBuilderOptions): (string | {
|
|
10
|
-
|
|
11
|
+
destinationAfterAccept: {
|
|
11
12
|
id: string;
|
|
13
|
+
args?: Record<string, any> | undefined;
|
|
12
14
|
};
|
|
13
15
|
organizationId?: string | undefined;
|
|
14
16
|
locationId?: string | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_1 = require("@sprucelabs/schema");
|
|
4
4
|
function buildRouteToCreateInvite(options) {
|
|
5
|
-
(0, schema_1.assertOptions)(options, ['
|
|
5
|
+
(0, schema_1.assertOptions)(options, ['destinationAfterAccept']);
|
|
6
6
|
if (options.locationId && !options.organizationId) {
|
|
7
7
|
throw new Error('If you supply a locationId, you have to also supply an organizationId.');
|
|
8
8
|
}
|