@adcp/sdk 16.0.0-beta.3 → 16.0.0-beta.5
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/lib/auth/oauth/diagnose.js +3 -11
- package/dist/lib/auth/oauth/diagnose.mjs +4 -12
- package/dist/lib/auth/oauth/diagnostics.d.mts +2 -1
- package/dist/lib/auth/oauth/diagnostics.d.ts +2 -1
- package/dist/lib/auth/oauth/diagnostics.js +8 -10
- package/dist/lib/auth/oauth/diagnostics.mjs +7 -10
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +7 -1
- package/dist/lib/reporting/consumer-runtime.js +2 -1
- package/dist/lib/reporting/consumer-runtime.mjs +2 -1
- package/dist/lib/reporting/ledger/handler.js +50 -11
- package/dist/lib/reporting/ledger/handler.mjs +50 -12
- package/dist/lib/reporting/ledger/index.d.mts +17 -14
- package/dist/lib/reporting/ledger/index.d.ts +17 -14
- package/dist/lib/reporting/ledger/index.js +32 -20
- package/dist/lib/reporting/ledger/index.mjs +21 -10
- package/dist/lib/reporting/ledger/offering-validation.d.mts +9 -0
- package/dist/lib/reporting/ledger/offering-validation.d.ts +9 -0
- package/dist/lib/reporting/{gcs/bucket-policy.js → ledger/offering-validation.js} +9 -8
- package/dist/lib/reporting/ledger/offering-validation.mjs +8 -0
- package/dist/lib/reporting/ledger/receipts.d.mts +48 -0
- package/dist/lib/reporting/ledger/receipts.d.ts +48 -0
- package/dist/lib/reporting/ledger/receipts.js +186 -0
- package/dist/lib/reporting/ledger/receipts.mjs +161 -0
- package/dist/lib/reporting/ledger/status-ingest.js +3 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -5
- package/dist/lib/reporting/ledger/types.d.mts +43 -0
- package/dist/lib/reporting/ledger/types.d.ts +43 -0
- package/dist/lib/reporting/ledger/types.js +31 -2
- package/dist/lib/reporting/ledger/types.mjs +26 -1
- package/dist/lib/reporting/pagination.d.mts +6 -0
- package/dist/lib/reporting/pagination.d.ts +6 -0
- package/dist/lib/reporting/{gcs/errors.js → pagination.js} +12 -17
- package/dist/lib/reporting/pagination.mjs +12 -0
- package/dist/lib/reporting/reconciliation.d.mts +1 -0
- package/dist/lib/reporting/reconciliation.d.ts +1 -0
- package/dist/lib/reporting/reconciliation.js +3 -2
- package/dist/lib/reporting/reconciliation.mjs +3 -2
- package/dist/lib/reporting/service/index.d.mts +79 -153
- package/dist/lib/reporting/service/index.d.ts +79 -153
- package/dist/lib/reporting/service/index.js +34 -491
- package/dist/lib/reporting/service/index.mjs +36 -510
- package/dist/lib/reporting/service/scheduler-support.d.mts +43 -0
- package/dist/lib/reporting/service/scheduler-support.d.ts +43 -0
- package/dist/lib/reporting/service/scheduler-support.js +125 -0
- package/dist/lib/reporting/service/scheduler-support.mjs +96 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/signing/canonicalize.d.mts +4 -0
- package/dist/lib/signing/canonicalize.d.ts +4 -0
- package/dist/lib/signing/canonicalize.js +14 -8
- package/dist/lib/signing/canonicalize.mjs +14 -8
- package/dist/lib/signing/content-digest.d.mts +8 -0
- package/dist/lib/signing/content-digest.d.ts +8 -0
- package/dist/lib/signing/content-digest.js +11 -5
- package/dist/lib/signing/content-digest.mjs +10 -5
- package/dist/lib/signing/signer.js +9 -6
- package/dist/lib/signing/signer.mjs +10 -7
- package/dist/lib/signing/web-bot-auth.js +103 -37
- package/dist/lib/signing/web-bot-auth.mjs +108 -37
- package/dist/lib/testing/storyboard/junit.js +16 -3
- package/dist/lib/testing/storyboard/junit.mjs +16 -3
- package/dist/lib/testing/storyboard/request-signing/builder.js +10 -9
- package/dist/lib/testing/storyboard/request-signing/builder.mjs +10 -9
- package/dist/lib/testing/storyboard/runner.js +94 -25
- package/dist/lib/testing/storyboard/runner.mjs +94 -25
- package/dist/lib/testing/storyboard/types.d.mts +6 -0
- package/dist/lib/testing/storyboard/types.d.ts +6 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/schemas.generated.d.ts +907 -60
- package/dist/lib/types/schemas.generated.js +7 -7
- package/dist/lib/types/schemas.generated.mjs +7 -7
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +23 -5
- package/docs/guides/REPORTING-GCS-FENCE.md +3 -3
- package/docs/guides/REPORTING-GCS-MANAGED.md +4 -4
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +7 -7
- package/docs/guides/REPORTING-LEDGER.md +107 -51
- package/docs/guides/REPORTING-OPERATIONS.md +66 -5
- package/docs/guides/REPORTING-STABILITY.md +36 -32
- package/docs/llms.txt +4 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -7
- package/docs/migration-reporting-storage-package.md +186 -0
- package/examples/README.md +1 -1
- package/package.json +13 -78
- package/dist/lib/reporting/azure/index.d.mts +0 -31
- package/dist/lib/reporting/azure/index.d.ts +0 -31
- package/dist/lib/reporting/azure/index.js +0 -266
- package/dist/lib/reporting/azure/index.mjs +0 -249
- package/dist/lib/reporting/bigquery/index.d.mts +0 -246
- package/dist/lib/reporting/bigquery/index.d.ts +0 -246
- package/dist/lib/reporting/bigquery/index.js +0 -633
- package/dist/lib/reporting/bigquery/index.mjs +0 -594
- package/dist/lib/reporting/gcs/adapter.d.mts +0 -38
- package/dist/lib/reporting/gcs/adapter.d.ts +0 -38
- package/dist/lib/reporting/gcs/adapter.js +0 -342
- package/dist/lib/reporting/gcs/adapter.mjs +0 -325
- package/dist/lib/reporting/gcs/bucket-policy.d.mts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.d.ts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.mjs +0 -7
- package/dist/lib/reporting/gcs/errors.d.mts +0 -11
- package/dist/lib/reporting/gcs/errors.d.ts +0 -11
- package/dist/lib/reporting/gcs/errors.mjs +0 -16
- package/dist/lib/reporting/gcs/fence.d.mts +0 -41
- package/dist/lib/reporting/gcs/fence.d.ts +0 -41
- package/dist/lib/reporting/gcs/fence.js +0 -250
- package/dist/lib/reporting/gcs/fence.mjs +0 -230
- package/dist/lib/reporting/gcs/index.d.mts +0 -18
- package/dist/lib/reporting/gcs/index.d.ts +0 -18
- package/dist/lib/reporting/gcs/index.js +0 -44
- package/dist/lib/reporting/gcs/index.mjs +0 -14
- package/dist/lib/reporting/gcs/io.d.mts +0 -7
- package/dist/lib/reporting/gcs/io.d.ts +0 -7
- package/dist/lib/reporting/gcs/io.js +0 -95
- package/dist/lib/reporting/gcs/io.mjs +0 -69
- package/dist/lib/reporting/gcs/reader.d.mts +0 -67
- package/dist/lib/reporting/gcs/reader.d.ts +0 -67
- package/dist/lib/reporting/gcs/reader.js +0 -193
- package/dist/lib/reporting/gcs/reader.mjs +0 -169
- package/dist/lib/reporting/gcs/row-provider.d.mts +0 -39
- package/dist/lib/reporting/gcs/row-provider.d.ts +0 -39
- package/dist/lib/reporting/gcs/row-provider.js +0 -225
- package/dist/lib/reporting/gcs/row-provider.mjs +0 -208
- package/dist/lib/reporting/gcs/validation.d.mts +0 -5
- package/dist/lib/reporting/gcs/validation.d.ts +0 -5
- package/dist/lib/reporting/gcs/validation.js +0 -49
- package/dist/lib/reporting/gcs/validation.mjs +0 -25
- package/dist/lib/reporting/ledger/change-feed.d.mts +0 -69
- package/dist/lib/reporting/ledger/change-feed.d.ts +0 -69
- package/dist/lib/reporting/ledger/change-feed.js +0 -107
- package/dist/lib/reporting/ledger/change-feed.mjs +0 -80
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.js +0 -2346
- package/dist/lib/reporting/ledger/managed-postgres.mjs +0 -2332
- package/dist/lib/reporting/ledger/managed-router.d.mts +0 -148
- package/dist/lib/reporting/ledger/managed-router.d.ts +0 -148
- package/dist/lib/reporting/ledger/managed-router.js +0 -280
- package/dist/lib/reporting/ledger/managed-router.mjs +0 -258
- package/dist/lib/reporting/ledger/managed.d.mts +0 -535
- package/dist/lib/reporting/ledger/managed.d.ts +0 -535
- package/dist/lib/reporting/ledger/managed.js +0 -761
- package/dist/lib/reporting/ledger/managed.mjs +0 -729
- package/dist/lib/reporting/ledger/notification-activity.d.mts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.d.ts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.js +0 -1366
- package/dist/lib/reporting/ledger/notification-activity.mjs +0 -1337
- package/dist/lib/reporting/ledger/object-writes.d.mts +0 -128
- package/dist/lib/reporting/ledger/object-writes.d.ts +0 -128
- package/dist/lib/reporting/ledger/object-writes.js +0 -147
- package/dist/lib/reporting/ledger/object-writes.mjs +0 -114
- package/dist/lib/reporting/ledger/postgres.d.mts +0 -689
- package/dist/lib/reporting/ledger/postgres.d.ts +0 -689
- package/dist/lib/reporting/ledger/postgres.js +0 -4462
- package/dist/lib/reporting/ledger/postgres.mjs +0 -4462
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.js +0 -365
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +0 -339
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.js +0 -379
- package/dist/lib/reporting/ledger/row-storage-object.mjs +0 -335
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -142
- package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -111
- package/dist/lib/reporting/ledger/row-storage.d.mts +0 -316
- package/dist/lib/reporting/ledger/row-storage.d.ts +0 -316
- package/dist/lib/reporting/ledger/row-storage.js +0 -812
- package/dist/lib/reporting/ledger/row-storage.mjs +0 -802
- package/dist/lib/reporting/s3/index.d.mts +0 -34
- package/dist/lib/reporting/s3/index.d.ts +0 -34
- package/dist/lib/reporting/s3/index.js +0 -347
- package/dist/lib/reporting/s3/index.mjs +0 -340
- package/dist/lib/reporting/service/maintenance.d.mts +0 -148
- package/dist/lib/reporting/service/maintenance.d.ts +0 -148
- package/dist/lib/reporting/service/maintenance.js +0 -185
- package/dist/lib/reporting/service/maintenance.mjs +0 -159
- package/examples/reliable-reporting-service/README.md +0 -169
|
@@ -2184,7 +2184,7 @@ const MacroProcessingCapabilitySchema = /* @__PURE__ */ (() => import_zod.z.obje
|
|
|
2184
2184
|
universal_semantic: UniversalMacroSchema.optional(),
|
|
2185
2185
|
operation: import_zod.z.union([import_zod.z.literal("translate_to_native"), import_zod.z.literal("resolve_value")]),
|
|
2186
2186
|
performed_by: MacroProcessingActorSchema,
|
|
2187
|
-
supported_contexts: import_zod.z.array(
|
|
2187
|
+
supported_contexts: import_zod.z.array(import_zod.z.enum(["url_query_value", "url_path_segment"])),
|
|
2188
2188
|
supported_encodings: import_zod.z.array(MacroEncodingSchema).optional(),
|
|
2189
2189
|
translation_target: MacroTranslationTargetSchema.optional()
|
|
2190
2190
|
}).passthrough()).merge(import_zod.z.object({
|
|
@@ -2196,7 +2196,7 @@ const MacroProcessingCapabilitySchema = /* @__PURE__ */ (() => import_zod.z.obje
|
|
|
2196
2196
|
universal_semantic: UniversalMacroSchema.optional(),
|
|
2197
2197
|
operation: import_zod.z.union([import_zod.z.literal("translate_to_native"), import_zod.z.literal("resolve_value")]),
|
|
2198
2198
|
performed_by: MacroProcessingActorSchema,
|
|
2199
|
-
supported_contexts: import_zod.z.array(
|
|
2199
|
+
supported_contexts: import_zod.z.array(import_zod.z.enum(["url_query_value", "url_path_segment"])),
|
|
2200
2200
|
supported_encodings: import_zod.z.array(MacroEncodingSchema).optional(),
|
|
2201
2201
|
translation_target: MacroTranslationTargetSchema.optional()
|
|
2202
2202
|
}).passthrough()))();
|
|
@@ -6509,7 +6509,7 @@ const AgentEncryptionKeySchema = /* @__PURE__ */ (() => import_zod.z.object({
|
|
|
6509
6509
|
const AgentNotificationConfigStateSchema = /* @__PURE__ */ (() => import_zod.z.object({
|
|
6510
6510
|
subscriber_id: import_zod.z.string().min(1).max(64).regex(new RegExp("^[A-Za-z0-9_.:-]{1,64}$")),
|
|
6511
6511
|
url: import_zod.z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
|
|
6512
|
-
event_types: import_zod.z.array(
|
|
6512
|
+
event_types: import_zod.z.array(import_zod.z.enum(["creative.status_changed", "creative.assignment_changed", "indicators.changed", "creative.purged", "account.status_changed", "account.change_recorded", "product.created", "product.updated", "product.priced", "product.removed", "signal.created", "signal.updated", "signal.priced", "signal.removed", "wholesale_feed.bulk_change", "capabilities.changed", "reporting.delivery_ready", "reporting.status_changed", "reporting.ledger_changed", "principal.changed"])),
|
|
6513
6513
|
all_authorized_accounts: import_zod.z.boolean().optional(),
|
|
6514
6514
|
include_future_event_types: import_zod.z.boolean().optional(),
|
|
6515
6515
|
authentication: import_zod.z.object({
|
|
@@ -6521,7 +6521,7 @@ const AgentNotificationConfigStateSchema = /* @__PURE__ */ (() => import_zod.z.o
|
|
|
6521
6521
|
const AgentNotificationConfigSchema = /* @__PURE__ */ (() => import_zod.z.object({
|
|
6522
6522
|
subscriber_id: import_zod.z.string().min(1).max(64).regex(new RegExp("^[A-Za-z0-9_.:-]{1,64}$")),
|
|
6523
6523
|
url: import_zod.z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
|
|
6524
|
-
event_types: import_zod.z.array(
|
|
6524
|
+
event_types: import_zod.z.array(import_zod.z.enum(["creative.status_changed", "creative.assignment_changed", "indicators.changed", "creative.purged", "account.status_changed", "account.change_recorded", "product.created", "product.updated", "product.priced", "product.removed", "signal.created", "signal.updated", "signal.priced", "signal.removed", "wholesale_feed.bulk_change", "capabilities.changed", "reporting.delivery_ready", "reporting.status_changed", "reporting.ledger_changed", "principal.changed"])),
|
|
6525
6525
|
all_authorized_accounts: import_zod.z.boolean().optional(),
|
|
6526
6526
|
include_future_event_types: import_zod.z.boolean().optional(),
|
|
6527
6527
|
authentication: import_zod.z.object({
|
|
@@ -7278,7 +7278,7 @@ const OutcomeTargetCostPerSchema = /* @__PURE__ */ (() => import_zod.z.object({
|
|
|
7278
7278
|
}).passthrough())();
|
|
7279
7279
|
const PackageDeliveryMetricValueSchema = /* @__PURE__ */ (() => import_zod.z.object({}).passthrough().merge(import_zod.z.object({
|
|
7280
7280
|
scope: import_zod.z.literal("standard"),
|
|
7281
|
-
metric_id:
|
|
7281
|
+
metric_id: import_zod.z.enum(["impressions", "clicks", "ctr", "views", "completed_views", "completion_rate", "conversions", "conversion_value", "commissionable_value", "roas", "cost_per_acquisition", "new_to_brand_rate", "leads", "reach", "frequency", "grps", "engagements", "engagement_rate", "follows", "saves", "profile_visits", "viewable_rate", "viewable_impressions", "measurable_impressions", "viewed_seconds", "quartile_25", "quartile_50", "quartile_75", "quartile_100", "ooh_metrics", "cost_per_click", "cost_per_completed_view", "cpm", "downloads", "units_sold", "new_to_brand_units", "plays", "incremental_sales_lift", "brand_lift", "foot_traffic", "conversion_lift", "brand_search_lift"]),
|
|
7282
7282
|
qualifier: CanonicalMetricQualifierSchema.optional(),
|
|
7283
7283
|
value: import_zod.z.number(),
|
|
7284
7284
|
measurable_impressions: import_zod.z.number().optional(),
|
|
@@ -13355,7 +13355,7 @@ const PixelTrackerAssetSchema = /* @__PURE__ */ (() => import_zod.z.object({}).p
|
|
|
13355
13355
|
}).passthrough()))();
|
|
13356
13356
|
const VASTTrackerAssetSchema = /* @__PURE__ */ (() => import_zod.z.object({}).passthrough().merge(import_zod.z.object({
|
|
13357
13357
|
asset_type: import_zod.z.literal("vast_tracker"),
|
|
13358
|
-
vast_event:
|
|
13358
|
+
vast_event: import_zod.z.enum(["creativeView", "loaded", "start", "firstQuartile", "midpoint", "thirdQuartile", "complete", "mute", "unmute", "pause", "resume", "rewind", "skip", "playerExpand", "playerCollapse", "fullscreen", "exitFullscreen", "progress", "acceptInvitation", "adExpand", "adCollapse", "minimize", "overlayViewDuration", "otherAdInteraction", "interactiveStart", "close", "closeLinear"]),
|
|
13359
13359
|
url: MacroBearingURL7Schema,
|
|
13360
13360
|
macro_declarations: import_zod.z.array(MacroDeclarationSchema.and(import_zod.z.object({
|
|
13361
13361
|
location: import_zod.z.object({
|
|
@@ -13368,7 +13368,7 @@ const VASTTrackerAssetSchema = /* @__PURE__ */ (() => import_zod.z.object({}).pa
|
|
|
13368
13368
|
}).passthrough()))();
|
|
13369
13369
|
const DAASTTrackerAssetSchema = /* @__PURE__ */ (() => import_zod.z.object({}).passthrough().merge(import_zod.z.object({
|
|
13370
13370
|
asset_type: import_zod.z.literal("daast_tracker"),
|
|
13371
|
-
daast_event:
|
|
13371
|
+
daast_event: import_zod.z.enum(["creativeView", "start", "firstQuartile", "midpoint", "thirdQuartile", "complete", "mute", "unmute", "pause", "resume", "rewind", "skip", "progress", "close"]),
|
|
13372
13372
|
url: MacroBearingURL8Schema,
|
|
13373
13373
|
macro_declarations: import_zod.z.array(MacroDeclarationSchema.and(import_zod.z.object({
|
|
13374
13374
|
location: import_zod.z.object({
|
|
@@ -667,7 +667,7 @@ const MacroProcessingCapabilitySchema = /* @__PURE__ */ (() => z.object({}).pass
|
|
|
667
667
|
universal_semantic: UniversalMacroSchema.optional(),
|
|
668
668
|
operation: z.union([z.literal("translate_to_native"), z.literal("resolve_value")]),
|
|
669
669
|
performed_by: MacroProcessingActorSchema,
|
|
670
|
-
supported_contexts: z.array(
|
|
670
|
+
supported_contexts: z.array(z.enum(["url_query_value", "url_path_segment"])),
|
|
671
671
|
supported_encodings: z.array(MacroEncodingSchema).optional(),
|
|
672
672
|
translation_target: MacroTranslationTargetSchema.optional()
|
|
673
673
|
}).passthrough()).merge(z.object({
|
|
@@ -679,7 +679,7 @@ const MacroProcessingCapabilitySchema = /* @__PURE__ */ (() => z.object({}).pass
|
|
|
679
679
|
universal_semantic: UniversalMacroSchema.optional(),
|
|
680
680
|
operation: z.union([z.literal("translate_to_native"), z.literal("resolve_value")]),
|
|
681
681
|
performed_by: MacroProcessingActorSchema,
|
|
682
|
-
supported_contexts: z.array(
|
|
682
|
+
supported_contexts: z.array(z.enum(["url_query_value", "url_path_segment"])),
|
|
683
683
|
supported_encodings: z.array(MacroEncodingSchema).optional(),
|
|
684
684
|
translation_target: MacroTranslationTargetSchema.optional()
|
|
685
685
|
}).passthrough()))();
|
|
@@ -4992,7 +4992,7 @@ const AgentEncryptionKeySchema = /* @__PURE__ */ (() => z.object({
|
|
|
4992
4992
|
const AgentNotificationConfigStateSchema = /* @__PURE__ */ (() => z.object({
|
|
4993
4993
|
subscriber_id: z.string().min(1).max(64).regex(new RegExp("^[A-Za-z0-9_.:-]{1,64}$")),
|
|
4994
4994
|
url: z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
|
|
4995
|
-
event_types: z.array(
|
|
4995
|
+
event_types: z.array(z.enum(["creative.status_changed", "creative.assignment_changed", "indicators.changed", "creative.purged", "account.status_changed", "account.change_recorded", "product.created", "product.updated", "product.priced", "product.removed", "signal.created", "signal.updated", "signal.priced", "signal.removed", "wholesale_feed.bulk_change", "capabilities.changed", "reporting.delivery_ready", "reporting.status_changed", "reporting.ledger_changed", "principal.changed"])),
|
|
4996
4996
|
all_authorized_accounts: z.boolean().optional(),
|
|
4997
4997
|
include_future_event_types: z.boolean().optional(),
|
|
4998
4998
|
authentication: z.object({
|
|
@@ -5004,7 +5004,7 @@ const AgentNotificationConfigStateSchema = /* @__PURE__ */ (() => z.object({
|
|
|
5004
5004
|
const AgentNotificationConfigSchema = /* @__PURE__ */ (() => z.object({
|
|
5005
5005
|
subscriber_id: z.string().min(1).max(64).regex(new RegExp("^[A-Za-z0-9_.:-]{1,64}$")),
|
|
5006
5006
|
url: z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
|
|
5007
|
-
event_types: z.array(
|
|
5007
|
+
event_types: z.array(z.enum(["creative.status_changed", "creative.assignment_changed", "indicators.changed", "creative.purged", "account.status_changed", "account.change_recorded", "product.created", "product.updated", "product.priced", "product.removed", "signal.created", "signal.updated", "signal.priced", "signal.removed", "wholesale_feed.bulk_change", "capabilities.changed", "reporting.delivery_ready", "reporting.status_changed", "reporting.ledger_changed", "principal.changed"])),
|
|
5008
5008
|
all_authorized_accounts: z.boolean().optional(),
|
|
5009
5009
|
include_future_event_types: z.boolean().optional(),
|
|
5010
5010
|
authentication: z.object({
|
|
@@ -5761,7 +5761,7 @@ const OutcomeTargetCostPerSchema = /* @__PURE__ */ (() => z.object({
|
|
|
5761
5761
|
}).passthrough())();
|
|
5762
5762
|
const PackageDeliveryMetricValueSchema = /* @__PURE__ */ (() => z.object({}).passthrough().merge(z.object({
|
|
5763
5763
|
scope: z.literal("standard"),
|
|
5764
|
-
metric_id:
|
|
5764
|
+
metric_id: z.enum(["impressions", "clicks", "ctr", "views", "completed_views", "completion_rate", "conversions", "conversion_value", "commissionable_value", "roas", "cost_per_acquisition", "new_to_brand_rate", "leads", "reach", "frequency", "grps", "engagements", "engagement_rate", "follows", "saves", "profile_visits", "viewable_rate", "viewable_impressions", "measurable_impressions", "viewed_seconds", "quartile_25", "quartile_50", "quartile_75", "quartile_100", "ooh_metrics", "cost_per_click", "cost_per_completed_view", "cpm", "downloads", "units_sold", "new_to_brand_units", "plays", "incremental_sales_lift", "brand_lift", "foot_traffic", "conversion_lift", "brand_search_lift"]),
|
|
5765
5765
|
qualifier: CanonicalMetricQualifierSchema.optional(),
|
|
5766
5766
|
value: z.number(),
|
|
5767
5767
|
measurable_impressions: z.number().optional(),
|
|
@@ -11838,7 +11838,7 @@ const PixelTrackerAssetSchema = /* @__PURE__ */ (() => z.object({}).passthrough(
|
|
|
11838
11838
|
}).passthrough()))();
|
|
11839
11839
|
const VASTTrackerAssetSchema = /* @__PURE__ */ (() => z.object({}).passthrough().merge(z.object({
|
|
11840
11840
|
asset_type: z.literal("vast_tracker"),
|
|
11841
|
-
vast_event:
|
|
11841
|
+
vast_event: z.enum(["creativeView", "loaded", "start", "firstQuartile", "midpoint", "thirdQuartile", "complete", "mute", "unmute", "pause", "resume", "rewind", "skip", "playerExpand", "playerCollapse", "fullscreen", "exitFullscreen", "progress", "acceptInvitation", "adExpand", "adCollapse", "minimize", "overlayViewDuration", "otherAdInteraction", "interactiveStart", "close", "closeLinear"]),
|
|
11842
11842
|
url: MacroBearingURL7Schema,
|
|
11843
11843
|
macro_declarations: z.array(MacroDeclarationSchema.and(z.object({
|
|
11844
11844
|
location: z.object({
|
|
@@ -11851,7 +11851,7 @@ const VASTTrackerAssetSchema = /* @__PURE__ */ (() => z.object({}).passthrough()
|
|
|
11851
11851
|
}).passthrough()))();
|
|
11852
11852
|
const DAASTTrackerAssetSchema = /* @__PURE__ */ (() => z.object({}).passthrough().merge(z.object({
|
|
11853
11853
|
asset_type: z.literal("daast_tracker"),
|
|
11854
|
-
daast_event:
|
|
11854
|
+
daast_event: z.enum(["creativeView", "start", "firstQuartile", "midpoint", "thirdQuartile", "complete", "mute", "unmute", "pause", "resume", "rewind", "skip", "progress", "close"]),
|
|
11855
11855
|
url: MacroBearingURL8Schema,
|
|
11856
11856
|
macro_declarations: z.array(MacroDeclarationSchema.and(z.object({
|
|
11857
11857
|
location: z.object({
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.0.0-beta.5";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.0.0-beta.
|
|
36
|
+
readonly library: "16.0.0-beta.5";
|
|
37
37
|
readonly adcp: "3.2.4";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-16T15:23:10.050Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.0.0-beta.5";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.0.0-beta.
|
|
36
|
+
readonly library: "16.0.0-beta.5";
|
|
37
37
|
readonly adcp: "3.2.4";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-16T15:23:10.050Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(version_exports, {
|
|
|
31
31
|
toReleasePrecisionVersion: () => toReleasePrecisionVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(version_exports);
|
|
34
|
-
const LIBRARY_VERSION = "16.0.0-beta.
|
|
34
|
+
const LIBRARY_VERSION = "16.0.0-beta.5";
|
|
35
35
|
const ADCP_VERSION = "3.2.4";
|
|
36
36
|
const ADCP_MAJOR_VERSION = 3;
|
|
37
37
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -98,10 +98,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
98
98
|
"3.2.4"
|
|
99
99
|
];
|
|
100
100
|
const VERSION_INFO = {
|
|
101
|
-
library: "16.0.0-beta.
|
|
101
|
+
library: "16.0.0-beta.5",
|
|
102
102
|
adcp: "3.2.4",
|
|
103
103
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
104
|
-
generatedAt: "2026-10-
|
|
104
|
+
generatedAt: "2026-10-16T15:23:10.050Z"
|
|
105
105
|
};
|
|
106
106
|
function getAdcpVersion() {
|
|
107
107
|
return ADCP_VERSION;
|
package/dist/lib/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const LIBRARY_VERSION = "16.0.0-beta.
|
|
1
|
+
const LIBRARY_VERSION = "16.0.0-beta.5";
|
|
2
2
|
const ADCP_VERSION = "3.2.4";
|
|
3
3
|
const ADCP_MAJOR_VERSION = 3;
|
|
4
4
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -65,10 +65,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
65
65
|
"3.2.4"
|
|
66
66
|
];
|
|
67
67
|
const VERSION_INFO = {
|
|
68
|
-
library: "16.0.0-beta.
|
|
68
|
+
library: "16.0.0-beta.5",
|
|
69
69
|
adcp: "3.2.4",
|
|
70
70
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
71
|
-
generatedAt: "2026-10-
|
|
71
|
+
generatedAt: "2026-10-16T15:23:10.050Z"
|
|
72
72
|
};
|
|
73
73
|
function getAdcpVersion() {
|
|
74
74
|
return ADCP_VERSION;
|
package/docs/TYPE-SUMMARY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AdCP Type Summary
|
|
2
2
|
|
|
3
|
-
> Generated at: 2026-10-
|
|
4
|
-
> @adcp/sdk v16.0.0-beta.
|
|
3
|
+
> Generated at: 2026-10-16
|
|
4
|
+
> @adcp/sdk v16.0.0-beta.5
|
|
5
5
|
|
|
6
6
|
Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
|
|
7
7
|
|
|
@@ -2900,9 +2900,23 @@ interface InlineReportingAvailabilityEvidenceV1 {
|
|
|
2900
2900
|
|
|
2901
2901
|
## Seller Reporting Ledger
|
|
2902
2902
|
|
|
2903
|
-
|
|
2903
|
+
The ledger interface, handlers and producer import from `@adcp/sdk/reporting/ledger`. The PostgreSQL store, its migrations, row storage and maintenance import from `@adcp/reporting-storage`, managed delivery from `@adcp/reporting-storage/managed` and notification activity from `@adcp/reporting-storage/notifications` (install `@adcp/reporting-storage` next to `@adcp/sdk`; it is pre-1.0 and every export is experimental). `createPostgresPersistentNotificationRuntime` is a server symbol and imports from `@adcp/sdk/server`.
|
|
2904
2904
|
|
|
2905
2905
|
```typescript
|
|
2906
|
+
import { Pool } from 'pg';
|
|
2907
|
+
import { createPostgresPersistentNotificationRuntime } from '@adcp/sdk/server';
|
|
2908
|
+
import {
|
|
2909
|
+
createReportingDeliveryHandler,
|
|
2910
|
+
createReportingProducer,
|
|
2911
|
+
createReportingStatusHandler,
|
|
2912
|
+
createSyncReportingStatusHandler,
|
|
2913
|
+
} from '@adcp/sdk/reporting/ledger';
|
|
2914
|
+
import { PostgresReportingLedgerStore, REPORTING_LEDGER_MIGRATION } from '@adcp/reporting-storage';
|
|
2915
|
+
import {
|
|
2916
|
+
createPostgresReportingNotificationActivityRuntime,
|
|
2917
|
+
createPostgresReportingNotificationAttemptCheckpoint,
|
|
2918
|
+
} from '@adcp/reporting-storage/notifications';
|
|
2919
|
+
|
|
2906
2920
|
// Build the notification path first: the store must be constructed with the
|
|
2907
2921
|
// activity port, or lifecycle transitions record no activity and notify nobody.
|
|
2908
2922
|
const attemptCheckpoint = createPostgresReportingNotificationAttemptCheckpoint({
|
|
@@ -2965,6 +2979,9 @@ The store freezes configuration lineage and period-end denominators, retains imm
|
|
|
2965
2979
|
Import from `@adcp/sdk/reporting/service`. This is the adapter-first lifecycle owner over the source and ledger primitives; it does not introduce another store or transport.
|
|
2966
2980
|
|
|
2967
2981
|
```typescript
|
|
2982
|
+
import { createReliableReportingService } from '@adcp/sdk/reporting/service';
|
|
2983
|
+
import { PostgresReportingLedgerStore, reportingLedgerMaintenance } from '@adcp/reporting-storage';
|
|
2984
|
+
|
|
2968
2985
|
interface ReliableReportingAdapterV1 {
|
|
2969
2986
|
readonly sourceOffering: ReportingSourceOfferingV1;
|
|
2970
2987
|
readonly deliveryOffering: ReportingDeliveryOffering;
|
|
@@ -2987,9 +3004,10 @@ const reporting = createReliableReportingService({
|
|
|
2987
3004
|
resolveCurrency: account => currency,
|
|
2988
3005
|
resolveCoverage: account => ({ constituents }), // authorized media-buy/package denominator
|
|
2989
3006
|
resolveConsumerId, // optional; controls consumer-status handler/capability
|
|
3007
|
+
maintenance: reportingLedgerMaintenance({ retention: { enabled: true } }), // optional factory from @adcp/reporting-storage
|
|
2990
3008
|
});
|
|
2991
3009
|
|
|
2992
|
-
|
|
3010
|
+
for (const sql of reporting.setup.migrations) await pool.query(sql);
|
|
2993
3011
|
const installedPlatform = reporting.install(platform);
|
|
2994
3012
|
await reporting.installConfiguration(configuration, { account: ctx.account });
|
|
2995
3013
|
await reporting.runCycle({ accountId }); // tenant-partitioned
|
|
@@ -2999,7 +3017,7 @@ await reporting.stop();
|
|
|
2999
3017
|
|
|
3000
3018
|
Account identity comes only from the framework-resolved context. Trusted host callbacks derive adapter routing, credential-free `sourceScope`, source timezone, currency, and the authorized constituent denominator. A declaration cannot supply `account`, `sourceScope`, `sourceTimezone`, `contract`, `currency`, `constituents`, or `mediaBuyIds`; `mediaBuyIds` is derived from `resolveCoverage`, so a buyer cannot name another buyer's media buys on a shared upstream network. Currency is frozen into configuration and obligation lineage. Capabilities are Core-only and derived from installed adapters and handlers; managed delivery, reconciled billing, receipts, webhook activity, and notifications are not advertised. Installation requires `platform.accounts.upsert`, which owns the advertised `sync_accounts` configuration path.
|
|
3001
3019
|
|
|
3002
|
-
For complete seller production assembly, use async `createPostgresReliableReportingProductionService` from `@adcp/
|
|
3020
|
+
For complete seller production assembly, use async `createPostgresReliableReportingProductionService` from `@adcp/reporting-storage/service`. It owns the PostgreSQL Core/Managed stores, receipts, all three reporting notifications, webhook activity, migrations, probes, recovery, and capability publication. Supply `activity.tenantScopeForAccount`; Reconciled Billing offerings also require a trusted `obligatedConsumers` roster. Its scheduler and `recoverOnce` require explicit `deploymentWide: true` because recovery scans the whole namespace. See `docs/guides/REPORTING-LEDGER.md` and `docs/guides/REPORTING-OPERATIONS.md`.
|
|
3003
3021
|
|
|
3004
3022
|
Buyer production processes use `createPostgresReportingConsumerRuntimeV1` with `createReliableReportingConsumerV1` from the package root. Verify webhook signatures before passing authenticated hints, preserve seller/principal scope, and configure `evaluateAdjustment` to authorize integrity-valid post-official corrections; the default defers them. See `docs/guides/REPORTING-RECONCILIATION.md`.
|
|
3005
3023
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Durable GCS reporting write fence
|
|
2
2
|
|
|
3
|
-
`@adcp/
|
|
3
|
+
`@adcp/reporting-storage/gcs` provides a provider write-fence primitive backed by the existing PostgreSQL destination authority. It is a building block for a managed delivery adapter; it does not advertise Managed Delivery or Reconciled Billing capabilities or implement `ReportingManagedDeliveryAdapterV1`.
|
|
4
4
|
|
|
5
|
-
Install the optional official Google client with `npm install @google-cloud/storage@^7.22.0` for Node 20 or Node 22+. Google client `^8.2.0` is also supported on Node 22+. This peer is required when compiling or using the GCS subpath, including its public types; other
|
|
5
|
+
Install the optional official Google client with `npm install @google-cloud/storage@^7.22.0` for Node 20 or Node 22+. Google client `^8.2.0` is also supported on Node 22+. This peer is required when compiling or using the GCS subpath, including its public types; other subpaths remain independent. Apply `REPORTING_LEDGER_MIGRATION`, `REPORTING_MANAGED_DELIVERY_MIGRATION`, then the additive `REPORTING_OBJECT_WRITE_MIGRATION` from `@adcp/reporting-storage` (and `@adcp/reporting-storage/managed` for the managed-delivery one) in the same isolated tenant schema. Apply the final migration to a fresh object-write schema if experimenting with earlier, unpublished versions of these tables: `CREATE TABLE IF NOT EXISTS` does not upgrade incompatible prerelease tables.
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { Storage } from '@google-cloud/storage';
|
|
9
|
-
import { createGcsReportingObjectFenceV1 } from '@adcp/
|
|
9
|
+
import { createGcsReportingObjectFenceV1 } from '@adcp/reporting-storage/gcs';
|
|
10
10
|
|
|
11
11
|
const fence = createGcsReportingObjectFenceV1({
|
|
12
12
|
storage: new Storage({ retryOptions: { totalTimeout: 60, maxRetries: 3 } }), // Host-owned ADC; retry timeout is in seconds.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Managed reporting delivery on GCS
|
|
2
2
|
|
|
3
|
-
`@adcp/
|
|
3
|
+
`@adcp/reporting-storage/gcs` supplies a complete `ReportingManagedDeliveryAdapterV1` for private GCS file transfer. It supports `manifest_checksums` and `canonical_digest` by uploading deterministic JSONL and manifest bytes, then inspecting actual provider bytes and digest-pinned private contracts. The managed runtime owns materialization settlement, cleanup leases, retries and capability publication. Verification is attributed to the producer; independent buyer qualification is a separate gate.
|
|
4
4
|
|
|
5
5
|
Install the optional official `@google-cloud/storage` peer. Use 7.22.x on Node 20.19 or later; Storage 8.2.x requires Node 22 or later. The default SDK import does not load Google Storage. Supply a host-owned official Storage client using ADC, workload identity or short-lived impersonation. Never persist credentials in reporting descriptors, contract URIs, `ctx_metadata`, inventory or error envelopes.
|
|
6
6
|
|
|
7
|
-
Apply `REPORTING_LEDGER_MIGRATION`, the applicable Core writer-fence migration, `REPORTING_MANAGED_DELIVERY_MIGRATION`, `REPORTING_OBJECT_WRITE_MIGRATION`, then `REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION` from `@adcp/
|
|
7
|
+
Apply `REPORTING_LEDGER_MIGRATION`, the applicable Core writer-fence migration, `REPORTING_MANAGED_DELIVERY_MIGRATION`, `REPORTING_OBJECT_WRITE_MIGRATION`, then `REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION` from `@adcp/reporting-storage` (`REPORTING_MANAGED_DELIVERY_MIGRATION` is on `@adcp/reporting-storage/managed`). The last migration requires PostgreSQL 13 or later and creates one persistent installation UUID per isolated schema. Reapplying it preserves the UUID. Keep that row in backups and restores. **Never run delivery or cleanup from an independently writable clone of live authorization, inventory or materialization tables.** Such a clone would still address the original objects. Start a fresh isolated schema with a distinct deployment namespace and installation UUID, provision new destination grants, and import only the needed immutable Core facts. A restored replica of the same authority keeps its identity. Do not replace an identity while old write plans still exist. The adapter combines the UUID with your stable deployment namespace to avoid collisions between isolated schemas sharing a bucket.
|
|
8
8
|
|
|
9
9
|
Core and managed stores must share the exact same PostgreSQL pool, and Core must enable `managedDelivery: true`. The factory probes both stores and the provider policy before returning an adapter. Hosts supply pool acquisition/connect timeouts; transactions started with a signal additionally limit lock and statement waits. Readiness is bounded by the operation deadline, at most 60 seconds.
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import { Storage } from '@google-cloud/storage';
|
|
13
|
-
import { createGcsReportingManagedDeliveryAdapterV1 } from '@adcp/
|
|
14
|
-
import { createReportingManagedDeliveryRuntime } from '@adcp/
|
|
13
|
+
import { createGcsReportingManagedDeliveryAdapterV1 } from '@adcp/reporting-storage/gcs';
|
|
14
|
+
import { createReportingManagedDeliveryRuntime } from '@adcp/reporting-storage/managed';
|
|
15
15
|
|
|
16
16
|
const adapter = await createGcsReportingManagedDeliveryAdapterV1({
|
|
17
17
|
storage: new Storage(), // ADC/workload identity; no keys in reporting state
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This guide is for a seller that already runs its own Reliable Reporting ledger
|
|
4
4
|
(tables for configuration generations, obligations and revisions, row files in
|
|
5
5
|
object storage and a warehouse, status issues and transitions) and wants
|
|
6
|
-
`@adcp/sdk` to own the ledger from now on. Read the
|
|
6
|
+
`@adcp/sdk` and `@adcp/reporting-storage` to own the ledger from now on. Read the
|
|
7
7
|
[ledger guide](REPORTING-LEDGER.md) first for the SDK side, and the
|
|
8
8
|
[operations runbook](REPORTING-OPERATIONS.md) for production practice.
|
|
9
9
|
|
|
@@ -28,7 +28,7 @@ You have two ways to run the SDK's service on top of what you have.
|
|
|
28
28
|
| Change feed | `changeFeed: true`: `changesAfter`, current-revision reads, consumer cursors | You implement it, or go without host reads and the warehouse sink |
|
|
29
29
|
| Retention | `maintenance.retention`: period-aligned retirement honouring the change-feed hold | You implement `retireExpiredPeriods` and tombstones, or never retire |
|
|
30
30
|
| Maintenance | `maintenance`: snapshot sweep, abandoned-upload sweep, feed pruning | You write all of it |
|
|
31
|
-
| Warehouse | `@adcp/
|
|
31
|
+
| Warehouse | `@adcp/reporting-storage/bigquery` sink | Not available: it reads the SDK store |
|
|
32
32
|
| Correctness | Lease fencing, gap-free status checkpoints, immutable generations and the revision binding are enforced in one tested place | Every one of those guarantees is yours to prove |
|
|
33
33
|
| Existing data | Starts empty; old tables stay behind a read-only hook | Old data served natively |
|
|
34
34
|
|
|
@@ -52,8 +52,8 @@ advertise Managed Delivery or Reconciled Billing today, read
|
|
|
52
52
|
```ts
|
|
53
53
|
import { Pool } from 'pg';
|
|
54
54
|
import { Storage } from '@google-cloud/storage';
|
|
55
|
-
import { PostgresReportingLedgerStore } from '@adcp/
|
|
56
|
-
import { createGcsReportingRowObjectProviderV1 } from '@adcp/
|
|
55
|
+
import { PostgresReportingLedgerStore, reportingLedgerMaintenance } from '@adcp/reporting-storage';
|
|
56
|
+
import { createGcsReportingRowObjectProviderV1 } from '@adcp/reporting-storage/gcs';
|
|
57
57
|
import { createReliableReportingService } from '@adcp/sdk/reporting/service';
|
|
58
58
|
|
|
59
59
|
// Apply once, in order, with your migration owner (PostgreSQL 13+):
|
|
@@ -86,10 +86,10 @@ const reporting = createReliableReportingService({
|
|
|
86
86
|
statusRetentionDays: 90, // the commitment advertised to buyers; retention uses it
|
|
87
87
|
// ...adapters, contact, resolveSource, resolveCurrency, resolveCoverage
|
|
88
88
|
legacyRevisionReader, // see "The legacy fallback hook"
|
|
89
|
-
maintenance: {
|
|
89
|
+
maintenance: reportingLedgerMaintenance({
|
|
90
90
|
retention: { enabled: true, recordRetentionDays: 120, limit: 100 },
|
|
91
91
|
changeFeed: { changeRetentionDays: 30, maxFeedHoldDays: 7 },
|
|
92
|
-
},
|
|
92
|
+
}),
|
|
93
93
|
});
|
|
94
94
|
```
|
|
95
95
|
|
|
@@ -118,7 +118,7 @@ state. The bytes live in your bucket.
|
|
|
118
118
|
|
|
119
119
|
### Keeping your BigQuery tables fed
|
|
120
120
|
|
|
121
|
-
`@adcp/
|
|
121
|
+
`@adcp/reporting-storage/bigquery` follows the change feed and loads every
|
|
122
122
|
committed revision's verified rows into BigQuery tables you name
|
|
123
123
|
([sink details](REPORTING-LEDGER.md#bigquery-warehouse-sink)). The warehouse
|
|
124
124
|
copy is derived and never served.
|