platform-types 1.10.742 → 1.10.744
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/auth.d.ts +7 -6
- package/dist/log.d.ts +51 -2
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -613,10 +613,9 @@ declare global {
|
|
|
613
613
|
* no single principal to attribute the row to. Never render "no login
|
|
614
614
|
* attempts" as "nobody tried".
|
|
615
615
|
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* since expired".
|
|
616
|
+
* No login-history row carries the refresh token id (`jti`) on any surface:
|
|
617
|
+
* a session handle is published only on the session lists
|
|
618
|
+
* (`CustomerSession.jti` / `OperatorSession.jti`), whose revoke flows use it.
|
|
620
619
|
*/
|
|
621
620
|
interface CustomerLoginAttempt {
|
|
622
621
|
outcome: LoginOutcome;
|
|
@@ -629,8 +628,10 @@ declare global {
|
|
|
629
628
|
/** Client build string, when the caller sent one. */
|
|
630
629
|
clientVersion?: string;
|
|
631
630
|
/**
|
|
632
|
-
* The refresh token id
|
|
633
|
-
*
|
|
631
|
+
* @deprecated Never sent. The row stores the refresh token id a success
|
|
632
|
+
* minted, but no login-history read publishes it; the session lists carry
|
|
633
|
+
* the handle a revoke needs. Kept so a consumer that still reads it (as a
|
|
634
|
+
* React key fallback, say) compiles — it is simply always absent.
|
|
634
635
|
*/
|
|
635
636
|
jti?: string;
|
|
636
637
|
/**
|
package/dist/log.d.ts
CHANGED
|
@@ -51,8 +51,16 @@ declare global {
|
|
|
51
51
|
entry: FiscalAuditLogRow;
|
|
52
52
|
}) | (AuditHistoryRowBase & {
|
|
53
53
|
surface: 'loginHistory';
|
|
54
|
-
entry:
|
|
54
|
+
entry: AuditHistoryLoginEntry;
|
|
55
55
|
});
|
|
56
|
+
/**
|
|
57
|
+
* A `loginHistory` history row's `entry`: the attempt WITHOUT its address, agent or token id.
|
|
58
|
+
* `GET /logs?mode=history` is IP-free for every role and lens; only the staff-only audit export
|
|
59
|
+
* file ({@link AuditExportLoginEntry}) carries `ip` and `userAgent`, and no surface carries `jti`.
|
|
60
|
+
*/
|
|
61
|
+
type AuditHistoryLoginEntry = Omit<CustomerLoginAttempt, 'ttl' | 'ip' | 'userAgent' | 'jti'>;
|
|
62
|
+
/** A `loginHistory` audit export row's `entry`: the history entry plus the stored `ip` and `userAgent`. */
|
|
63
|
+
type AuditExportLoginEntry = AuditHistoryLoginEntry & Pick<CustomerLoginAttempt, 'ip' | 'userAgent'>;
|
|
56
64
|
/**
|
|
57
65
|
* How much of one surface this page covers. `complete` means the surface has
|
|
58
66
|
* nothing older in the range; `paging` means it has more; `incomplete` means a
|
|
@@ -96,10 +104,20 @@ declare global {
|
|
|
96
104
|
coverage: AuditHistorySourceCoverage[];
|
|
97
105
|
}
|
|
98
106
|
type AuditExportTier = 'hot' | 'cold' | 'cold-error-output';
|
|
99
|
-
|
|
107
|
+
/** A history row as the export captures it; a `loginHistory` row's `entry` keeps `ip`/`userAgent`. */
|
|
108
|
+
type AuditExportRow = (Exclude<AuditHistoryRow, {
|
|
109
|
+
surface: 'loginHistory';
|
|
110
|
+
}> | (AuditHistoryRowBase & {
|
|
111
|
+
surface: 'loginHistory';
|
|
112
|
+
entry: AuditExportLoginEntry;
|
|
113
|
+
})) & {
|
|
100
114
|
tier: AuditExportTier;
|
|
101
115
|
};
|
|
102
116
|
interface AuditExportColdCoverage {
|
|
117
|
+
/**
|
|
118
|
+
* `pending-delivery` is no longer produced: an export whose end passed `visibleThrough` is
|
|
119
|
+
* now cut to it (`AuditExportSourceManifest.clamp`). It stays for manifests stored before.
|
|
120
|
+
*/
|
|
103
121
|
state: 'complete' | 'pending-delivery' | 'incomplete' | 'not-read' | 'unsupported';
|
|
104
122
|
reason?: 'COLD_OBJECT_TOO_LARGE' | 'COLD_READ_FAILED' | 'COLD_LENS_UNSUPPORTED' | 'BUDGET_EXHAUSTED' | 'DEDUP_SET_OVERFLOW' | 'FISCAL_REPLAY_IDS_NOT_CAPTURED' | 'COLD_TIER_NOT_ENUMERATED';
|
|
105
123
|
arrivalWindow: {
|
|
@@ -119,7 +137,17 @@ declare global {
|
|
|
119
137
|
rowsOtherTenant: number;
|
|
120
138
|
rowsOutOfRange: number;
|
|
121
139
|
duplicatesOfHot: number;
|
|
140
|
+
/**
|
|
141
|
+
* Cold-only rows in the file: read rows less hot duplicates and, once the export worker
|
|
142
|
+
* nets them, less `erasedRowsOmitted`.
|
|
143
|
+
*/
|
|
122
144
|
coldOnlyEmitted: number;
|
|
145
|
+
/**
|
|
146
|
+
* Cold-only rows read but left out of the file for naming an already-erased customer;
|
|
147
|
+
* written by the export worker. Absent when none was. Summed over every source with
|
|
148
|
+
* `hot.erasedRowsOmitted`, it equals the manifest's own `erasedRowsOmitted`.
|
|
149
|
+
*/
|
|
150
|
+
erasedRowsOmitted?: number;
|
|
123
151
|
legacyRows: number;
|
|
124
152
|
excludedAnonymous: number;
|
|
125
153
|
invalidRows: number;
|
|
@@ -129,8 +157,11 @@ declare global {
|
|
|
129
157
|
tierPlan: 'hot-only-no-archive' | 'hot-authoritative' | 'hot-and-cold';
|
|
130
158
|
tierPlanReason: string;
|
|
131
159
|
hot: AuditHistorySourceCoverage & {
|
|
160
|
+
/** Hot rows in the file, net of `erasedRowsOmitted`. */
|
|
132
161
|
emitted: number;
|
|
133
162
|
nearExpiryRecorded: number;
|
|
163
|
+
/** Hot rows read but left out for naming an already-erased customer (export worker). Absent when none was. */
|
|
164
|
+
erasedRowsOmitted?: number;
|
|
134
165
|
};
|
|
135
166
|
cold?: AuditExportColdCoverage;
|
|
136
167
|
}
|
|
@@ -148,7 +179,25 @@ declare global {
|
|
|
148
179
|
fromIso: string;
|
|
149
180
|
toIso: string;
|
|
150
181
|
};
|
|
182
|
+
/**
|
|
183
|
+
* The end every read of the capture used: `requested.toIso` bounded by `captureStartedAt`,
|
|
184
|
+
* and cut further to the cold delivery horizon when {@link clamp} is present.
|
|
185
|
+
*/
|
|
151
186
|
effectiveTo: string;
|
|
187
|
+
/**
|
|
188
|
+
* Present when the export's end was cut short of the request; written by the export engine
|
|
189
|
+
* (`buildAuditExportManifest`). `COLD_DELIVERY_HORIZON`: the selection holds an archived
|
|
190
|
+
* surface (`userActivity`, `fiscalAudit`, `storefrontEvents`) and the requested end lies past
|
|
191
|
+
* the instant the capture can prove the cold archive delivered — `captureStartedAt` less
|
|
192
|
+
* the delivery window (`sources[].cold.visibleThrough`, about 24 h 15 min). The whole file,
|
|
193
|
+
* every surface in it, ends at `to` (equal to `effectiveTo`); nothing after it is in the
|
|
194
|
+
* file, and the coverage states describe the cut range. `requested` stays as asked. Absent
|
|
195
|
+
* when nothing was cut — a selection of `entityAudit`/`loginHistory` alone never is.
|
|
196
|
+
*/
|
|
197
|
+
clamp?: {
|
|
198
|
+
to: string;
|
|
199
|
+
reason: 'COLD_DELIVERY_HORIZON';
|
|
200
|
+
};
|
|
152
201
|
captureStartedAt: string;
|
|
153
202
|
captureCompletedAt?: string;
|
|
154
203
|
lifetimeMs: number;
|