@fairmint/canton-node-sdk 0.0.272 → 0.0.274

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 (76) hide show
  1. package/README.md +26 -0
  2. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts +18 -1
  3. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts.map +1 -1
  4. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js +8 -0
  5. package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js.map +1 -1
  6. package/build/src/clients/ledger-json-api/index.d.ts +6 -1
  7. package/build/src/clients/ledger-json-api/index.d.ts.map +1 -1
  8. package/build/src/clients/ledger-json-api/index.js +9 -1
  9. package/build/src/clients/ledger-json-api/index.js.map +1 -1
  10. package/build/src/clients/ledger-json-api/operations/v2/commands/async/submit.d.ts +52 -52
  11. package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait.d.ts +52 -52
  12. package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-raw-completions.d.ts +66 -0
  13. package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-raw-completions.d.ts.map +1 -0
  14. package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-raw-completions.js +65 -0
  15. package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-raw-completions.js.map +1 -0
  16. package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.d.ts +26 -3
  17. package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.d.ts.map +1 -1
  18. package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.js +36 -5
  19. package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.js.map +1 -1
  20. package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.d.ts +17 -3
  21. package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.d.ts.map +1 -1
  22. package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.js +24 -7
  23. package/build/src/clients/ledger-json-api/operations/v2/state/active-contracts-request.js.map +1 -1
  24. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts +37 -2
  25. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts.map +1 -1
  26. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js +42 -23
  27. package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.js.map +1 -1
  28. package/build/src/clients/ledger-json-api/operations/v2/updates/get-updates-page.d.ts +503 -0
  29. package/build/src/clients/ledger-json-api/operations/v2/updates/get-updates-page.d.ts.map +1 -0
  30. package/build/src/clients/ledger-json-api/operations/v2/updates/get-updates-page.js +178 -0
  31. package/build/src/clients/ledger-json-api/operations/v2/updates/get-updates-page.js.map +1 -0
  32. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-raw-updates.d.ts +87 -0
  33. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-raw-updates.d.ts.map +1 -0
  34. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-raw-updates.js +99 -0
  35. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-raw-updates.js.map +1 -0
  36. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts +31 -2
  37. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.d.ts.map +1 -1
  38. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.js +38 -7
  39. package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-updates.js.map +1 -1
  40. package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.d.ts +68 -20
  41. package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.d.ts.map +1 -1
  42. package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.js +76 -50
  43. package/build/src/clients/ledger-json-api/operations/v2/utils/event-format-builder.js.map +1 -1
  44. package/build/src/clients/ledger-json-api/operations/v2/utils/party-scope.d.ts +36 -0
  45. package/build/src/clients/ledger-json-api/operations/v2/utils/party-scope.d.ts.map +1 -0
  46. package/build/src/clients/ledger-json-api/operations/v2/utils/party-scope.js +45 -0
  47. package/build/src/clients/ledger-json-api/operations/v2/utils/party-scope.js.map +1 -0
  48. package/build/src/clients/ledger-json-api/operations/v2/utils/raw-frame-stream.d.ts +113 -0
  49. package/build/src/clients/ledger-json-api/operations/v2/utils/raw-frame-stream.d.ts.map +1 -0
  50. package/build/src/clients/ledger-json-api/operations/v2/utils/raw-frame-stream.js +295 -0
  51. package/build/src/clients/ledger-json-api/operations/v2/utils/raw-frame-stream.js.map +1 -0
  52. package/build/src/core/http/HttpClient.d.ts +5 -0
  53. package/build/src/core/http/HttpClient.d.ts.map +1 -1
  54. package/build/src/core/http/HttpClient.js +40 -11
  55. package/build/src/core/http/HttpClient.js.map +1 -1
  56. package/build/src/core/operations/WebSocketOperationFactory.js +1 -1
  57. package/build/src/core/operations/WebSocketOperationFactory.js.map +1 -1
  58. package/build/src/core/types.d.ts +6 -0
  59. package/build/src/core/types.d.ts.map +1 -1
  60. package/build/src/core/utils/index.d.ts +1 -0
  61. package/build/src/core/utils/index.d.ts.map +1 -1
  62. package/build/src/core/utils/index.js +7 -1
  63. package/build/src/core/utils/index.js.map +1 -1
  64. package/build/src/core/utils/lossless-json.d.ts +52 -0
  65. package/build/src/core/utils/lossless-json.d.ts.map +1 -0
  66. package/build/src/core/utils/lossless-json.js +250 -0
  67. package/build/src/core/utils/lossless-json.js.map +1 -0
  68. package/build/src/core/ws/WebSocketClient.d.ts +5 -1
  69. package/build/src/core/ws/WebSocketClient.d.ts.map +1 -1
  70. package/build/src/core/ws/WebSocketClient.js +1 -1
  71. package/build/src/core/ws/WebSocketClient.js.map +1 -1
  72. package/build/src/utils/ledger/user-rights.d.ts +46 -0
  73. package/build/src/utils/ledger/user-rights.d.ts.map +1 -1
  74. package/build/src/utils/ledger/user-rights.js +68 -0
  75. package/build/src/utils/ledger/user-rights.js.map +1 -1
  76. package/package.json +1 -1
