@sprucelabs/spruce-test-fixtures 62.2.323 → 62.2.325
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.325",
|
17
17
|
"files": [
|
18
18
|
"build/**/*",
|
19
19
|
"!build/__tests__",
|
@@ -61,27 +61,27 @@
|
|
61
61
|
"lint.tsc": "tsc -p . --noEmit"
|
62
62
|
},
|
63
63
|
"dependencies": {
|
64
|
-
"@sprucelabs/data-stores": "^28.3.
|
65
|
-
"@sprucelabs/error": "^6.0.
|
66
|
-
"@sprucelabs/heartwood-view-controllers": "^110.12.
|
64
|
+
"@sprucelabs/data-stores": "^28.3.74",
|
65
|
+
"@sprucelabs/error": "^6.0.418",
|
66
|
+
"@sprucelabs/heartwood-view-controllers": "^110.12.130",
|
67
67
|
"@sprucelabs/mercury-client": "^42.0.472",
|
68
|
-
"@sprucelabs/mercury-core-events": "^24.3.
|
68
|
+
"@sprucelabs/mercury-core-events": "^24.3.228",
|
69
69
|
"@sprucelabs/mercury-event-emitter": "^42.0.472",
|
70
|
-
"@sprucelabs/schema": "^30.0.
|
71
|
-
"@sprucelabs/spruce-core-schemas": "^40.1.
|
72
|
-
"@sprucelabs/spruce-event-utils": "^40.1.
|
73
|
-
"@sprucelabs/spruce-permission-utils": "^8.0.
|
74
|
-
"@sprucelabs/spruce-skill-booter": "^62.2.
|
75
|
-
"@sprucelabs/spruce-skill-utils": "^31.0.
|
76
|
-
"@sprucelabs/test-utils": "^5.1.
|
70
|
+
"@sprucelabs/schema": "^30.0.467",
|
71
|
+
"@sprucelabs/spruce-core-schemas": "^40.1.411",
|
72
|
+
"@sprucelabs/spruce-event-utils": "^40.1.189",
|
73
|
+
"@sprucelabs/spruce-permission-utils": "^8.0.545",
|
74
|
+
"@sprucelabs/spruce-skill-booter": "^62.2.325",
|
75
|
+
"@sprucelabs/spruce-skill-utils": "^31.0.486",
|
76
|
+
"@sprucelabs/test-utils": "^5.1.365",
|
77
77
|
"dotenv": "^16.4.5",
|
78
78
|
"unique-names-generator": "^4.7.1"
|
79
79
|
},
|
80
80
|
"devDependencies": {
|
81
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
82
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
83
|
-
"@sprucelabs/mercury-types": "^47.0.
|
84
|
-
"@sprucelabs/resolve-path-aliases": "^2.0.
|
81
|
+
"@sprucelabs/esm-postbuild": "^6.0.402",
|
82
|
+
"@sprucelabs/jest-json-reporter": "^8.0.418",
|
83
|
+
"@sprucelabs/mercury-types": "^47.0.468",
|
84
|
+
"@sprucelabs/resolve-path-aliases": "^2.0.397",
|
85
85
|
"@sprucelabs/semantic-release": "^5.0.2",
|
86
86
|
"@sprucelabs/test": "^9.0.47",
|
87
87
|
"@types/node": "17.0.5",
|
@@ -114,5 +114,5 @@
|
|
114
114
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
115
115
|
}
|
116
116
|
},
|
117
|
-
"gitHead": "
|
117
|
+
"gitHead": "96f400a6e187fea1fde120034c684930d8888a2d"
|
118
118
|
}
|