czech-data-box 0.1.2 → 0.2.0

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 (81) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +277 -48
  3. package/dist/index.d.ts +5 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +4 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/ISDSBox.d.ts +96 -0
  8. package/dist/lib/ISDSBox.d.ts.map +1 -0
  9. package/dist/lib/ISDSBox.js +662 -0
  10. package/dist/lib/ISDSBox.js.map +1 -0
  11. package/dist/lib/ISDSSentOutFiles.d.ts +14 -0
  12. package/dist/lib/ISDSSentOutFiles.d.ts.map +1 -0
  13. package/dist/lib/ISDSSentOutFiles.js +44 -0
  14. package/dist/lib/ISDSSentOutFiles.js.map +1 -0
  15. package/dist/lib/ISDSSoapClient.d.ts +25 -0
  16. package/dist/lib/ISDSSoapClient.d.ts.map +1 -0
  17. package/dist/lib/ISDSSoapClient.js +178 -0
  18. package/dist/lib/ISDSSoapClient.js.map +1 -0
  19. package/dist/lib/config.d.ts +7 -0
  20. package/dist/lib/config.d.ts.map +1 -0
  21. package/dist/lib/config.js +94 -0
  22. package/dist/lib/config.js.map +1 -0
  23. package/dist/models/DataBox.d.ts +34 -0
  24. package/dist/models/DataBox.d.ts.map +1 -0
  25. package/dist/models/DataBox.js +92 -0
  26. package/dist/models/DataBox.js.map +1 -0
  27. package/dist/models/DataMessage.d.ts +29 -0
  28. package/dist/models/DataMessage.d.ts.map +1 -0
  29. package/dist/models/DataMessage.js +96 -0
  30. package/dist/models/DataMessage.js.map +1 -0
  31. package/dist/models/DataMessageFile.d.ts +22 -0
  32. package/dist/models/DataMessageFile.d.ts.map +1 -0
  33. package/dist/models/DataMessageFile.js +54 -0
  34. package/dist/models/DataMessageFile.js.map +1 -0
  35. package/dist/models/DataMessageFiles.d.ts +9 -0
  36. package/dist/models/DataMessageFiles.d.ts.map +1 -0
  37. package/dist/models/DataMessageFiles.js +17 -0
  38. package/dist/models/DataMessageFiles.js.map +1 -0
  39. package/dist/types.d.ts +420 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/dist/types.js +2 -0
  42. package/dist/types.js.map +1 -0
  43. package/package.json +66 -40
  44. package/resources/wsdl/ChangePassword.wsdl +83 -83
  45. package/resources/wsdl/ChangePasswordTypes.xsd +68 -68
  46. package/resources/wsdl/dbTypes.xsd +1712 -1688
  47. package/resources/wsdl/db_access.wsdl +199 -197
  48. package/resources/wsdl/db_manipulations.wsdl +600 -598
  49. package/resources/wsdl/db_search.wsdl +389 -362
  50. package/resources/wsdl/dmBaseTypes.xsd +1563 -1497
  51. package/resources/wsdl/dm_VoDZ.wsdl +215 -212
  52. package/resources/wsdl/dm_arch.wsdl +77 -0
  53. package/resources/wsdl/dm_info.wsdl +462 -412
  54. package/resources/wsdl/dm_operations.wsdl +252 -242
  55. package/.gitattributes +0 -16
  56. package/.github/workflows/tests.yml +0 -39
  57. package/.nvmrc +0 -1
  58. package/.prettierignore +0 -1
  59. package/.prettierrc.yaml +0 -6
  60. package/.vscode/launch.json +0 -15
  61. package/.vscode/settings.json +0 -5
  62. package/CHANGELOG.md +0 -17
  63. package/CODE_OF_CONDUCT.md +0 -128
  64. package/CONTRIBUTING.md +0 -84
  65. package/eslint.config.js +0 -26
  66. package/examples/db_login_with_certificate.js +0 -27
  67. package/examples/db_search.js +0 -27
  68. package/examples/dm_operations.js +0 -58
  69. package/src/index.js +0 -5
  70. package/src/lib/ISDSBox.js +0 -309
  71. package/src/lib/ISDSSentOutFiles.js +0 -84
  72. package/src/lib/ISDSSoapClient.js +0 -201
  73. package/src/lib/config.js +0 -71
  74. package/src/models/DataBox.js +0 -194
  75. package/src/models/DataMessage.js +0 -153
  76. package/src/models/DataMessageFile.js +0 -69
  77. package/src/models/DataMessageFiles.js +0 -23
  78. package/test/ISDSBox.test.js +0 -129
  79. package/test/ISDSSentOutFiles.test.js +0 -124
  80. package/test/ISDSSoapClient.test.js +0 -81
  81. package/test/communication_test.pdf +0 -0
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Martin Křivda
3
+ Copyright (c) 2026 Martin Křivda
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,68 +1,298 @@
1
- # Czech Data Box Library
1
+ # czech-data-box
2
2
 