@@ -0,0 +1,503 @@
1
+ import { z } from 'zod';
2
+ import { ApiOperation } from '../../../../../core/operations/ApiOperation';
3
+ import { type OperationExecuteOptions } from '../../../../../core/operations/operation-execute-options';
4
+ import type { paths } from '../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi';
5
+ import { type RawFrameKind } from '../utils/raw-frame-stream';
6
+ import { type RawUpdateKind } from './subscribe-to-raw-updates';
7
+ declare const endpoint: '/v2/updates/get-updates-page';
8
+ /** Parameters of `getUpdatesPage` and `getRawUpdatesPage`: the Ledger API's `GetUpdatesPageRequest`. */
9
+ export declare const GetUpdatesPageParamsSchema: z.ZodObject<{
10
+ updateFormat: z.ZodObject<{
11
+ includeTransactions: z.ZodOptional<z.ZodObject<{
12
+ eventFormat: z.ZodObject<{
13
+ filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
14
+ cumulative: z.ZodArray<z.ZodObject<{
15
+ identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
16
+ Empty: z.ZodObject<{}, z.core.$strip>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ InterfaceFilter: z.ZodObject<{
19
+ value: z.ZodObject<{
20
+ interfaceId: z.ZodString;
21
+ includeInterfaceView: z.ZodBoolean;
22
+ includeCreatedEventBlob: z.ZodBoolean;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ TemplateFilter: z.ZodObject<{
27
+ value: z.ZodObject<{
28
+ templateId: z.ZodString;
29
+ includeCreatedEventBlob: z.ZodBoolean;
30
+ }, z.core.$strip>;
31
+ }, z.core.$strip>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ WildcardFilter: z.ZodObject<{
34
+ value: z.ZodObject<{
35
+ includeCreatedEventBlob: z.ZodBoolean;
36
+ }, z.core.$strip>;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>]>;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>>;
41
+ filtersForAnyParty: z.ZodOptional<z.ZodObject<{
42
+ cumulative: z.ZodArray<z.ZodObject<{
43
+ identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
44
+ Empty: z.ZodObject<{}, z.core.$strip>;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ InterfaceFilter: z.ZodObject<{
47
+ value: z.ZodObject<{
48
+ interfaceId: z.ZodString;
49
+ includeInterfaceView: z.ZodBoolean;
50
+ includeCreatedEventBlob: z.ZodBoolean;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ TemplateFilter: z.ZodObject<{
55
+ value: z.ZodObject<{
56
+ templateId: z.ZodString;
57
+ includeCreatedEventBlob: z.ZodBoolean;
58
+ }, z.core.$strip>;
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ WildcardFilter: z.ZodObject<{
62
+ value: z.ZodObject<{
63
+ includeCreatedEventBlob: z.ZodBoolean;
64
+ }, z.core.$strip>;
65
+ }, z.core.$strip>;
66
+ }, z.core.$strip>]>;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>>;
69
+ verbose: z.ZodOptional<z.ZodBoolean>;
70
+ }, z.core.$strip>;
71
+ transactionShape: z.ZodUnion<readonly [z.ZodLiteral<"TRANSACTION_SHAPE_ACS_DELTA">, z.ZodLiteral<"TRANSACTION_SHAPE_LEDGER_EFFECTS">]>;
72
+ }, z.core.$strip>>;
73
+ includeReassignments: z.ZodOptional<z.ZodObject<{
74
+ filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ cumulative: z.ZodArray<z.ZodObject<{
76
+ identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
77
+ Empty: z.ZodObject<{}, z.core.$strip>;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ InterfaceFilter: z.ZodObject<{
80
+ value: z.ZodObject<{
81
+ interfaceId: z.ZodString;
82
+ includeInterfaceView: z.ZodBoolean;
83
+ includeCreatedEventBlob: z.ZodBoolean;
84
+ }, z.core.$strip>;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ TemplateFilter: z.ZodObject<{
88
+ value: z.ZodObject<{
89
+ templateId: z.ZodString;
90
+ includeCreatedEventBlob: z.ZodBoolean;
91
+ }, z.core.$strip>;
92
+ }, z.core.$strip>;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ WildcardFilter: z.ZodObject<{
95
+ value: z.ZodObject<{
96
+ includeCreatedEventBlob: z.ZodBoolean;
97
+ }, z.core.$strip>;
98
+ }, z.core.$strip>;
99
+ }, z.core.$strip>]>;
100
+ }, z.core.$strip>>;
101
+ }, z.core.$strip>>;
102
+ filtersForAnyParty: z.ZodOptional<z.ZodObject<{
103
+ cumulative: z.ZodArray<z.ZodObject<{
104
+ identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
105
+ Empty: z.ZodObject<{}, z.core.$strip>;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ InterfaceFilter: z.ZodObject<{
108
+ value: z.ZodObject<{
109
+ interfaceId: z.ZodString;
110
+ includeInterfaceView: z.ZodBoolean;
111
+ includeCreatedEventBlob: z.ZodBoolean;
112
+ }, z.core.$strip>;
113
+ }, z.core.$strip>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ TemplateFilter: z.ZodObject<{
116
+ value: z.ZodObject<{
117
+ templateId: z.ZodString;
118
+ includeCreatedEventBlob: z.ZodBoolean;
119
+ }, z.core.$strip>;
120
+ }, z.core.$strip>;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ WildcardFilter: z.ZodObject<{
123
+ value: z.ZodObject<{
124
+ includeCreatedEventBlob: z.ZodBoolean;
125
+ }, z.core.$strip>;
126
+ }, z.core.$strip>;
127
+ }, z.core.$strip>]>;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>>;
130
+ verbose: z.ZodOptional<z.ZodBoolean>;
131
+ }, z.core.$strip>>;
132
+ includeTopologyEvents: z.ZodOptional<z.ZodObject<{
133
+ includeParticipantAuthorizationEvents: z.ZodOptional<z.ZodObject<{
134
+ parties: z.ZodOptional<z.ZodArray<z.ZodString>>;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>>;
137
+ }, z.core.$strip>;
138
+ beginOffsetExclusive: z.ZodOptional<z.ZodNumber>;
139
+ endOffsetInclusive: z.ZodOptional<z.ZodNumber>;
140
+ maxPageSize: z.ZodOptional<z.ZodNumber>;
141
+ descendingOrder: z.ZodOptional<z.ZodBoolean>;
142
+ pageToken: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strip>;
144
+ export type GetUpdatesPageParams = z.infer<typeof GetUpdatesPageParamsSchema>;
145
+ export type GetUpdatesPageRequest = paths[typeof endpoint]['post']['requestBody']['content']['application/json'];
146
+ export type GetUpdatesPageResponse = paths[typeof endpoint]['post']['responses']['200']['content']['application/json'];
147
+ /**
148
+ * Reads one page of updates (`POST /v2/updates/get-updates-page`), parsed as JSON without any schema normalization.
149
+ *
150
+ * Read every page by passing each page's `nextPageToken` with otherwise identical parameters until it is absent.
151
+ * Without `endOffsetInclusive` the token is always present, so polling it tails the ledger. For the exact response
152
+ * text, use `getRawUpdatesPage`.
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * const page = await client.getUpdatesPage({
157
+ * updateFormat: buildUpdateFormat({ anyParty: true, includeTopologyEvents: true }),
158
+ * beginOffsetExclusive: 1000,
159
+ * endOffsetInclusive: 2000,
160
+ * maxPageSize: 100,
161
+ * });
162
+ * ```;
163
+ */
164
+ export declare const GetUpdatesPage: new (client: import("../../../../..").BaseClient) => ApiOperation<{
165
+ updateFormat: {
166
+ includeTransactions?: {
167
+ eventFormat: {
168
+ filtersByParty: Record<string, {
169
+ cumulative: {
170
+ identifierFilter: {
171
+ Empty: Record<string, never>;
172
+ } | {
173
+ InterfaceFilter: {
174
+ value: {
175
+ interfaceId: string;
176
+ includeInterfaceView: boolean;
177
+ includeCreatedEventBlob: boolean;
178
+ };
179
+ };
180
+ } | {
181
+ TemplateFilter: {
182
+ value: {
183
+ templateId: string;
184
+ includeCreatedEventBlob: boolean;
185
+ };
186
+ };
187
+ } | {
188
+ WildcardFilter: {
189
+ value: {
190
+ includeCreatedEventBlob: boolean;
191
+ };
192
+ };
193
+ };
194
+ }[];
195
+ }>;
196
+ filtersForAnyParty?: {
197
+ cumulative: {
198
+ identifierFilter: {
199
+ Empty: Record<string, never>;
200
+ } | {
201
+ InterfaceFilter: {
202
+ value: {
203
+ interfaceId: string;
204
+ includeInterfaceView: boolean;
205
+ includeCreatedEventBlob: boolean;
206
+ };
207
+ };
208
+ } | {
209
+ TemplateFilter: {
210
+ value: {
211
+ templateId: string;
212
+ includeCreatedEventBlob: boolean;
213
+ };
214
+ };
215
+ } | {
216
+ WildcardFilter: {
217
+ value: {
218
+ includeCreatedEventBlob: boolean;
219
+ };
220
+ };
221
+ };
222
+ }[];
223
+ } | undefined;
224
+ verbose?: boolean | undefined;
225
+ };
226
+ transactionShape: "TRANSACTION_SHAPE_ACS_DELTA" | "TRANSACTION_SHAPE_LEDGER_EFFECTS";
227
+ } | undefined;
228
+ includeReassignments?: {
229
+ filtersByParty: Record<string, {
230
+ cumulative: {
231
+ identifierFilter: {
232
+ Empty: Record<string, never>;
233
+ } | {
234
+ InterfaceFilter: {
235
+ value: {
236
+ interfaceId: string;
237
+ includeInterfaceView: boolean;
238
+ includeCreatedEventBlob: boolean;
239
+ };
240
+ };
241
+ } | {
242
+ TemplateFilter: {
243
+ value: {
244
+ templateId: string;
245
+ includeCreatedEventBlob: boolean;
246
+ };
247
+ };
248
+ } | {
249
+ WildcardFilter: {
250
+ value: {
251
+ includeCreatedEventBlob: boolean;
252
+ };
253
+ };
254
+ };
255
+ }[];
256
+ }>;
257
+ filtersForAnyParty?: {
258
+ cumulative: {
259
+ identifierFilter: {
260
+ Empty: Record<string, never>;
261
+ } | {
262
+ InterfaceFilter: {
263
+ value: {
264
+ interfaceId: string;
265
+ includeInterfaceView: boolean;
266
+ includeCreatedEventBlob: boolean;
267
+ };
268
+ };
269
+ } | {
270
+ TemplateFilter: {
271
+ value: {
272
+ templateId: string;
273
+ includeCreatedEventBlob: boolean;
274
+ };
275
+ };
276
+ } | {
277
+ WildcardFilter: {
278
+ value: {
279
+ includeCreatedEventBlob: boolean;
280
+ };
281
+ };
282
+ };
283
+ }[];
284
+ } | undefined;
285
+ verbose?: boolean | undefined;
286
+ } | undefined;
287
+ includeTopologyEvents?: {
288
+ includeParticipantAuthorizationEvents?: {
289
+ parties?: string[] | undefined;
290
+ } | undefined;
291
+ } | undefined;
292
+ };
293
+ beginOffsetExclusive?: number | undefined;
294
+ endOffsetInclusive?: number | undefined;
295
+ maxPageSize?: number | undefined;
296
+ descendingOrder?: boolean | undefined;
297
+ pageToken?: string | undefined;
298
+ }, {
299
+ updates?: import("../../../../../generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi").components["schemas"]["JsGetUpdateResponse"][];
300
+ lowestPageOffsetExclusive: number;
301
+ highestPageOffsetInclusive: number;
302
+ nextPageToken?: string;
303
+ }, OperationExecuteOptions<{
304
+ updateFormat: {
305
+ includeTransactions?: {
306
+ eventFormat: {
307
+ filtersByParty: Record<string, {
308
+ cumulative: {
309
+ identifierFilter: {
310
+ Empty: Record<string, never>;
311
+ } | {
312
+ InterfaceFilter: {
313
+ value: {
314
+ interfaceId: string;
315
+ includeInterfaceView: boolean;
316
+ includeCreatedEventBlob: boolean;
317
+ };
318
+ };
319
+ } | {
320
+ TemplateFilter: {
321
+ value: {
322
+ templateId: string;
323
+ includeCreatedEventBlob: boolean;
324
+ };
325
+ };
326
+ } | {
327
+ WildcardFilter: {
328
+ value: {
329
+ includeCreatedEventBlob: boolean;
330
+ };
331
+ };
332
+ };
333
+ }[];
334
+ }>;
335
+ filtersForAnyParty?: {
336
+ cumulative: {
337
+ identifierFilter: {
338
+ Empty: Record<string, never>;
339
+ } | {
340
+ InterfaceFilter: {
341
+ value: {
342
+ interfaceId: string;
343
+ includeInterfaceView: boolean;
344
+ includeCreatedEventBlob: boolean;
345
+ };
346
+ };
347
+ } | {
348
+ TemplateFilter: {
349
+ value: {
350
+ templateId: string;
351
+ includeCreatedEventBlob: boolean;
352
+ };
353
+ };
354
+ } | {
355
+ WildcardFilter: {
356
+ value: {
357
+ includeCreatedEventBlob: boolean;
358
+ };
359
+ };
360
+ };
361
+ }[];
362
+ } | undefined;
363
+ verbose?: boolean | undefined;
364
+ };
365
+ transactionShape: "TRANSACTION_SHAPE_ACS_DELTA" | "TRANSACTION_SHAPE_LEDGER_EFFECTS";
366
+ } | undefined;
367
+ includeReassignments?: {
368
+ filtersByParty: Record<string, {
369
+ cumulative: {
370
+ identifierFilter: {
371
+ Empty: Record<string, never>;
372
+ } | {
373
+ InterfaceFilter: {
374
+ value: {
375
+ interfaceId: string;
376
+ includeInterfaceView: boolean;
377
+ includeCreatedEventBlob: boolean;
378
+ };
379
+ };
380
+ } | {
381
+ TemplateFilter: {
382
+ value: {
383
+ templateId: string;
384
+ includeCreatedEventBlob: boolean;
385
+ };
386
+ };
387
+ } | {
388
+ WildcardFilter: {
389
+ value: {
390
+ includeCreatedEventBlob: boolean;
391
+ };
392
+ };
393
+ };
394
+ }[];
395
+ }>;
396
+ filtersForAnyParty?: {
397
+ cumulative: {
398
+ identifierFilter: {
399
+ Empty: Record<string, never>;
400
+ } | {
401
+ InterfaceFilter: {
402
+ value: {
403
+ interfaceId: string;
404
+ includeInterfaceView: boolean;
405
+ includeCreatedEventBlob: boolean;
406
+ };
407
+ };
408
+ } | {
409
+ TemplateFilter: {
410
+ value: {
411
+ templateId: string;
412
+ includeCreatedEventBlob: boolean;
413
+ };
414
+ };
415
+ } | {
416
+ WildcardFilter: {
417
+ value: {
418
+ includeCreatedEventBlob: boolean;
419
+ };
420
+ };
421
+ };
422
+ }[];
423
+ } | undefined;
424
+ verbose?: boolean | undefined;
425
+ } | undefined;
426
+ includeTopologyEvents?: {
427
+ includeParticipantAuthorizationEvents?: {
428
+ parties?: string[] | undefined;
429
+ } | undefined;
430
+ } | undefined;
431
+ };
432
+ beginOffsetExclusive?: number | undefined;
433
+ endOffsetInclusive?: number | undefined;
434
+ maxPageSize?: number | undefined;
435
+ descendingOrder?: boolean | undefined;
436
+ pageToken?: string | undefined;
437
+ }>>;
438
+ /** One update of a raw page: the page's item exactly as received and as parsed, with its kind and offset. */
439
+ export interface RawPageUpdate {
440
+ /**
441
+ * The item exactly as it appears in the response text, `{ "update": { "<kind>": { "value": { ... } } } }`, without
442
+ * the whitespace or comma around it. Store this to keep the bytes the participant sent: re-serializing `json` would
443
+ * not (JavaScript moves integer-like keys first and drops whitespace).
444
+ */
445
+ readonly text: string;
446
+ /** `JSON.parse(text)`, unnormalized: every number in it equals the number written in `text`, and no key was dropped. */
447
+ readonly json: unknown;
448
+ readonly kind: RawFrameKind<RawUpdateKind>;
449
+ /** The update's offset; every known kind carries one. */
450
+ readonly offset: number | undefined;
451
+ }
452
+ /** A page of updates exactly as the participant sent it. */
453
+ export interface RawUpdatesPage {
454
+ /** The response body as received (its UTF-8 text). */
455
+ readonly text: string;
456
+ /** `JSON.parse(text)`, unnormalized; every number in it equals the number written in `text`, and no key was dropped. */
457
+ readonly json: unknown;
458
+ /** The page's lower bound: its updates have greater offsets. */
459
+ readonly lowestPageOffsetExclusive: number;
460
+ /** The page's upper bound. A reader's cursor moves here even when the last offsets carry no visible update. */
461
+ readonly highestPageOffsetInclusive: number;
462
+ /** Token for the next page, or `undefined` on the last page (an absent or empty token). */
463
+ readonly nextPageToken: string | undefined;
464
+ /** The page's updates in the order received, each with its exact text (`[]` when the page has none). */
465
+ readonly updates: readonly RawPageUpdate[];
466
+ }
467
+ /**
468
+ * Decodes a get-updates-page response body without normalizing it.
469
+ *
470
+ * @throws LossyJsonError if `JSON.parse` would change a number or drop a repeated key
471
+ * @throws ApiError if the body is not a page
472
+ */
473
+ export declare function decodeRawUpdatesPage(text: unknown): RawUpdatesPage;
474
+ /**
475
+ * Reads one page of updates (`POST /v2/updates/get-updates-page`) exactly as the participant sent it: the response
476
+ * text, its `JSON.parse` value (checked to keep every number and key, with no schema normalization), the page bounds
477
+ * and token, and each update with its exact text, its parsed value, its kind and its offset.
478
+ *
479
+ * It takes the parameters, retries and cancellation of `getUpdatesPage`. A Canton error response is still parsed, so
480
+ * the thrown `ApiError` carries its code (e.g. `PARTICIPANT_PRUNED_DATA_ACCESSED`).
481
+ *
482
+ * @example
483
+ * ```typescript
484
+ * const updateFormat = buildUpdateFormat({ anyParty: true, includeCreatedEventBlob: true, includeTopologyEvents: true });
485
+ * let pageToken: string | undefined;
486
+ * do {
487
+ * const page = await client.getRawUpdatesPage({
488
+ * updateFormat,
489
+ * beginOffsetExclusive: begin,
490
+ * endOffsetInclusive: end,
491
+ * maxPageSize: 200,
492
+ * ...(pageToken !== undefined && { pageToken }),
493
+ * });
494
+ * await store(page.updates, page.highestPageOffsetInclusive);
495
+ * pageToken = page.nextPageToken;
496
+ * } while (pageToken !== undefined);
497
+ * ```;
498
+ */
499
+ export declare class GetRawUpdatesPage extends ApiOperation<GetUpdatesPageParams, RawUpdatesPage> {
500
+ execute(params: GetUpdatesPageParams, options?: OperationExecuteOptions<GetUpdatesPageParams>): Promise<RawUpdatesPage>;
501
+ }
502
+ export {};
503
+ //# sourceMappingURL=get-updates-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-updates-page.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/get-updates-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAGxG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2GAA2G,CAAC;A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