@vrplatform/api 1.3.1-stage.602 → 1.3.1-stage.604

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.
@@ -3,6 +3,9 @@ export * from './client';
3
3
  export * from './embed-lifecycle';
4
4
  export * from './error';
5
5
  export type * from './generated/v1';
6
+ export * from './is-test-team';
7
+ export * from './is-test-user';
8
+ export * from './is-vrp-member';
6
9
  export * from './routing';
7
10
  export * from './sec';
8
11
  export * from './types';
@@ -17,6 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client"), exports);
18
18
  __exportStar(require("./embed-lifecycle"), exports);
19
19
  __exportStar(require("./error"), exports);
20
+ __exportStar(require("./is-test-team"), exports);
21
+ __exportStar(require("./is-test-user"), exports);
22
+ __exportStar(require("./is-vrp-member"), exports);
20
23
  __exportStar(require("./routing"), exports);
21
24
  __exportStar(require("./sec"), exports);
22
25
  __exportStar(require("./types"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,2CAAyB;AACzB,oDAAkC;AAClC,0CAAwB;AAExB,4CAA0B;AAC1B,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B","sourcesContent":["import type { ApiClient } from './types';\n\nexport * from './client';\nexport * from './embed-lifecycle';\nexport * from './error';\nexport type * from './generated/v1';\nexport * from './routing';\nexport * from './sec';\nexport * from './types';\nexport * from './vrt-mcp';\n\nexport type VRPlatformApi = ApiClient;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,2CAAyB;AACzB,oDAAkC;AAClC,0CAAwB;AAExB,iDAA+B;AAC/B,iDAA+B;AAC/B,kDAAgC;AAChC,4CAA0B;AAC1B,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B","sourcesContent":["import type { ApiClient } from './types';\n\nexport * from './client';\nexport * from './embed-lifecycle';\nexport * from './error';\nexport type * from './generated/v1';\nexport * from './is-test-team';\nexport * from './is-test-user';\nexport * from './is-vrp-member';\nexport * from './routing';\nexport * from './sec';\nexport * from './types';\nexport * from './vrt-mcp';\n\nexport type VRPlatformApi = ApiClient;\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const TEST_TEAM_IDS: readonly ["0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa", "fa4d1a20-2f47-4021-9c72-c5a809be9c48", "c4fd21b4-8447-43a2-bdcb-f06a85a935ad", "8f21060e-afe6-410a-b2f4-00a3caa20786"];
2
+ export declare function isTestTeam(team: {
3
+ id: string;
4
+ partnerId?: string | null;
5
+ billingPartnerId?: string | null;
6
+ } | undefined): boolean;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TEST_TEAM_IDS = void 0;
4
+ exports.isTestTeam = isTestTeam;
5
+ const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';
6
+ exports.TEST_TEAM_IDS = [
7
+ DEMO_TEST_PARTNER_TENANT_ID,
8
+ 'fa4d1a20-2f47-4021-9c72-c5a809be9c48', // Testing tenant
9
+ 'c4fd21b4-8447-43a2-bdcb-f06a85a935ad', // VRP Automated Testing
10
+ '8f21060e-afe6-410a-b2f4-00a3caa20786', // test_company_xxxx
11
+ ];
12
+ function isTestTeam(team) {
13
+ if (!team)
14
+ return false;
15
+ return (new Set(exports.TEST_TEAM_IDS).has(team.id) ||
16
+ [team.partnerId, team.billingPartnerId].includes(DEMO_TEST_PARTNER_TENANT_ID));
17
+ }
18
+ //# sourceMappingURL=is-test-team.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-test-team.js","sourceRoot":"src/","sources":["is-test-team.ts"],"names":[],"mappings":";;;AASA,gCAgBC;AAzBD,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAE9D,QAAA,aAAa,GAAG;IAC3B,2BAA2B;IAC3B,sCAAsC,EAAE,iBAAiB;IACzD,sCAAsC,EAAE,wBAAwB;IAChE,sCAAsC,EAAE,oBAAoB;CACpD,CAAC;AAEX,SAAgB,UAAU,CACxB,IAMa;IAEb,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,OAAO,CACL,IAAI,GAAG,CAAS,qBAAa,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC","sourcesContent":["const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';\n\nexport const TEST_TEAM_IDS = [\n DEMO_TEST_PARTNER_TENANT_ID,\n 'fa4d1a20-2f47-4021-9c72-c5a809be9c48', // Testing tenant\n 'c4fd21b4-8447-43a2-bdcb-f06a85a935ad', // VRP Automated Testing\n '8f21060e-afe6-410a-b2f4-00a3caa20786', // test_company_xxxx\n] as const;\n\nexport function isTestTeam(\n team:\n | {\n id: string;\n partnerId?: string | null;\n billingPartnerId?: string | null;\n }\n | undefined\n): boolean {\n if (!team) return false;\n return (\n new Set<string>(TEST_TEAM_IDS).has(team.id) ||\n [team.partnerId, team.billingPartnerId].includes(\n DEMO_TEST_PARTNER_TENANT_ID\n )\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const isTestUser: ({ userEmail, userId, }: {
2
+ userEmail?: string | null;
3
+ userId?: string | null;
4
+ }) => boolean;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTestUser = void 0;
4
+ const E2E_TEST_USER_EMAILS = [
5
+ 'e2e-invite-owner@finalytic.io',
6
+ 'e2e-invite-owner@vrp.rocks',
7
+ 'e2e-invite-member@finalytic.io',
8
+ 'e2e-invite-member@vrp.rocks',
9
+ 'e2e-sign-up-legacy@vrp.rocks',
10
+ 'e2e-sign-up-partner@vrp.rocks',
11
+ 'e2e-sign-up@finalytic.io',
12
+ 'e2e-sign-up@vrp.rocks',
13
+ 'lars+e2e@vrplatform.app',
14
+ 'lars+e2e-gl@vrplatform.app',
15
+ 'lars+checkly@finalytic.co',
16
+ ];
17
+ const E2E_TEST_USERS = {
18
+ 'e2e-invite-member@finalytic.io': '113d73d8-ee21-46b7-a12a-a74f632401ca',
19
+ 'e2e-invite-member@vrp.rocks': '113d73d8-ee21-46b7-a12a-a74f632401ca',
20
+ 'e2e-invite-owner@finalytic.io': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
21
+ 'e2e-invite-owner@vrp.rocks': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
22
+ 'e2e-sign-up-partner@vrp.rocks': '5c8e5572-74d0-4ae6-af73-bca8db9a27e9',
23
+ 'e2e-sign-up@vrp.rocks': '3c8e5572-74d0-4ae6-af73-bca8db9a27e9',
24
+ 'e2e-sign-up@finalytic.io': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
25
+ 'e2e-sign-up-legacy@vrp.rocks': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
26
+ 'lars+checkly@finalytic.co': '9e7dfc88-503c-4222-9905-9116169d2203',
27
+ };
28
+ const isTestUser = ({ userEmail, userId, }) => Boolean((userId && Object.values(E2E_TEST_USERS).includes(userId)) ||
29
+ (userEmail && Object.keys(E2E_TEST_USERS).includes(userEmail)));
30
+ exports.isTestUser = isTestUser;
31
+ //# sourceMappingURL=is-test-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-test-user.js","sourceRoot":"src/","sources":["is-test-user.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IAC3B,+BAA+B;IAC/B,4BAA4B;IAC5B,gCAAgC;IAChC,6BAA6B;IAC7B,8BAA8B;IAC9B,+BAA+B;IAC/B,0BAA0B;IAC1B,uBAAuB;IACvB,yBAAyB;IACzB,4BAA4B;IAC5B,2BAA2B;CACnB,CAAC;AAEX,MAAM,cAAc,GAEhB;IACF,gCAAgC,EAAE,sCAAsC;IACxE,6BAA6B,EAAE,sCAAsC;IACrE,+BAA+B,EAAE,sCAAsC;IACvE,4BAA4B,EAAE,sCAAsC;IACpE,+BAA+B,EAAE,sCAAsC;IACvE,uBAAuB,EAAE,sCAAsC;IAC/D,0BAA0B,EAAE,sCAAsC;IAClE,8BAA8B,EAAE,sCAAsC;IACtE,2BAA2B,EAAE,sCAAsC;CACpE,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,MAAM,GAIP,EAAE,EAAE,CACH,OAAO,CACL,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAC/D,CAAC;AAVS,QAAA,UAAU,cAUnB","sourcesContent":["const E2E_TEST_USER_EMAILS = [\n 'e2e-invite-owner@finalytic.io',\n 'e2e-invite-owner@vrp.rocks',\n 'e2e-invite-member@finalytic.io',\n 'e2e-invite-member@vrp.rocks',\n 'e2e-sign-up-legacy@vrp.rocks',\n 'e2e-sign-up-partner@vrp.rocks',\n 'e2e-sign-up@finalytic.io',\n 'e2e-sign-up@vrp.rocks',\n 'lars+e2e@vrplatform.app',\n 'lars+e2e-gl@vrplatform.app',\n 'lars+checkly@finalytic.co',\n] as const;\n\nconst E2E_TEST_USERS: Partial<\n Record<(typeof E2E_TEST_USER_EMAILS)[number], string>\n> = {\n 'e2e-invite-member@finalytic.io': '113d73d8-ee21-46b7-a12a-a74f632401ca',\n 'e2e-invite-member@vrp.rocks': '113d73d8-ee21-46b7-a12a-a74f632401ca',\n 'e2e-invite-owner@finalytic.io': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',\n 'e2e-invite-owner@vrp.rocks': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',\n 'e2e-sign-up-partner@vrp.rocks': '5c8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up@vrp.rocks': '3c8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up@finalytic.io': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up-legacy@vrp.rocks': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'lars+checkly@finalytic.co': '9e7dfc88-503c-4222-9905-9116169d2203',\n};\n\nexport const isTestUser = ({\n userEmail,\n userId,\n}: {\n userEmail?: string | null;\n userId?: string | null;\n}) =>\n Boolean(\n (userId && Object.values(E2E_TEST_USERS).includes(userId)) ||\n (userEmail && Object.keys(E2E_TEST_USERS).includes(userEmail))\n );\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const isVrpMember: ({ email, userId, }: {
2
+ email?: string | null;
3
+ userId?: string | null;
4
+ }) => boolean;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isVrpMember = void 0;
4
+ const VRP_EMAIL_DOMAINS = ['@finalytic.co', '@vrplatform.app'];
5
+ const VRP_EMAILS = [
6
+ 'radek+vrp@setup.inc',
7
+ 'philipp@philipp-achenbach.de',
8
+ 'l.behrenberg@gmail.com',
9
+ 'l.behrenberg+secondary@gmail.com',
10
+ 'adam@ximplifi.com',
11
+ ];
12
+ const VRP_USER_IDS = [
13
+ '3267f329-26d9-471d-86c1-d4c2efab2951',
14
+ '735e1803-13f5-4a90-a02f-2498b3eefa03',
15
+ '1a2bd1ea-88b1-4217-935f-2a8d97c422f9',
16
+ '4b221539-d6cf-4d18-a015-1f3a99fc3c2d',
17
+ '5e9bdcc1-71ae-4e59-87a1-affbfc3ce603',
18
+ '2a40c6c5-c9a2-4d98-a70f-3c6f75bff3e2',
19
+ '31a87570-3917-4e4c-b237-af605ab0094b',
20
+ 'ec78e603-705c-4f1c-9b85-4dc5733c5b85',
21
+ '16b5bd68-8261-4192-a28a-13817b31fede',
22
+ '2e22dcba-73f0-4699-bc48-088209804fe2',
23
+ '840da880-9a3d-43e5-9e2e-d4c74429ed17',
24
+ '9ecc0316-e7dc-4c73-960d-01c2763fb8da',
25
+ '9f6008c7-4df5-4aec-997f-07ecd44a2f79',
26
+ '27dc0d2a-d11a-4fe1-a500-6e0e6350ad04',
27
+ ];
28
+ const isVrpMember = ({ email, userId, }) => Boolean((email &&
29
+ (VRP_EMAILS.includes(email) ||
30
+ VRP_EMAIL_DOMAINS.some((domain) => email.endsWith(domain)))) ||
31
+ (userId && VRP_USER_IDS.includes(userId)));
32
+ exports.isVrpMember = isVrpMember;
33
+ //# sourceMappingURL=is-vrp-member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-vrp-member.js","sourceRoot":"src/","sources":["is-vrp-member.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AAC/D,MAAM,UAAU,GAAG;IACjB,qBAAqB;IACrB,8BAA8B;IAC9B,wBAAwB;IACxB,kCAAkC;IAClC,mBAAmB;CACpB,CAAC;AACF,MAAM,YAAY,GAAG;IACnB,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;CACvC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,MAAM,GAIP,EAAE,EAAE,CACH,OAAO,CACL,CAAC,KAAK;IACJ,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAC1C,CAAC;AAZS,QAAA,WAAW,eAYpB","sourcesContent":["const VRP_EMAIL_DOMAINS = ['@finalytic.co', '@vrplatform.app'];\nconst VRP_EMAILS = [\n 'radek+vrp@setup.inc',\n 'philipp@philipp-achenbach.de',\n 'l.behrenberg@gmail.com',\n 'l.behrenberg+secondary@gmail.com',\n 'adam@ximplifi.com',\n];\nconst VRP_USER_IDS = [\n '3267f329-26d9-471d-86c1-d4c2efab2951',\n '735e1803-13f5-4a90-a02f-2498b3eefa03',\n '1a2bd1ea-88b1-4217-935f-2a8d97c422f9',\n '4b221539-d6cf-4d18-a015-1f3a99fc3c2d',\n '5e9bdcc1-71ae-4e59-87a1-affbfc3ce603',\n '2a40c6c5-c9a2-4d98-a70f-3c6f75bff3e2',\n '31a87570-3917-4e4c-b237-af605ab0094b',\n 'ec78e603-705c-4f1c-9b85-4dc5733c5b85',\n '16b5bd68-8261-4192-a28a-13817b31fede',\n '2e22dcba-73f0-4699-bc48-088209804fe2',\n '840da880-9a3d-43e5-9e2e-d4c74429ed17',\n '9ecc0316-e7dc-4c73-960d-01c2763fb8da',\n '9f6008c7-4df5-4aec-997f-07ecd44a2f79',\n '27dc0d2a-d11a-4fe1-a500-6e0e6350ad04',\n];\n\nexport const isVrpMember = ({\n email,\n userId,\n}: {\n email?: string | null;\n userId?: string | null;\n}) =>\n Boolean(\n (email &&\n (VRP_EMAILS.includes(email) ||\n VRP_EMAIL_DOMAINS.some((domain) => email.endsWith(domain)))) ||\n (userId && VRP_USER_IDS.includes(userId))\n );\n"]}
@@ -3,6 +3,9 @@ export * from './client';
3
3
  export * from './embed-lifecycle';
