@sourcey/catalog-verifier 1.1.18 → 1.1.19
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/SOURCEY-CLOSURE.json +26 -10
- package/dist/contracts/api/src/endpoints.d.ts +164 -4
- package/dist/contracts/api/src/endpoints.d.ts.map +1 -1
- package/dist/contracts/company-verification/src/commercial.d.ts +440 -0
- package/dist/contracts/company-verification/src/commercial.d.ts.map +1 -0
- package/dist/contracts/company-verification/src/commercial.js +231 -0
- package/dist/contracts/company-verification/src/commercial.js.map +1 -0
- package/dist/contracts/startup-credits-commercial/src/product.d.ts.map +1 -1
- package/dist/contracts/startup-credits-commercial/src/product.js +2 -20
- package/dist/contracts/startup-credits-commercial/src/product.js.map +1 -1
- package/dist/contracts/startup-credits-commercial/src/requests.d.ts +87 -3
- package/dist/contracts/startup-credits-commercial/src/requests.d.ts.map +1 -1
- package/dist/contracts/startup-credits-commercial/src/requests.js +23 -9
- package/dist/contracts/startup-credits-commercial/src/requests.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const companyVerificationProductCode: "company-human-verification";
|
|
3
|
+
export declare const companyVerificationPrice: {
|
|
4
|
+
readonly currency: "usd";
|
|
5
|
+
readonly minor_units: 2900;
|
|
6
|
+
};
|
|
7
|
+
export declare const companyVerificationPriceLookupKey: "company-human-verification-usd-29";
|
|
8
|
+
export declare const companyVerificationPurchaseDisclosureStatement: "Human verification of a company includes publication of a supportable company record with verified status for a legitimate company. Sourcey cannot publish false, unsafe, conflicting, duplicate, or non-existent company claims. Refunds apply when Sourcey cannot deliver the purchased service or misses the review deadline.";
|
|
9
|
+
/** The business days a paid verification is delivered in, counted on Sydney's calendar. */
|
|
10
|
+
export declare const humanVerificationServiceCalendarSchema: z.ZodObject<{
|
|
11
|
+
time_zone: z.ZodLiteral<"Australia/Sydney">;
|
|
12
|
+
business_days: z.ZodLiteral<3>;
|
|
13
|
+
counting: z.ZodLiteral<"next-business-day">;
|
|
14
|
+
deadline: z.ZodLiteral<"end-of-local-day">;
|
|
15
|
+
holiday_dates: z.ZodArray<z.ZodISODate>;
|
|
16
|
+
valid_through: z.ZodISODate;
|
|
17
|
+
source_url: z.ZodLiteral<"https://www.nsw.gov.au/about-nsw/public-holidays">;
|
|
18
|
+
source_observed_at: z.ZodISODateTime;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare const companyVerificationServicePolicySchema: z.ZodObject<{
|
|
21
|
+
policy_contract: z.ZodLiteral<"sourcey.company-verification-service-policy/v1alpha1">;
|
|
22
|
+
product_code: z.ZodLiteral<"company-human-verification">;
|
|
23
|
+
price_lookup_key: z.ZodLiteral<"company-human-verification-usd-29">;
|
|
24
|
+
price: z.ZodObject<{
|
|
25
|
+
currency: z.ZodLiteral<"usd">;
|
|
26
|
+
minor_units: z.ZodLiteral<2900>;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
service_calendar: z.ZodObject<{
|
|
29
|
+
time_zone: z.ZodLiteral<"Australia/Sydney">;
|
|
30
|
+
business_days: z.ZodLiteral<3>;
|
|
31
|
+
counting: z.ZodLiteral<"next-business-day">;
|
|
32
|
+
deadline: z.ZodLiteral<"end-of-local-day">;
|
|
33
|
+
holiday_dates: z.ZodArray<z.ZodISODate>;
|
|
34
|
+
valid_through: z.ZodISODate;
|
|
35
|
+
source_url: z.ZodLiteral<"https://www.nsw.gov.au/about-nsw/public-holidays">;
|
|
36
|
+
source_observed_at: z.ZodISODateTime;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
material_misrepresentation_refundable: z.ZodLiteral<false>;
|
|
39
|
+
sla_miss_refundable: z.ZodLiteral<true>;
|
|
40
|
+
sourcey_error_refundable: z.ZodLiteral<true>;
|
|
41
|
+
payment_authorizes_human_verification: z.ZodLiteral<true>;
|
|
42
|
+
payment_changes_truth: z.ZodLiteral<false>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export declare const companyVerificationWorkDefinitionSchema: z.ZodObject<{
|
|
45
|
+
work_contract: z.ZodLiteral<"sourcey.company-review-work-definition/v1alpha1">;
|
|
46
|
+
scope: z.ZodLiteral<"one-entity">;
|
|
47
|
+
passing_results: z.ZodObject<{
|
|
48
|
+
entity_identity: z.ZodObject<{
|
|
49
|
+
status: z.ZodLiteral<"verified">;
|
|
50
|
+
binding: z.ZodLiteral<"identity-epoch">;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export declare const companyVerificationPurchaseDisclosureSchema: z.ZodObject<{
|
|
55
|
+
disclosure_contract: z.ZodLiteral<"sourcey.company-purchase-disclosure/v1alpha1">;
|
|
56
|
+
statement: z.ZodLiteral<"Human verification of a company includes publication of a supportable company record with verified status for a legitimate company. Sourcey cannot publish false, unsafe, conflicting, duplicate, or non-existent company claims. Refunds apply when Sourcey cannot deliver the purchased service or misses the review deadline.">;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
export declare const companyVerificationPurchasePreviewSchema: z.ZodObject<{
|
|
59
|
+
preview_contract: z.ZodLiteral<"sourcey.company-purchase-preview/v1alpha1">;
|
|
60
|
+
product_code: z.ZodLiteral<"company-human-verification">;
|
|
61
|
+
purchase_kind: z.ZodLiteral<"one_off">;
|
|
62
|
+
price_lookup_key: z.ZodLiteral<"company-human-verification-usd-29">;
|
|
63
|
+
price: z.ZodObject<{
|
|
64
|
+
currency: z.ZodLiteral<"usd">;
|
|
65
|
+
minor_units: z.ZodLiteral<2900>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
work_scope: z.ZodLiteral<"one-entity">;
|
|
68
|
+
passing_results: z.ZodObject<{
|
|
69
|
+
entity_identity: z.ZodObject<{
|
|
70
|
+
status: z.ZodLiteral<"verified">;
|
|
71
|
+
binding: z.ZodLiteral<"identity-epoch">;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
service_level: z.ZodObject<{
|
|
75
|
+
starts_after: z.ZodLiteral<"settled-payment">;
|
|
76
|
+
business_days: z.ZodLiteral<3>;
|
|
77
|
+
time_zone: z.ZodLiteral<"Australia/Sydney">;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
refunds: z.ZodObject<{
|
|
80
|
+
material_misrepresentation_refundable: z.ZodLiteral<false>;
|
|
81
|
+
service_level_missed_refundable: z.ZodLiteral<true>;
|
|
82
|
+
sourcey_error_refundable: z.ZodLiteral<true>;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
disclosure: z.ZodLiteral<"Human verification of a company includes publication of a supportable company record with verified status for a legitimate company. Sourcey cannot publish false, unsafe, conflicting, duplicate, or non-existent company claims. Refunds apply when Sourcey cannot deliver the purchased service or misses the review deadline.">;
|
|
85
|
+
policy_bindings: z.ZodObject<{
|
|
86
|
+
assurance_method: z.ZodString;
|
|
87
|
+
purchase_disclosure: z.ZodString;
|
|
88
|
+
service: z.ZodString;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
preview_digest: z.ZodString;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
/**
|
|
93
|
+
* A data repository's pull request adding a company alone (no Offer) below Sourcey's standing bar.
|
|
94
|
+
* The order serves the pull request's own submission and its exact Entity; the head is where it
|
|
95
|
+
* was bought. A later head keeps the service while it keeps that Entity, and the person verifies
|
|
96
|
+
* each head again.
|
|
97
|
+
*/
|
|
98
|
+
export declare const companyVerificationGitPullRequestTargetSchema: z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"git_pull_request">;
|
|
100
|
+
base_release_id: z.ZodString;
|
|
101
|
+
entity_id: z.ZodString;
|
|
102
|
+
pull_request: z.ZodObject<{
|
|
103
|
+
repository_id: z.ZodString;
|
|
104
|
+
repository: z.ZodString;
|
|
105
|
+
pull_request_number: z.ZodNumber;
|
|
106
|
+
submission_id: z.ZodString;
|
|
107
|
+
head_sha: z.ZodString;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
standing_result: z.ZodObject<{
|
|
110
|
+
result_contract: z.ZodLiteral<"sourcey.standing-result/v1alpha1">;
|
|
111
|
+
policy_digest: z.ZodString;
|
|
112
|
+
evidence_digest: z.ZodString;
|
|
113
|
+
registrable_domain: z.ZodString;
|
|
114
|
+
official_source_url: z.ZodURL;
|
|
115
|
+
route: z.ZodEnum<{
|
|
116
|
+
correction_required: "correction_required";
|
|
117
|
+
free_machine_review: "free_machine_review";
|
|
118
|
+
human_verification_required: "human_verification_required";
|
|
119
|
+
repair_required: "repair_required";
|
|
120
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
121
|
+
}>;
|
|
122
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
123
|
+
evaluated_at: z.ZodISODateTime;
|
|
124
|
+
expires_at: z.ZodISODateTime;
|
|
125
|
+
result_digest: z.ZodString;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
authoring_digest: z.ZodString;
|
|
128
|
+
revisions: z.ZodObject<{
|
|
129
|
+
entity_revision_digest: z.ZodString;
|
|
130
|
+
}, z.core.$strict>;
|
|
131
|
+
labels: z.ZodObject<{
|
|
132
|
+
company_name: z.ZodString;
|
|
133
|
+
company_site_url: z.ZodURL;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
/** The exact pull request head a person verified, and the Entity revision it compiles to. */
|
|
137
|
+
export declare const companyVerificationReviewedRevisionSchema: z.ZodObject<{
|
|
138
|
+
submission_id: z.ZodString;
|
|
139
|
+
revision_digest: z.ZodString;
|
|
140
|
+
head_sha: z.ZodString;
|
|
141
|
+
entity_revision_digest: z.ZodString;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
export declare const companyVerificationFundedWorkIntentSchema: z.ZodObject<{
|
|
144
|
+
product_intent_contract: z.ZodLiteral<"sourcey.company-human-verification-intent/v1alpha1">;
|
|
145
|
+
verification_case_id: z.ZodString;
|
|
146
|
+
billing: z.ZodObject<{
|
|
147
|
+
intent_contract: z.ZodLiteral<"sourcey.funded-work-intent/v1alpha1">;
|
|
148
|
+
intent_id: z.ZodString;
|
|
149
|
+
product_code: z.ZodString;
|
|
150
|
+
purchase_kind: z.ZodLiteral<"one_off">;
|
|
151
|
+
actor_ref: z.ZodString;
|
|
152
|
+
owner_work_ref: z.ZodString;
|
|
153
|
+
owner_payload_digest: z.ZodString;
|
|
154
|
+
subject: z.ZodObject<{
|
|
155
|
+
entity_id: z.ZodString;
|
|
156
|
+
program_id: z.ZodOptional<z.ZodString>;
|
|
157
|
+
offer_id: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
base_release_id: z.ZodString;
|
|
160
|
+
eligibility_digest: z.ZodString;
|
|
161
|
+
policy_bindings: z.ZodArray<z.ZodObject<{
|
|
162
|
+
role: z.ZodString;
|
|
163
|
+
policy_digest: z.ZodString;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
work_class: z.ZodString;
|
|
166
|
+
forbidden_effects: z.ZodTuple<[z.ZodLiteral<"admit_without_evidence">, z.ZodLiteral<"alter_facts">, z.ZodLiteral<"alter_ranking">, z.ZodLiteral<"guarantee_outcome">, z.ZodLiteral<"publish_without_authority">], null>;
|
|
167
|
+
price_lookup_key: z.ZodString;
|
|
168
|
+
requested_by: z.ZodEnum<{
|
|
169
|
+
contributor: "contributor";
|
|
170
|
+
subject: "subject";
|
|
171
|
+
}>;
|
|
172
|
+
issued_at: z.ZodISODateTime;
|
|
173
|
+
expires_at: z.ZodISODateTime;
|
|
174
|
+
intent_digest: z.ZodString;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
target: z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"git_pull_request">;
|
|
178
|
+
base_release_id: z.ZodString;
|
|
179
|
+
entity_id: z.ZodString;
|
|
180
|
+
pull_request: z.ZodObject<{
|
|
181
|
+
repository_id: z.ZodString;
|
|
182
|
+
repository: z.ZodString;
|
|
183
|
+
pull_request_number: z.ZodNumber;
|
|
184
|
+
submission_id: z.ZodString;
|
|
185
|
+
head_sha: z.ZodString;
|
|
186
|
+
}, z.core.$strict>;
|
|
187
|
+
standing_result: z.ZodObject<{
|
|
188
|
+
result_contract: z.ZodLiteral<"sourcey.standing-result/v1alpha1">;
|
|
189
|
+
policy_digest: z.ZodString;
|
|
190
|
+
evidence_digest: z.ZodString;
|
|
191
|
+
registrable_domain: z.ZodString;
|
|
192
|
+
official_source_url: z.ZodURL;
|
|
193
|
+
route: z.ZodEnum<{
|
|
194
|
+
correction_required: "correction_required";
|
|
195
|
+
free_machine_review: "free_machine_review";
|
|
196
|
+
human_verification_required: "human_verification_required";
|
|
197
|
+
repair_required: "repair_required";
|
|
198
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
199
|
+
}>;
|
|
200
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
201
|
+
evaluated_at: z.ZodISODateTime;
|
|
202
|
+
expires_at: z.ZodISODateTime;
|
|
203
|
+
result_digest: z.ZodString;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
authoring_digest: z.ZodString;
|
|
206
|
+
revisions: z.ZodObject<{
|
|
207
|
+
entity_revision_digest: z.ZodString;
|
|
208
|
+
}, z.core.$strict>;
|
|
209
|
+
labels: z.ZodObject<{
|
|
210
|
+
company_name: z.ZodString;
|
|
211
|
+
company_site_url: z.ZodURL;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
}, z.core.$strict>;
|
|
214
|
+
purchase_preview_digest: z.ZodString;
|
|
215
|
+
disclosure_digest: z.ZodString;
|
|
216
|
+
product_intent_digest: z.ZodString;
|
|
217
|
+
}, z.core.$strict>;
|
|
218
|
+
/** What a person records verifying a company alone: its identity, and nothing about an Offer. */
|
|
219
|
+
export declare const companyVerificationReviewDecisionSchema: z.ZodObject<{
|
|
220
|
+
entity_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
221
|
+
status: z.ZodLiteral<"passed">;
|
|
222
|
+
rationale: z.ZodString;
|
|
223
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
224
|
+
status: z.ZodLiteral<"failed">;
|
|
225
|
+
reason_code: z.ZodEnum<{
|
|
226
|
+
identity_mismatch: "identity_mismatch";
|
|
227
|
+
identity_unresolved: "identity_unresolved";
|
|
228
|
+
insufficient_evidence: "insufficient_evidence";
|
|
229
|
+
}>;
|
|
230
|
+
rationale: z.ZodString;
|
|
231
|
+
basis: z.ZodObject<{
|
|
232
|
+
evidence_event_ids: z.ZodArray<z.ZodString>;
|
|
233
|
+
observation_ids: z.ZodArray<z.ZodString>;
|
|
234
|
+
retained_artifact_digests: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
}, z.core.$strict>], "status">;
|
|
237
|
+
}, z.core.$strict>;
|
|
238
|
+
export declare const companyVerificationReviewCompletionReceiptCoreSchema: z.ZodObject<{
|
|
239
|
+
order_id: z.ZodString;
|
|
240
|
+
funded_work_intent_id: z.ZodString;
|
|
241
|
+
funded_work_intent_digest: z.ZodString;
|
|
242
|
+
verification_case_id: z.ZodString;
|
|
243
|
+
method_policy_digest: z.ZodString;
|
|
244
|
+
reviewer_id: z.ZodString;
|
|
245
|
+
reviewed_at: z.ZodISODateTime;
|
|
246
|
+
readback_release_id: z.ZodString;
|
|
247
|
+
work_outcome: z.ZodLiteral<"review_delivered">;
|
|
248
|
+
entity_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
249
|
+
status: z.ZodLiteral<"passed">;
|
|
250
|
+
entity_id: z.ZodString;
|
|
251
|
+
assurance: z.ZodObject<{
|
|
252
|
+
status: z.ZodLiteral<"verified">;
|
|
253
|
+
assurance_id: z.ZodString;
|
|
254
|
+
verified_at: z.ZodISODateTime;
|
|
255
|
+
identity_epoch_digest: z.ZodString;
|
|
256
|
+
method_policy_digest: z.ZodString;
|
|
257
|
+
coverage_policy_digest: z.ZodString;
|
|
258
|
+
event_id: z.ZodString;
|
|
259
|
+
receipt_digest: z.ZodString;
|
|
260
|
+
}, z.core.$strict>;
|
|
261
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
|
+
status: z.ZodLiteral<"reused">;
|
|
263
|
+
entity_id: z.ZodString;
|
|
264
|
+
assurance: z.ZodObject<{
|
|
265
|
+
status: z.ZodLiteral<"verified">;
|
|
266
|
+
assurance_id: z.ZodString;
|
|
267
|
+
verified_at: z.ZodISODateTime;
|
|
268
|
+
identity_epoch_digest: z.ZodString;
|
|
269
|
+
method_policy_digest: z.ZodString;
|
|
270
|
+
coverage_policy_digest: z.ZodString;
|
|
271
|
+
event_id: z.ZodString;
|
|
272
|
+
receipt_digest: z.ZodString;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
+
status: z.ZodLiteral<"failed">;
|
|
276
|
+
entity_id: z.ZodString;
|
|
277
|
+
reason_code: z.ZodEnum<{
|
|
278
|
+
identity_mismatch: "identity_mismatch";
|
|
279
|
+
identity_unresolved: "identity_unresolved";
|
|
280
|
+
insufficient_evidence: "insufficient_evidence";
|
|
281
|
+
}>;
|
|
282
|
+
rationale: z.ZodString;
|
|
283
|
+
basis: z.ZodObject<{
|
|
284
|
+
evidence_event_ids: z.ZodArray<z.ZodString>;
|
|
285
|
+
observation_ids: z.ZodArray<z.ZodString>;
|
|
286
|
+
retained_artifact_digests: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
287
|
+
}, z.core.$strict>;
|
|
288
|
+
}, z.core.$strict>], "status">;
|
|
289
|
+
receipt_contract: z.ZodLiteral<"sourcey.company-review-completion/v1alpha1">;
|
|
290
|
+
target: z.ZodObject<{
|
|
291
|
+
kind: z.ZodLiteral<"git_pull_request">;
|
|
292
|
+
base_release_id: z.ZodString;
|
|
293
|
+
entity_id: z.ZodString;
|
|
294
|
+
pull_request: z.ZodObject<{
|
|
295
|
+
repository_id: z.ZodString;
|
|
296
|
+
repository: z.ZodString;
|
|
297
|
+
pull_request_number: z.ZodNumber;
|
|
298
|
+
submission_id: z.ZodString;
|
|
299
|
+
head_sha: z.ZodString;
|
|
300
|
+
}, z.core.$strict>;
|
|
301
|
+
standing_result: z.ZodObject<{
|
|
302
|
+
result_contract: z.ZodLiteral<"sourcey.standing-result/v1alpha1">;
|
|
303
|
+
policy_digest: z.ZodString;
|
|
304
|
+
evidence_digest: z.ZodString;
|
|
305
|
+
registrable_domain: z.ZodString;
|
|
306
|
+
official_source_url: z.ZodURL;
|
|
307
|
+
route: z.ZodEnum<{
|
|
308
|
+
correction_required: "correction_required";
|
|
309
|
+
free_machine_review: "free_machine_review";
|
|
310
|
+
human_verification_required: "human_verification_required";
|
|
311
|
+
repair_required: "repair_required";
|
|
312
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
313
|
+
}>;
|
|
314
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
315
|
+
evaluated_at: z.ZodISODateTime;
|
|
316
|
+
expires_at: z.ZodISODateTime;
|
|
317
|
+
result_digest: z.ZodString;
|
|
318
|
+
}, z.core.$strict>;
|
|
319
|
+
authoring_digest: z.ZodString;
|
|
320
|
+
revisions: z.ZodObject<{
|
|
321
|
+
entity_revision_digest: z.ZodString;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
labels: z.ZodObject<{
|
|
324
|
+
company_name: z.ZodString;
|
|
325
|
+
company_site_url: z.ZodURL;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
reviewed_revision: z.ZodObject<{
|
|
329
|
+
submission_id: z.ZodString;
|
|
330
|
+
revision_digest: z.ZodString;
|
|
331
|
+
head_sha: z.ZodString;
|
|
332
|
+
entity_revision_digest: z.ZodString;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
}, z.core.$strict>;
|
|
335
|
+
export declare const companyVerificationReviewCompletionReceiptSchema: z.ZodObject<{
|
|
336
|
+
order_id: z.ZodString;
|
|
337
|
+
funded_work_intent_id: z.ZodString;
|
|
338
|
+
funded_work_intent_digest: z.ZodString;
|
|
339
|
+
verification_case_id: z.ZodString;
|
|
340
|
+
method_policy_digest: z.ZodString;
|
|
341
|
+
reviewer_id: z.ZodString;
|
|
342
|
+
reviewed_at: z.ZodISODateTime;
|
|
343
|
+
readback_release_id: z.ZodString;
|
|
344
|
+
work_outcome: z.ZodLiteral<"review_delivered">;
|
|
345
|
+
entity_identity: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
346
|
+
status: z.ZodLiteral<"passed">;
|
|
347
|
+
entity_id: z.ZodString;
|
|
348
|
+
assurance: z.ZodObject<{
|
|
349
|
+
status: z.ZodLiteral<"verified">;
|
|
350
|
+
assurance_id: z.ZodString;
|
|
351
|
+
verified_at: z.ZodISODateTime;
|
|
352
|
+
identity_epoch_digest: z.ZodString;
|
|
353
|
+
method_policy_digest: z.ZodString;
|
|
354
|
+
coverage_policy_digest: z.ZodString;
|
|
355
|
+
event_id: z.ZodString;
|
|
356
|
+
receipt_digest: z.ZodString;
|
|
357
|
+
}, z.core.$strict>;
|
|
358
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
359
|
+
status: z.ZodLiteral<"reused">;
|
|
360
|
+
entity_id: z.ZodString;
|
|
361
|
+
assurance: z.ZodObject<{
|
|
362
|
+
status: z.ZodLiteral<"verified">;
|
|
363
|
+
assurance_id: z.ZodString;
|
|
364
|
+
verified_at: z.ZodISODateTime;
|
|
365
|
+
identity_epoch_digest: z.ZodString;
|
|
366
|
+
method_policy_digest: z.ZodString;
|
|
367
|
+
coverage_policy_digest: z.ZodString;
|
|
368
|
+
event_id: z.ZodString;
|
|
369
|
+
receipt_digest: z.ZodString;
|
|
370
|
+
}, z.core.$strict>;
|
|
371
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
372
|
+
status: z.ZodLiteral<"failed">;
|
|
373
|
+
entity_id: z.ZodString;
|
|
374
|
+
reason_code: z.ZodEnum<{
|
|
375
|
+
identity_mismatch: "identity_mismatch";
|
|
376
|
+
identity_unresolved: "identity_unresolved";
|
|
377
|
+
insufficient_evidence: "insufficient_evidence";
|
|
378
|
+
}>;
|
|
379
|
+
rationale: z.ZodString;
|
|
380
|
+
basis: z.ZodObject<{
|
|
381
|
+
evidence_event_ids: z.ZodArray<z.ZodString>;
|
|
382
|
+
observation_ids: z.ZodArray<z.ZodString>;
|
|
383
|
+
retained_artifact_digests: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
}, z.core.$strict>], "status">;
|
|
386
|
+
receipt_contract: z.ZodLiteral<"sourcey.company-review-completion/v1alpha1">;
|
|
387
|
+
target: z.ZodObject<{
|
|
388
|
+
kind: z.ZodLiteral<"git_pull_request">;
|
|
389
|
+
base_release_id: z.ZodString;
|
|
390
|
+
entity_id: z.ZodString;
|
|
391
|
+
pull_request: z.ZodObject<{
|
|
392
|
+
repository_id: z.ZodString;
|
|
393
|
+
repository: z.ZodString;
|
|
394
|
+
pull_request_number: z.ZodNumber;
|
|
395
|
+
submission_id: z.ZodString;
|
|
396
|
+
head_sha: z.ZodString;
|
|
397
|
+
}, z.core.$strict>;
|
|
398
|
+
standing_result: z.ZodObject<{
|
|
399
|
+
result_contract: z.ZodLiteral<"sourcey.standing-result/v1alpha1">;
|
|
400
|
+
policy_digest: z.ZodString;
|
|
401
|
+
evidence_digest: z.ZodString;
|
|
402
|
+
registrable_domain: z.ZodString;
|
|
403
|
+
official_source_url: z.ZodURL;
|
|
404
|
+
route: z.ZodEnum<{
|
|
405
|
+
correction_required: "correction_required";
|
|
406
|
+
free_machine_review: "free_machine_review";
|
|
407
|
+
human_verification_required: "human_verification_required";
|
|
408
|
+
repair_required: "repair_required";
|
|
409
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
410
|
+
}>;
|
|
411
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
412
|
+
evaluated_at: z.ZodISODateTime;
|
|
413
|
+
expires_at: z.ZodISODateTime;
|
|
414
|
+
result_digest: z.ZodString;
|
|
415
|
+
}, z.core.$strict>;
|
|
416
|
+
authoring_digest: z.ZodString;
|
|
417
|
+
revisions: z.ZodObject<{
|
|
418
|
+
entity_revision_digest: z.ZodString;
|
|
419
|
+
}, z.core.$strict>;
|
|
420
|
+
labels: z.ZodObject<{
|
|
421
|
+
company_name: z.ZodString;
|
|
422
|
+
company_site_url: z.ZodURL;
|
|
423
|
+
}, z.core.$strict>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
reviewed_revision: z.ZodObject<{
|
|
426
|
+
submission_id: z.ZodString;
|
|
427
|
+
revision_digest: z.ZodString;
|
|
428
|
+
head_sha: z.ZodString;
|
|
429
|
+
entity_revision_digest: z.ZodString;
|
|
430
|
+
}, z.core.$strict>;
|
|
431
|
+
receipt_digest: z.ZodString;
|
|
432
|
+
}, z.core.$strict>;
|
|
433
|
+
export type CompanyVerificationServicePolicy = z.infer<typeof companyVerificationServicePolicySchema>;
|
|
434
|
+
export type CompanyVerificationPurchasePreview = z.infer<typeof companyVerificationPurchasePreviewSchema>;
|
|
435
|
+
export type CompanyVerificationGitPullRequestTarget = z.infer<typeof companyVerificationGitPullRequestTargetSchema>;
|
|
436
|
+
export type CompanyVerificationReviewedRevision = z.infer<typeof companyVerificationReviewedRevisionSchema>;
|
|
437
|
+
export type CompanyVerificationFundedWorkIntent = z.infer<typeof companyVerificationFundedWorkIntentSchema>;
|
|
438
|
+
export type CompanyVerificationReviewDecision = z.infer<typeof companyVerificationReviewDecisionSchema>;
|
|
439
|
+
export type CompanyVerificationReviewCompletionReceipt = z.infer<typeof companyVerificationReviewCompletionReceiptSchema>;
|
|
440
|
+
//# sourceMappingURL=commercial.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commercial.d.ts","sourceRoot":"","sources":["../../../../contracts/company-verification/src/commercial.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,8BAA8B,EAAG,4BAAqC,CAAC;AACpF,eAAO,MAAM,wBAAwB;aAAK,QAAQ,EAAE,KAAK;aAAE,WAAW,EAAE,IAAK;CAAW,CAAC;AACzF,eAAO,MAAM,iCAAiC,EAAG,mCAA4C,CAAC;AAC9F,eAAO,MAAM,8CAA8C,EACzD,kUAA2U,CAAC;AAE9U,2FAA2F;AAC3F,eAAO,MAAM,sCAAsC;;;;;;;;;kBAuB/C,CAAC;AASL,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;kBAaxC,CAAC;AAEZ,eAAO,MAAM,uCAAuC;;;;;;;;;kBAYzC,CAAC;AAEZ,eAAO,MAAM,2CAA2C;;;kBAK7C,CAAC;AAoCZ,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE1C,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2B/C,CAAC;AAEZ,6FAA6F;AAC7F,eAAO,MAAM,yCAAyC;;;;;kBAO3C,CAAC;AAEZ,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsDlD,CAAC;AAEL,iGAAiG;AACjG,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;kBAEzC,CAAC;AAEZ,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgB7D,CAAC;AAEL,eAAO,MAAM,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGhD,CAAC;AAEd,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAC;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,6CAA6C,CACrD,CAAC;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAC;AACF,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,gDAAgD,CACxD,CAAC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { DIGEST_PATTERN } from "provenry/primitives";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ENTITY_ID_PATTERN } from "../../../modules/catalog-primitives/src/index.js";
|
|
4
|
+
import { standingResultSchema } from "../../company-standing/src/index.js";
|
|
5
|
+
import { fundedWorkIntentEnvelopeSchema } from "../../funded-work/src/index.js";
|
|
6
|
+
import { companyIdentityReviewDecisionSchema, completedCompanyReviewCoreSchema } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Sourcey's company-only Human Verification: a person verifies one company that falls below the
|
|
9
|
+
* standing bar, with no Offer, and the verified company is published. Its records are its own
|
|
10
|
+
* contracts; the Offer product's records keep theirs byte for byte.
|
|
11
|
+
*/
|
|
12
|
+
const digestSchema = z.string().regex(DIGEST_PATTERN);
|
|
13
|
+
const entityIdSchema = z.string().regex(ENTITY_ID_PATTERN);
|
|
14
|
+
const instantSchema = z.iso.datetime({ offset: true });
|
|
15
|
+
export const companyVerificationProductCode = "company-human-verification";
|
|
16
|
+
export const companyVerificationPrice = { currency: "usd", minor_units: 2_900 };
|
|
17
|
+
export const companyVerificationPriceLookupKey = "company-human-verification-usd-29";
|
|
18
|
+
export const companyVerificationPurchaseDisclosureStatement = "Human verification of a company includes publication of a supportable company record with verified status for a legitimate company. Sourcey cannot publish false, unsafe, conflicting, duplicate, or non-existent company claims. Refunds apply when Sourcey cannot deliver the purchased service or misses the review deadline.";
|
|
19
|
+
/** The business days a paid verification is delivered in, counted on Sydney's calendar. */
|
|
20
|
+
export const humanVerificationServiceCalendarSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
time_zone: z.literal("Australia/Sydney"),
|
|
23
|
+
business_days: z.literal(3),
|
|
24
|
+
counting: z.literal("next-business-day"),
|
|
25
|
+
deadline: z.literal("end-of-local-day"),
|
|
26
|
+
holiday_dates: z.array(z.iso.date()).min(1),
|
|
27
|
+
valid_through: z.iso.date(),
|
|
28
|
+
source_url: z.literal("https://www.nsw.gov.au/about-nsw/public-holidays"),
|
|
29
|
+
source_observed_at: instantSchema,
|
|
30
|
+
})
|
|
31
|
+
.strict()
|
|
32
|
+
.superRefine((calendar, context) => {
|
|
33
|
+
if (new Set(calendar.holiday_dates).size !== calendar.holiday_dates.length) {
|
|
34
|
+
context.addIssue({ code: "custom", message: "Service holidays must be unique." });
|
|
35
|
+
}
|
|
36
|
+
if (calendar.holiday_dates.some((date, index) => index > 0 && (calendar.holiday_dates[index - 1] ?? "") >= date)) {
|
|
37
|
+
context.addIssue({ code: "custom", message: "Service holidays must be sorted." });
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const companyVerificationPriceSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
currency: z.literal(companyVerificationPrice.currency),
|
|
43
|
+
minor_units: z.literal(companyVerificationPrice.minor_units),
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
46
|
+
export const companyVerificationServicePolicySchema = z
|
|
47
|
+
.object({
|
|
48
|
+
policy_contract: z.literal("sourcey.company-verification-service-policy/v1alpha1"),
|
|
49
|
+
product_code: z.literal(companyVerificationProductCode),
|
|
50
|
+
price_lookup_key: z.literal(companyVerificationPriceLookupKey),
|
|
51
|
+
price: companyVerificationPriceSchema,
|
|
52
|
+
service_calendar: humanVerificationServiceCalendarSchema,
|
|
53
|
+
material_misrepresentation_refundable: z.literal(false),
|
|
54
|
+
sla_miss_refundable: z.literal(true),
|
|
55
|
+
sourcey_error_refundable: z.literal(true),
|
|
56
|
+
payment_authorizes_human_verification: z.literal(true),
|
|
57
|
+
payment_changes_truth: z.literal(false),
|
|
58
|
+
})
|
|
59
|
+
.strict();
|
|
60
|
+
export const companyVerificationWorkDefinitionSchema = z
|
|
61
|
+
.object({
|
|
62
|
+
work_contract: z.literal("sourcey.company-review-work-definition/v1alpha1"),
|
|
63
|
+
scope: z.literal("one-entity"),
|
|
64
|
+
passing_results: z
|
|
65
|
+
.object({
|
|
66
|
+
entity_identity: z
|
|
67
|
+
.object({ status: z.literal("verified"), binding: z.literal("identity-epoch") })
|
|
68
|
+
.strict(),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
})
|
|
72
|
+
.strict();
|
|
73
|
+
export const companyVerificationPurchaseDisclosureSchema = z
|
|
74
|
+
.object({
|
|
75
|
+
disclosure_contract: z.literal("sourcey.company-purchase-disclosure/v1alpha1"),
|
|
76
|
+
statement: z.literal(companyVerificationPurchaseDisclosureStatement),
|
|
77
|
+
})
|
|
78
|
+
.strict();
|
|
79
|
+
const companyVerificationPurchasePreviewCoreSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
preview_contract: z.literal("sourcey.company-purchase-preview/v1alpha1"),
|
|
82
|
+
product_code: z.literal(companyVerificationProductCode),
|
|
83
|
+
purchase_kind: z.literal("one_off"),
|
|
84
|
+
price_lookup_key: z.literal(companyVerificationPriceLookupKey),
|
|
85
|
+
price: companyVerificationPriceSchema,
|
|
86
|
+
work_scope: z.literal("one-entity"),
|
|
87
|
+
passing_results: companyVerificationWorkDefinitionSchema.shape.passing_results,
|
|
88
|
+
service_level: z
|
|
89
|
+
.object({
|
|
90
|
+
starts_after: z.literal("settled-payment"),
|
|
91
|
+
business_days: z.literal(3),
|
|
92
|
+
time_zone: z.literal("Australia/Sydney"),
|
|
93
|
+
})
|
|
94
|
+
.strict(),
|
|
95
|
+
refunds: z
|
|
96
|
+
.object({
|
|
97
|
+
material_misrepresentation_refundable: z.literal(false),
|
|
98
|
+
service_level_missed_refundable: z.literal(true),
|
|
99
|
+
sourcey_error_refundable: z.literal(true),
|
|
100
|
+
})
|
|
101
|
+
.strict(),
|
|
102
|
+
disclosure: companyVerificationPurchaseDisclosureSchema.shape.statement,
|
|
103
|
+
policy_bindings: z
|
|
104
|
+
.object({
|
|
105
|
+
assurance_method: digestSchema,
|
|
106
|
+
purchase_disclosure: digestSchema,
|
|
107
|
+
service: digestSchema,
|
|
108
|
+
})
|
|
109
|
+
.strict(),
|
|
110
|
+
})
|
|
111
|
+
.strict();
|
|
112
|
+
export const companyVerificationPurchasePreviewSchema = companyVerificationPurchasePreviewCoreSchema
|
|
113
|
+
.safeExtend({ preview_digest: digestSchema })
|
|
114
|
+
.strict();
|
|
115
|
+
/**
|
|
116
|
+
* A data repository's pull request adding a company alone (no Offer) below Sourcey's standing bar.
|
|
117
|
+
* The order serves the pull request's own submission and its exact Entity; the head is where it
|
|
118
|
+
* was bought. A later head keeps the service while it keeps that Entity, and the person verifies
|
|
119
|
+
* each head again.
|
|
120
|
+
*/
|
|
121
|
+
export const companyVerificationGitPullRequestTargetSchema = z
|
|
122
|
+
.object({
|
|
123
|
+
kind: z.literal("git_pull_request"),
|
|
124
|
+
base_release_id: digestSchema,
|
|
125
|
+
entity_id: entityIdSchema,
|
|
126
|
+
pull_request: z
|
|
127
|
+
.object({
|
|
128
|
+
repository_id: z.string().regex(/^[1-9][0-9]*$/u),
|
|
129
|
+
repository: z.string().regex(/^[A-Za-z0-9-]+\/[A-Za-z0-9._-]+$/u),
|
|
130
|
+
pull_request_number: z.number().int().positive(),
|
|
131
|
+
submission_id: z.string().regex(/^pull_[a-f0-9]{64}$/u),
|
|
132
|
+
head_sha: z.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/u),
|
|
133
|
+
})
|
|
134
|
+
.strict(),
|
|
135
|
+
standing_result: standingResultSchema,
|
|
136
|
+
/** The canonical Entity authoring at the head it was bought at. */
|
|
137
|
+
authoring_digest: digestSchema,
|
|
138
|
+
/** The exact Entity revision that head compiles to. */
|
|
139
|
+
revisions: z.object({ entity_revision_digest: digestSchema }).strict(),
|
|
140
|
+
/** What that head names, as the person verifying it reads it. */
|
|
141
|
+
labels: z
|
|
142
|
+
.object({
|
|
143
|
+
company_name: z.string().trim().min(1).max(240),
|
|
144
|
+
company_site_url: z.url({ protocol: /^https$/u }),
|
|
145
|
+
})
|
|
146
|
+
.strict(),
|
|
147
|
+
})
|
|
148
|
+
.strict();
|
|
149
|
+
/** The exact pull request head a person verified, and the Entity revision it compiles to. */
|
|
150
|
+
export const companyVerificationReviewedRevisionSchema = z
|
|
151
|
+
.object({
|
|
152
|
+
submission_id: z.string().regex(/^pull_[a-f0-9]{64}$/u),
|
|
153
|
+
revision_digest: digestSchema,
|
|
154
|
+
head_sha: z.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/u),
|
|
155
|
+
entity_revision_digest: digestSchema,
|
|
156
|
+
})
|
|
157
|
+
.strict();
|
|
158
|
+
export const companyVerificationFundedWorkIntentSchema = z
|
|
159
|
+
.object({
|
|
160
|
+
product_intent_contract: z.literal("sourcey.company-human-verification-intent/v1alpha1"),
|
|
161
|
+
verification_case_id: z.string().regex(/^hvc_[a-f0-9]{64}$/u),
|
|
162
|
+
billing: fundedWorkIntentEnvelopeSchema,
|
|
163
|
+
target: companyVerificationGitPullRequestTargetSchema,
|
|
164
|
+
purchase_preview_digest: digestSchema,
|
|
165
|
+
disclosure_digest: digestSchema,
|
|
166
|
+
product_intent_digest: digestSchema,
|
|
167
|
+
})
|
|
168
|
+
.strict()
|
|
169
|
+
.superRefine((intent, context) => {
|
|
170
|
+
const issue = (path, message) => context.addIssue({ code: "custom", path, message });
|
|
171
|
+
const { billing, target } = intent;
|
|
172
|
+
if (billing.product_code !== companyVerificationProductCode) {
|
|
173
|
+
issue(["billing", "product_code"], "Company verification uses its own product code.");
|
|
174
|
+
}
|
|
175
|
+
if (billing.price_lookup_key !== companyVerificationPriceLookupKey) {
|
|
176
|
+
issue(["billing", "price_lookup_key"], "Company verification uses its own price key.");
|
|
177
|
+
}
|
|
178
|
+
if (billing.work_class !== "human-verification") {
|
|
179
|
+
issue(["billing", "work_class"], "Company verification remains human verification.");
|
|
180
|
+
}
|
|
181
|
+
if (target.standing_result.route !== "human_verification_required") {
|
|
182
|
+
issue(["target", "standing_result", "route"], "A company is verified for payment only when it falls below the standing bar.");
|
|
183
|
+
}
|
|
184
|
+
if (billing.eligibility_digest !== target.standing_result.result_digest) {
|
|
185
|
+
issue(["billing", "eligibility_digest"], "Billing binds the exact standing result.");
|
|
186
|
+
}
|
|
187
|
+
const bindings = new Map(billing.policy_bindings.map((b) => [b.role, b.policy_digest]));
|
|
188
|
+
if (bindings.get("standing") !== target.standing_result.policy_digest) {
|
|
189
|
+
issue(["billing", "policy_bindings"], "The standing binding matches the standing result.");
|
|
190
|
+
}
|
|
191
|
+
if (bindings.get("purchase-disclosure") !== intent.disclosure_digest) {
|
|
192
|
+
issue(["billing", "policy_bindings"], "The disclosure binding matches the disclosure.");
|
|
193
|
+
}
|
|
194
|
+
for (const role of ["assurance-method", "service"]) {
|
|
195
|
+
if (!bindings.has(role)) {
|
|
196
|
+
issue(["billing", "policy_bindings"], `The ${role} policy binding is required.`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (billing.owner_work_ref !== intent.verification_case_id ||
|
|
200
|
+
billing.base_release_id !== target.base_release_id ||
|
|
201
|
+
billing.subject.entity_id !== target.entity_id ||
|
|
202
|
+
billing.subject.program_id !== undefined ||
|
|
203
|
+
billing.subject.offer_id !== undefined) {
|
|
204
|
+
issue(["billing"], "Billing binds this exact verification case and its company alone.");
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
/** What a person records verifying a company alone: its identity, and nothing about an Offer. */
|
|
208
|
+
export const companyVerificationReviewDecisionSchema = z
|
|
209
|
+
.object({ entity_identity: companyIdentityReviewDecisionSchema })
|
|
210
|
+
.strict();
|
|
211
|
+
export const companyVerificationReviewCompletionReceiptCoreSchema = completedCompanyReviewCoreSchema
|
|
212
|
+
.safeExtend({
|
|
213
|
+
receipt_contract: z.literal("sourcey.company-review-completion/v1alpha1"),
|
|
214
|
+
target: companyVerificationGitPullRequestTargetSchema,
|
|
215
|
+
/** The exact head the person verified, which may follow the one bought. */
|
|
216
|
+
reviewed_revision: companyVerificationReviewedRevisionSchema,
|
|
217
|
+
})
|
|
218
|
+
.strict()
|
|
219
|
+
.superRefine((receipt, context) => {
|
|
220
|
+
if (receipt.reviewed_revision.submission_id !== receipt.target.pull_request.submission_id) {
|
|
221
|
+
context.addIssue({
|
|
222
|
+
code: "custom",
|
|
223
|
+
path: ["reviewed_revision"],
|
|
224
|
+
message: "A pull request's completion names exactly the head its person verified.",
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
export const companyVerificationReviewCompletionReceiptSchema = companyVerificationReviewCompletionReceiptCoreSchema
|
|
229
|
+
.safeExtend({ receipt_digest: digestSchema })
|
|
230
|
+
.strict();
|
|
231
|
+
//# sourceMappingURL=commercial.js.map
|