@sprucelabs/spruce-test-fixtures 62.2.323 → 62.2.324
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,8 +14,8 @@ export default class LocationFixture {
|
|
14
14
|
roles: RoleFixture;
|
15
15
|
});
|
16
16
|
seedDemoLocation(values?: Partial<SpruceSchemas.Mercury.v2020_12_25.CreateLocationEmitPayload> & {
|
17
|
-
phone?: string;
|
18
|
-
organizationId?: string;
|
17
|
+
phone?: string | null;
|
18
|
+
organizationId?: string | null;
|
19
19
|
}): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
|
20
20
|
private generateLocationSlug;
|
21
21
|
getLocationById(id: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
|
@@ -30,17 +30,18 @@ class LocationFixture {
|
|
30
30
|
}
|
31
31
|
seedDemoLocation(values) {
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
33
|
-
|
34
|
-
|
33
|
+
var _a, _b, _c;
|
34
|
+
const { client } = yield this.people.loginAsDemoPerson((_a = values === null || values === void 0 ? void 0 : values.phone) !== null && _a !== void 0 ? _a : undefined);
|
35
|
+
let _d = values !== null && values !== void 0 ? values : {}, { organizationId: orgId } = _d, rest = __rest(_d, ["organizationId"]);
|
35
36
|
if (!orgId) {
|
36
|
-
const last = yield this.orgs.getNewestOrganization(values === null || values === void 0 ? void 0 : values.phone);
|
37
|
+
const last = yield this.orgs.getNewestOrganization((_b = values === null || values === void 0 ? void 0 : values.phone) !== null && _b !== void 0 ? _b : undefined);
|
37
38
|
if (last) {
|
38
39
|
orgId = last.id;
|
39
40
|
}
|
40
41
|
else {
|
41
42
|
const org = yield this.orgs.seedDemoOrganization({
|
42
43
|
name: 'Org to support seed location',
|
43
|
-
phone: values === null || values === void 0 ? void 0 : values.phone,
|
44
|
+
phone: (_c = values === null || values === void 0 ? void 0 : values.phone) !== null && _c !== void 0 ? _c : undefined,
|
44
45
|
});
|
45
46
|
orgId = org.id;
|
46
47
|
}
|
@@ -14,8 +14,8 @@ export default class LocationFixture {
|
|
14
14
|
roles: RoleFixture;
|
15
15
|
});
|
16
16
|
seedDemoLocation(values?: Partial<SpruceSchemas.Mercury.v2020_12_25.CreateLocationEmitPayload> & {
|
17
|
-
phone?: string;
|
18
|
-
organizationId?: string;
|
17
|
+
phone?: string | null;
|
18
|
+
organizationId?: string | null;
|
19
19
|
}): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
|
20
20
|
private generateLocationSlug;
|
21
21
|
getLocationById(id: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
|
@@ -22,17 +22,18 @@ class LocationFixture {
|
|
22
22
|
this.roles = options.roles;
|
23
23
|
}
|
24
24
|
async seedDemoLocation(values) {
|
25
|
-
|
26
|
-
|
25
|
+
var _a, _b, _c;
|
26
|
+
const { client } = await this.people.loginAsDemoPerson((_a = values === null || values === void 0 ? void 0 : values.phone) !== null && _a !== void 0 ? _a : undefined);
|
27
|
+
let _d = values !== null && values !== void 0 ? values : {}, { organizationId: orgId } = _d, rest = __rest(_d, ["organizationId"]);
|
27
28
|
if (!orgId) {
|
28
|
-
const last = await this.orgs.getNewestOrganization(values === null || values === void 0 ? void 0 : values.phone);
|
29
|
+
const last = await this.orgs.getNewestOrganization((_b = values === null || values === void 0 ? void 0 : values.phone) !== null && _b !== void 0 ? _b : undefined);
|
29
30
|
if (last) {
|
30
31
|
orgId = last.id;
|
31
32
|
}
|
32
33
|
else {
|
33
34
|
const org = await this.orgs.seedDemoOrganization({
|
34
35
|
name: 'Org to support seed location',
|
35
|
-
phone: values === null || values === void 0 ? void 0 : values.phone,
|
36
|
+
phone: (_c = values === null || values === void 0 ? void 0 : values.phone) !== null && _c !== void 0 ? _c : undefined,
|
36
37
|
});
|
37
38
|
orgId = org.id;
|
38
39
|
}
|
package/package.json
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
"@sprucelabs/spruce-test-fixtures"
|
14
14
|
]
|
15
15
|
},
|
16
|
-
"version": "62.2.
|
16
|
+
"version": "62.2.324",
|
17
17
|
"files": [
|
18
18
|
"build/**/*",
|
19
19
|
"!build/__tests__",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@sprucelabs/spruce-core-schemas": "^40.1.409",
|
72
72
|
"@sprucelabs/spruce-event-utils": "^40.1.187",
|
73
73
|
"@sprucelabs/spruce-permission-utils": "^8.0.543",
|
74
|
-
"@sprucelabs/spruce-skill-booter": "^62.2.
|
74
|
+
"@sprucelabs/spruce-skill-booter": "^62.2.324",
|
75
75
|
"@sprucelabs/spruce-skill-utils": "^31.0.484",
|
76
76
|
"@sprucelabs/test-utils": "^5.1.363",
|
77
77
|
"dotenv": "^16.4.5",
|
@@ -114,5 +114,5 @@
|
|
114
114
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
115
115
|
}
|
116
116
|
},
|
117
|
-
"gitHead": "
|
117
|
+
"gitHead": "75bc821152ce1437b705a10104d2c63d347d3660"
|
118
118
|
}
|