4
4
  export * from './error';
5
5
  export type * from './generated/v1';
6
+ export * from './is-test-team';
7
+ export * from './is-test-user';
8
+ export * from './is-vrp-member';
6
9
  export * from './routing';
7
10
  export * from './sec';
8
11
  export * from './types';
@@ -1,6 +1,9 @@
1
1
  export * from './client';
2
2
  export * from './embed-lifecycle';
3
3
  export * from './error';
4
+ export * from './is-test-team';
5
+ export * from './is-test-user';
6
+ export * from './is-vrp-member';
4
7
  export * from './routing';
5
8
  export * from './sec';
6
9
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC","sourcesContent":["import type { ApiClient } from './types';\n\nexport * from './client';\nexport * from './embed-lifecycle';\nexport * from './error';\nexport type * from './generated/v1';\nexport * from './routing';\nexport * from './sec';\nexport * from './types';\nexport * from './vrt-mcp';\n\nexport type VRPlatformApi = ApiClient;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AAExB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC","sourcesContent":["import type { ApiClient } from './types';\n\nexport * from './client';\nexport * from './embed-lifecycle';\nexport * from './error';\nexport type * from './generated/v1';\nexport * from './is-test-team';\nexport * from './is-test-user';\nexport * from './is-vrp-member';\nexport * from './routing';\nexport * from './sec';\nexport * from './types';\nexport * from './vrt-mcp';\n\nexport type VRPlatformApi = ApiClient;\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const TEST_TEAM_IDS: readonly ["0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa", "fa4d1a20-2f47-4021-9c72-c5a809be9c48", "c4fd21b4-8447-43a2-bdcb-f06a85a935ad", "8f21060e-afe6-410a-b2f4-00a3caa20786"];
2
+ export declare function isTestTeam(team: {
3
+ id: string;
4
+ partnerId?: string | null;
5
+ billingPartnerId?: string | null;
6
+ } | undefined): boolean;
@@ -0,0 +1,14 @@
1
+ const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';
2
+ export const TEST_TEAM_IDS = [
3
+ DEMO_TEST_PARTNER_TENANT_ID,
4
+ 'fa4d1a20-2f47-4021-9c72-c5a809be9c48', // Testing tenant
5
+ 'c4fd21b4-8447-43a2-bdcb-f06a85a935ad', // VRP Automated Testing
6
+ '8f21060e-afe6-410a-b2f4-00a3caa20786', // test_company_xxxx
7
+ ];
8
+ export function isTestTeam(team) {
9
+ if (!team)
10
+ return false;
11
+ return (new Set(TEST_TEAM_IDS).has(team.id) ||
12
+ [team.partnerId, team.billingPartnerId].includes(DEMO_TEST_PARTNER_TENANT_ID));
13
+ }
14
+ //# sourceMappingURL=is-test-team.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-test-team.js","sourceRoot":"src/","sources":["is-test-team.ts"],"names":[],"mappings":"AAAA,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAE3E,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,2BAA2B;IAC3B,sCAAsC,EAAE,iBAAiB;IACzD,sCAAsC,EAAE,wBAAwB;IAChE,sCAAsC,EAAE,oBAAoB;CACpD,CAAC;AAEX,MAAM,UAAU,UAAU,CACxB,IAMa;IAEb,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,OAAO,CACL,IAAI,GAAG,CAAS,aAAa,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC","sourcesContent":["const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';\n\nexport const TEST_TEAM_IDS = [\n DEMO_TEST_PARTNER_TENANT_ID,\n 'fa4d1a20-2f47-4021-9c72-c5a809be9c48', // Testing tenant\n 'c4fd21b4-8447-43a2-bdcb-f06a85a935ad', // VRP Automated Testing\n '8f21060e-afe6-410a-b2f4-00a3caa20786', // test_company_xxxx\n] as const;\n\nexport function isTestTeam(\n team:\n | {\n id: string;\n partnerId?: string | null;\n billingPartnerId?: string | null;\n }\n | undefined\n): boolean {\n if (!team) return false;\n return (\n new Set<string>(TEST_TEAM_IDS).has(team.id) ||\n [team.partnerId, team.billingPartnerId].includes(\n DEMO_TEST_PARTNER_TENANT_ID\n )\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const isTestUser: ({ userEmail, userId, }: {
2
+ userEmail?: string | null;
3
+ userId?: string | null;
4
+ }) => boolean;
@@ -0,0 +1,27 @@
1
+ const E2E_TEST_USER_EMAILS = [
2
+ 'e2e-invite-owner@finalytic.io',
3
+ 'e2e-invite-owner@vrp.rocks',
4
+ 'e2e-invite-member@finalytic.io',
5
+ 'e2e-invite-member@vrp.rocks',
6
+ 'e2e-sign-up-legacy@vrp.rocks',
7
+ 'e2e-sign-up-partner@vrp.rocks',
8
+ 'e2e-sign-up@finalytic.io',
9
+ 'e2e-sign-up@vrp.rocks',
10
+ 'lars+e2e@vrplatform.app',
11
+ 'lars+e2e-gl@vrplatform.app',
12
+ 'lars+checkly@finalytic.co',
13
+ ];
14
+ const E2E_TEST_USERS = {
15
+ 'e2e-invite-member@finalytic.io': '113d73d8-ee21-46b7-a12a-a74f632401ca',
16
+ 'e2e-invite-member@vrp.rocks': '113d73d8-ee21-46b7-a12a-a74f632401ca',
17
+ 'e2e-invite-owner@finalytic.io': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
18
+ 'e2e-invite-owner@vrp.rocks': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
19
+ 'e2e-sign-up-partner@vrp.rocks': '5c8e5572-74d0-4ae6-af73-bca8db9a27e9',
20
+ 'e2e-sign-up@vrp.rocks': '3c8e5572-74d0-4ae6-af73-bca8db9a27e9',
21
+ 'e2e-sign-up@finalytic.io': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
22
+ 'e2e-sign-up-legacy@vrp.rocks': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
23
+ 'lars+checkly@finalytic.co': '9e7dfc88-503c-4222-9905-9116169d2203',
24
+ };
25
+ export const isTestUser = ({ userEmail, userId, }) => Boolean((userId && Object.values(E2E_TEST_USERS).includes(userId)) ||
26
+ (userEmail && Object.keys(E2E_TEST_USERS).includes(userEmail)));
27
+ //# sourceMappingURL=is-test-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-test-user.js","sourceRoot":"src/","sources":["is-test-user.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG;IAC3B,+BAA+B;IAC/B,4BAA4B;IAC5B,gCAAgC;IAChC,6BAA6B;IAC7B,8BAA8B;IAC9B,+BAA+B;IAC/B,0BAA0B;IAC1B,uBAAuB;IACvB,yBAAyB;IACzB,4BAA4B;IAC5B,2BAA2B;CACnB,CAAC;AAEX,MAAM,cAAc,GAEhB;IACF,gCAAgC,EAAE,sCAAsC;IACxE,6BAA6B,EAAE,sCAAsC;IACrE,+BAA+B,EAAE,sCAAsC;IACvE,4BAA4B,EAAE,sCAAsC;IACpE,+BAA+B,EAAE,sCAAsC;IACvE,uBAAuB,EAAE,sCAAsC;IAC/D,0BAA0B,EAAE,sCAAsC;IAClE,8BAA8B,EAAE,sCAAsC;IACtE,2BAA2B,EAAE,sCAAsC;CACpE,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,MAAM,GAIP,EAAE,EAAE,CACH,OAAO,CACL,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAC/D,CAAC","sourcesContent":["const E2E_TEST_USER_EMAILS = [\n 'e2e-invite-owner@finalytic.io',\n 'e2e-invite-owner@vrp.rocks',\n 'e2e-invite-member@finalytic.io',\n 'e2e-invite-member@vrp.rocks',\n 'e2e-sign-up-legacy@vrp.rocks',\n 'e2e-sign-up-partner@vrp.rocks',\n 'e2e-sign-up@finalytic.io',\n 'e2e-sign-up@vrp.rocks',\n 'lars+e2e@vrplatform.app',\n 'lars+e2e-gl@vrplatform.app',\n 'lars+checkly@finalytic.co',\n] as const;\n\nconst E2E_TEST_USERS: Partial<\n Record<(typeof E2E_TEST_USER_EMAILS)[number], string>\n> = {\n 'e2e-invite-member@finalytic.io': '113d73d8-ee21-46b7-a12a-a74f632401ca',\n 'e2e-invite-member@vrp.rocks': '113d73d8-ee21-46b7-a12a-a74f632401ca',\n 'e2e-invite-owner@finalytic.io': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',\n 'e2e-invite-owner@vrp.rocks': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',\n 'e2e-sign-up-partner@vrp.rocks': '5c8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up@vrp.rocks': '3c8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up@finalytic.io': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'e2e-sign-up-legacy@vrp.rocks': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',\n 'lars+checkly@finalytic.co': '9e7dfc88-503c-4222-9905-9116169d2203',\n};\n\nexport const isTestUser = ({\n userEmail,\n userId,\n}: {\n userEmail?: string | null;\n userId?: string | null;\n}) =>\n Boolean(\n (userId && Object.values(E2E_TEST_USERS).includes(userId)) ||\n (userEmail && Object.keys(E2E_TEST_USERS).includes(userEmail))\n );\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const isVrpMember: ({ email, userId, }: {
2
+ email?: string | null;
3
+ userId?: string | null;
4
+ }) => boolean;
@@ -0,0 +1,29 @@
1
+ const VRP_EMAIL_DOMAINS = ['@finalytic.co', '@vrplatform.app'];
2
+ const VRP_EMAILS = [
3
+ 'radek+vrp@setup.inc',
4
+ 'philipp@philipp-achenbach.de',
5
+ 'l.behrenberg@gmail.com',
6
+ 'l.behrenberg+secondary@gmail.com',
7
+ 'adam@ximplifi.com',
8
+ ];
9
+ const VRP_USER_IDS = [
10
+ '3267f329-26d9-471d-86c1-d4c2efab2951',
11
+ '735e1803-13f5-4a90-a02f-2498b3eefa03',
12
+ '1a2bd1ea-88b1-4217-935f-2a8d97c422f9',
13
+ '4b221539-d6cf-4d18-a015-1f3a99fc3c2d',
14
+ '5e9bdcc1-71ae-4e59-87a1-affbfc3ce603',
15
+ '2a40c6c5-c9a2-4d98-a70f-3c6f75bff3e2',
16
+ '31a87570-3917-4e4c-b237-af605ab0094b',
17
+ 'ec78e603-705c-4f1c-9b85-4dc5733c5b85',
18
+ '16b5bd68-8261-4192-a28a-13817b31fede',
19
+ '2e22dcba-73f0-4699-bc48-088209804fe2',
20
+ '840da880-9a3d-43e5-9e2e-d4c74429ed17',
21
+ '9ecc0316-e7dc-4c73-960d-01c2763fb8da',
22
+ '9f6008c7-4df5-4aec-997f-07ecd44a2f79',
23
+ '27dc0d2a-d11a-4fe1-a500-6e0e6350ad04',
24
+ ];
25
+ export const isVrpMember = ({ email, userId, }) => Boolean((email &&
26
+ (VRP_EMAILS.includes(email) ||
27
+ VRP_EMAIL_DOMAINS.some((domain) => email.endsWith(domain)))) ||
28
+ (userId && VRP_USER_IDS.includes(userId)));
29
+ //# sourceMappingURL=is-vrp-member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-vrp-member.js","sourceRoot":"src/","sources":["is-vrp-member.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AAC/D,MAAM,UAAU,GAAG;IACjB,qBAAqB;IACrB,8BAA8B;IAC9B,wBAAwB;IACxB,kCAAkC;IAClC,mBAAmB;CACpB,CAAC;AACF,MAAM,YAAY,GAAG;IACnB,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;IACtC,sCAAsC;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,MAAM,GAIP,EAAE,EAAE,CACH,OAAO,CACL,CAAC,KAAK;IACJ,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAC1C,CAAC","sourcesContent":["const VRP_EMAIL_DOMAINS = ['@finalytic.co', '@vrplatform.app'];\nconst VRP_EMAILS = [\n 'radek+vrp@setup.inc',\n 'philipp@philipp-achenbach.de',\n 'l.behrenberg@gmail.com',\n 'l.behrenberg+secondary@gmail.com',\n 'adam@ximplifi.com',\n];\nconst VRP_USER_IDS = [\n '3267f329-26d9-471d-86c1-d4c2efab2951',\n '735e1803-13f5-4a90-a02f-2498b3eefa03',\n '1a2bd1ea-88b1-4217-935f-2a8d97c422f9',\n '4b221539-d6cf-4d18-a015-1f3a99fc3c2d',\n '5e9bdcc1-71ae-4e59-87a1-affbfc3ce603',\n '2a40c6c5-c9a2-4d98-a70f-3c6f75bff3e2',\n '31a87570-3917-4e4c-b237-af605ab0094b',\n 'ec78e603-705c-4f1c-9b85-4dc5733c5b85',\n '16b5bd68-8261-4192-a28a-13817b31fede',\n '2e22dcba-73f0-4699-bc48-088209804fe2',\n '840da880-9a3d-43e5-9e2e-d4c74429ed17',\n '9ecc0316-e7dc-4c73-960d-01c2763fb8da',\n '9f6008c7-4df5-4aec-997f-07ecd44a2f79',\n '27dc0d2a-d11a-4fe1-a500-6e0e6350ad04',\n];\n\nexport const isVrpMember = ({\n email,\n userId,\n}: {\n email?: string | null;\n userId?: string | null;\n}) =>\n Boolean(\n (email &&\n (VRP_EMAILS.includes(email) ||\n VRP_EMAIL_DOMAINS.some((domain) => email.endsWith(domain)))) ||\n (userId && VRP_USER_IDS.includes(userId))\n );\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.3.1-stage.602",
6
+ "version": "1.3.1-stage.604",
7
7
  "description": "",
