@adcp/sdk 14.0.0-rc.47 → 14.0.0-rc.48
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/registry/types.generated.d.mts +7 -0
- package/dist/lib/registry/types.generated.d.ts +7 -0
- package/dist/lib/reporting/consumer-postgres.d.mts +81 -0
- package/dist/lib/reporting/consumer-postgres.d.ts +81 -0
- package/dist/lib/reporting/consumer-postgres.js +628 -0
- package/dist/lib/reporting/consumer-postgres.mjs +601 -0
- package/dist/lib/reporting/consumer-runtime.d.mts +93 -0
- package/dist/lib/reporting/consumer-runtime.d.ts +93 -0
- package/dist/lib/reporting/consumer-runtime.js +655 -0
- package/dist/lib/reporting/consumer-runtime.mjs +633 -0
- package/dist/lib/reporting/index.d.mts +8 -2
- package/dist/lib/reporting/index.d.ts +8 -2
- package/dist/lib/reporting/index.js +35 -2
- package/dist/lib/reporting/index.mjs +34 -1
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +15 -1
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +15 -1
- package/dist/lib/reporting/ledger/managed-postgres.js +150 -7
- package/dist/lib/reporting/ledger/managed-postgres.mjs +150 -7
- package/dist/lib/reporting/ledger/notification-activity.d.mts +56 -8
- package/dist/lib/reporting/ledger/notification-activity.d.ts +56 -8
- package/dist/lib/reporting/ledger/notification-activity.js +379 -152
- package/dist/lib/reporting/ledger/notification-activity.mjs +379 -152
- package/dist/lib/reporting/ledger/postgres.js +12 -3
- package/dist/lib/reporting/ledger/postgres.mjs +12 -3
- package/dist/lib/reporting/ledger/types.d.mts +14 -0
- package/dist/lib/reporting/ledger/types.d.ts +14 -0
- package/dist/lib/reporting/reconciliation.d.mts +76 -10
- package/dist/lib/reporting/reconciliation.d.ts +76 -10
- package/dist/lib/reporting/reconciliation.js +397 -44
- package/dist/lib/reporting/reconciliation.mjs +396 -44
- package/dist/lib/reporting/service/index.d.mts +95 -2
- package/dist/lib/reporting/service/index.d.ts +95 -2
- package/dist/lib/reporting/service/index.js +333 -4
- package/dist/lib/reporting/service/index.mjs +346 -5
- package/dist/lib/reporting/webhook-activity.d.mts +75 -0
- package/dist/lib/reporting/webhook-activity.d.ts +75 -0
- package/dist/lib/reporting/webhook-activity.js +720 -0
- package/dist/lib/reporting/webhook-activity.mjs +689 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +7 -4
- package/dist/lib/server/create-adcp-server.d.ts +7 -4
- package/dist/lib/server/create-adcp-server.js +4 -4
- package/dist/lib/server/create-adcp-server.mjs +4 -4
- package/dist/lib/server/decisioning/runtime/from-platform.js +23 -10
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +23 -10
- package/dist/lib/server/decisioning/specialisms/reporting.d.mts +6 -2
- package/dist/lib/server/decisioning/specialisms/reporting.d.ts +6 -2
- package/dist/lib/server/notification-subscriptions/runtime.js +33 -10
- package/dist/lib/server/notification-subscriptions/runtime.mjs +33 -10
- package/dist/lib/server/notification-subscriptions/types.d.mts +4 -2
- package/dist/lib/server/notification-subscriptions/types.d.ts +4 -2
- package/dist/lib/server/webhook-delivery/recovery.js +3 -0
- package/dist/lib/server/webhook-delivery/recovery.mjs +3 -0
- package/dist/lib/server/webhook-emitter.d.mts +23 -2
- package/dist/lib/server/webhook-emitter.d.ts +23 -2
- package/dist/lib/server/webhook-emitter.js +85 -16
- package/dist/lib/server/webhook-emitter.mjs +85 -16
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- 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 +6 -2
- package/docs/guides/REPORTING-LEDGER.md +124 -7
- package/docs/guides/REPORTING-OPERATIONS.md +194 -0
- package/docs/guides/REPORTING-RECONCILIATION.md +151 -4
- package/docs/llms.txt +4 -2
- package/docs/migration-14.x-rc-worksheet.md +49 -4
- package/examples/reliable-reporting-service/README.md +69 -0
- package/package.json +1 -1
|
@@ -4549,6 +4549,8 @@ export interface components {
|
|
|
4549
4549
|
is_authoritative?: boolean;
|
|
4550
4550
|
requested_compliance_target?: string | null;
|
|
4551
4551
|
adcp_version?: string | null;
|
|
4552
|
+
/** @description Runner capability version recorded at execution time, separate from the AdCP version under test. Null when not recorded, including historical runs. */
|
|
4553
|
+
runner_capability_version?: string | null;
|
|
4552
4554
|
overall_status: string;
|
|
4553
4555
|
headline: string | null;
|
|
4554
4556
|
tracks_passed: number;
|
|
@@ -10317,6 +10319,11 @@ export interface operations {
|
|
|
10317
10319
|
/** @enum {string} */
|
|
10318
10320
|
alternative_action: "monitoring_requeue";
|
|
10319
10321
|
alternative_description: string;
|
|
10322
|
+
/**
|
|
10323
|
+
* Format: uri
|
|
10324
|
+
* @description Issue tracking the restoration of human-initiated refresh
|
|
10325
|
+
*/
|
|
10326
|
+
tracking_issue: string;
|
|
10320
10327
|
};
|
|
10321
10328
|
};
|
|
10322
10329
|
};
|
|
@@ -4549,6 +4549,8 @@ export interface components {
|
|
|
4549
4549
|
is_authoritative?: boolean;
|
|
4550
4550
|
requested_compliance_target?: string | null;
|
|
4551
4551
|
adcp_version?: string | null;
|
|
4552
|
+
/** @description Runner capability version recorded at execution time, separate from the AdCP version under test. Null when not recorded, including historical runs. */
|
|
4553
|
+
runner_capability_version?: string | null;
|
|
4552
4554
|
overall_status: string;
|
|
4553
4555
|
headline: string | null;
|
|
4554
4556
|
tracks_passed: number;
|
|
@@ -10317,6 +10319,11 @@ export interface operations {
|
|
|
10317
10319
|
/** @enum {string} */
|
|
10318
10320
|
alternative_action: "monitoring_requeue";
|
|
10319
10321
|
alternative_description: string;
|
|
10322
|
+
/**
|
|
10323
|
+
* Format: uri
|
|
10324
|
+
* @description Issue tracking the restoration of human-initiated refresh
|
|
10325
|
+
*/
|
|
10326
|
+
tracking_issue: string;
|
|
10320
10327
|
};
|
|
10321
10328
|
};
|
|
10322
10329
|
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ReportingCheckpointStore, ReportingPendingConsumerStatusStore, ReportingPersistenceLeaseFenceV1 } from './reconciliation.mjs';
|
|
2
|
+
export interface ReportingConsumerPostgresQueryable {
|
|
3
|
+
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
4
|
+
rows: Row[];
|
|
5
|
+
rowCount: number | null;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export interface ReportingChangesCheckpointKeyV1 {
|
|
9
|
+
/** Stable, non-secret seller and authenticated-principal identity. Stored as a SHA-256 digest. */
|
|
10
|
+
consumerScope: string;
|
|
11
|
+
/** Protocol account identifier. Stored verbatim to support indexed operational lookup. */
|
|
12
|
+
accountId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ReportingChangesCheckpointV1 {
|
|
15
|
+
checkpoint: string;
|
|
16
|
+
generation: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ReportingConsumerWorkLeaseV1 extends ReportingPersistenceLeaseFenceV1 {
|
|
19
|
+
}
|
|
20
|
+
export interface ReportingChangesCheckpointStoreV1 {
|
|
21
|
+
get(key: ReportingChangesCheckpointKeyV1): Promise<ReportingChangesCheckpointV1 | undefined>;
|
|
22
|
+
compareAndSet(key: ReportingChangesCheckpointKeyV1, expected: string | null, checkpoint: string,
|
|
23
|
+
/** When supplied, PostgreSQL applies the cursor write only while this exact fenced lease is current. */
|
|
24
|
+
lease?: ReportingConsumerWorkLeaseV1): Promise<'applied' | 'unchanged' | 'conflict'>;
|
|
25
|
+
/** Retire an opaque cursor the seller no longer recognizes or returns. */
|
|
26
|
+
clear?(key: ReportingChangesCheckpointKeyV1, expected?: string, lease?: ReportingConsumerWorkLeaseV1): Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
export interface ReportingConsumerWorkLeaseStoreV1 {
|
|
29
|
+
claim(input: {
|
|
30
|
+
key: ReportingChangesCheckpointKeyV1;
|
|
31
|
+
ownerToken: string;
|
|
32
|
+
leaseMilliseconds: number;
|
|
33
|
+
}): Promise<ReportingConsumerWorkLeaseV1 | null>;
|
|
34
|
+
renew(lease: ReportingConsumerWorkLeaseV1, leaseMilliseconds: number): Promise<ReportingConsumerWorkLeaseV1 | null>;
|
|
35
|
+
release(lease: ReportingConsumerWorkLeaseV1): Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
export interface ReportingConsumerNotificationStoreV1 {
|
|
38
|
+
isProcessed(input: {
|
|
39
|
+
consumerScope: string;
|
|
40
|
+
accountId: string;
|
|
41
|
+
idempotencyKey: string;
|
|
42
|
+
payloadSha256: string;
|
|
43
|
+
}): Promise<boolean>;
|
|
44
|
+
markProcessed(input: {
|
|
45
|
+
consumerScope: string;
|
|
46
|
+
accountId: string;
|
|
47
|
+
idempotencyKey: string;
|
|
48
|
+
payloadSha256: string;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
pruneProcessed(options?: {
|
|
51
|
+
retentionDays?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
}): Promise<number>;
|
|
54
|
+
}
|
|
55
|
+
export interface CreatePostgresReportingConsumerRuntimeOptionsV1 {
|
|
56
|
+
db: ReportingConsumerPostgresQueryable;
|
|
57
|
+
/** Stable deployment namespace. Never use a credential, bearer, or connection string. */
|
|
58
|
+
namespace: string;
|
|
59
|
+
/** Lowercase PostgreSQL identifier prefix, at most 32 bytes. */
|
|
60
|
+
tablePrefix?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PostgresReportingConsumerRuntimeV1 {
|
|
63
|
+
readonly checkpointStore: ReportingCheckpointStore;
|
|
64
|
+
readonly pendingConsumerStatusStore: ReportingPendingConsumerStatusStore;
|
|
65
|
+
readonly changesCheckpointStore: ReportingChangesCheckpointStoreV1;
|
|
66
|
+
readonly workLeases: ReportingConsumerWorkLeaseStoreV1;
|
|
67
|
+
readonly notifications: ReportingConsumerNotificationStoreV1;
|
|
68
|
+
readonly migrations: {
|
|
69
|
+
persistence: string;
|
|
70
|
+
all: readonly [string];
|
|
71
|
+
};
|
|
72
|
+
probe(): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
export declare class ReportingConsumerPersistenceConflictError extends Error {
|
|
75
|
+
readonly name = "ReportingConsumerPersistenceConflictError";
|
|
76
|
+
}
|
|
77
|
+
export declare function getReportingConsumerPostgresMigration(options?: {
|
|
78
|
+
tablePrefix?: string;
|
|
79
|
+
}): string;
|
|
80
|
+
export declare const REPORTING_CONSUMER_POSTGRES_MIGRATION: string;
|
|
81
|
+
export declare function createPostgresReportingConsumerRuntimeV1(options: CreatePostgresReportingConsumerRuntimeOptionsV1): PostgresReportingConsumerRuntimeV1;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ReportingCheckpointStore, ReportingPendingConsumerStatusStore, ReportingPersistenceLeaseFenceV1 } from './reconciliation';
|
|
2
|
+
export interface ReportingConsumerPostgresQueryable {
|
|
3
|
+
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
4
|
+
rows: Row[];
|
|
5
|
+
rowCount: number | null;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export interface ReportingChangesCheckpointKeyV1 {
|
|
9
|
+
/** Stable, non-secret seller and authenticated-principal identity. Stored as a SHA-256 digest. */
|
|
10
|
+
consumerScope: string;
|
|
11
|
+
/** Protocol account identifier. Stored verbatim to support indexed operational lookup. */
|
|
12
|
+
accountId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ReportingChangesCheckpointV1 {
|
|
15
|
+
checkpoint: string;
|
|
16
|
+
generation: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ReportingConsumerWorkLeaseV1 extends ReportingPersistenceLeaseFenceV1 {
|
|
19
|
+
}
|
|
20
|
+
export interface ReportingChangesCheckpointStoreV1 {
|
|
21
|
+
get(key: ReportingChangesCheckpointKeyV1): Promise<ReportingChangesCheckpointV1 | undefined>;
|
|
22
|
+
compareAndSet(key: ReportingChangesCheckpointKeyV1, expected: string | null, checkpoint: string,
|
|
23
|
+
/** When supplied, PostgreSQL applies the cursor write only while this exact fenced lease is current. */
|
|
24
|
+
lease?: ReportingConsumerWorkLeaseV1): Promise<'applied' | 'unchanged' | 'conflict'>;
|
|
25
|
+
/** Retire an opaque cursor the seller no longer recognizes or returns. */
|
|
26
|
+
clear?(key: ReportingChangesCheckpointKeyV1, expected?: string, lease?: ReportingConsumerWorkLeaseV1): Promise<boolean>;
|
|
27
|
+
}
|
|
28
|
+
export interface ReportingConsumerWorkLeaseStoreV1 {
|
|
29
|
+
claim(input: {
|
|
30
|
+
key: ReportingChangesCheckpointKeyV1;
|
|
31
|
+
ownerToken: string;
|
|
32
|
+
leaseMilliseconds: number;
|
|
33
|
+
}): Promise<ReportingConsumerWorkLeaseV1 | null>;
|
|
34
|
+
renew(lease: ReportingConsumerWorkLeaseV1, leaseMilliseconds: number): Promise<ReportingConsumerWorkLeaseV1 | null>;
|
|
35
|
+
release(lease: ReportingConsumerWorkLeaseV1): Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
export interface ReportingConsumerNotificationStoreV1 {
|
|
38
|
+
isProcessed(input: {
|
|
39
|
+
consumerScope: string;
|
|
40
|
+
accountId: string;
|
|
41
|
+
idempotencyKey: string;
|
|
42
|
+
payloadSha256: string;
|
|
43
|
+
}): Promise<boolean>;
|
|
44
|
+
markProcessed(input: {
|
|
45
|
+
consumerScope: string;
|
|
46
|
+
accountId: string;
|
|
47
|
+
idempotencyKey: string;
|
|
48
|
+
payloadSha256: string;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
pruneProcessed(options?: {
|
|
51
|
+
retentionDays?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
}): Promise<number>;
|
|
54
|
+
}
|
|
55
|
+
export interface CreatePostgresReportingConsumerRuntimeOptionsV1 {
|
|
56
|
+
db: ReportingConsumerPostgresQueryable;
|
|
57
|
+
/** Stable deployment namespace. Never use a credential, bearer, or connection string. */
|
|
58
|
+
namespace: string;
|
|
59
|
+
/** Lowercase PostgreSQL identifier prefix, at most 32 bytes. */
|
|
60
|
+
tablePrefix?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PostgresReportingConsumerRuntimeV1 {
|
|
63
|
+
readonly checkpointStore: ReportingCheckpointStore;
|
|
64
|
+
readonly pendingConsumerStatusStore: ReportingPendingConsumerStatusStore;
|
|
65
|
+
readonly changesCheckpointStore: ReportingChangesCheckpointStoreV1;
|
|
66
|
+
readonly workLeases: ReportingConsumerWorkLeaseStoreV1;
|
|
67
|
+
readonly notifications: ReportingConsumerNotificationStoreV1;
|
|
68
|
+
readonly migrations: {
|
|
69
|
+
persistence: string;
|
|
70
|
+
all: readonly [string];
|
|
71
|
+
};
|
|
72
|
+
probe(): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
export declare class ReportingConsumerPersistenceConflictError extends Error {
|
|
75
|
+
readonly name = "ReportingConsumerPersistenceConflictError";
|
|
76
|
+
}
|
|
77
|
+
export declare function getReportingConsumerPostgresMigration(options?: {
|
|
78
|
+
tablePrefix?: string;
|
|
79
|
+
}): string;
|
|
80
|
+
export declare const REPORTING_CONSUMER_POSTGRES_MIGRATION: string;
|
|
81
|
+
export declare function createPostgresReportingConsumerRuntimeV1(options: CreatePostgresReportingConsumerRuntimeOptionsV1): PostgresReportingConsumerRuntimeV1;
|