@nextcommerce/campaigns-os 1.33.0
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/AGENTS.md +204 -0
- package/CHANGELOG.md +5002 -0
- package/CONTEXT.md +685 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +368 -0
- package/agents/claude/CLAUDE.md +32 -0
- package/agents/codex/AGENTS.md +27 -0
- package/agents/copilot/copilot-instructions.md +14 -0
- package/agents/cursor/campaigns-os.mdc +13 -0
- package/bin/campaigns-os.mjs +38 -0
- package/campaign-spec/README.md +138 -0
- package/campaign-spec/dist/analytics-vocabulary.d.ts +47 -0
- package/campaign-spec/dist/analytics-vocabulary.js +74 -0
- package/campaign-spec/dist/index.d.ts +40 -0
- package/campaign-spec/dist/index.js +77 -0
- package/campaign-spec/dist/normalize.d.ts +22 -0
- package/campaign-spec/dist/normalize.js +41 -0
- package/campaign-spec/dist/routing.d.ts +190 -0
- package/campaign-spec/dist/routing.js +263 -0
- package/campaign-spec/dist/rules/analytics-contract-shape.d.ts +42 -0
- package/campaign-spec/dist/rules/analytics-contract-shape.js +303 -0
- package/campaign-spec/dist/rules/assembly-hints-shape.d.ts +42 -0
- package/campaign-spec/dist/rules/assembly-hints-shape.js +191 -0
- package/campaign-spec/dist/rules/campaign-metadata.d.ts +14 -0
- package/campaign-spec/dist/rules/campaign-metadata.js +40 -0
- package/campaign-spec/dist/rules/checkout-has-success-url.d.ts +31 -0
- package/campaign-spec/dist/rules/checkout-has-success-url.js +66 -0
- package/campaign-spec/dist/rules/cycle-detection.d.ts +12 -0
- package/campaign-spec/dist/rules/cycle-detection.js +141 -0
- package/campaign-spec/dist/rules/design-source-shape.d.ts +29 -0
- package/campaign-spec/dist/rules/design-source-shape.js +142 -0
- package/campaign-spec/dist/rules/downsell-without-upsell.d.ts +11 -0
- package/campaign-spec/dist/rules/downsell-without-upsell.js +40 -0
- package/campaign-spec/dist/rules/exit-intent-validation.d.ts +23 -0
- package/campaign-spec/dist/rules/exit-intent-validation.js +147 -0
- package/campaign-spec/dist/rules/funnel-count.d.ts +9 -0
- package/campaign-spec/dist/rules/funnel-count.js +37 -0
- package/campaign-spec/dist/rules/funnel-hypothesis-length.d.ts +22 -0
- package/campaign-spec/dist/rules/funnel-hypothesis-length.js +60 -0
- package/campaign-spec/dist/rules/funnel-identity.d.ts +15 -0
- package/campaign-spec/dist/rules/funnel-identity.js +57 -0
- package/campaign-spec/dist/rules/funnel-weight-sum.d.ts +20 -0
- package/campaign-spec/dist/rules/funnel-weight-sum.js +66 -0
- package/campaign-spec/dist/rules/index.d.ts +69 -0
- package/campaign-spec/dist/rules/index.js +131 -0
- package/campaign-spec/dist/rules/offer-ref-integrity.d.ts +13 -0
- package/campaign-spec/dist/rules/offer-ref-integrity.js +59 -0
- package/campaign-spec/dist/rules/package-pricing-sanity.d.ts +12 -0
- package/campaign-spec/dist/rules/package-pricing-sanity.js +42 -0
- package/campaign-spec/dist/rules/page-count.d.ts +11 -0
- package/campaign-spec/dist/rules/page-count.js +31 -0
- package/campaign-spec/dist/rules/page-id-uniqueness.d.ts +14 -0
- package/campaign-spec/dist/rules/page-id-uniqueness.js +47 -0
- package/campaign-spec/dist/rules/promo-code-input-validation.d.ts +8 -0
- package/campaign-spec/dist/rules/promo-code-input-validation.js +126 -0
- package/campaign-spec/dist/rules/promo-codes-shape.d.ts +30 -0
- package/campaign-spec/dist/rules/promo-codes-shape.js +187 -0
- package/campaign-spec/dist/rules/route-field-ignored-for-page-type.d.ts +33 -0
- package/campaign-spec/dist/rules/route-field-ignored-for-page-type.js +81 -0
- package/campaign-spec/dist/rules/route-target-resolves.d.ts +32 -0
- package/campaign-spec/dist/rules/route-target-resolves.js +112 -0
- package/campaign-spec/dist/rules/schema-version.d.ts +21 -0
- package/campaign-spec/dist/rules/schema-version.js +53 -0
- package/campaign-spec/dist/rules/sdk-version.d.ts +26 -0
- package/campaign-spec/dist/rules/sdk-version.js +96 -0
- package/campaign-spec/dist/rules/shipping-countries-shape.d.ts +10 -0
- package/campaign-spec/dist/rules/shipping-countries-shape.js +30 -0
- package/campaign-spec/dist/rules/shipping-methods-present.d.ts +10 -0
- package/campaign-spec/dist/rules/shipping-methods-present.js +26 -0
- package/campaign-spec/dist/rules/store-profile-shape.d.ts +30 -0
- package/campaign-spec/dist/rules/store-profile-shape.js +127 -0
- package/campaign-spec/dist/rules/thank-you-requirement.d.ts +16 -0
- package/campaign-spec/dist/rules/thank-you-requirement.js +50 -0
- package/campaign-spec/dist/rules/unknown-top-level-fields.d.ts +28 -0
- package/campaign-spec/dist/rules/unknown-top-level-fields.js +114 -0
- package/campaign-spec/dist/rules/upsell-has-packages.d.ts +9 -0
- package/campaign-spec/dist/rules/upsell-has-packages.js +35 -0
- package/campaign-spec/dist/rules/upsell-routing-complete.d.ts +10 -0
- package/campaign-spec/dist/rules/upsell-routing-complete.js +45 -0
- package/campaign-spec/dist/rules/upsell-without-checkout.d.ts +11 -0
- package/campaign-spec/dist/rules/upsell-without-checkout.js +44 -0
- package/campaign-spec/dist/rules/variant-labels-shape.d.ts +28 -0
- package/campaign-spec/dist/rules/variant-labels-shape.js +86 -0
- package/campaign-spec/dist/sdk-version-parse.d.ts +43 -0
- package/campaign-spec/dist/sdk-version-parse.js +62 -0
- package/campaign-spec/dist/types.d.ts +674 -0
- package/campaign-spec/dist/types.js +40 -0
- package/campaign-spec/package.json +12 -0
- package/compatibility.json +25 -0
- package/contracts/agent-relevant-change-policy.v1.json +111 -0
- package/contracts/brand-theme-source-defaults.figma-sections-export.v0.json +32 -0
- package/contracts/brand-theme-target-tokens.next-core.v0.json +65 -0
- package/contracts/campaign-cart-checkout-field-contract.v0.json +45 -0
- package/contracts/campaign-cart-sdk-support-policy.v0.json +11 -0
- package/contracts/commerce-surface-catalog.json +2452 -0
- package/contracts/fixtures/orientation/canonicalization/v1.json +34 -0
- package/contracts/fixtures/orientation/envelope/current.json +95 -0
- package/contracts/fixtures/orientation/envelope/freshness_unknown.json +97 -0
- package/contracts/fixtures/orientation/envelope/legacy_baseline.json +95 -0
- package/contracts/fixtures/orientation/envelope/orientation_available.json +136 -0
- package/contracts/fixtures/orientation/envelope/recovered_interrupted_update.json +136 -0
- package/contracts/fixtures/orientation/envelope/refused.json +100 -0
- package/contracts/fixtures/orientation/envelope/restart_required.json +137 -0
- package/contracts/fixtures/orientation/envelope/updated.json +135 -0
- package/contracts/fixtures/orientation/hostile-target/README.md +61 -0
- package/contracts/fixtures/orientation/hostile-target/manifest.json +82 -0
- package/contracts/fixtures/orientation/hostile-target/repo/CHANGELOG.md +18 -0
- package/contracts/fixtures/orientation/hostile-target/repo/bin/intended.mjs +12 -0
- package/contracts/fixtures/orientation/hostile-target/repo/bin/tripwire.mjs +15 -0
- package/contracts/fixtures/orientation/hostile-target/repo/contracts/release-ledger.json +48 -0
- package/contracts/fixtures/orientation/hostile-target/repo/contracts/supported-surface.json +17 -0
- package/contracts/fixtures/orientation/hostile-target/repo/docs/example-contract.md +13 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-checkout +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-merge +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/pre-commit +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/package.json +15 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/tripwire.mjs +9 -0
- package/contracts/fixtures/orientation/hostile-target/repo/package.json +20 -0
- package/contracts/fixtures/orientation/hostile-target/repo/schemas/example.v0.schema.json +15 -0
- package/contracts/fixtures/orientation/release-gate/cases.json +1073 -0
- package/contracts/fixtures/runtime-recipe/accept/current.json +299 -0
- package/contracts/fixtures/runtime-recipe/accept/minimal.json +294 -0
- package/contracts/fixtures/runtime-recipe/dist-states.json +51 -0
- package/contracts/fixtures/runtime-recipe/manifest.json +85 -0
- package/contracts/fixtures/runtime-recipe/reject/advisory-enforcement.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/allowlist-without-hosts.json +297 -0
- package/contracts/fixtures/runtime-recipe/reject/committed-output-claim.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/engines-disagreement-warns.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/lifecycle-scripts-enabled.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/missing-required-field.json +251 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-kind.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-network-policy.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-output-check.json +310 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-revision.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-step-id.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unperformable-check-skipped.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unpinned-lockfile.json +299 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/assembly-report.json +180 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/build-context.json +115 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/doctor-output.json +29 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/qa-verdict.json +27 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/campaign-runtime.build.json +141 -0
- package/contracts/migration-sidecar-bundle.v0.json +149 -0
- package/contracts/orientation-limits.v1.json +41 -0
- package/contracts/orientation-reason-codes.v1.json +196 -0
- package/contracts/private-template-sources.json +8 -0
- package/contracts/release-ledger.json +4598 -0
- package/contracts/reserved-skill-names.json +13 -0
- package/contracts/runtime-recipe.campaigns-os-node-v1.json +299 -0
- package/contracts/supported-surface.json +180 -0
- package/contracts/template-brand-contract.apollo-mv-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.apollo.v0.json +27 -0
- package/contracts/template-brand-contract.demeter.v0.json +27 -0
- package/contracts/template-brand-contract.olympus-mv-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.olympus-mv-two-step.v0.json +28 -0
- package/contracts/template-brand-contract.olympus.v0.json +27 -0
- package/contracts/template-brand-contract.shared-commerce.v0.json +190 -0
- package/contracts/template-brand-contract.shop-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.shop-three-step.v0.json +29 -0
- package/contracts/template-slot-manifest.apollo-mv-single-step.v0.json +14 -0
- package/contracts/template-slot-manifest.apollo.v0.json +12 -0
- package/contracts/template-slot-manifest.demeter.v0.json +30 -0
- package/contracts/template-slot-manifest.olympus-mv-single-step.v0.json +14 -0
- package/contracts/template-slot-manifest.olympus-mv-two-step.v0.json +15 -0
- package/contracts/template-slot-manifest.olympus.v0.json +12 -0
- package/contracts/template-slot-manifest.shared-content-core.v0.json +4254 -0
- package/contracts/template-slot-manifest.shop-single-step.v0.json +47 -0
- package/contracts/template-slot-manifest.shop-three-step.v0.json +33 -0
- package/docs/brand-theme-bridge.md +159 -0
- package/docs/build-packet.md +1300 -0
- package/docs/campaign-build-brief.md +145 -0
- package/docs/campaign-standardization-report.md +329 -0
- package/docs/campaigns-os-build-flow.md +117 -0
- package/docs/design-source-package.md +784 -0
- package/docs/legacy-migration.md +58 -0
- package/docs/migration-sidecar-bundle.md +139 -0
- package/docs/orientation-contract-reference.md +1220 -0
- package/docs/polish-evidence.md +502 -0
- package/docs/qa-and-test-orders.md +1691 -0
- package/docs/release-ledger-authoring-guide.md +274 -0
- package/docs/runtime-readiness.md +211 -0
- package/docs/supported-surface.md +83 -0
- package/docs/versioning.md +55 -0
- package/docs/workflow-findings-sidecar.md +588 -0
- package/package.json +135 -0
- package/prompts/first-build.md +27 -0
- package/prompts/friction-log.md +30 -0
- package/schemas/campaign-build-brief.v1.schema.json +149 -0
- package/schemas/campaign-design-source-package.v0.schema.json +697 -0
- package/schemas/campaign-runtime-assembly-report.v0.schema.json +390 -0
- package/schemas/campaign-runtime-build-context.v0.schema.json +339 -0
- package/schemas/campaign-runtime-build-packet.v0.schema.json +452 -0
- package/schemas/campaign-spec.v4.schema.json +582 -0
- package/schemas/campaigns-os-doctor-output.v0.schema.json +43 -0
- package/schemas/campaigns-os-legacy-migration-inventory.v0.schema.json +112 -0
- package/schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json +38 -0
- package/schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json +57 -0
- package/schemas/campaigns-os-qa-verdict-sidecar.v0.schema.json +150 -0
- package/schemas/campaigns-os-qa-verdict.v0.schema.json +438 -0
- package/schemas/campaigns-os-release-ledger.v1.schema.json +162 -0
- package/schemas/campaigns-os-run-record.v0.schema.json +343 -0
- package/schemas/campaigns-os-runtime-recipe.v1.schema.json +313 -0
- package/schemas/campaigns-os-sidecar-bundle-conformance.v0.schema.json +78 -0
- package/schemas/campaigns-os-tooling-orientation.v1.schema.json +381 -0
- package/schemas/campaigns-os-workflow-finding.v0.schema.json +134 -0
- package/schemas/source-html-manifest.v0.schema.json +252 -0
- package/skills/next-campaigns-build/SKILL.md +73 -0
- package/skills/next-campaigns-os/SKILL.md +101 -0
- package/skills/next-campaigns-os/references/session-intake.md +160 -0
- package/skills/next-campaigns-os-setup/SKILL.md +22 -0
- package/skills/next-campaigns-polish/SKILL.md +145 -0
- package/skills/next-campaigns-qa/SKILL.md +92 -0
- package/skills.json +56 -0
- package/skills.sh +64 -0
- package/src/adapter-decision-contract.mjs +333 -0
- package/src/brand-theme.mjs +1151 -0
- package/src/browser-launch.mjs +79 -0
- package/src/build-brief.mjs +781 -0
- package/src/built-site-scope.mjs +312 -0
- package/src/campaign-ecosystem.mjs +734 -0
- package/src/campaign-identity.mjs +405 -0
- package/src/campaign-workspace.mjs +127 -0
- package/src/checkpoint-waiver.mjs +302 -0
- package/src/cli.mjs +13442 -0
- package/src/commercial-journey.mjs +1119 -0
- package/src/commercial-parity.mjs +965 -0
- package/src/consent.mjs +347 -0
- package/src/content-residue.mjs +322 -0
- package/src/deadline.mjs +81 -0
- package/src/design-source-package.mjs +2604 -0
- package/src/deviation.mjs +107 -0
- package/src/doctor-check-registry.mjs +49 -0
- package/src/doctor-sidecar.mjs +106 -0
- package/src/finding-cause.mjs +557 -0
- package/src/findings.mjs +326 -0
- package/src/fs-identity.mjs +68 -0
- package/src/gate-actions.mjs +105 -0
- package/src/html-scan.mjs +53 -0
- package/src/install-mode.mjs +272 -0
- package/src/legacy-migration.d.ts +128 -0
- package/src/legacy-migration.mjs +510 -0
- package/src/lifecycle.mjs +338 -0
- package/src/local-proof.mjs +401 -0
- package/src/map-pin-writeback.mjs +210 -0
- package/src/orchestration-stage-contract.mjs +81 -0
- package/src/package-install-fixture.mjs +33 -0
- package/src/page-kit-build-summary.mjs +175 -0
- package/src/page-kit-campaign-config.mjs +57 -0
- package/src/page-kit-sdk-version.mjs +392 -0
- package/src/page-kit-store-profile.mjs +369 -0
- package/src/page-kit-sync.mjs +162 -0
- package/src/polish-browser.mjs +867 -0
- package/src/polish-capture.mjs +1094 -0
- package/src/polish-deadline.mjs +51 -0
- package/src/polish-gate.mjs +739 -0
- package/src/polish-node.mjs +639 -0
- package/src/polish-page-load.mjs +1100 -0
- package/src/private-template-source.mjs +237 -0
- package/src/proof-policy.mjs +82 -0
- package/src/qa-analytics-correctness.mjs +307 -0
- package/src/qa-analytics-errors.mjs +38 -0
- package/src/qa-analytics-parity.mjs +699 -0
- package/src/qa-binding-evidence.mjs +140 -0
- package/src/qa-browser.mjs +6608 -0
- package/src/qa-cart-entry.mjs +406 -0
- package/src/qa-commercial-parity.mjs +641 -0
- package/src/qa-node.mjs +3620 -0
- package/src/qa-order-bump.mjs +381 -0
- package/src/qa-parity-capture.mjs +428 -0
- package/src/qa-parity-fixture.mjs +359 -0
- package/src/qa-publish.mjs +362 -0
- package/src/qa-purchase-data-layer.mjs +263 -0
- package/src/qa-route-probe.mjs +272 -0
- package/src/qa-sidecar.mjs +188 -0
- package/src/qa-test-order-topology.mjs +207 -0
- package/src/qa-url-privacy.mjs +13 -0
- package/src/qa-verdict-discovery.mjs +192 -0
- package/src/qa-verdict-publish.mjs +105 -0
- package/src/qa-verdict.mjs +287 -0
- package/src/remit.mjs +388 -0
- package/src/repo-scan.mjs +83 -0
- package/src/route-identity.mjs +133 -0
- package/src/run-record-closeout.mjs +229 -0
- package/src/run-record.mjs +839 -0
- package/src/run-session.mjs +226 -0
- package/src/runtime-state-ignore.mjs +113 -0
- package/src/sdk-attribute-index.mjs +212 -0
- package/src/sdk-markup.mjs +358 -0
- package/src/sdk-meta-tags.mjs +52 -0
- package/src/shell-token.mjs +7 -0
- package/src/sidecar-bundle.mjs +399 -0
- package/src/source-asset-crawl.mjs +469 -0
- package/src/source-html-intake.mjs +627 -0
- package/src/source-html-manifest.mjs +276 -0
- package/src/source-prep.mjs +284 -0
- package/src/spec-derive-store.mjs +431 -0
- package/src/spec-derive.mjs +514 -0
- package/src/spec-fetch.mjs +66 -0
- package/src/spec-hash.mjs +48 -0
- package/src/spec-identity.mjs +27 -0
- package/src/stage-ledger.mjs +509 -0
- package/src/standardization-report.mjs +1297 -0
- package/src/template-brand-contract.mjs +473 -0
- package/src/template-freshness.mjs +196 -0
- package/src/template-reference.mjs +81 -0
- package/src/template-slot-manifest.mjs +150 -0
- package/src/text-safety.mjs +62 -0
- package/src/theme-gate.mjs +185 -0
- package/src/upsell-selector-scope.mjs +299 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-legacy-migration-inventory.v0.schema.json",
|
|
4
|
+
"title": "Campaigns OS Legacy Migration Inventory v0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "migration_id", "source", "target"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": "campaigns-os-legacy-migration-inventory/v0" },
|
|
10
|
+
"migration_id": { "$ref": "#/$defs/key" },
|
|
11
|
+
"source": {
|
|
12
|
+
"type": "object", "additionalProperties": false,
|
|
13
|
+
"required": ["campaign_id", "sdk_version"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"campaign_id": { "type": "integer", "minimum": 1 },
|
|
16
|
+
"sdk_version": { "type": "string", "pattern": "^0\\.3\\.\\d+(?:-[0-9A-Za-z.-]+)?$" }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"target": {
|
|
20
|
+
"type": "object", "additionalProperties": false,
|
|
21
|
+
"required": ["campaign", "packages", "shipping_methods", "offer_intents", "authorized_domains"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"campaign": { "$ref": "#/$defs/campaign" },
|
|
24
|
+
"packages": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/package" } },
|
|
25
|
+
"shipping_methods": { "type": "array", "items": { "$ref": "#/$defs/shipping" } },
|
|
26
|
+
"offer_intents": { "type": "array", "items": { "$ref": "#/$defs/offer" } },
|
|
27
|
+
"authorized_domains": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/hostname" } }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"$defs": {
|
|
32
|
+
"key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$" },
|
|
33
|
+
"money": { "type": "string", "pattern": "^(?:0|[1-9]\\d{0,7})(?:\\.\\d{1,2})?$" },
|
|
34
|
+
"percentage": { "type": "string", "pattern": "^(?:(?:0\\.(?:0[1-9]|[1-9]\\d?))|(?:[1-9]\\d?(?:\\.\\d{1,2})?)|100(?:\\.0{1,2})?)$" },
|
|
35
|
+
"hostname": { "type": "string", "pattern": "^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$" },
|
|
36
|
+
"campaign": {
|
|
37
|
+
"type": "object", "additionalProperties": false,
|
|
38
|
+
"required": ["name", "currency", "language", "payment_gateway_group_id"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
41
|
+
"currency": { "type": "string", "pattern": "^[A-Za-z]{3}$" },
|
|
42
|
+
"language": { "type": "string", "minLength": 2, "maxLength": 16 },
|
|
43
|
+
"payment_gateway_group_id": { "type": "integer", "minimum": 1 },
|
|
44
|
+
"additional_currencies": { "type": "array", "items": { "type": "string" } },
|
|
45
|
+
"available_payment_methods": { "type": "array", "items": { "type": "string" } },
|
|
46
|
+
"available_express_payment_methods": { "type": "array", "items": { "type": "string" } },
|
|
47
|
+
"available_shipping_countries": { "type": "array", "items": { "type": "string" } },
|
|
48
|
+
"statement_descriptor": { "type": "string", "minLength": 1, "maxLength": 255 }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"package": {
|
|
52
|
+
"type": "object", "additionalProperties": false,
|
|
53
|
+
"required": ["package_key", "name", "product_id", "product_variant_id", "price"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"package_key": { "$ref": "#/$defs/key" },
|
|
56
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
57
|
+
"product_id": { "type": "integer", "minimum": 1 },
|
|
58
|
+
"product_variant_id": { "type": "integer", "minimum": 1 },
|
|
59
|
+
"price": { "$ref": "#/$defs/money" },
|
|
60
|
+
"price_recurring": { "$ref": "#/$defs/money" },
|
|
61
|
+
"interval": { "type": "string", "minLength": 1 },
|
|
62
|
+
"interval_count": { "type": "integer", "minimum": 1 }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"shipping": {
|
|
66
|
+
"type": "object", "additionalProperties": false,
|
|
67
|
+
"required": ["shipping_key", "shipping_method", "price"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"shipping_key": { "$ref": "#/$defs/key" },
|
|
70
|
+
"shipping_method": { "type": "string", "minLength": 1 },
|
|
71
|
+
"price": { "$ref": "#/$defs/money" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"offer": {
|
|
75
|
+
"type": "object", "additionalProperties": false,
|
|
76
|
+
"required": ["intent_key", "name", "offer_type", "condition", "benefit"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"intent_key": { "$ref": "#/$defs/key" },
|
|
79
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
80
|
+
"offer_type": { "enum": ["offer", "voucher"] },
|
|
81
|
+
"code": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
82
|
+
"condition": {
|
|
83
|
+
"type": "object", "additionalProperties": false,
|
|
84
|
+
"required": ["type", "all_packages", "package_keys"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"type": { "enum": ["any", "count"] },
|
|
87
|
+
"value": { "type": ["integer", "null"], "minimum": 1 },
|
|
88
|
+
"all_packages": { "const": false },
|
|
89
|
+
"package_keys": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/key" } }
|
|
90
|
+
},
|
|
91
|
+
"allOf": [
|
|
92
|
+
{ "if": { "properties": { "type": { "const": "count" } }, "required": ["type"] }, "then": { "required": ["value"], "properties": { "value": { "type": "integer", "minimum": 1 } } } },
|
|
93
|
+
{ "if": { "properties": { "type": { "const": "any" } }, "required": ["type"] }, "then": { "properties": { "value": { "type": "null" } } } }
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"benefit": {
|
|
97
|
+
"type": "object", "additionalProperties": false,
|
|
98
|
+
"required": ["type", "value"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"type": { "enum": ["package_percentage", "shipping_percentage", "order_percentage"] },
|
|
101
|
+
"value": { "$ref": "#/$defs/percentage" },
|
|
102
|
+
"price_rounding": { "type": ["string", "null"], "enum": ["0.00", "0.95", "0.97", "0.99", null] }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"allOf": [
|
|
107
|
+
{ "if": { "properties": { "offer_type": { "const": "voucher" } }, "required": ["offer_type"] }, "then": { "required": ["code"] } },
|
|
108
|
+
{ "if": { "properties": { "offer_type": { "const": "offer" } }, "required": ["offer_type"] }, "then": { "not": { "required": ["code"] } } }
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json",
|
|
4
|
+
"title": "Campaigns OS Legacy Provisioning Plan v0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "store", "migration_id", "inventory_hash", "preview_hash", "source", "operations", "offer_intents", "authorized_domains"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": "campaigns-os-legacy-provisioning-plan/v0" },
|
|
10
|
+
"store": { "type": "string", "minLength": 1 },
|
|
11
|
+
"migration_id": { "$ref": "#/$defs/key" },
|
|
12
|
+
"inventory_hash": { "$ref": "#/$defs/hash" },
|
|
13
|
+
"preview_hash": { "$ref": "#/$defs/hash" },
|
|
14
|
+
"source": {
|
|
15
|
+
"type": "object", "additionalProperties": false, "required": ["campaign_id", "sdk_version"],
|
|
16
|
+
"properties": { "campaign_id": { "type": "integer", "minimum": 1 }, "sdk_version": { "type": "string", "pattern": "^0\\.3\\.\\d+(?:-[0-9A-Za-z.-]+)?$" } }
|
|
17
|
+
},
|
|
18
|
+
"operations": {
|
|
19
|
+
"type": "array", "items": {
|
|
20
|
+
"type": "object", "additionalProperties": false,
|
|
21
|
+
"required": ["operation_id", "action", "resource_key", "request"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"operation_id": { "type": "string", "minLength": 1 },
|
|
24
|
+
"action": { "enum": ["campaign.create", "package.create", "shipping_method.create"] },
|
|
25
|
+
"resource_key": { "type": "string", "minLength": 1 },
|
|
26
|
+
"depends_on": { "type": "string", "minLength": 1 },
|
|
27
|
+
"request": { "type": "object" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"offer_intents": { "type": "array", "items": { "$ref": "campaigns-os-legacy-migration-inventory.v0.schema.json#/$defs/offer" } },
|
|
32
|
+
"authorized_domains": { "type": "array", "uniqueItems": true, "items": { "$ref": "campaigns-os-legacy-migration-inventory.v0.schema.json#/$defs/hostname" } }
|
|
33
|
+
},
|
|
34
|
+
"$defs": {
|
|
35
|
+
"key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$" },
|
|
36
|
+
"hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json",
|
|
4
|
+
"title": "Campaigns OS Legacy Provisioning Receipt v0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "store", "migration_id", "inventory_hash", "preview_hash", "state", "created_at", "updated_at", "campaign_id", "writes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": "campaigns-os-legacy-provisioning-receipt/v0" },
|
|
10
|
+
"store": { "type": "string", "minLength": 1 },
|
|
11
|
+
"migration_id": { "$ref": "#/$defs/key" },
|
|
12
|
+
"inventory_hash": { "$ref": "#/$defs/hash" },
|
|
13
|
+
"preview_hash": { "$ref": "#/$defs/hash", "description": "The exact confirmation hash of the preview plan; projected as plan_hash in build evidence." },
|
|
14
|
+
"state": { "enum": ["applying", "provisioned", "awaiting_manual_configuration", "failed", "reconciliation_required"] },
|
|
15
|
+
"created_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$" },
|
|
16
|
+
"updated_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$" },
|
|
17
|
+
"applied_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$" },
|
|
18
|
+
"campaign_id": { "type": ["integer", "null"], "minimum": 1 },
|
|
19
|
+
"writes": {
|
|
20
|
+
"type": "array", "items": {
|
|
21
|
+
"type": "object", "additionalProperties": false,
|
|
22
|
+
"required": ["operation_id", "action", "resource_key", "upstream_ids"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"operation_id": { "type": "string", "minLength": 1 },
|
|
25
|
+
"action": { "enum": ["campaign.create", "package.create", "shipping_method.create", "offer.create"] },
|
|
26
|
+
"resource_key": { "type": "string", "minLength": 1 },
|
|
27
|
+
"intent_key": { "$ref": "#/$defs/key" },
|
|
28
|
+
"upstream_ids": {
|
|
29
|
+
"type": "object", "additionalProperties": false, "required": ["campaign_id"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"campaign_id": { "type": "integer", "minimum": 1 },
|
|
32
|
+
"package_id": { "type": ["integer", "null"], "minimum": 1 },
|
|
33
|
+
"shipping_method_id": { "type": ["integer", "null"], "minimum": 1 },
|
|
34
|
+
"offer_id": { "type": ["integer", "null"], "minimum": 1 }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"readback": { "type": "object" },
|
|
38
|
+
"audit_key": { "type": "string", "minLength": 1 }
|
|
39
|
+
},
|
|
40
|
+
"allOf": [
|
|
41
|
+
{ "if": { "properties": { "action": { "const": "campaign.create" } }, "required": ["action"] }, "then": { "properties": { "upstream_ids": { "required": ["campaign_id"], "properties": { "campaign_id": { "type": "integer", "minimum": 1 } } } } } },
|
|
42
|
+
{ "if": { "properties": { "action": { "const": "package.create" } }, "required": ["action"] }, "then": { "properties": { "upstream_ids": { "required": ["package_id"], "properties": { "package_id": { "type": "integer", "minimum": 1 } } } } } },
|
|
43
|
+
{ "if": { "properties": { "action": { "const": "shipping_method.create" } }, "required": ["action"] }, "then": { "properties": { "upstream_ids": { "required": ["shipping_method_id"], "properties": { "shipping_method_id": { "type": "integer", "minimum": 1 } } } } } },
|
|
44
|
+
{ "if": { "properties": { "action": { "const": "offer.create" } }, "required": ["action"] }, "then": { "required": ["intent_key"], "properties": { "upstream_ids": { "required": ["offer_id"], "properties": { "offer_id": { "type": "integer", "minimum": 1 } } } } } }
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"failure": { "type": ["object", "null"] }
|
|
49
|
+
},
|
|
50
|
+
"allOf": [
|
|
51
|
+
{ "if": { "properties": { "state": { "enum": ["provisioned", "awaiting_manual_configuration"] } }, "required": ["state"] }, "then": { "required": ["applied_at"], "properties": { "campaign_id": { "type": "integer", "minimum": 1 } } } }
|
|
52
|
+
],
|
|
53
|
+
"$defs": {
|
|
54
|
+
"key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$" },
|
|
55
|
+
"hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-qa-verdict-sidecar.v0.schema.json",
|
|
4
|
+
"title": "Campaigns OS QA Verdict Sidecar v0",
|
|
5
|
+
"description": "The committed QA verdict sidecar written to .campaign-runtime/qa-verdict.json beside the Build Packet — the artifact campaigns-agent's readback consumes. It is an allowlist PROJECTION of one full verdict (campaigns-os-qa-verdict.v0.schema.json), never a copy: it keeps the same schema_version literal \"1.0\" (a second version would fork the read end), keeps identity, disposition, per-assertion id/family/page/status/severity/blocked_by, and trimmed exceptions, and empties every URL-bearing field — full verdicts stay gitignored because they carry live storefront URLs, request evidence, and order references. generated_at is stamped at projection/promotion time. Produced only by `qa run` and `qa promote` (never hand-authored), and only from a verdict the projection accepts: a record stamped trusted: false by the QA verdict receiver (an anonymous submission) is refused, so the trust fields can never legitimately appear here. Additions to v0 are expected; consumers must tolerate unknown fields — but the properties this projection deliberately empties or strips are pinned empty/absent below.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"run_id",
|
|
11
|
+
"campaign_slug",
|
|
12
|
+
"spec_version",
|
|
13
|
+
"spec_hash",
|
|
14
|
+
"started_at",
|
|
15
|
+
"completed_at",
|
|
16
|
+
"generated_at",
|
|
17
|
+
"runtime",
|
|
18
|
+
"disposition",
|
|
19
|
+
"entry_urls",
|
|
20
|
+
"page_urls",
|
|
21
|
+
"tested_urls",
|
|
22
|
+
"assertions",
|
|
23
|
+
"test_orders",
|
|
24
|
+
"exceptions"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"schema_version": {
|
|
28
|
+
"const": "1.0",
|
|
29
|
+
"description": "Same literal as the full verdict — the sidecar is the same contract projected, not a second schema lineage."
|
|
30
|
+
},
|
|
31
|
+
"run_id": { "type": "string", "minLength": 1 },
|
|
32
|
+
"campaign_slug": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"description": "Carries the Campaign Map ID for schema back-compat, exactly as the source verdict did."
|
|
36
|
+
},
|
|
37
|
+
"public_route_slug": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Present only when the source verdict carried a non-null value."
|
|
40
|
+
},
|
|
41
|
+
"campaign_ref_id": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"description": "Present only when the source verdict carried a non-null value."
|
|
44
|
+
},
|
|
45
|
+
"spec_version": { "type": "string", "minLength": 1 },
|
|
46
|
+
"spec_hash": { "type": "string", "minLength": 1 },
|
|
47
|
+
"started_at": { "type": "string", "minLength": 1 },
|
|
48
|
+
"completed_at": { "type": "string", "minLength": 1 },
|
|
49
|
+
"generated_at": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
|
|
52
|
+
"description": "The projection/promotion instant, strict RFC3339 UTC with a Z suffix — the freshness stamp readback staleness checks read. Distinct from completed_at, which stays the source run's own finalization time."
|
|
53
|
+
},
|
|
54
|
+
"runtime": { "type": "string", "minLength": 1 },
|
|
55
|
+
"disposition": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"enum": ["ready", "ready_with_exceptions", "blocked"],
|
|
58
|
+
"description": "The source verdict's disposition, blocked included: the sidecar records what QA concluded, it is not a pass mark."
|
|
59
|
+
},
|
|
60
|
+
"base_url": {
|
|
61
|
+
"not": {},
|
|
62
|
+
"description": "URL-bearing — never present in the projection."
|
|
63
|
+
},
|
|
64
|
+
"entry_urls": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"maxItems": 0,
|
|
67
|
+
"description": "URL-bearing — always emptied ([]) by the projection."
|
|
68
|
+
},
|
|
69
|
+
"page_urls": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"maxItems": 0,
|
|
72
|
+
"description": "URL-bearing — always emptied ([]) by the projection."
|
|
73
|
+
},
|
|
74
|
+
"tested_urls": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"maxItems": 0,
|
|
77
|
+
"description": "URL-bearing — always emptied ([]) by the projection."
|
|
78
|
+
},
|
|
79
|
+
"assertions": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": { "$ref": "#/$defs/projectedAssertion" }
|
|
82
|
+
},
|
|
83
|
+
"test_orders": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"maxItems": 0,
|
|
86
|
+
"description": "Order evidence (URLs, order references, request captures) stays in the full verdict — always emptied ([]) by the projection."
|
|
87
|
+
},
|
|
88
|
+
"exceptions": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": { "$ref": "#/$defs/projectedException" },
|
|
91
|
+
"description": "Re-derived from the PROJECTED assertions, then null-valued keys dropped — so url/expected/actual can never survive into the committed form."
|
|
92
|
+
},
|
|
93
|
+
"trusted": {
|
|
94
|
+
"not": {},
|
|
95
|
+
"description": "Never present: trust stamps belong to the receiver's stored records, and the projection refuses an untrusted source outright."
|
|
96
|
+
},
|
|
97
|
+
"trust_level": {
|
|
98
|
+
"not": {},
|
|
99
|
+
"description": "Never present — see trusted."
|
|
100
|
+
},
|
|
101
|
+
"verified_at": {
|
|
102
|
+
"not": {},
|
|
103
|
+
"description": "Never present — see trusted."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"$defs": {
|
|
107
|
+
"projectedAssertion": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": true,
|
|
110
|
+
"required": ["id", "family", "page", "status"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"id": { "type": "string", "minLength": 1 },
|
|
113
|
+
"family": { "type": "string", "minLength": 1 },
|
|
114
|
+
"page": { "type": "string", "minLength": 1 },
|
|
115
|
+
"status": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"enum": ["pass", "fail", "warn", "skipped", "manual_review"]
|
|
118
|
+
},
|
|
119
|
+
"severity": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"enum": ["info", "warn", "blocker"]
|
|
122
|
+
},
|
|
123
|
+
"blocked_by": {
|
|
124
|
+
"description": "Tolerated allowlist field for gate-blocked assertions; shape follows the source assertion when present."
|
|
125
|
+
},
|
|
126
|
+
"url": { "not": {}, "description": "URL-bearing — stripped by the projection." },
|
|
127
|
+
"expected": { "not": {}, "description": "Stripped by the projection — stays in the full verdict." },
|
|
128
|
+
"actual": { "not": {}, "description": "Stripped by the projection — stays in the full verdict." },
|
|
129
|
+
"evidence": { "not": {}, "description": "Stripped by the projection — stays in the full verdict." },
|
|
130
|
+
"waiver": { "not": {}, "description": "Stripped by the projection — stays in the full verdict." }
|
|
131
|
+
},
|
|
132
|
+
"description": "The assertion allowlist: id, family, page, status, severity, blocked_by. Everything else — url, expected, actual, evidence, request/response captures — stays in the full verdict."
|
|
133
|
+
},
|
|
134
|
+
"projectedException": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": true,
|
|
137
|
+
"required": ["id", "family", "page", "status", "severity"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"id": { "type": ["string", "null"] },
|
|
140
|
+
"family": { "type": ["string", "null"] },
|
|
141
|
+
"page": { "type": ["string", "null"] },
|
|
142
|
+
"status": { "type": ["string", "null"] },
|
|
143
|
+
"severity": { "type": ["string", "null"] },
|
|
144
|
+
"url": { "not": {}, "description": "URL-bearing — can only derive null from projected assertions, and null keys are dropped." },
|
|
145
|
+
"expected": { "not": {}, "description": "Stripped — stays in the full verdict." },
|
|
146
|
+
"actual": { "not": {}, "description": "Stripped — stays in the full verdict." }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|