8
8
  "main": "build/main/index.js",
9
9
  "module": "build/module/index.js",
package/src/index.ts CHANGED
@@ -4,6 +4,9 @@ export * from './client';
4
4
  export * from './embed-lifecycle';
5
5
  export * from './error';
6
6
  export type * from './generated/v1';
7
+ export * from './is-test-team';
8
+ export * from './is-test-user';
9
+ export * from './is-vrp-member';
7
10
  export * from './routing';
8
11
  export * from './sec';
9
12
  export * from './types';
@@ -0,0 +1,26 @@
1
+ const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';
2
+
3
+ export const TEST_TEAM_IDS = [
4
+ DEMO_TEST_PARTNER_TENANT_ID,
5
+ 'fa4d1a20-2f47-4021-9c72-c5a809be9c48', // Testing tenant
6
+ 'c4fd21b4-8447-43a2-bdcb-f06a85a935ad', // VRP Automated Testing
7
+ '8f21060e-afe6-410a-b2f4-00a3caa20786', // test_company_xxxx
8
+ ] as const;
9
+
10
+ export function isTestTeam(
11
+ team:
12
+ | {
13
+ id: string;
14
+ partnerId?: string | null;
15
+ billingPartnerId?: string | null;
16
+ }
17
+ | undefined
18
+ ): boolean {
19
+ if (!team) return false;
20
+ return (
21
+ new Set<string>(TEST_TEAM_IDS).has(team.id) ||
22
+ [team.partnerId, team.billingPartnerId].includes(
23
+ DEMO_TEST_PARTNER_TENANT_ID
24
+ )
25
+ );
26
+ }
@@ -0,0 +1,39 @@
1
+ const E2E_TEST_USER_EMAILS = [
2
+ 'e2e-invite-owner@finalytic.io',
3
+ 'e2e-invite-owner@vrp.rocks',
4
+ 'e2e-invite-member@finalytic.io',
5
+ 'e2e-invite-member@vrp.rocks',
6
+ 'e2e-sign-up-legacy@vrp.rocks',
7
+ 'e2e-sign-up-partner@vrp.rocks',
8
+ 'e2e-sign-up@finalytic.io',
9
+ 'e2e-sign-up@vrp.rocks',
10
+ 'lars+e2e@vrplatform.app',
11
+ 'lars+e2e-gl@vrplatform.app',
12
+ 'lars+checkly@finalytic.co',
13
+ ] as const;
14
+
15
+ const E2E_TEST_USERS: Partial<
16
+ Record<(typeof E2E_TEST_USER_EMAILS)[number], string>
17
+ > = {
18
+ 'e2e-invite-member@finalytic.io': '113d73d8-ee21-46b7-a12a-a74f632401ca',
19
+ 'e2e-invite-member@vrp.rocks': '113d73d8-ee21-46b7-a12a-a74f632401ca',
20
+ 'e2e-invite-owner@finalytic.io': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
21
+ 'e2e-invite-owner@vrp.rocks': '917b7c4e-cb03-491c-9e94-d33a5bdeca05',
22
+ 'e2e-sign-up-partner@vrp.rocks': '5c8e5572-74d0-4ae6-af73-bca8db9a27e9',
23
+ 'e2e-sign-up@vrp.rocks': '3c8e5572-74d0-4ae6-af73-bca8db9a27e9',
24
+ 'e2e-sign-up@finalytic.io': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
25
+ 'e2e-sign-up-legacy@vrp.rocks': 'ec8e5572-74d0-4ae6-af73-bca8db9a27e9',
26
+ 'lars+checkly@finalytic.co': '9e7dfc88-503c-4222-9905-9116169d2203',
27
+ };
28
+
29
+ export const isTestUser = ({
30
+ userEmail,
31
+ userId,
32
+ }: {
33
+ userEmail?: string | null;
34
+ userId?: string | null;
35
+ }) =>
36
+ Boolean(
37
+ (userId && Object.values(E2E_TEST_USERS).includes(userId)) ||
38
+ (userEmail && Object.keys(E2E_TEST_USERS).includes(userEmail))
39
+ );
@@ -0,0 +1,38 @@
1
+ const VRP_EMAIL_DOMAINS = ['@finalytic.co', '@vrplatform.app'];
2
+ const VRP_EMAILS = [
3
+ 'radek+vrp@setup.inc',
4
+ 'philipp@philipp-achenbach.de',
5
+ 'l.behrenberg@gmail.com',
6
+ 'l.behrenberg+secondary@gmail.com',
7
+ 'adam@ximplifi.com',
8
+ ];
9
+ const VRP_USER_IDS = [
10
+ '3267f329-26d9-471d-86c1-d4c2efab2951',
11
+ '735e1803-13f5-4a90-a02f-2498b3eefa03',
12
+ '1a2bd1ea-88b1-4217-935f-2a8d97c422f9',
13
+ '4b221539-d6cf-4d18-a015-1f3a99fc3c2d',
14
+ '5e9bdcc1-71ae-4e59-87a1-affbfc3ce603',
15
+ '2a40c6c5-c9a2-4d98-a70f-3c6f75bff3e2',
16
+ '31a87570-3917-4e4c-b237-af605ab0094b',
17
+ 'ec78e603-705c-4f1c-9b85-4dc5733c5b85',
18
+ '16b5bd68-8261-4192-a28a-13817b31fede',
19
+ '2e22dcba-73f0-4699-bc48-088209804fe2',
20
+ '840da880-9a3d-43e5-9e2e-d4c74429ed17',
21
+ '9ecc0316-e7dc-4c73-960d-01c2763fb8da',
22
+ '9f6008c7-4df5-4aec-997f-07ecd44a2f79',
23
+ '27dc0d2a-d11a-4fe1-a500-6e0e6350ad04',
24
+ ];
25
+
26
+ export const isVrpMember = ({
27
+ email,
28
+ userId,
29
+ }: {
30
+ email?: string | null;
31
+ userId?: string | null;
32
+ }) =>
33
+ Boolean(
34
+ (email &&
35
+ (VRP_EMAILS.includes(email) ||
36
+ VRP_EMAIL_DOMAINS.some((domain) => email.endsWith(domain)))) ||
37
+ (userId && VRP_USER_IDS.includes(userId))
38
+ );