@tearleads/client-sdk 0.1.41 → 0.1.42

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.
Files changed (93) hide show
  1. package/client/Tearleads.js +3 -0
  2. package/client/Tearleads.js.map +1 -1
  3. package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js +2 -0
  4. package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js.map +1 -1
  5. package/data/keyingProjectionVerification/checkpointContext.d.ts +12 -0
  6. package/data/keyingProjectionVerification/checkpointContext.js +16 -0
  7. package/data/keyingProjectionVerification/checkpointContext.js.map +1 -1
  8. package/data/keyingProjectionVerification/containerDestinationVerification.js +3 -1
  9. package/data/keyingProjectionVerification/containerDestinationVerification.js.map +1 -1
  10. package/data/keyingProjectionVerification/containerProjectionVerification.js +12 -6
  11. package/data/keyingProjectionVerification/containerProjectionVerification.js.map +1 -1
  12. package/data/keyingProjectionVerification/documentProjectionVerification.js +10 -4
  13. package/data/keyingProjectionVerification/documentProjectionVerification.js.map +1 -1
  14. package/data/persistence/keyingCheckpointAdvancePersistence.js +27 -8
  15. package/data/persistence/keyingCheckpointAdvancePersistence.js.map +1 -1
  16. package/data/persistence/verifiedManifestBundlePersistence.d.ts +45 -0
  17. package/data/persistence/verifiedManifestBundlePersistence.js +282 -0
  18. package/data/persistence/verifiedManifestBundlePersistence.js.map +1 -0
  19. package/data/sqlite/schema.d.ts +157 -0
  20. package/data/sqlite/schema.js +3 -0
  21. package/data/sqlite/schema.js.map +1 -1
  22. package/data/sqlite/verifiedManifestBundleSchema.d.ts +174 -0
  23. package/data/sqlite/verifiedManifestBundleSchema.js +36 -0
  24. package/data/sqlite/verifiedManifestBundleSchema.js.map +1 -0
  25. package/internal/api-client/ApiClient.d.ts +4 -11
  26. package/internal/api-client/ApiClient.js +8 -6
  27. package/internal/api-client/ApiClient.js.map +1 -1
  28. package/internal/api-client/index.d.ts +1 -1
  29. package/internal/api-client/index.js +0 -1
  30. package/internal/api-client/index.js.map +1 -1
  31. package/internal/api-client/principalHistoryRequest.js +8 -2
  32. package/internal/api-client/principalHistoryRequest.js.map +1 -1
  33. package/internal/api-client/principalHistoryRequestContext.js +15 -5
  34. package/internal/api-client/principalHistoryRequestContext.js.map +1 -1
  35. package/internal/api-client/routes/writerProjections.js +6 -3
  36. package/internal/api-client/routes/writerProjections.js.map +1 -1
  37. package/internal/api-client/verifiedManifestCitations.d.ts +23 -0
  38. package/internal/api-client/verifiedManifestCitations.js +60 -0
  39. package/internal/api-client/verifiedManifestCitations.js.map +1 -0
  40. package/internal/api-client/writerProjectionRequests.js +75 -14
  41. package/internal/api-client/writerProjectionRequests.js.map +1 -1
  42. package/internal/crypto/index.d.ts +0 -1
  43. package/internal/crypto/index.js +0 -1
  44. package/internal/crypto/index.js.map +1 -1
  45. package/internal/validators/knownManifestsRefinements.js +5 -0
  46. package/internal/validators/knownManifestsRefinements.js.map +1 -0
  47. package/internal/validators/operation/writerProjections.d.ts +85 -319
  48. package/internal/validators/operation/writerProjections.js +11 -11
  49. package/internal/validators/operation/writerProjections.js.map +1 -1
  50. package/internal/validators/response/container.d.ts +429 -20
  51. package/internal/validators/response/container.js +40 -5
  52. package/internal/validators/response/container.js.map +1 -1
  53. package/internal/validators/response/documentMutation.d.ts +440 -20
  54. package/internal/validators/response/documentMutation.js +33 -3
  55. package/internal/validators/response/documentMutation.js.map +1 -1
  56. package/internal/validators/response/index.d.ts +3 -2
  57. package/internal/validators/response/index.js +3 -2
  58. package/internal/validators/response/index.js.map +1 -1
  59. package/internal/validators/response/manifestBundleReferences.js +79 -0
  60. package/internal/validators/response/manifestBundleReferences.js.map +1 -0
  61. package/internal/validators/response/writerProjectionWire.d.ts +19 -0
  62. package/internal/validators/response/writerProjectionWire.js +132 -0
  63. package/internal/validators/response/writerProjectionWire.js.map +1 -0
  64. package/internal/validators/schema.js +20 -0
  65. package/internal/validators/schema.js.map +1 -1
  66. package/internal/validators/util/index.d.ts +1 -1
  67. package/internal/validators/util/index.js +1 -1
  68. package/internal/validators/util/index.js.map +1 -1
  69. package/internal/validators/util/knownManifestWire.d.ts +11 -0
  70. package/internal/validators/util/knownManifestWire.js +28 -0
  71. package/internal/validators/util/knownManifestWire.js.map +1 -0
  72. package/internal/validators/writerProjectionRefinements.js +5 -0
  73. package/internal/validators/writerProjectionRefinements.js.map +1 -1
  74. package/package.json +1 -1
  75. package/workflows/registration/provisioningBootstrapBuilders.d.ts +0 -5
  76. package/workflows/sync/remoteReset.js +2 -0
  77. package/workflows/sync/remoteReset.js.map +1 -1
  78. package/internal/api-client/projectionHistoryTransport.js +0 -107
  79. package/internal/api-client/projectionHistoryTransport.js.map +0 -1
  80. package/internal/api-client/verifiedProjectionHistory.d.ts +0 -4
  81. package/internal/api-client/verifiedProjectionHistory.js +0 -12
  82. package/internal/api-client/verifiedProjectionHistory.js.map +0 -1
  83. package/internal/crypto/projectionHistory.d.ts +0 -14
  84. package/internal/crypto/projectionHistory.js +0 -90
  85. package/internal/crypto/projectionHistory.js.map +0 -1
  86. package/internal/crypto/projectionHistorySlots.d.ts +0 -13
  87. package/internal/crypto/projectionHistorySlots.js +0 -81
  88. package/internal/crypto/projectionHistorySlots.js.map +0 -1
  89. package/internal/validators/projectionHistoryRefinements.js +0 -5
  90. package/internal/validators/projectionHistoryRefinements.js.map +0 -1
  91. package/internal/validators/util/projectionHistoryWire.d.ts +0 -23
  92. package/internal/validators/util/projectionHistoryWire.js +0 -33
  93. package/internal/validators/util/projectionHistoryWire.js.map +0 -1
