@vrplatform/api 1.3.1-stage.39977793874 → 1.3.1-stage.39979879592

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.
@@ -4,3 +4,15 @@ export declare function isTestTeam(team: {
4
4
  partnerId?: string | null;
5
5
  billingPartnerId?: string | null;
6
6
  } | undefined): boolean;
7
+ type TestTeamReference = {
8
+ id: string;
9
+ partnerId?: string | null;
10
+ billingPartnerId?: string | null;
11
+ } | null | undefined;
12
+ /**
13
+ * A team is a test team when it, its accounting partner or its billing
14
+ * partner is one by `isTestTeam`. Partners are checked without recursion.
15
+ * Hyperline bills these teams in Sandbox.
16
+ */
17
+ export declare function isTestTeamWithPartners(team: TestTeamReference, partner: TestTeamReference, billingPartner: TestTeamReference): boolean;
18
+ export {};
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TEST_TEAM_IDS = void 0;
4
4
  exports.isTestTeam = isTestTeam;
5
+ exports.isTestTeamWithPartners = isTestTeamWithPartners;
5
6
  const DEMO_TEST_PARTNER_TENANT_ID = '0b6a7bd6-56cc-46b5-b2ab-1bd7d1e994fa';
6
7
  exports.TEST_TEAM_IDS = [
7
8
  DEMO_TEST_PARTNER_TENANT_ID,
@@ -15,4 +16,12 @@ function isTestTeam(team) {
15
16
  return (new Set(exports.TEST_TEAM_IDS).has(team.id) ||
16
17
  [team.partnerId, team.billingPartnerId].includes(DEMO_TEST_PARTNER_TENANT_ID));
17
18
  }
19
+ /**
20
+ * A team is a test team when it, its accounting partner or its billing
21
+ * partner is one by `isTestTeam`. Partners are checked without recursion.
22
+ * Hyperline bills these teams in Sandbox.
23
+ */
24
+ function isTestTeamWithPartners(team, partner, billingPartner) {
25
+ return [team, partner, billingPartner].some((reference) => isTestTeam(reference ?? undefined));
26
+ }
18
27
  //# sourceMappingURL=is-test-team.js.map
@@ -1 +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"]}
1
+ {"version":3,"file":"is-test-team.js","sourceRoot":"src/","sources":["is-test-team.ts"],"names":[],"mappings":";;;AASA,gCAgBC;AAgBD,wDAQC;AAjDD,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;AAWD;;;;GAIG;AACH,SAAgB,sBAAsB,CACpC,IAAuB,EACvB,OAA0B,EAC1B,cAAiC;IAEjC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACxD,UAAU,CAAC,SAAS,IAAI,SAAS,CAAC,CACnC,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\ntype TestTeamReference =\n | {\n id: string;\n partnerId?: string | null;\n billingPartnerId?: string | null;\n }\n | null\n | undefined;\n\n/**\n * A team is a test team when it, its accounting partner or its billing\n * partner is one by `isTestTeam`. Partners are checked without recursion.\n * Hyperline bills these teams in Sandbox.\n */\nexport function isTestTeamWithPartners(\n team: TestTeamReference,\n partner: TestTeamReference,\n billingPartner: TestTeamReference\n): boolean {\n return [team, partner, billingPartner].some((reference) =>\n isTestTeam(reference ?? undefined)\n );\n}\n"]}
@@ -4,3 +4,15 @@ export declare function isTestTeam(team: {
4
4
  partnerId?: string | null;
5
5
  billingPartnerId?: string | null;
6
6
  } | undefined): boolean;
7
+ type TestTeamReference = {
8
+ id: string;
9
+ partnerId?: string | null;
10
+ billingPartnerId?: string | null;
11
+ } | null | undefined;
12
+ /**
13
+ * A team is a test team when it, its accounting partner or its billing
14
+ * partner is one by `isTestTeam`. Partners are checked without recursion.
15
+ * Hyperline bills these teams in Sandbox.
16
+ */
17
+ export declare function isTestTeamWithPartners(team: TestTeamReference, partner: TestTeamReference, billingPartner: TestTeamReference): boolean;
18
+ export {};
@@ -11,4 +11,12 @@ export function isTestTeam(team) {
11
11
  return (new Set(TEST_TEAM_IDS).has(team.id) ||
12
12
  [team.partnerId, team.billingPartnerId].includes(DEMO_TEST_PARTNER_TENANT_ID));
13
13
  }
14
+ /**
15
+ * A team is a test team when it, its accounting partner or its billing
16
+ * partner is one by `isTestTeam`. Partners are checked without recursion.
17
+ * Hyperline bills these teams in Sandbox.
18
+ */
19
+ export function isTestTeamWithPartners(team, partner, billingPartner) {
20
+ return [team, partner, billingPartner].some((reference) => isTestTeam(reference ?? undefined));
21
+ }
14
22
  //# sourceMappingURL=is-test-team.js.map
@@ -1 +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"]}
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;AAWD;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAuB,EACvB,OAA0B,EAC1B,cAAiC;IAEjC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CACxD,UAAU,CAAC,SAAS,IAAI,SAAS,CAAC,CACnC,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\ntype TestTeamReference =\n | {\n id: string;\n partnerId?: string | null;\n billingPartnerId?: string | null;\n }\n | null\n | undefined;\n\n/**\n * A team is a test team when it, its accounting partner or its billing\n * partner is one by `isTestTeam`. Partners are checked without recursion.\n * Hyperline bills these teams in Sandbox.\n */\nexport function isTestTeamWithPartners(\n team: TestTeamReference,\n partner: TestTeamReference,\n billingPartner: TestTeamReference\n): boolean {\n return [team, partner, billingPartner].some((reference) =>\n isTestTeam(reference ?? undefined)\n );\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.39977793874",
6
+ "version": "1.3.1-stage.39979879592",
7
7
  "description": "",
8
8
  "main": "build/main/index.js",
9
9
  "module": "build/module/index.js",
@@ -24,3 +24,27 @@ export function isTestTeam(
24
24
  )
25
25
  );
26
26
  }
27
+
28
+ type TestTeamReference =
29
+ | {
30
+ id: string;
31
+ partnerId?: string | null;
32
+ billingPartnerId?: string | null;
33
+ }
34
+ | null
35
+ | undefined;
36
+
37
+ /**
38
+ * A team is a test team when it, its accounting partner or its billing
39
+ * partner is one by `isTestTeam`. Partners are checked without recursion.
40
+ * Hyperline bills these teams in Sandbox.
41
+ */
42
+ export function isTestTeamWithPartners(
43
+ team: TestTeamReference,
44
+ partner: TestTeamReference,
45
+ billingPartner: TestTeamReference
46
+ ): boolean {
47
+ return [team, partner, billingPartner].some((reference) =>
48
+ isTestTeam(reference ?? undefined)
49
+ );
50
+ }