@wildo-ai/saas-specifications 1.1.8 → 1.1.9
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.
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +9 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
- package/dist/esm/_core/application-specification-family-identity.schemas.js +9 -0
- package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-name-choice.d.ts +136 -0
- package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-choice.js +193 -0
- package/dist/esm/_core/brand/brand-name-choice.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +108 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +59 -0
- package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +51 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.js +157 -0
- package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-view.d.ts +120 -0
- package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening-view.js +47 -0
- package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts +3 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.js +42 -0
- package/dist/esm/_core/brand/brand-name-screening.family-aspects.js.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +310 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.js +272 -0
- package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -0
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -0
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.js +32 -0
- package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +10 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +57 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +89 -0
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +79 -19
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +61 -11
- package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js +18 -2
- package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +28 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +53 -5
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +24 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +64 -4
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +59 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js +64 -0
- package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js.map +1 -1
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +3 -0
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +16 -0
- package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +7 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition-validation.js +34 -28
- package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +75 -4
- package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js +62 -4
- package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +7 -0
- package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +153 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +241 -0
- package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -0
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +8 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +19 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +61 -3
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +73 -3
- package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js +1 -0
- package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
- package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
- package/dist/esm/_core/family-aspects.registry.js +2 -0
- package/dist/esm/_core/family-aspects.registry.js.map +1 -1
- package/dist/esm/_core/index.d.ts +6 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +6 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +5 -1
- package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.d.ts +7 -0
- package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-icp.schemas.js +7 -0
- package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-language-coverage.d.ts +62 -0
- package/dist/esm/_core/market/market-language-coverage.d.ts.map +1 -0
- package/dist/esm/_core/market/market-language-coverage.js +48 -0
- package/dist/esm/_core/market/market-language-coverage.js.map +1 -0
- package/dist/esm/_core/market/market-snapshot-validation.js +2 -2
- package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +63 -2
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +73 -5
- package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-line.application-creation.schemas.js +2 -0
- package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +28 -0
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +19 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
- package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation.exports.d.ts +7 -0
- package/dist/esm/application-creation.exports.d.ts.map +1 -1
- package/dist/esm/application-creation.exports.js +7 -0
- package/dist/esm/application-creation.exports.js.map +1 -1
- package/dist/esm/assurance/application-risk-signals.derivations.d.ts +20 -0
- package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
- package/dist/esm/assurance/application-risk-signals.derivations.js +81 -0
- package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
- package/dist/esm/assurance/governed-document-release.d.ts +9 -0
- package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
- package/dist/esm/assurance/governed-document-release.js +9 -0
- package/dist/esm/assurance/governed-document-release.js.map +1 -1
- package/dist/esm/companion-exports.d.ts +10 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +1 -0
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +0 -24
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +0 -1
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +0 -24
- package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BrandNameCandidateOrigin, type BrandNameScreening } from './brand-name-screening.schemas';
|
|
3
|
+
/** The ref prefix every candidate carries. */
|
|
4
|
+
export declare const BRAND_NAME_CANDIDATE_REF_PREFIX = "name-";
|
|
5
|
+
/**
|
|
6
|
+
* Strict provider-facing candidate: a semantic slug instead of the ref, which the trusted runtime stamps.
|
|
7
|
+
* There is no outcome field to fill in — the standing is derived from the queries — so the provider can
|
|
8
|
+
* only report what each register returned, never summarize it.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BrandNameCandidateGenerationSchema: z.ZodObject<{
|
|
11
|
+
slug: z.ZodString;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
origin: z.ZodEnum<typeof BrandNameCandidateOrigin>;
|
|
14
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
15
|
+
trademarkQueries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
16
|
+
register: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkRegister>>;
|
|
17
|
+
jurisdictionsCovered: z.ZodArray<z.ZodString>;
|
|
18
|
+
niceClassesSearched: z.ZodArray<z.ZodNumber>;
|
|
19
|
+
matchTypesSearched: z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>>;
|
|
20
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkQueryOutcome>>;
|
|
21
|
+
conflictingMarks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
22
|
+
mark: z.ZodString;
|
|
23
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
24
|
+
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
25
|
+
niceClasses: z.ZodArray<z.ZodNumber>;
|
|
26
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameConflictingMarkStatus>>;
|
|
27
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
28
|
+
sourceUrl: z.ZodURL;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
sourceUrl: z.ZodURL;
|
|
31
|
+
checkedOn: z.ZodISODate;
|
|
32
|
+
note: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
competitorCollisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
35
|
+
alternativeRef: z.ZodOptional<z.ZodString>;
|
|
36
|
+
competitorName: z.ZodString;
|
|
37
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
39
|
+
domainSignals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
40
|
+
domain: z.ZodString;
|
|
41
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameDomainStatus>>;
|
|
42
|
+
checkedOn: z.ZodISODate;
|
|
43
|
+
sourceUrl: z.ZodOptional<z.ZodURL>;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
sameCategoryUses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
sourceUrl: z.ZodURL;
|
|
48
|
+
note: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type BrandNameCandidateGeneration = z.infer<typeof BrandNameCandidateGenerationSchema>;
|
|
52
|
+
/** One complete provider response for the brand-name-screening family. */
|
|
53
|
+
export declare const BrandNameScreeningGenerationSchema: z.ZodObject<{
|
|
54
|
+
screenedOn: z.ZodISODate;
|
|
55
|
+
jurisdictions: z.ZodArray<z.ZodObject<{
|
|
56
|
+
code: z.ZodString;
|
|
57
|
+
derivedFrom: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
niceClasses: z.ZodArray<z.ZodObject<{
|
|
60
|
+
classNumber: z.ZodNumber;
|
|
61
|
+
rationale: z.ZodString;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
64
|
+
slug: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
origin: z.ZodEnum<typeof BrandNameCandidateOrigin>;
|
|
67
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
68
|
+
trademarkQueries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
69
|
+
register: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkRegister>>;
|
|
70
|
+
jurisdictionsCovered: z.ZodArray<z.ZodString>;
|
|
71
|
+
niceClassesSearched: z.ZodArray<z.ZodNumber>;
|
|
72
|
+
matchTypesSearched: z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>>;
|
|
73
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkQueryOutcome>>;
|
|
74
|
+
conflictingMarks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
75
|
+
mark: z.ZodString;
|
|
76
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
77
|
+
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
78
|
+
niceClasses: z.ZodArray<z.ZodNumber>;
|
|
79
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameConflictingMarkStatus>>;
|
|
80
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
81
|
+
sourceUrl: z.ZodURL;
|
|
82
|
+
}, z.core.$strip>>>;
|
|
83
|
+
sourceUrl: z.ZodURL;
|
|
84
|
+
checkedOn: z.ZodISODate;
|
|
85
|
+
note: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
competitorCollisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
88
|
+
alternativeRef: z.ZodOptional<z.ZodString>;
|
|
89
|
+
competitorName: z.ZodString;
|
|
90
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
91
|
+
}, z.core.$strip>>>;
|
|
92
|
+
domainSignals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
93
|
+
domain: z.ZodString;
|
|
94
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameDomainStatus>>;
|
|
95
|
+
checkedOn: z.ZodISODate;
|
|
96
|
+
sourceUrl: z.ZodOptional<z.ZodURL>;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
sameCategoryUses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
sourceUrl: z.ZodURL;
|
|
101
|
+
note: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>>>;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export type BrandNameScreeningGeneration = z.infer<typeof BrandNameScreeningGenerationSchema>;
|
|
106
|
+
/** Normalize strict provider output into the persisted family (stamping refs and version). */
|
|
107
|
+
export declare function parseBrandNameScreeningGeneration(input: unknown): BrandNameScreening;
|
|
108
|
+
//# sourceMappingURL=brand-name-screening-generation.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-name-screening-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EACL,wBAAwB,EAUxB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAExC,8CAA8C;AAC9C,eAAO,MAAM,+BAA+B,UAAU,CAAC;AAIvD;;;;GAIG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,0EAA0E;AAC1E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkB7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,8FAA8F;AAC9F,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAYpF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { applyFamilyRefPrefix } from '../utils/family-ref-stamping.js';
|
|
3
|
+
import { NonEmptyStringSchema } from '../market/market-references.schemas.js';
|
|
4
|
+
import { BrandNameCandidateOrigin, BrandNameCompetitorCollisionSchema, BrandNameDomainSignalSchema, BrandNameSameCategoryUseSchema, BrandNameScreeningJurisdictionSchema, BrandNameScreeningNiceClassSchema, BrandNameScreeningSchema, BrandNameScreeningVersion, BrandNameTrademarkQuerySchema, normalizeBrandNameForComparison, } from './brand-name-screening.schemas.js';
|
|
5
|
+
/** The ref prefix every candidate carries. */
|
|
6
|
+
export const BRAND_NAME_CANDIDATE_REF_PREFIX = 'name-';
|
|
7
|
+
const SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
8
|
+
/**
|
|
9
|
+
* Strict provider-facing candidate: a semantic slug instead of the ref, which the trusted runtime stamps.
|
|
10
|
+
* There is no outcome field to fill in — the standing is derived from the queries — so the provider can
|
|
11
|
+
* only report what each register returned, never summarize it.
|
|
12
|
+
*/
|
|
13
|
+
export const BrandNameCandidateGenerationSchema = z.strictObject({
|
|
14
|
+
slug: SlugSchema,
|
|
15
|
+
name: NonEmptyStringSchema,
|
|
16
|
+
origin: z.enum(BrandNameCandidateOrigin),
|
|
17
|
+
rationale: NonEmptyStringSchema.optional(),
|
|
18
|
+
trademarkQueries: z.array(BrandNameTrademarkQuerySchema).default([]),
|
|
19
|
+
competitorCollisions: z.array(BrandNameCompetitorCollisionSchema).default([]),
|
|
20
|
+
domainSignals: z.array(BrandNameDomainSignalSchema).default([]),
|
|
21
|
+
sameCategoryUses: z.array(BrandNameSameCategoryUseSchema).default([]),
|
|
22
|
+
});
|
|
23
|
+
/** One complete provider response for the brand-name-screening family. */
|
|
24
|
+
export const BrandNameScreeningGenerationSchema = z.strictObject({
|
|
25
|
+
screenedOn: z.iso.date(),
|
|
26
|
+
jurisdictions: z.array(BrandNameScreeningJurisdictionSchema).min(1),
|
|
27
|
+
niceClasses: z.array(BrandNameScreeningNiceClassSchema).min(1),
|
|
28
|
+
candidates: z.array(BrandNameCandidateGenerationSchema).min(1),
|
|
29
|
+
}).superRefine((generated, context) => {
|
|
30
|
+
// Keyed on the STAMPED ref and on the comparable NAME: two slugs that stamp to one ref, or two spellings of
|
|
31
|
+
// one name, would make the choice computed from this screening ambiguous.
|
|
32
|
+
const refs = new Set();
|
|
33
|
+
const names = new Set();
|
|
34
|
+
generated.candidates.forEach((candidate, index) => {
|
|
35
|
+
const ref = applyFamilyRefPrefix(candidate.slug, BRAND_NAME_CANDIDATE_REF_PREFIX);
|
|
36
|
+
if (refs.has(ref))
|
|
37
|
+
context.addIssue({ code: 'custom', message: `duplicate candidate slug ${candidate.slug} (normalizes to ${ref})`, path: ['candidates', index, 'slug'] });
|
|
38
|
+
refs.add(ref);
|
|
39
|
+
const name = normalizeBrandNameForComparison(candidate.name);
|
|
40
|
+
if (names.has(name))
|
|
41
|
+
context.addIssue({ code: 'custom', message: `"${candidate.name}" is listed twice`, path: ['candidates', index, 'name'] });
|
|
42
|
+
names.add(name);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
/** Normalize strict provider output into the persisted family (stamping refs and version). */
|
|
46
|
+
export function parseBrandNameScreeningGeneration(input) {
|
|
47
|
+
const generated = BrandNameScreeningGenerationSchema.parse(input);
|
|
48
|
+
return BrandNameScreeningSchema.parse({
|
|
49
|
+
version: BrandNameScreeningVersion.V1,
|
|
50
|
+
screenedOn: generated.screenedOn,
|
|
51
|
+
jurisdictions: generated.jurisdictions,
|
|
52
|
+
niceClasses: generated.niceClasses,
|
|
53
|
+
candidates: generated.candidates.map(({ slug, ...candidate }) => ({
|
|
54
|
+
ref: applyFamilyRefPrefix(slug, BRAND_NAME_CANDIDATE_REF_PREFIX),
|
|
55
|
+
...candidate,
|
|
56
|
+
})),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=brand-name-screening-generation.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-name-screening-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC9B,oCAAoC,EACpC,iCAAiC,EACjC,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,GAEhC,MAAM,gCAAgC,CAAC;AAExC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,+BAA+B,GAAG,OAAO,CAAC;AAEvD,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/D,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC;IACxC,SAAS,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC1C,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACpE,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,OAAO,C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GAAG,CAAC,GAAG,CAAC,CAAC;QACd,MAAM,IAAI,GAAG,+BAA+B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,SAAS,CAAC,IAAI,mBAAmB,EAAE,IAAI,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/I,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAGH,8FAA8F;AAC9F,MAAM,UAAU,iCAAiC,CAAC,KAAc;IAC9D,MAAM,SAAS,GAAG,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,wBAAwB,CAAC,KAAK,CAAC;QACpC,OAAO,EAAE,yBAAyB,CAAC,EAAE;QACrC,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;YAChE,GAAG,EAAE,oBAAoB,CAAC,IAAI,EAAE,+BAA+B,CAAC;YAChE,GAAG,SAAS;SACb,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { applyFamilyRefPrefix } from '../utils/family-ref-stamping';\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\nimport {\n BrandNameCandidateOrigin,\n BrandNameCompetitorCollisionSchema,\n BrandNameDomainSignalSchema,\n BrandNameSameCategoryUseSchema,\n BrandNameScreeningJurisdictionSchema,\n BrandNameScreeningNiceClassSchema,\n BrandNameScreeningSchema,\n BrandNameScreeningVersion,\n BrandNameTrademarkQuerySchema,\n normalizeBrandNameForComparison,\n type BrandNameScreening,\n} from './brand-name-screening.schemas';\n\n/** The ref prefix every candidate carries. */\nexport const BRAND_NAME_CANDIDATE_REF_PREFIX = 'name-';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n\n/**\n * Strict provider-facing candidate: a semantic slug instead of the ref, which the trusted runtime stamps.\n * There is no outcome field to fill in — the standing is derived from the queries — so the provider can\n * only report what each register returned, never summarize it.\n */\nexport const BrandNameCandidateGenerationSchema = z.strictObject({\n slug: SlugSchema,\n name: NonEmptyStringSchema,\n origin: z.enum(BrandNameCandidateOrigin),\n rationale: NonEmptyStringSchema.optional(),\n trademarkQueries: z.array(BrandNameTrademarkQuerySchema).default([]),\n competitorCollisions: z.array(BrandNameCompetitorCollisionSchema).default([]),\n domainSignals: z.array(BrandNameDomainSignalSchema).default([]),\n sameCategoryUses: z.array(BrandNameSameCategoryUseSchema).default([]),\n});\nexport type BrandNameCandidateGeneration = z.infer<typeof BrandNameCandidateGenerationSchema>;\n\n/** One complete provider response for the brand-name-screening family. */\nexport const BrandNameScreeningGenerationSchema = z.strictObject({\n screenedOn: z.iso.date(),\n jurisdictions: z.array(BrandNameScreeningJurisdictionSchema).min(1),\n niceClasses: z.array(BrandNameScreeningNiceClassSchema).min(1),\n candidates: z.array(BrandNameCandidateGenerationSchema).min(1),\n}).superRefine((generated, context) => {\n // Keyed on the STAMPED ref and on the comparable NAME: two slugs that stamp to one ref, or two spellings of\n // one name, would make the choice computed from this screening ambiguous.\n const refs = new Set<string>();\n const names = new Set<string>();\n generated.candidates.forEach((candidate, index) => {\n const ref = applyFamilyRefPrefix(candidate.slug, BRAND_NAME_CANDIDATE_REF_PREFIX);\n if (refs.has(ref)) context.addIssue({ code: 'custom', message: `duplicate candidate slug ${candidate.slug} (normalizes to ${ref})`, path: ['candidates', index, 'slug'] });\n refs.add(ref);\n const name = normalizeBrandNameForComparison(candidate.name);\n if (names.has(name)) context.addIssue({ code: 'custom', message: `\"${candidate.name}\" is listed twice`, path: ['candidates', index, 'name'] });\n names.add(name);\n });\n});\nexport type BrandNameScreeningGeneration = z.infer<typeof BrandNameScreeningGenerationSchema>;\n\n/** Normalize strict provider output into the persisted family (stamping refs and version). */\nexport function parseBrandNameScreeningGeneration(input: unknown): BrandNameScreening {\n const generated = BrandNameScreeningGenerationSchema.parse(input);\n return BrandNameScreeningSchema.parse({\n version: BrandNameScreeningVersion.V1,\n screenedOn: generated.screenedOn,\n jurisdictions: generated.jurisdictions,\n niceClasses: generated.niceClasses,\n candidates: generated.candidates.map(({ slug, ...candidate }) => ({\n ref: applyFamilyRefPrefix(slug, BRAND_NAME_CANDIDATE_REF_PREFIX),\n ...candidate,\n })),\n });\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BrandNameScreening } from './brand-name-screening.schemas';
|
|
2
|
+
/** Deterministic finding over a brand-name screening. */
|
|
3
|
+
export declare enum BrandNameScreeningFindingCode {
|
|
4
|
+
/** A query says CONFLICT and names no mark — a verdict with nothing behind it. */
|
|
5
|
+
CONFLICT_WITHOUT_MARK = "CONFLICT_WITHOUT_MARK",
|
|
6
|
+
/** A query names a live mark and does not say CONFLICT — the mark is there, so the name is not clear. */
|
|
7
|
+
MARK_WITHOUT_CONFLICT = "MARK_WITHOUT_CONFLICT",
|
|
8
|
+
/** Two candidates spell the same name, so a choice between them is ambiguous. */
|
|
9
|
+
DUPLICATE_CANDIDATE_NAME = "DUPLICATE_CANDIDATE_NAME",
|
|
10
|
+
/** Two candidates share one ref. */
|
|
11
|
+
DUPLICATE_CANDIDATE_REF = "DUPLICATE_CANDIDATE_REF",
|
|
12
|
+
/**
|
|
13
|
+
* Fewer than three companion-proposed names survive the screening's OWN records (conflicts and recorded
|
|
14
|
+
* competitor collisions), so the creator has little to choose from. A screening alone cannot see the market,
|
|
15
|
+
* so the count of what is actually OFFERED is the coherence report's (`brand-name-few-offerable-proposals`).
|
|
16
|
+
*/
|
|
17
|
+
FEWER_THAN_THREE_OFFERABLE_PROPOSALS = "FEWER_THAN_THREE_OFFERABLE_PROPOSALS",
|
|
18
|
+
/** A target in an EU member state, and the EU trade mark is not among the jurisdictions searched. */
|
|
19
|
+
EU_TRADE_MARK_NOT_DECLARED = "EU_TRADE_MARK_NOT_DECLARED",
|
|
20
|
+
/** Class 9 or 42 is not searched, though every software product lives in both. */
|
|
21
|
+
SOFTWARE_CLASS_NOT_SEARCHED = "SOFTWARE_CLASS_NOT_SEARCHED",
|
|
22
|
+
/** A candidate is not covered in every jurisdiction, class and match type, or a register could not be read. */
|
|
23
|
+
CANDIDATE_SCREENING_INCOMPLETE = "CANDIDATE_SCREENING_INCOMPLETE",
|
|
24
|
+
/** A companion-proposed candidate conflicts with a live mark or a named competitor; it is kept as a record and never offered. */
|
|
25
|
+
PROPOSED_CANDIDATE_CONFLICTS = "PROPOSED_CANDIDATE_CONFLICTS",
|
|
26
|
+
/** A companion-proposed candidate says nothing about why it fits the product. */
|
|
27
|
+
PROPOSED_CANDIDATE_WITHOUT_RATIONALE = "PROPOSED_CANDIDATE_WITHOUT_RATIONALE",
|
|
28
|
+
/** A conflicting mark is in none of the classes its query searched — it cannot be a conflict this screening found. */
|
|
29
|
+
MARK_OUTSIDE_SEARCHED_CLASSES = "MARK_OUTSIDE_SEARCHED_CLASSES",
|
|
30
|
+
/** A national-office query claims to cover the EU trade mark or international registrations. */
|
|
31
|
+
NATIONAL_OFFICE_COVERS_SUPRANATIONAL = "NATIONAL_OFFICE_COVERS_SUPRANATIONAL"
|
|
32
|
+
}
|
|
33
|
+
export interface BrandNameScreeningFinding {
|
|
34
|
+
readonly code: BrandNameScreeningFindingCode;
|
|
35
|
+
readonly candidateRef: string | null;
|
|
36
|
+
readonly message: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The findings that block a landing — only those that make the screening UNTRUE.
|
|
40
|
+
*
|
|
41
|
+
* A conflict naming no mark, or a mark recorded beside a clear verdict, is a record that contradicts
|
|
42
|
+
* itself; a duplicate name makes the choice it feeds ambiguous. Everything else — an incomplete screening,
|
|
43
|
+
* a conflicting proposal kept for the record, a thin shortlist — is TRUE and unfinished, so it travels
|
|
44
|
+
* with the artifact for the creator's review rather than stopping it (`application-creation-directive.md`:
|
|
45
|
+
* only a lie refuses).
|
|
46
|
+
*/
|
|
47
|
+
export declare const BRAND_NAME_SCREENING_HARD_FLOOR_CODES: readonly BrandNameScreeningFindingCode[];
|
|
48
|
+
/** Minimum number of companion-proposed names that should survive the screening. */
|
|
49
|
+
export declare const MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS = 3;
|
|
50
|
+
export declare function validateBrandNameScreening(screening: BrandNameScreening): readonly BrandNameScreeningFinding[];
|
|
51
|
+
//# sourceMappingURL=brand-name-screening-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-name-screening-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAExC,yDAAyD;AACzD,oBAAY,6BAA6B;IACvC,kFAAkF;IAClF,qBAAqB,0BAA0B;IAC/C,yGAAyG;IACzG,qBAAqB,0BAA0B;IAC/C,iFAAiF;IACjF,wBAAwB,6BAA6B;IACrD,oCAAoC;IACpC,uBAAuB,4BAA4B;IACnD;;;;OAIG;IACH,oCAAoC,yCAAyC;IAC7E,qGAAqG;IACrG,0BAA0B,+BAA+B;IACzD,kFAAkF;IAClF,2BAA2B,gCAAgC;IAC3D,+GAA+G;IAC/G,8BAA8B,mCAAmC;IACjE,iIAAiI;IACjI,4BAA4B,iCAAiC;IAC7D,iFAAiF;IACjF,oCAAoC,yCAAyC;IAC7E,sHAAsH;IACtH,6BAA6B,kCAAkC;IAC/D,gGAAgG;IAChG,oCAAoC,yCAAyC;CAC9E;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qCAAqC,EAAE,SAAS,6BAA6B,EAKzF,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,yBAAyB,EAAE,CA0G9G"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { BrandNameCandidateOrigin, BrandNameTrademarkOutcome, BrandNameTrademarkQueryOutcome, BrandNameTrademarkRegister, EU_MEMBER_STATE_CODES, EU_TRADE_MARK_JURISDICTION, INTERNATIONAL_REGISTRATION_JURISDICTION, SOFTWARE_NICE_CLASSES, deriveBrandNameTrademarkOutcome, normalizeBrandNameForComparison, uncoveredBrandNameJurisdictions, } from './brand-name-screening.schemas.js';
|
|
2
|
+
/** Deterministic finding over a brand-name screening. */
|
|
3
|
+
export var BrandNameScreeningFindingCode;
|
|
4
|
+
(function (BrandNameScreeningFindingCode) {
|
|
5
|
+
/** A query says CONFLICT and names no mark — a verdict with nothing behind it. */
|
|
6
|
+
BrandNameScreeningFindingCode["CONFLICT_WITHOUT_MARK"] = "CONFLICT_WITHOUT_MARK";
|
|
7
|
+
/** A query names a live mark and does not say CONFLICT — the mark is there, so the name is not clear. */
|
|
8
|
+
BrandNameScreeningFindingCode["MARK_WITHOUT_CONFLICT"] = "MARK_WITHOUT_CONFLICT";
|
|
9
|
+
/** Two candidates spell the same name, so a choice between them is ambiguous. */
|
|
10
|
+
BrandNameScreeningFindingCode["DUPLICATE_CANDIDATE_NAME"] = "DUPLICATE_CANDIDATE_NAME";
|
|
11
|
+
/** Two candidates share one ref. */
|
|
12
|
+
BrandNameScreeningFindingCode["DUPLICATE_CANDIDATE_REF"] = "DUPLICATE_CANDIDATE_REF";
|
|
13
|
+
/**
|
|
14
|
+
* Fewer than three companion-proposed names survive the screening's OWN records (conflicts and recorded
|
|
15
|
+
* competitor collisions), so the creator has little to choose from. A screening alone cannot see the market,
|
|
16
|
+
* so the count of what is actually OFFERED is the coherence report's (`brand-name-few-offerable-proposals`).
|
|
17
|
+
*/
|
|
18
|
+
BrandNameScreeningFindingCode["FEWER_THAN_THREE_OFFERABLE_PROPOSALS"] = "FEWER_THAN_THREE_OFFERABLE_PROPOSALS";
|
|
19
|
+
/** A target in an EU member state, and the EU trade mark is not among the jurisdictions searched. */
|
|
20
|
+
BrandNameScreeningFindingCode["EU_TRADE_MARK_NOT_DECLARED"] = "EU_TRADE_MARK_NOT_DECLARED";
|
|
21
|
+
/** Class 9 or 42 is not searched, though every software product lives in both. */
|
|
22
|
+
BrandNameScreeningFindingCode["SOFTWARE_CLASS_NOT_SEARCHED"] = "SOFTWARE_CLASS_NOT_SEARCHED";
|
|
23
|
+
/** A candidate is not covered in every jurisdiction, class and match type, or a register could not be read. */
|
|
24
|
+
BrandNameScreeningFindingCode["CANDIDATE_SCREENING_INCOMPLETE"] = "CANDIDATE_SCREENING_INCOMPLETE";
|
|
25
|
+
/** A companion-proposed candidate conflicts with a live mark or a named competitor; it is kept as a record and never offered. */
|
|
26
|
+
BrandNameScreeningFindingCode["PROPOSED_CANDIDATE_CONFLICTS"] = "PROPOSED_CANDIDATE_CONFLICTS";
|
|
27
|
+
/** A companion-proposed candidate says nothing about why it fits the product. */
|
|
28
|
+
BrandNameScreeningFindingCode["PROPOSED_CANDIDATE_WITHOUT_RATIONALE"] = "PROPOSED_CANDIDATE_WITHOUT_RATIONALE";
|
|
29
|
+
/** A conflicting mark is in none of the classes its query searched — it cannot be a conflict this screening found. */
|
|
30
|
+
BrandNameScreeningFindingCode["MARK_OUTSIDE_SEARCHED_CLASSES"] = "MARK_OUTSIDE_SEARCHED_CLASSES";
|
|
31
|
+
/** A national-office query claims to cover the EU trade mark or international registrations. */
|
|
32
|
+
BrandNameScreeningFindingCode["NATIONAL_OFFICE_COVERS_SUPRANATIONAL"] = "NATIONAL_OFFICE_COVERS_SUPRANATIONAL";
|
|
33
|
+
})(BrandNameScreeningFindingCode || (BrandNameScreeningFindingCode = {}));
|
|
34
|
+
/**
|
|
35
|
+
* The findings that block a landing — only those that make the screening UNTRUE.
|
|
36
|
+
*
|
|
37
|
+
* A conflict naming no mark, or a mark recorded beside a clear verdict, is a record that contradicts
|
|
38
|
+
* itself; a duplicate name makes the choice it feeds ambiguous. Everything else — an incomplete screening,
|
|
39
|
+
* a conflicting proposal kept for the record, a thin shortlist — is TRUE and unfinished, so it travels
|
|
40
|
+
* with the artifact for the creator's review rather than stopping it (`application-creation-directive.md`:
|
|
41
|
+
* only a lie refuses).
|
|
42
|
+
*/
|
|
43
|
+
export const BRAND_NAME_SCREENING_HARD_FLOOR_CODES = [
|
|
44
|
+
BrandNameScreeningFindingCode.CONFLICT_WITHOUT_MARK,
|
|
45
|
+
BrandNameScreeningFindingCode.MARK_WITHOUT_CONFLICT,
|
|
46
|
+
BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_NAME,
|
|
47
|
+
BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_REF,
|
|
48
|
+
];
|
|
49
|
+
/** Minimum number of companion-proposed names that should survive the screening. */
|
|
50
|
+
export const MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS = 3;
|
|
51
|
+
export function validateBrandNameScreening(screening) {
|
|
52
|
+
const findings = [];
|
|
53
|
+
const declared = new Set(screening.jurisdictions.map((jurisdiction) => jurisdiction.code));
|
|
54
|
+
if (screening.jurisdictions.some((jurisdiction) => EU_MEMBER_STATE_CODES.includes(jurisdiction.code)) && !declared.has(EU_TRADE_MARK_JURISDICTION)) {
|
|
55
|
+
findings.push({
|
|
56
|
+
code: BrandNameScreeningFindingCode.EU_TRADE_MARK_NOT_DECLARED,
|
|
57
|
+
candidateRef: null,
|
|
58
|
+
message: 'An EU member state is targeted but "EU" is not a declared jurisdiction: an EU trade mark has effect in every member state, so EUIPO must be searched.',
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const classNumbers = screening.niceClasses.map((niceClass) => niceClass.classNumber);
|
|
62
|
+
const missingSoftwareClasses = SOFTWARE_NICE_CLASSES.filter((classNumber) => !classNumbers.includes(classNumber));
|
|
63
|
+
if (missingSoftwareClasses.length > 0) {
|
|
64
|
+
findings.push({
|
|
65
|
+
code: BrandNameScreeningFindingCode.SOFTWARE_CLASS_NOT_SEARCHED,
|
|
66
|
+
candidateRef: null,
|
|
67
|
+
message: `Nice class ${missingSoftwareClasses.join(' and ')} is not searched, though every software product lives in classes 9 and 42.`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const seenNames = new Map();
|
|
71
|
+
const seenRefs = new Set();
|
|
72
|
+
let offerableProposals = 0;
|
|
73
|
+
for (const candidate of screening.candidates) {
|
|
74
|
+
if (seenRefs.has(candidate.ref)) {
|
|
75
|
+
findings.push({ code: BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_REF, candidateRef: candidate.ref, message: `${candidate.ref} is used by more than one candidate.` });
|
|
76
|
+
}
|
|
77
|
+
seenRefs.add(candidate.ref);
|
|
78
|
+
const nameKey = normalizeBrandNameForComparison(candidate.name);
|
|
79
|
+
const sameName = seenNames.get(nameKey);
|
|
80
|
+
if (sameName !== undefined) {
|
|
81
|
+
findings.push({
|
|
82
|
+
code: BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_NAME,
|
|
83
|
+
candidateRef: candidate.ref,
|
|
84
|
+
message: `"${candidate.name}" (${candidate.ref}) is the same name as ${sameName}, so a choice between them is ambiguous.`,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
seenNames.set(nameKey, candidate.ref);
|
|
89
|
+
}
|
|
90
|
+
candidate.trademarkQueries.forEach((query, index) => {
|
|
91
|
+
const where = `${candidate.ref} query ${index + 1} (${query.register})`;
|
|
92
|
+
if (query.outcome === BrandNameTrademarkQueryOutcome.CONFLICT && query.conflictingMarks.length === 0) {
|
|
93
|
+
findings.push({ code: BrandNameScreeningFindingCode.CONFLICT_WITHOUT_MARK, candidateRef: candidate.ref, message: `${where} says CONFLICT and names no conflicting mark.` });
|
|
94
|
+
}
|
|
95
|
+
if (query.outcome !== BrandNameTrademarkQueryOutcome.CONFLICT && query.conflictingMarks.length > 0) {
|
|
96
|
+
findings.push({
|
|
97
|
+
code: BrandNameScreeningFindingCode.MARK_WITHOUT_CONFLICT,
|
|
98
|
+
candidateRef: candidate.ref,
|
|
99
|
+
message: `${where} records ${query.conflictingMarks.length} live mark(s) but says ${query.outcome}; a live identical or near-identical mark is a conflict.`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
for (const mark of query.conflictingMarks) {
|
|
103
|
+
if (!mark.niceClasses.some((classNumber) => query.niceClassesSearched.includes(classNumber))) {
|
|
104
|
+
findings.push({
|
|
105
|
+
code: BrandNameScreeningFindingCode.MARK_OUTSIDE_SEARCHED_CLASSES,
|
|
106
|
+
candidateRef: candidate.ref,
|
|
107
|
+
message: `${where}: the mark "${mark.mark}" is in class(es) ${mark.niceClasses.join(', ')}, none of which this query searched.`,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (query.register === BrandNameTrademarkRegister.NATIONAL_OFFICE
|
|
112
|
+
&& query.jurisdictionsCovered.some((code) => code === EU_TRADE_MARK_JURISDICTION || code === INTERNATIONAL_REGISTRATION_JURISDICTION)) {
|
|
113
|
+
findings.push({
|
|
114
|
+
code: BrandNameScreeningFindingCode.NATIONAL_OFFICE_COVERS_SUPRANATIONAL,
|
|
115
|
+
candidateRef: candidate.ref,
|
|
116
|
+
message: `${where} is a national office yet claims to cover the EU trade mark or international registrations.`,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const outcome = deriveBrandNameTrademarkOutcome(screening, candidate);
|
|
121
|
+
const proposed = candidate.origin === BrandNameCandidateOrigin.COMPANION_PROPOSED;
|
|
122
|
+
if (outcome === BrandNameTrademarkOutcome.UNKNOWN) {
|
|
123
|
+
const uncovered = uncoveredBrandNameJurisdictions(screening, candidate);
|
|
124
|
+
findings.push({
|
|
125
|
+
code: BrandNameScreeningFindingCode.CANDIDATE_SCREENING_INCOMPLETE,
|
|
126
|
+
candidateRef: candidate.ref,
|
|
127
|
+
message: `"${candidate.name}" is NOT cleared: ${uncovered.length > 0 ? `not covered at full depth in ${uncovered.join(', ')}` : 'a register could not be read'}. If it is offered at all, it is offered as "screening incomplete".`,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const conflicting = outcome === BrandNameTrademarkOutcome.CONFLICT || candidate.competitorCollisions.length > 0;
|
|
131
|
+
if (proposed && conflicting) {
|
|
132
|
+
findings.push({
|
|
133
|
+
code: BrandNameScreeningFindingCode.PROPOSED_CANDIDATE_CONFLICTS,
|
|
134
|
+
candidateRef: candidate.ref,
|
|
135
|
+
message: `The name "${candidate.name}", recorded as a companion proposal, conflicts with ${outcome === BrandNameTrademarkOutcome.CONFLICT ? 'a live mark' : 'a named competitor'}; it is kept as a record, and is not offered unless the creator listed it as their own (the creator's answer, not this record, decides that).`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
if (proposed && candidate.rationale === undefined) {
|
|
139
|
+
findings.push({
|
|
140
|
+
code: BrandNameScreeningFindingCode.PROPOSED_CANDIDATE_WITHOUT_RATIONALE,
|
|
141
|
+
candidateRef: candidate.ref,
|
|
142
|
+
message: `The proposed name "${candidate.name}" says nothing about why it fits this product.`,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (proposed && !conflicting)
|
|
146
|
+
offerableProposals += 1;
|
|
147
|
+
}
|
|
148
|
+
if (offerableProposals < MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS) {
|
|
149
|
+
findings.push({
|
|
150
|
+
code: BrandNameScreeningFindingCode.FEWER_THAN_THREE_OFFERABLE_PROPOSALS,
|
|
151
|
+
candidateRef: null,
|
|
152
|
+
message: `Only ${offerableProposals} companion-proposed name(s) survive the screening's own records; propose at least ${MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS} so the creator has a real choice. (This counts recorded conflicts and collisions only; the coherence report's brand-name-few-offerable-proposals counts what is actually offered, after the market's competitors and the creator's own names are applied.)`,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return findings;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=brand-name-screening-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-name-screening-validation.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,uCAAuC,EACvC,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,+BAA+B,GAEhC,MAAM,gCAAgC,CAAC;AAExC,yDAAyD;AACzD,MAAM,CAAN,IAAY,6BA6BX;AA7BD,WAAY,6BAA6B;IACvC,kFAAkF;IAClF,gFAA+C,CAAA;IAC/C,yGAAyG;IACzG,gFAA+C,CAAA;IAC/C,iFAAiF;IACjF,sFAAqD,CAAA;IACrD,oCAAoC;IACpC,oFAAmD,CAAA;IACnD;;;;OAIG;IACH,8GAA6E,CAAA;IAC7E,qGAAqG;IACrG,0FAAyD,CAAA;IACzD,kFAAkF;IAClF,4FAA2D,CAAA;IAC3D,+GAA+G;IAC/G,kGAAiE,CAAA;IACjE,iIAAiI;IACjI,8FAA6D,CAAA;IAC7D,iFAAiF;IACjF,8GAA6E,CAAA;IAC7E,sHAAsH;IACtH,gGAA+D,CAAA;IAC/D,gGAAgG;IAChG,8GAA6E,CAAA;AAC/E,CAAC,EA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AC5B,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,6BAA6B,CAAC,4BAA4B;gBAChE,YAAY,EAAE,SAAS,CAAC,GAAG;gBAC3B,OAAO,EAAE,aAAa,SAAS,CAAC,IAAI,uDAAuD,OAAO,KAAK,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB,+IAA+I;aAChU,CAAC,CAAC;QACL,CAAC;QACD,IAAI,QAAQ,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,6BAA6B,CAAC,oCAAoC;gBACxE,YAAY,EAAE,SAAS,CAAC,GAAG;gBAC3B,OAAO,EAAE,sBAAsB,SAAS,CAAC,IAAI,gDAAgD;aAC9F,CAAC,CAAC;QACL,CAAC;QACD,IAAI,QAAQ,IAAI,CAAC,WAAW;YAAE,kBAAkB,IAAI,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,kBAAkB,GAAG,sCAAsC,EAAE,CAAC;QAChE,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,6BAA6B,CAAC,oCAAoC;YACxE,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE,QAAQ,kBAAkB,qFAAqF,sCAAsC,6PAA6P;SAC5Z,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import {\n BrandNameCandidateOrigin,\n BrandNameTrademarkOutcome,\n BrandNameTrademarkQueryOutcome,\n BrandNameTrademarkRegister,\n EU_MEMBER_STATE_CODES,\n EU_TRADE_MARK_JURISDICTION,\n INTERNATIONAL_REGISTRATION_JURISDICTION,\n SOFTWARE_NICE_CLASSES,\n deriveBrandNameTrademarkOutcome,\n normalizeBrandNameForComparison,\n uncoveredBrandNameJurisdictions,\n type BrandNameScreening,\n} from './brand-name-screening.schemas';\n\n/** Deterministic finding over a brand-name screening. */\nexport enum BrandNameScreeningFindingCode {\n /** A query says CONFLICT and names no mark — a verdict with nothing behind it. */\n CONFLICT_WITHOUT_MARK = 'CONFLICT_WITHOUT_MARK',\n /** A query names a live mark and does not say CONFLICT — the mark is there, so the name is not clear. */\n MARK_WITHOUT_CONFLICT = 'MARK_WITHOUT_CONFLICT',\n /** Two candidates spell the same name, so a choice between them is ambiguous. */\n DUPLICATE_CANDIDATE_NAME = 'DUPLICATE_CANDIDATE_NAME',\n /** Two candidates share one ref. */\n DUPLICATE_CANDIDATE_REF = 'DUPLICATE_CANDIDATE_REF',\n /**\n * Fewer than three companion-proposed names survive the screening's OWN records (conflicts and recorded\n * competitor collisions), so the creator has little to choose from. A screening alone cannot see the market,\n * so the count of what is actually OFFERED is the coherence report's (`brand-name-few-offerable-proposals`).\n */\n FEWER_THAN_THREE_OFFERABLE_PROPOSALS = 'FEWER_THAN_THREE_OFFERABLE_PROPOSALS',\n /** A target in an EU member state, and the EU trade mark is not among the jurisdictions searched. */\n EU_TRADE_MARK_NOT_DECLARED = 'EU_TRADE_MARK_NOT_DECLARED',\n /** Class 9 or 42 is not searched, though every software product lives in both. */\n SOFTWARE_CLASS_NOT_SEARCHED = 'SOFTWARE_CLASS_NOT_SEARCHED',\n /** A candidate is not covered in every jurisdiction, class and match type, or a register could not be read. */\n CANDIDATE_SCREENING_INCOMPLETE = 'CANDIDATE_SCREENING_INCOMPLETE',\n /** A companion-proposed candidate conflicts with a live mark or a named competitor; it is kept as a record and never offered. */\n PROPOSED_CANDIDATE_CONFLICTS = 'PROPOSED_CANDIDATE_CONFLICTS',\n /** A companion-proposed candidate says nothing about why it fits the product. */\n PROPOSED_CANDIDATE_WITHOUT_RATIONALE = 'PROPOSED_CANDIDATE_WITHOUT_RATIONALE',\n /** A conflicting mark is in none of the classes its query searched — it cannot be a conflict this screening found. */\n MARK_OUTSIDE_SEARCHED_CLASSES = 'MARK_OUTSIDE_SEARCHED_CLASSES',\n /** A national-office query claims to cover the EU trade mark or international registrations. */\n NATIONAL_OFFICE_COVERS_SUPRANATIONAL = 'NATIONAL_OFFICE_COVERS_SUPRANATIONAL',\n}\n\nexport interface BrandNameScreeningFinding {\n readonly code: BrandNameScreeningFindingCode;\n readonly candidateRef: string | null;\n readonly message: string;\n}\n\n/**\n * The findings that block a landing — only those that make the screening UNTRUE.\n *\n * A conflict naming no mark, or a mark recorded beside a clear verdict, is a record that contradicts\n * itself; a duplicate name makes the choice it feeds ambiguous. Everything else — an incomplete screening,\n * a conflicting proposal kept for the record, a thin shortlist — is TRUE and unfinished, so it travels\n * with the artifact for the creator's review rather than stopping it (`application-creation-directive.md`:\n * only a lie refuses).\n */\nexport const BRAND_NAME_SCREENING_HARD_FLOOR_CODES: readonly BrandNameScreeningFindingCode[] = [\n BrandNameScreeningFindingCode.CONFLICT_WITHOUT_MARK,\n BrandNameScreeningFindingCode.MARK_WITHOUT_CONFLICT,\n BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_NAME,\n BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_REF,\n];\n\n/** Minimum number of companion-proposed names that should survive the screening. */\nexport const MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS = 3;\n\nexport function validateBrandNameScreening(screening: BrandNameScreening): readonly BrandNameScreeningFinding[] {\n const findings: BrandNameScreeningFinding[] = [];\n const declared = new Set(screening.jurisdictions.map((jurisdiction) => jurisdiction.code));\n if (screening.jurisdictions.some((jurisdiction) => EU_MEMBER_STATE_CODES.includes(jurisdiction.code)) && !declared.has(EU_TRADE_MARK_JURISDICTION)) {\n findings.push({\n code: BrandNameScreeningFindingCode.EU_TRADE_MARK_NOT_DECLARED,\n candidateRef: null,\n message: 'An EU member state is targeted but \"EU\" is not a declared jurisdiction: an EU trade mark has effect in every member state, so EUIPO must be searched.',\n });\n }\n const classNumbers = screening.niceClasses.map((niceClass) => niceClass.classNumber);\n const missingSoftwareClasses = SOFTWARE_NICE_CLASSES.filter((classNumber) => !classNumbers.includes(classNumber));\n if (missingSoftwareClasses.length > 0) {\n findings.push({\n code: BrandNameScreeningFindingCode.SOFTWARE_CLASS_NOT_SEARCHED,\n candidateRef: null,\n message: `Nice class ${missingSoftwareClasses.join(' and ')} is not searched, though every software product lives in classes 9 and 42.`,\n });\n }\n\n const seenNames = new Map<string, string>();\n const seenRefs = new Set<string>();\n let offerableProposals = 0;\n for (const candidate of screening.candidates) {\n if (seenRefs.has(candidate.ref)) {\n findings.push({ code: BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_REF, candidateRef: candidate.ref, message: `${candidate.ref} is used by more than one candidate.` });\n }\n seenRefs.add(candidate.ref);\n const nameKey = normalizeBrandNameForComparison(candidate.name);\n const sameName = seenNames.get(nameKey);\n if (sameName !== undefined) {\n findings.push({\n code: BrandNameScreeningFindingCode.DUPLICATE_CANDIDATE_NAME,\n candidateRef: candidate.ref,\n message: `\"${candidate.name}\" (${candidate.ref}) is the same name as ${sameName}, so a choice between them is ambiguous.`,\n });\n } else {\n seenNames.set(nameKey, candidate.ref);\n }\n\n candidate.trademarkQueries.forEach((query, index) => {\n const where = `${candidate.ref} query ${index + 1} (${query.register})`;\n if (query.outcome === BrandNameTrademarkQueryOutcome.CONFLICT && query.conflictingMarks.length === 0) {\n findings.push({ code: BrandNameScreeningFindingCode.CONFLICT_WITHOUT_MARK, candidateRef: candidate.ref, message: `${where} says CONFLICT and names no conflicting mark.` });\n }\n if (query.outcome !== BrandNameTrademarkQueryOutcome.CONFLICT && query.conflictingMarks.length > 0) {\n findings.push({\n code: BrandNameScreeningFindingCode.MARK_WITHOUT_CONFLICT,\n candidateRef: candidate.ref,\n message: `${where} records ${query.conflictingMarks.length} live mark(s) but says ${query.outcome}; a live identical or near-identical mark is a conflict.`,\n });\n }\n for (const mark of query.conflictingMarks) {\n if (!mark.niceClasses.some((classNumber) => query.niceClassesSearched.includes(classNumber))) {\n findings.push({\n code: BrandNameScreeningFindingCode.MARK_OUTSIDE_SEARCHED_CLASSES,\n candidateRef: candidate.ref,\n message: `${where}: the mark \"${mark.mark}\" is in class(es) ${mark.niceClasses.join(', ')}, none of which this query searched.`,\n });\n }\n }\n if (query.register === BrandNameTrademarkRegister.NATIONAL_OFFICE\n && query.jurisdictionsCovered.some((code) => code === EU_TRADE_MARK_JURISDICTION || code === INTERNATIONAL_REGISTRATION_JURISDICTION)) {\n findings.push({\n code: BrandNameScreeningFindingCode.NATIONAL_OFFICE_COVERS_SUPRANATIONAL,\n candidateRef: candidate.ref,\n message: `${where} is a national office yet claims to cover the EU trade mark or international registrations.`,\n });\n }\n });\n\n const outcome = deriveBrandNameTrademarkOutcome(screening, candidate);\n const proposed = candidate.origin === BrandNameCandidateOrigin.COMPANION_PROPOSED;\n if (outcome === BrandNameTrademarkOutcome.UNKNOWN) {\n const uncovered = uncoveredBrandNameJurisdictions(screening, candidate);\n findings.push({\n code: BrandNameScreeningFindingCode.CANDIDATE_SCREENING_INCOMPLETE,\n candidateRef: candidate.ref,\n message: `\"${candidate.name}\" is NOT cleared: ${uncovered.length > 0 ? `not covered at full depth in ${uncovered.join(', ')}` : 'a register could not be read'}. If it is offered at all, it is offered as \"screening incomplete\".`,\n });\n }\n const conflicting = outcome === BrandNameTrademarkOutcome.CONFLICT || candidate.competitorCollisions.length > 0;\n if (proposed && conflicting) {\n findings.push({\n code: BrandNameScreeningFindingCode.PROPOSED_CANDIDATE_CONFLICTS,\n candidateRef: candidate.ref,\n message: `The name \"${candidate.name}\", recorded as a companion proposal, conflicts with ${outcome === BrandNameTrademarkOutcome.CONFLICT ? 'a live mark' : 'a named competitor'}; it is kept as a record, and is not offered unless the creator listed it as their own (the creator's answer, not this record, decides that).`,\n });\n }\n if (proposed && candidate.rationale === undefined) {\n findings.push({\n code: BrandNameScreeningFindingCode.PROPOSED_CANDIDATE_WITHOUT_RATIONALE,\n candidateRef: candidate.ref,\n message: `The proposed name \"${candidate.name}\" says nothing about why it fits this product.`,\n });\n }\n if (proposed && !conflicting) offerableProposals += 1;\n }\n if (offerableProposals < MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS) {\n findings.push({\n code: BrandNameScreeningFindingCode.FEWER_THAN_THREE_OFFERABLE_PROPOSALS,\n candidateRef: null,\n message: `Only ${offerableProposals} companion-proposed name(s) survive the screening's own records; propose at least ${MINIMUM_OFFERABLE_BRAND_NAME_PROPOSALS} so the creator has a real choice. (This counts recorded conflicts and collisions only; the coherence report's brand-name-few-offerable-proposals counts what is actually offered, after the market's competitors and the creator's own names are applied.)`,\n });\n }\n return findings;\n}\n"]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import '@wildo-ai/zod-decorators';
|
|
3
|
+
import { BrandNameTrademarkOutcome, type BrandNameScreening } from './brand-name-screening.schemas';
|
|
4
|
+
/**
|
|
5
|
+
* A brand-name screening as a READER needs it (#2152): each candidate widened with its DERIVED standing and the
|
|
6
|
+
* jurisdictions it is not covered in.
|
|
7
|
+
*
|
|
8
|
+
* Not part of the stored contract, on purpose: `BrandNameScreeningSchema` has no standing field, so a producer
|
|
9
|
+
* cannot fill one in and a model cannot label a half-checked name clear. That is exactly why the standing must
|
|
10
|
+
* be SHOWN — a candidate whose every recorded query reads "no conflict found" but which misses a required
|
|
11
|
+
* jurisdiction (`WO`, say) is not cleared, and only `deriveBrandNameTrademarkOutcome` says so. A view schema
|
|
12
|
+
* here, beside the derivation, rather than in a renderer: the standing's vocabulary is declared ONCE, and every
|
|
13
|
+
* surface that shows a screening reads the same shape.
|
|
14
|
+
*
|
|
15
|
+
* The candidate is a separate object rather than `.extend()`, so the standing reads right after the name.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BrandNameCandidateViewSchema: z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
standing: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof BrandNameTrademarkOutcome>>;
|
|
20
|
+
uncoveredJurisdictions: z.ZodArray<z.ZodString>;
|
|
21
|
+
ref: z.ZodString;
|
|
22
|
+
origin: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameCandidateOrigin>>;
|
|
23
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
24
|
+
trademarkQueries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
25
|
+
register: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkRegister>>;
|
|
26
|
+
jurisdictionsCovered: z.ZodArray<z.ZodString>;
|
|
27
|
+
niceClassesSearched: z.ZodArray<z.ZodNumber>;
|
|
28
|
+
matchTypesSearched: z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>>;
|
|
29
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkQueryOutcome>>;
|
|
30
|
+
conflictingMarks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
31
|
+
mark: z.ZodString;
|
|
32
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
33
|
+
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
34
|
+
niceClasses: z.ZodArray<z.ZodNumber>;
|
|
35
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameConflictingMarkStatus>>;
|
|
36
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
37
|
+
sourceUrl: z.ZodURL;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
39
|
+
sourceUrl: z.ZodURL;
|
|
40
|
+
checkedOn: z.ZodISODate;
|
|
41
|
+
note: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>>>;
|
|
43
|
+
competitorCollisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
44
|
+
alternativeRef: z.ZodOptional<z.ZodString>;
|
|
45
|
+
competitorName: z.ZodString;
|
|
46
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
domainSignals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
49
|
+
domain: z.ZodString;
|
|
50
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameDomainStatus>>;
|
|
51
|
+
checkedOn: z.ZodISODate;
|
|
52
|
+
sourceUrl: z.ZodOptional<z.ZodURL>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
sameCategoryUses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
55
|
+
name: z.ZodString;
|
|
56
|
+
sourceUrl: z.ZodURL;
|
|
57
|
+
note: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type BrandNameCandidateView = z.infer<typeof BrandNameCandidateViewSchema>;
|
|
61
|
+
/** The screening with every candidate widened — see {@link BrandNameCandidateViewSchema}. */
|
|
62
|
+
export declare const BrandNameScreeningViewSchema: z.ZodObject<{
|
|
63
|
+
version: z.ZodDefault<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameScreeningVersion>>;
|
|
64
|
+
screenedOn: z.ZodISODate;
|
|
65
|
+
jurisdictions: z.ZodArray<z.ZodObject<{
|
|
66
|
+
code: z.ZodString;
|
|
67
|
+
derivedFrom: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
niceClasses: z.ZodArray<z.ZodObject<{
|
|
70
|
+
classNumber: z.ZodNumber;
|
|
71
|
+
rationale: z.ZodString;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
standing: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof BrandNameTrademarkOutcome>>;
|
|
76
|
+
uncoveredJurisdictions: z.ZodArray<z.ZodString>;
|
|
77
|
+
ref: z.ZodString;
|
|
78
|
+
origin: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameCandidateOrigin>>;
|
|
79
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
80
|
+
trademarkQueries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
81
|
+
register: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkRegister>>;
|
|
82
|
+
jurisdictionsCovered: z.ZodArray<z.ZodString>;
|
|
83
|
+
niceClassesSearched: z.ZodArray<z.ZodNumber>;
|
|
84
|
+
matchTypesSearched: z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>>;
|
|
85
|
+
outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameTrademarkQueryOutcome>>;
|
|
86
|
+
conflictingMarks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
87
|
+
mark: z.ZodString;
|
|
88
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
89
|
+
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
90
|
+
niceClasses: z.ZodArray<z.ZodNumber>;
|
|
91
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameConflictingMarkStatus>>;
|
|
92
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
93
|
+
sourceUrl: z.ZodURL;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
sourceUrl: z.ZodURL;
|
|
96
|
+
checkedOn: z.ZodISODate;
|
|
97
|
+
note: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
competitorCollisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
100
|
+
alternativeRef: z.ZodOptional<z.ZodString>;
|
|
101
|
+
competitorName: z.ZodString;
|
|
102
|
+
matchType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameMatchType>>;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
104
|
+
domainSignals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
105
|
+
domain: z.ZodString;
|
|
106
|
+
status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./brand-name-screening.schemas").BrandNameDomainStatus>>;
|
|
107
|
+
checkedOn: z.ZodISODate;
|
|
108
|
+
sourceUrl: z.ZodOptional<z.ZodURL>;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
sameCategoryUses: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
sourceUrl: z.ZodURL;
|
|
113
|
+
note: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type BrandNameScreeningView = z.infer<typeof BrandNameScreeningViewSchema>;
|
|
118
|
+
/** The stored screening, each candidate widened with what its queries DERIVE. */
|
|
119
|
+
export declare function toBrandNameScreeningView(screening: BrandNameScreening): BrandNameScreeningView;
|
|
120
|
+
//# sourceMappingURL=brand-name-screening-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-name-screening-view.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAGL,yBAAyB,EAGzB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAavC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,kBAAkB,GAAG,sBAAsB,CAS9F"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first (#966).
|
|
3
|
+
import '@wildo-ai/zod-decorators';
|
|
4
|
+
import { BrandNameCandidateSchema, BrandNameScreeningSchema, BrandNameTrademarkOutcome, deriveBrandNameTrademarkOutcome, uncoveredBrandNameJurisdictions, } from './brand-name-screening.schemas.js';
|
|
5
|
+
/**
|
|
6
|
+
* A brand-name screening as a READER needs it (#2152): each candidate widened with its DERIVED standing and the
|
|
7
|
+
* jurisdictions it is not covered in.
|
|
8
|
+
*
|
|
9
|
+
* Not part of the stored contract, on purpose: `BrandNameScreeningSchema` has no standing field, so a producer
|
|
10
|
+
* cannot fill one in and a model cannot label a half-checked name clear. That is exactly why the standing must
|
|
11
|
+
* be SHOWN — a candidate whose every recorded query reads "no conflict found" but which misses a required
|
|
12
|
+
* jurisdiction (`WO`, say) is not cleared, and only `deriveBrandNameTrademarkOutcome` says so. A view schema
|
|
13
|
+
* here, beside the derivation, rather than in a renderer: the standing's vocabulary is declared ONCE, and every
|
|
14
|
+
* surface that shows a screening reads the same shape.
|
|
15
|
+
*
|
|
16
|
+
* The candidate is a separate object rather than `.extend()`, so the standing reads right after the name.
|
|
17
|
+
*/
|
|
18
|
+
export const BrandNameCandidateViewSchema = z.object({
|
|
19
|
+
name: BrandNameCandidateSchema.shape.name,
|
|
20
|
+
/** DERIVED from the queries — never stored. */
|
|
21
|
+
standing: z.enum(BrandNameTrademarkOutcome).systemEnum('BrandNameTrademarkOutcome'),
|
|
22
|
+
/** DERIVED: the required jurisdictions no full-depth clear query covers. */
|
|
23
|
+
uncoveredJurisdictions: z.array(z.string()),
|
|
24
|
+
ref: BrandNameCandidateSchema.shape.ref,
|
|
25
|
+
origin: BrandNameCandidateSchema.shape.origin,
|
|
26
|
+
rationale: BrandNameCandidateSchema.shape.rationale,
|
|
27
|
+
trademarkQueries: BrandNameCandidateSchema.shape.trademarkQueries,
|
|
28
|
+
competitorCollisions: BrandNameCandidateSchema.shape.competitorCollisions,
|
|
29
|
+
domainSignals: BrandNameCandidateSchema.shape.domainSignals,
|
|
30
|
+
sameCategoryUses: BrandNameCandidateSchema.shape.sameCategoryUses,
|
|
31
|
+
});
|
|
32
|
+
/** The screening with every candidate widened — see {@link BrandNameCandidateViewSchema}. */
|
|
33
|
+
export const BrandNameScreeningViewSchema = BrandNameScreeningSchema.extend({
|
|
34
|
+
candidates: z.array(BrandNameCandidateViewSchema),
|
|
35
|
+
});
|
|
36
|
+
/** The stored screening, each candidate widened with what its queries DERIVE. */
|
|
37
|
+
export function toBrandNameScreeningView(screening) {
|
|
38
|
+
return {
|
|
39
|
+
...screening,
|
|
40
|
+
candidates: screening.candidates.map((candidate) => ({
|
|
41
|
+
...candidate,
|
|
42
|
+
standing: deriveBrandNameTrademarkOutcome(screening, candidate),
|
|
43
|
+
uncoveredJurisdictions: [...uncoveredBrandNameJurisdictions(screening, candidate)],
|
|
44
|
+
})),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=brand-name-screening-view.js.map
|