@@ -0,0 +1,174 @@
1
+ import { type SqlTableSchema } from "./sqlTableSchema.js";
2
+ /**
3
+ * Access-manifest bundles this device verified inside a writer projection,
4
+ * keyed by manifest hash. A later projection read cites them so the API can
5
+ * omit their bytes; the client refills each omission from this row and
6
+ * verifies the rebuilt projection from scratch. Rows are neither trust nor
7
+ * checkpoint state: a missing, evicted, or damaged row only costs bytes.
8
+ *
9
+ * Columns:
10
+ * - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.
11
+ * - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified
12
+ * manifest's object, used to cite the lineage relevant to a request.
13
+ * - `bundleJson`: The exact verified bundle as JSON.
14
+ * - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.
15
+ * - `verifiedAt`: Latest local verification time; oldest rows evict first.
16
+ */
17
+ export declare const verifiedAccessManifestBundles: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
18
+ name: "verified_access_manifest_bundles";
19
+ schema: undefined;
20
+ columns: {
21
+ manifestHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
22
+ name: "manifest_hash";
23
+ tableName: "verified_access_manifest_bundles";
24
+ dataType: "string";
25
+ columnType: "SQLiteText";
26
+ data: string;
27
+ driverParam: string;
28
+ notNull: true;
29
+ hasDefault: false;
30
+ isPrimaryKey: true;
31
+ isAutoincrement: false;
32
+ hasRuntimeDefault: false;
33
+ enumValues: [string, ...string[]];
34
+ baseColumn: never;
35
+ identity: undefined;
36
+ generated: undefined;
37
+ }, {}, {
38
+ length: number | undefined;
39
+ }>;
40
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
41
+ name: "organization_id";
42
+ tableName: "verified_access_manifest_bundles";
43
+ dataType: "string";
44
+ columnType: "SQLiteText";
45
+ data: string;
46
+ driverParam: string;
47
+ notNull: true;
48
+ hasDefault: false;
49
+ isPrimaryKey: false;
50
+ isAutoincrement: false;
51
+ hasRuntimeDefault: false;
52
+ enumValues: [string, ...string[]];
53
+ baseColumn: never;
54
+ identity: undefined;
55
+ generated: undefined;
56
+ }, {}, {
57
+ length: number | undefined;
58
+ }>;
59
+ objectKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
60
+ name: "object_kind";
61
+ tableName: "verified_access_manifest_bundles";
62
+ dataType: "string";
63
+ columnType: "SQLiteText";
64
+ data: string;
65
+ driverParam: string;
66
+ notNull: true;
67
+ hasDefault: false;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
71
+ enumValues: [string, ...string[]];
72
+ baseColumn: never;
73
+ identity: undefined;
74
+ generated: undefined;
75
+ }, {}, {
76
+ length: number | undefined;
77
+ }>;
78
+ objectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
79
+ name: "object_id";
80
+ tableName: "verified_access_manifest_bundles";
81
+ dataType: "string";
82
+ columnType: "SQLiteText";
83
+ data: string;
84
+ driverParam: string;
85
+ notNull: true;
86
+ hasDefault: false;
87
+ isPrimaryKey: false;
88
+ isAutoincrement: false;
89
+ hasRuntimeDefault: false;
90
+ enumValues: [string, ...string[]];
91
+ baseColumn: never;
92
+ identity: undefined;
93
+ generated: undefined;
94
+ }, {}, {
95
+ length: number | undefined;
96
+ }>;
97
+ epoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
98
+ name: "epoch";
99
+ tableName: "verified_access_manifest_bundles";
100
+ dataType: "number";
101
+ columnType: "SQLiteInteger";
102
+ data: number;
103
+ driverParam: number;
104
+ notNull: true;
105
+ hasDefault: false;
106
+ isPrimaryKey: false;
107
+ isAutoincrement: false;
108
+ hasRuntimeDefault: false;
109
+ enumValues: undefined;
110
+ baseColumn: never;
111
+ identity: undefined;
112
+ generated: undefined;
113
+ }, {}, {}>;
114
+ bundleJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
115
+ name: "bundle_json";
116
+ tableName: "verified_access_manifest_bundles";
117
+ dataType: "string";
118
+ columnType: "SQLiteText";
119
+ data: string;
120
+ driverParam: string;
121
+ notNull: true;
122
+ hasDefault: false;
123
+ isPrimaryKey: false;
124
+ isAutoincrement: false;
125
+ hasRuntimeDefault: false;
126
+ enumValues: [string, ...string[]];
127
+ baseColumn: never;
128
+ identity: undefined;
129
+ generated: undefined;
130
+ }, {}, {
131
+ length: number | undefined;
132
+ }>;
133
+ bundleDigest: import("drizzle-orm/sqlite-core").SQLiteColumn<{
134
+ name: "bundle_digest";
135
+ tableName: "verified_access_manifest_bundles";
136
+ dataType: "string";
137
+ columnType: "SQLiteText";
138
+ data: string;
139
+ driverParam: string;
140
+ notNull: true;
141
+ hasDefault: false;
142
+ isPrimaryKey: false;
143
+ isAutoincrement: false;
144
+ hasRuntimeDefault: false;
145
+ enumValues: [string, ...string[]];
146
+ baseColumn: never;
147
+ identity: undefined;
148
+ generated: undefined;
149
+ }, {}, {
150
+ length: number | undefined;
151
+ }>;
152
+ verifiedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
153
+ name: "verified_at";
154
+ tableName: "verified_access_manifest_bundles";
155
+ dataType: "string";
156
+ columnType: "SQLiteText";
157
+ data: string;
158
+ driverParam: string;
159
+ notNull: true;
160
+ hasDefault: false;
161
+ isPrimaryKey: false;
162
+ isAutoincrement: false;
163
+ hasRuntimeDefault: false;
164
+ enumValues: [string, ...string[]];
165
+ baseColumn: never;
166
+ identity: undefined;
167
+ generated: undefined;
168
+ }, {}, {
169
+ length: number | undefined;
170
+ }>;
171
+ };
172
+ dialect: "sqlite";
173
+ }>;
174
+ export declare const verifiedManifestBundleTables: ReadonlyArray<SqlTableSchema>;
@@ -0,0 +1,36 @@
1
+ import { desc } from "drizzle-orm";
2
+ import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
3
+ import { defineSqlTableSchema } from "./sqlTableSchema.js";
4
+ /**
5
+ * Access-manifest bundles this device verified inside a writer projection,
6
+ * keyed by manifest hash. A later projection read cites them so the API can
7
+ * omit their bytes; the client refills each omission from this row and
8
+ * verifies the rebuilt projection from scratch. Rows are neither trust nor
9
+ * checkpoint state: a missing, evicted, or damaged row only costs bytes.
10
+ *
11
+ * Columns:
12
+ * - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.
13
+ * - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified
14
+ * manifest's object, used to cite the lineage relevant to a request.
15
+ * - `bundleJson`: The exact verified bundle as JSON.
16
+ * - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.
17
+ * - `verifiedAt`: Latest local verification time; oldest rows evict first.
18
+ */
19
+ export const verifiedAccessManifestBundles = sqliteTable("verified_access_manifest_bundles", {
20
+ manifestHash: text("manifest_hash").primaryKey(),
21
+ organizationId: text("organization_id").notNull(),
22
+ objectKind: text("object_kind").notNull(),
23
+ objectId: text("object_id").notNull(),
24
+ epoch: integer("epoch").notNull(),
25
+ bundleJson: text("bundle_json").notNull(),
26
+ bundleDigest: text("bundle_digest").notNull(),
27
+ verifiedAt: text("verified_at").notNull(),
28
+ }, (table) => [
29
+ index("verified_access_manifest_bundles_object_idx").on(table.objectKind, table.objectId, desc(table.epoch)),
30
+ index("verified_access_manifest_bundles_verified_at_idx").on(table.verifiedAt),
31
+ index("verified_access_manifest_bundles_organization_idx").on(table.organizationId),
32
+ ]);
33
+ export const verifiedManifestBundleTables = [
34
+ defineSqlTableSchema(verifiedAccessManifestBundles),
35
+ ];
36
+ //# sourceMappingURL=verifiedManifestBundleSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifiedManifestBundleSchema.js","sourceRoot":"","sources":["verifiedManifestBundleSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAuB,MAAM,kBAAkB,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CACtD,kCAAkC,EAClC;IACE,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,UAAU,EAAE;IAChD,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;IACrC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE;IACjC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IAC7C,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;CAC1C,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,6CAA6C,CAAC,CAAC,EAAE,CACrD,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAClB;IACD,KAAK,CAAC,kDAAkD,CAAC,CAAC,EAAE,CAC1D,KAAK,CAAC,UAAU,CACjB;IACD,KAAK,CAAC,mDAAmD,CAAC,CAAC,EAAE,CAC3D,KAAK,CAAC,cAAc,CACrB;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAkC;IACzE,oBAAoB,CAAC,6BAA6B,CAAC;CACpD,CAAC","sourcesContent":["import { desc } from \"drizzle-orm\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { defineSqlTableSchema, type SqlTableSchema } from \"./sqlTableSchema\";\n\n/**\n * Access-manifest bundles this device verified inside a writer projection,\n * keyed by manifest hash. A later projection read cites them so the API can\n * omit their bytes; the client refills each omission from this row and\n * verifies the rebuilt projection from scratch. Rows are neither trust nor\n * checkpoint state: a missing, evicted, or damaged row only costs bytes.\n *\n * Columns:\n * - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.\n * - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified\n * manifest's object, used to cite the lineage relevant to a request.\n * - `bundleJson`: The exact verified bundle as JSON.\n * - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.\n * - `verifiedAt`: Latest local verification time; oldest rows evict first.\n */\nexport const verifiedAccessManifestBundles = sqliteTable(\n \"verified_access_manifest_bundles\",\n {\n manifestHash: text(\"manifest_hash\").primaryKey(),\n organizationId: text(\"organization_id\").notNull(),\n objectKind: text(\"object_kind\").notNull(),\n objectId: text(\"object_id\").notNull(),\n epoch: integer(\"epoch\").notNull(),\n bundleJson: text(\"bundle_json\").notNull(),\n bundleDigest: text(\"bundle_digest\").notNull(),\n verifiedAt: text(\"verified_at\").notNull(),\n },\n (table) => [\n index(\"verified_access_manifest_bundles_object_idx\").on(\n table.objectKind,\n table.objectId,\n desc(table.epoch),\n ),\n index(\"verified_access_manifest_bundles_verified_at_idx\").on(\n table.verifiedAt,\n ),\n index(\"verified_access_manifest_bundles_organization_idx\").on(\n table.organizationId,\n ),\n ],\n);\n\nexport const verifiedManifestBundleTables: ReadonlyArray<SqlTableSchema> = [\n defineSqlTableSchema(verifiedAccessManifestBundles),\n];\n"]}
@@ -10,11 +10,12 @@ import { type UploadMultipartBlobPartBytesRequest } from "./routes/blobs/get.js"
10
10
  import { type ContainerKekLogOptions } from "./routes/containers/reads.js";