3
- ⭐ Star this project on GitHub — it motivates us a lot!
3
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D22.20.0%20%3C25-339933?logo=node.js&logoColor=white)](./package.json)
4
+ [![npm version](https://img.shields.io/npm/v/czech-data-box?logo=npm)](https://www.npmjs.com/package/czech-data-box)
5
+ [![CI](https://img.shields.io/github/actions/workflow/status/martinkrivda/czech-data-box/ci.yaml?branch=main&label=CI)](https://github.com/martinkrivda/czech-data-box/actions/workflows/ci.yaml)
6
+ [![License](https://img.shields.io/github/license/martinkrivda/czech-data-box)](./LICENSE)
7
+ [![GitHub stars](https://img.shields.io/github/stars/martinkrivda/czech-data-box?style=social)](https://github.com/martinkrivda/czech-data-box/stargazers)
8
+ [![GitHub Sponsors](https://img.shields.io/github/sponsors/martinkrivda?label=funding&logo=githubsponsors)](https://github.com/sponsors/martinkrivda)
4
9
 
5
- A library that provides access to the Information Services Data System (ISDS) interface for third-party applications in Node.js
10
+ TypeScript-first Node.js client for Czech Data Boxes (ISDS). The package wraps
11
+ message sending, inbox polling, message download, delivery metadata, VoDZ large
12
+ message operations, and document re-stamping/archive services.
6
13
 
7
- ## Description
14
+ ## Requirements
8
15
 
9
- This library is used for basic communication with the Information System for Data Boxes [ISDS](https://mojedatovaschranka.cz/) or [ISDS test](https://czebox.cz/)
16
+ - Development: Node.js `24.14.1`, pnpm `10.33.0`
17
+ - Supported runtime: Node.js `>=22.20.0 <25`
10
18
 
11
- ### Installation
19
+ The repository is managed with `pnpm`, strict `TypeScript`, `Changesets`, and
20
+ GitHub Actions.
12
21
 
13
- `npm install czech-data-box`
22
+ Bundled WSDL/XSD definitions are synced to the ISDS technical appendices from
23
+ September/December 2025.
14
24
 
15
- ### Basic usage
25
+ ## Installation
16
26
 
17
- #### Connecting to a data box
27
+ ```bash
28
+ pnpm add czech-data-box
29
+ ```
30
+
31
+ Consumers can use `npm` or `yarn` as well, but this repository itself is
32
+ maintained with `pnpm`.
33
+
34
+ ## Quick Start
35
+
36
+ ```ts
37
+ import ISDSBox, { DataBox } from 'czech-data-box';
38
+
39
+ const client = new ISDSBox().loginWithUsernameAndPassword(
40
+ process.env.ISDS_LOGIN ?? '',
41
+ process.env.ISDS_PASSWORD ?? '',
42
+ false,
43
+ );
44
+
45
+ const ownerInfo = await client.getOwnerInfoFromLogin();
46
+ console.log(ownerInfo.ownerInfo);
47
+
48
+ const searchQuery = new DataBox().setDbId('abc123').setDbType('PO');
49
+ const searchResult = await client.findDataBox(searchQuery);
50
+ console.log(searchResult.dbResults);
51
+ ```
18
52
 
19
- ```node
53
+ ## Mailroom Polling
54
+
55
+ For a podatelna-style application, the recommended flow is:
56
+
57
+ 1. list received messages in a bounded time window
58
+ 2. download envelope and full content
59
+ 3. persist or enqueue the payload into your workflow system
60
+ 4. mark the message as downloaded only after the handoff succeeds
61
+
62
+ ```ts
20
63
  import ISDSBox from 'czech-data-box';
21
64
 
22
- // Create an instance of the ISDSBox
23
- const isdsBox = new ISDSBox();
24
-
25
- // Login with username and password for production
26
- isdsBox
27
- .loginWithUsernameAndPassword('login', 'heslo', true)
28
- .then(() => {
29
- console.log('Logged in with username and password for production.');
30
- })
31
- .catch((err) => {
32
- console.error(
33
- 'Error logging in with username and password for production:',
34
- err,
35
- );
36
- });
65
+ const client = new ISDSBox().loginWithUsernameAndPassword(
66
+ process.env.ISDS_LOGIN ?? '',
67
+ process.env.ISDS_PASSWORD ?? '',
68
+ false,
69
+ );
37
70
 
38
- // Login with username and password for test environment
39
- isdsBox
40
- .loginWithUsernameAndPassword('login', 'heslo', false)
41
- .then(() => {
42
- console.log('Logged in with username and password for test environment.');
43
- })
44
- .catch((err) => {
45
- console.error(
46
- 'Error logging in with username and password for test environment:',
47
- err,
48
- );
71
+ const batch = await client.pollReceivedMessages({
72
+ dmFromTime: new Date(Date.now() - 15 * 60 * 1000),
73
+ dmToTime: new Date(),
74
+ dmLimit: 50,
75
+ includeEnvelope: true,
76
+ includeMessage: true,
77
+ });
78
+
79
+ for (const item of batch.items) {
80
+ const dmID = item.record.dmID;
81
+ if (!dmID) {
82
+ continue;
83
+ }
84
+
85
+ await workflow.enqueue({
86
+ dmID,
87
+ envelope: item.envelope,
88
+ message: item.message,
89
+ deliveryTime: item.record.dmDeliveryTime ?? null,
49
90
  });
91
+
92
+ await client.markMessageAsDownloaded(dmID);
93
+ }
94
+ ```
95
+
96
+ `pollReceivedMessages()` automatically switches to `BigMessageDownload` for VoDZ
97
+ records detected in the inbox listing.
98
+
99
+ For a long-running worker, use `watchReceivedMessages(...)` with `AbortSignal`:
100
+
101
+ ```ts
102
+ import ISDSBox from 'czech-data-box';
103
+
104
+ const controller = new AbortController();
105
+
106
+ const client = new ISDSBox().loginWithUsernameAndPassword(
107
+ process.env.ISDS_LOGIN ?? '',
108
+ process.env.ISDS_PASSWORD ?? '',
109
+ false,
110
+ );
111
+
112
+ for await (const batch of client.watchReceivedMessages({
113
+ intervalMs: 30_000,
114
+ signal: controller.signal,
115
+ includeEnvelope: true,
116
+ includeMessage: true,
117
+ notifications: {
118
+ scope: 'ALL',
119
+ },
120
+ })) {
121
+ for (const item of batch.items) {
122
+ const dmID = item.record.dmID;
123
+ if (!dmID) {
124
+ continue;
125
+ }
126
+
127
+ await workflow.enqueue({
128
+ dmID,
129
+ envelope: item.envelope,
130
+ message: item.message,
131
+ });
132
+
133
+ await client.markMessageAsDownloaded(dmID);
134
+ }
135
+ }
50
136
  ```
51
137
 
52
- ## Contributing
138
+ For a single blocking wait, use `waitForNewMessages(...)`.
139
+
140
+ Note: according to the ISDS operational rules, `GetListOfReceivedMessages` is
141
+ the operation with delivery semantics for inbox access. Design your polling job
142
+ and audit trail around that behavior.
143
+
144
+ ## Sending Messages
145
+
146
+ ```ts
147
+ import ISDSBox, { DataMessage } from 'czech-data-box';
53
148
 
54
- Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
149
+ const client = new ISDSBox().loginWithUsernameAndPassword(
150
+ process.env.ISDS_LOGIN ?? '',
151
+ process.env.ISDS_PASSWORD ?? '',
152
+ false,
153
+ );
154
+
155
+ const message = new DataMessage({
156
+ dbIDRecipient: 'abc123',
157
+ dmAnnotation: 'Integration test',
158
+ dmPersonalDelivery: true,
159
+ });
160
+
161
+ const result = await client.createMessage(message, [
162
+ {
163
+ dmFilePath: './document.pdf',
164
+ dmMimeType: 'application/pdf',
165
+ dmFileMetaType: 'main',
166
+ dmFileDescr: 'document.pdf',
167
+ },
168
+ ]);
169
+
170
+ console.log(result.dmID);
171
+ ```
55
172
 
56
- 1. Create your feature branch: `git checkout -b Feature/my-new-feature`
57
- 2. Commit your changes: `git commit -am 'Add some feature'`
58
- 3. Push to the branch: `git push origin Feature/my-new-feature`
59
- 4. Submit a pull request :D
173
+ The library also supports `createMultipleMessage(...)` for circular messages and
174
+ `createBigMessage(...)` for VoDZ payloads built from uploaded attachments.
60
175
 
61
- ## Changelog
176
+ ## Message Operations
62
177
 
63
- In separate file [CHANGELOG.md](CHANGELOG.md). Please [keep a CHANGELOG](https://keepachangelog.com/).
178
+ Inbox and download flow:
64
179
 
65
- This project adheres to [Semantic Versioning](https://semver.org/).
180
+ - `listReceivedMessages(...)`
181
+ - `downloadMessageEnvelope(dmID)`
182
+ - `downloadMessage(dmID)`
183
+ - `downloadBigMessage(dmID)`
184
+ - `markMessageAsDownloaded(dmID)`
185
+ - `pollReceivedMessages(...)`
186
+ - `waitForNewMessages(...)`
187
+ - `watchReceivedMessages(...)`
188
+
189
+ Sent and audit flow:
190
+
191
+ - `listSentMessages(...)`
192
+ - `getSentMessageEnvelope(dmID)`
193
+ - `verifyMessage(dmID)`
194
+ - `getDeliveryInfo(dmID)`
195
+ - `getSignedDeliveryInfo(dmID)`
196
+ - `downloadSignedMessage(dmID)`
197
+ - `downloadSignedSentMessage(dmID)`
198
+ - `getMessageStateChanges(...)`
199
+ - `getMessageAuthor(dmID)`
200
+ - `getMessageAuthorDetails(dmID)`
201
+
202
+ Lifecycle and notifications:
203
+
204
+ - `eraseMessage(...)`
205
+ - `getErasedMessages(...)`
206
+ - `pickUpAsyncResponse(...)`
207
+ - `listNotifications(...)`
208
+ - `registerForNotifications(action)`
209
+ - `reportSuspiciousMessage(...)`
210
+
211
+ Security, VoDZ, and archive:
212
+
213
+ - `uploadAttachment(...)`
214
+ - `downloadAttachment(...)`
215
+ - `authenticateMessage(...)`
216
+ - `authenticateBigMessage(...)`
217
+ - `downloadSignedBigMessage(dmID)`
218
+ - `downloadSignedSentBigMessage(dmID)`
219
+ - `reSignIsdsDocument(dmDocBase64)`
220
+ - `archiveIsdsDocument(dmMessageBase64)`
221
+
222
+ ## Authentication Modes
223
+
224
+ The library reflects the connection variants documented in the ISDS operational
225
+ rules:
226
+
227
+ - `loginWithUsernameAndPassword(...)` uses `https://ws1.../DS/*`
228
+ - `loginWithPkcs12Certificate(...)` uses `https://ws1c.../cert/DS/*`
229
+ - `loginWithUsernamePasswordAndCertificate(...)` uses
230
+ `https://ws1c.../certds/DS/*`
231
+ - `loginWithHostedSpisServiceCertificate(...)` uses
232
+ `https://ws1c.../hspis/DS/*`
233
+
234
+ Example with certificate + basic authentication:
235
+
236
+ ```ts
237
+ import { readFile } from 'node:fs/promises';
238
+ import ISDSBox from 'czech-data-box';
239
+
240
+ const pkcs12 = await readFile('./certificate.p12', { encoding: 'base64' });
241
+
242
+ const client = new ISDSBox().loginWithUsernamePasswordAndCertificate(
243
+ process.env.ISDS_LOGIN ?? '',
244
+ process.env.ISDS_PASSWORD ?? '',
245
+ pkcs12,
246
+ process.env.ISDS_CERT_PASSPHRASE ?? '',
247
+ false,
248
+ );
249
+ ```
250
+
251
+ `dm_arch` and `dm_VoDZ` are exposed through SOAP 1.2 clients. The bundled WSDLs
252
+ explicitly publish the base `ws2` endpoints. Certificate variants for `ws2c`
253
+ are implemented by inference from the same endpoint pattern used by `ws1/ws1c`.
254
+
255
+ ## Development
256
+
257
+ ```bash
258
+ pnpm install
259
+ pnpm verify
260
+ ```
261
+
262
+ Useful scripts:
263
+
264
+ - `pnpm lint`
265
+ - `pnpm typecheck`
266
+ - `pnpm test`
267
+ - `pnpm test:watch`
268
+ - `pnpm build`
269
+ - `pnpm test:package`
270
+ - `pnpm changeset`
271
+
272
+ ## Docs
273
+
274
+ - [Development guide](./docs/development.md)
275
+ - [Mailroom guide](./docs/mailroom.md)
276
+ - [Release guide](./docs/releasing.md)
277
+
278
+ ## Examples
279
+
280
+ The runnable examples in [`examples/`](./examples) import from `dist`, so build
281
+ the package first:
282
+
283
+ ```bash
284
+ pnpm build
285
+ node examples/db_search.mjs
286
+ ```
287
+
288
+ For real ISDS integration testing, use test credentials and prefer the ISDS
289
+ test environment (`productionMode = false`).
290
+
291
+ ## Versioning and Changelog
292
+
293
+ This project follows SemVer through `Changesets`. Every user-facing change
294
+ should ship with a changeset, and releases update
295
+ [`CHANGELOG.md`](./CHANGELOG.md) automatically.
66
296
 
67
297
  ## Credits
68
298
 
@@ -71,6 +301,5 @@ This project adheres to [Semantic Versioning](https://semver.org/).
71
301
 
72
302
  ## License
73
303
 
74
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
75
-
76
- This project is licensed under the MIT License. See the [LICENSE](/LICENSE) file for details.
304
+ This project is licensed under the MIT License. See the
305
+ [LICENSE](./LICENSE) file for details.
@@ -0,0 +1,5 @@
1
+ export { default, default as ISDSBox } from './lib/ISDSBox.js';
2
+ export { default as DataBox } from './models/DataBox.js';
3
+ export { default as DataMessage } from './models/DataMessage.js';
4
+ export type * from './types.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACjE,mBAAmB,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { default, default as ISDSBox } from './lib/ISDSBox.js';
2
+ export { default as DataBox } from './models/DataBox.js';
3
+ export { default as DataMessage } from './models/DataMessage.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,96 @@
1
+ import type { ArchiveIsdsDocumentResult, AuthenticateMessageResult, CreateBigMessageInput, CreateBigMessageResult, CreateMessageResult, CreateMultipleMessageResult, DataBoxAddressResult, DataMessageParams, DeliveryInfoResult, DownloadAttachmentInput, DownloadAttachmentResult, EraseMessageInput, ErasedMessagesListInput, ErasedMessagesResult, FindDataBoxResult, MessageAuthorDetailsResult, MessageAuthorResult, MessageDownloadResult, MessageEnvelopeResult, MessageListResult, MessageRecord, MessageStateChangesInput, MessageStateChangesResult, MultipleMessageEnvelopeParams, MultipleMessageRecipient, NotificationListInput, NotificationListResult, OutgoingFileParams, OwnerInfoResult, PasswordInfoResult, PickUpAsyncResponseInput, PickUpAsyncResponseResult, PollReceivedMessagesOptions, PollReceivedMessagesResult, ReceivedMessageListInput, RegisterForNotificationsResult, ReSignIsdsDocumentResult, SentMessageListInput, ServiceConnectionMode, SentMessageEnvelopeResult, SignedBinaryResult, SuspiciousMessageReportInput, SuspiciousMessageReportResult, UploadedAttachmentInput, UploadAttachmentResult, VerifyMessageResult, WaitForNewMessagesOptions, WatchReceivedMessagesOptions } from '../types.js';
2
+ import type DataBox from '../models/DataBox.js';
3
+ import DataMessage from '../models/DataMessage.js';
4
+ declare class ISDSBox {
5
+ private productionMode;
6
+ private connectionMode;
7
+ private loginName;
8
+ private password;
9
+ private certfilename;
10
+ private privateKey;
11
+ private publicKey;
12
+ private passPhrase;
13
+ private pkcs12Certificate;
14
+ private debug;
15
+ private operationsWS;
16
+ private infoWS;
17
+ private manipulationsWS;
18
+ private accessWS;
19
+ private searchWS;
20
+ private archiveWS;
21
+ private vodzWS;
22
+ constructor(loginTypeOrConnectionMode?: number | ServiceConnectionMode, loginName?: string, password?: string, certfilename?: string, privateKey?: string, publicKey?: string, passPhrase?: string, pkcs12Certificate?: string, production?: boolean, debug?: boolean);
23
+ private logDebug;
24
+ private createClient;
25
+ private normalizeDateTime;
26
+ private normalizeDate;
27
+ private normalizeMessageListInput;
28
+ private buildOutgoingFiles;
29
+ private buildMessageEnvelope;
30
+ private extractMessageId;
31
+ private getMessageId;
32
+ private extractNotificationRecords;
33
+ private assertNotAborted;
34
+ private sleep;
35
+ private initializeNotificationCursor;
36
+ private shouldPollInboxFromNotifications;
37
+ private filterSeenItems;
38
+ private isVodzMessage;
39
+ private requestOn;
40
+ setConnectionMode(connectionMode: ServiceConnectionMode): this;
41
+ setProductionMode(): this;
42
+ setTestMode(): this;
43
+ setDebugMode(): this;
44
+ setPublicKey(cert: string): this;
45
+ setPrivateKey(privateKey: string): this;
46
+ setPassPhrase(passPhrase: string): this;
47
+ setPkcs12Certificate(pkcs12Certificate: string, passPhrase: string): this;
48
+ loginWithUsernameAndPassword(loginName: string, password: string, productionMode?: boolean): this;
49
+ loginWithPkcs12Certificate(certFile: string, passPhrase: string, productionMode?: boolean): this;
50
+ loginWithUsernamePasswordAndCertificate(loginName: string, password: string, certFile: string, passPhrase: string, productionMode?: boolean): this;
51
+ loginWithHostedSpisServiceCertificate(dataBoxId: string, certFile: string, passPhrase: string, productionMode?: boolean): this;
52
+ initClients(): void;
53
+ extractMessageRecords(result: MessageListResult): MessageRecord[];
54
+ createMessage(dataMessageParams: DataMessage | DataMessageParams, outFilesParams: readonly OutgoingFileParams[]): Promise<CreateMessageResult>;
55
+ createMultipleMessage(envelopeParams: MultipleMessageEnvelopeParams, recipients: readonly MultipleMessageRecipient[], outFilesParams: readonly OutgoingFileParams[]): Promise<CreateMultipleMessageResult>;
56
+ findDataBox(dbOwnerInfo: DataBox): Promise<FindDataBoxResult>;
57
+ getDataBoxAddress(dbID: string): Promise<DataBoxAddressResult>;
58
+ getOwnerInfoFromLogin(): Promise<OwnerInfoResult>;
59
+ getPasswordInfo(): Promise<PasswordInfoResult>;
60
+ verifyMessage(dmID: string): Promise<VerifyMessageResult>;
61
+ getDeliveryInfo(dmID: string): Promise<DeliveryInfoResult>;
62
+ getSignedDeliveryInfo(dmID: string): Promise<SignedBinaryResult>;
63
+ listSentMessages(input?: SentMessageListInput): Promise<MessageListResult>;
64
+ listReceivedMessages(input?: ReceivedMessageListInput): Promise<MessageListResult>;
65
+ downloadMessage(dmID: string): Promise<MessageDownloadResult>;
66
+ downloadMessageEnvelope(dmID: string): Promise<MessageEnvelopeResult>;
67
+ downloadSignedMessage(dmID: string): Promise<SignedBinaryResult>;
68
+ markMessageAsDownloaded(dmID: string): Promise<RegisterForNotificationsResult>;
69
+ downloadSignedSentMessage(dmID: string): Promise<SignedBinaryResult>;
70
+ getMessageStateChanges(input?: MessageStateChangesInput): Promise<MessageStateChangesResult>;
71
+ getMessageAuthor(dmID: string): Promise<MessageAuthorResult>;
72
+ getMessageAuthorDetails(dmID: string): Promise<MessageAuthorDetailsResult>;
73
+ eraseMessage(input: EraseMessageInput): Promise<RegisterForNotificationsResult>;
74
+ getErasedMessages(input: ErasedMessagesListInput): Promise<ErasedMessagesResult>;
75
+ pickUpAsyncResponse(input: PickUpAsyncResponseInput): Promise<PickUpAsyncResponseResult>;
76
+ listNotifications(input: NotificationListInput): Promise<NotificationListResult>;
77
+ registerForNotifications(action: number): Promise<RegisterForNotificationsResult>;
78
+ getSentMessageEnvelope(dmID: string): Promise<SentMessageEnvelopeResult>;
79
+ reportSuspiciousMessage(input: SuspiciousMessageReportInput): Promise<SuspiciousMessageReportResult>;
80
+ authenticateMessage(dmMessage: string): Promise<AuthenticateMessageResult>;
81
+ reSignIsdsDocument(dmDoc: string): Promise<ReSignIsdsDocumentResult>;
82
+ dummyOperation(value?: string): Promise<RegisterForNotificationsResult>;
83
+ uploadAttachment(input: UploadedAttachmentInput): Promise<UploadAttachmentResult>;
84
+ downloadAttachment(input: DownloadAttachmentInput): Promise<DownloadAttachmentResult>;
85
+ createBigMessage(input: CreateBigMessageInput): Promise<CreateBigMessageResult>;
86
+ authenticateBigMessage(dmMessage: string): Promise<AuthenticateMessageResult>;
87
+ downloadSignedBigMessage(dmID: string): Promise<SignedBinaryResult>;
88
+ downloadSignedSentBigMessage(dmID: string): Promise<SignedBinaryResult>;
89
+ downloadBigMessage(dmID: string): Promise<MessageDownloadResult>;
90
+ archiveIsdsDocument(dmMessage: string): Promise<ArchiveIsdsDocumentResult>;
91
+ pollReceivedMessages(options?: PollReceivedMessagesOptions): Promise<PollReceivedMessagesResult>;
92
+ waitForNewMessages(options?: WaitForNewMessagesOptions): Promise<PollReceivedMessagesResult>;
93
+ watchReceivedMessages(options?: WatchReceivedMessagesOptions): AsyncGenerator<PollReceivedMessagesResult, void, void>;
94
+ }
95
+ export default ISDSBox;
96
+ //# sourceMappingURL=ISDSBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISDSBox.d.ts","sourceRoot":"","sources":["../../src/lib/ISD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