11
11
  import { type DocumentPurgeProofOptions } from "./routes/documents/mutations.js";
12
12
  import type { HttpMethod, ListContainerDocumentsOptions, ListDocumentEditAttributionRangesOptions, RequestResult, RequestResultOptions } from "./types.js";
13
+ import type { VerifiedManifestCitations } from "./verifiedManifestCitations.js";
13
14
  type ExpiredHandler = () => boolean | Promise<boolean>;
14
15
  type PaymentRequiredHandler = (organizationId: string | null) => void;
15
16
  export declare class ApiClient {
16
17
  private readonly requestRuntime;
17
- private readonly projectionHistory;
18
+ private verifiedManifestCitations;
18
19
  private readonly containerDocumentListRequestsByKey;
19
20
  private readonly containerParentLaneRequestsByKey;
20
21
  private readonly containerWriterProjectionRequestsByContainerId;
@@ -59,6 +60,8 @@ export declare class ApiClient {
59
60
  setOnApiVersion(handler: ((version: number) => void) | null): void;
60
61
  setOnSessionExpired(handler: ExpiredHandler | null): void;
61
62
  setOnPaymentRequired(handler: PaymentRequiredHandler | null): void;
63
+ /** Verified bundles to cite on projection reads, scoped by their owner. */
64
+ setVerifiedManifestCitations(source: VerifiedManifestCitations | null): void;
62
65
  setAuthToken(token: string | null): void;
63
66
  getAuthToken(): string | null;
64
67
  getRequestFailure(input: {
@@ -2572,11 +2575,6 @@ export declare class ApiClient {
2572
2575
  manifestHash: string;
2573
2576
  state: Record<string, unknown>;
2574
2577
  }[];
2575
- historyPrefixes?: {
2576
- key: string;
2577
- count: number;
2578
- digest: string;
2579
- }[] | undefined;
2580
2578
  } | null>;
2581
2579
  getContainerReplacementAuthorizationsResult(containerId: string, replacesOrganizationId: string): Promise<RequestResult<{
2582
2580
  authorizations: {
@@ -3405,11 +3403,6 @@ export declare class ApiClient {
3405
3403
  manifestHash: string;
3406
3404
  state: Record<string, unknown>;
3407
3405
  }[];
3408
- historyPrefixes?: {
3409
- key: string;
3410
- count: number;
3411
- digest: string;
3412
- }[] | undefined;
3413
3406
  contentKeyBundleStale?: true | undefined;
3414
3407
  } | null>;
3415
3408
  getDocumentEditAttribution(documentId: string, requestKey?: string): Promise<{
@@ -6,7 +6,6 @@ import { getDocumentPurgeProof as readPurgeProof, purgeDocument as submitDocumen
6
6
  import { createOperationTransport, } from "./operationTransportFactory.js";
7
7
  import { getOrganizationPolicyHistoryResult as organizationHistory } from "./organizationPolicyHistory.js";
8
8
  import { PrincipalPolicyRequests } from "./principalPolicyRequests.js";
9
- import { ProjectionHistoryTransport } from "./projectionHistoryTransport.js";
10
9
  import { bindPrototypeMethods, cachedRequest, dedupedRequest, evictWriterProjectionIfSyncChanged, listContainerDocumentsRequestKey, listContainerParentLanesRequestKey, } from "./requestInternals.js";
11
10
  import { destroySession as authDestroySession, listSessions as authListSessions, logout as authLogout, userIdentity as authUserIdentity, } from "./routes/auth/session.js";
12
11
  import { bindBlobAttachment as blobAttachmentBind, detachBlobAttachment as blobAttachmentDetach, } from "./routes/blobs/attachments.js";
@@ -37,7 +36,7 @@ const CONTAINER_ROTATIONS = {
37
36
  };
38
37
  export class ApiClient {
39
38
  requestRuntime;
40
- projectionHistory = new ProjectionHistoryTransport();
39
+ verifiedManifestCitations = null;
41
40
  containerDocumentListRequestsByKey = new Map();
42
41
  containerParentLaneRequestsByKey = new Map();
43
42
  containerWriterProjectionRequestsByContainerId = new CitingProjectionCache();
@@ -57,15 +56,14 @@ export class ApiClient {
57
56
  bindPrototypeMethods(this, ApiClient.prototype);
58
57
  this.requestRuntime = new ApiRequestRuntime(baseUrl, instrumentation);
59
58
  this.principalPolicyRequests = new PrincipalPolicyRequests(this.requestRuntime, this.principalPolicyRequestsByKey, this.clearWriterProjectionCaches);
60
- const projectionRequests = writerProjectionRequests(this.requestRuntime);
61
- this.request = this.projectionHistory.wrapRequest(projectionRequests.request);
62
- this.requestResult = this.projectionHistory.wrapRequestResult(projectionRequests.requestResult);
59
+ const projectionRequests = writerProjectionRequests(this.requestRuntime, () => this.verifiedManifestCitations);
60
+ this.request = projectionRequests.request;
61
+ this.requestResult = projectionRequests.requestResult;
63
62
  this.transport = createOperationTransport(this.requestRuntime.responseRequest);
64
63
  this.documentAttributionRequests = new DocumentAttributionRequests(this.transport);
65
64
  this.webSocketTickets = new WebSocketTickets(this.transport, () => this.getAuthToken());
66
65
  }
67
66
  clearAuthScopedCaches() {
68
- this.projectionHistory.clear();
69
67
  this.containerDocumentListRequestsByKey.clear();
70
68
  this.containerParentLaneRequestsByKey.clear();
71
69
  this.documentAttachmentListRequestsByDocumentId.clear();
@@ -183,6 +181,10 @@ export class ApiClient {
183
181
  setOnPaymentRequired(handler) {
184
182
  this.requestRuntime.setOnPaymentRequired(handler);
185
183
  }
184
+ /** Verified bundles to cite on projection reads, scoped by their owner. */
185
+ setVerifiedManifestCitations(source) {
186
+ this.verifiedManifestCitations = source;
187
+ }
186
188
  setAuthToken(token) {
187
189
  if (this.requestRuntime.setAuthToken(token)) {
188
190
  this.clearAuthScopedCaches();