czech-data-box 0.1.1 → 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.
- package/LICENSE +1 -1
- package/README.md +277 -48
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ISDSBox.d.ts +96 -0
- package/dist/lib/ISDSBox.d.ts.map +1 -0
- package/dist/lib/ISDSBox.js +662 -0
- package/dist/lib/ISDSBox.js.map +1 -0
- package/dist/lib/ISDSSentOutFiles.d.ts +14 -0
- package/dist/lib/ISDSSentOutFiles.d.ts.map +1 -0
- package/dist/lib/ISDSSentOutFiles.js +44 -0
- package/dist/lib/ISDSSentOutFiles.js.map +1 -0
- package/dist/lib/ISDSSoapClient.d.ts +25 -0
- package/dist/lib/ISDSSoapClient.d.ts.map +1 -0
- package/dist/lib/ISDSSoapClient.js +178 -0
- package/dist/lib/ISDSSoapClient.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +94 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/models/DataBox.d.ts +34 -0
- package/dist/models/DataBox.d.ts.map +1 -0
- package/dist/models/DataBox.js +92 -0
- package/dist/models/DataBox.js.map +1 -0
- package/dist/models/DataMessage.d.ts +29 -0
- package/dist/models/DataMessage.d.ts.map +1 -0
- package/dist/models/DataMessage.js +96 -0
- package/dist/models/DataMessage.js.map +1 -0
- package/dist/models/DataMessageFile.d.ts +22 -0
- package/dist/models/DataMessageFile.d.ts.map +1 -0
- package/dist/models/DataMessageFile.js +54 -0
- package/dist/models/DataMessageFile.js.map +1 -0
- package/dist/models/DataMessageFiles.d.ts +9 -0
- package/dist/models/DataMessageFiles.d.ts.map +1 -0
- package/dist/models/DataMessageFiles.js +17 -0
- package/dist/models/DataMessageFiles.js.map +1 -0
- package/dist/types.d.ts +420 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +66 -40
- package/resources/wsdl/ChangePassword.wsdl +83 -83
- package/resources/wsdl/ChangePasswordTypes.xsd +68 -68
- package/resources/wsdl/dbTypes.xsd +1712 -1688
- package/resources/wsdl/db_access.wsdl +199 -197
- package/resources/wsdl/db_manipulations.wsdl +600 -598
- package/resources/wsdl/db_search.wsdl +389 -362
- package/resources/wsdl/dmBaseTypes.xsd +1563 -1497
- package/resources/wsdl/dm_VoDZ.wsdl +215 -212
- package/resources/wsdl/dm_arch.wsdl +77 -0
- package/resources/wsdl/dm_info.wsdl +462 -412
- package/resources/wsdl/dm_operations.wsdl +252 -242
- package/.gitattributes +0 -16
- package/.nvmrc +0 -1
- package/.prettierignore +0 -1
- package/.prettierrc.yaml +0 -6
- package/.vscode/launch.json +0 -15
- package/.vscode/settings.json +0 -5
- package/CHANGELOG.md +0 -17
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -84
- package/eslint.config.js +0 -26
- package/examples/db_login_with_certificate.js +0 -27
- package/examples/db_search.js +0 -27
- package/examples/dm_operations.js +0 -58
- package/src/index.js +0 -5
- package/src/lib/ISDSBox.js +0 -309
- package/src/lib/ISDSSentOutFiles.js +0 -84
- package/src/lib/ISDSSoapClient.js +0 -201
- package/src/lib/config.js +0 -64
- package/src/models/DataBox.js +0 -142
- package/src/models/DataMessage.js +0 -153
- package/src/models/DataMessageFile.js +0 -69
- package/src/models/DataMessageFiles.js +0 -23
- package/test/ISDSBox.test.js +0 -129
- package/test/ISDSSentOutFiles.test.js +0 -124
- package/test/ISDSSoapClient.test.js +0 -81
- package/test/communication_test.pdf +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,68 +1,298 @@
|
|
|
1
|
-
#
|
|
1
|
+
# czech-data-box
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](./package.json)
|
|
4
|
+
[](https://www.npmjs.com/package/czech-data-box)
|
|
5
|
+
[](https://github.com/martinkrivda/czech-data-box/actions/workflows/ci.yaml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](https://github.com/martinkrivda/czech-data-box/stargazers)
|
|
8
|
+
[](https://github.com/sponsors/martinkrivda)
|
|
4
9
|
|
|
5
|
-
|
|
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
|
-
##
|
|
14
|
+
## Requirements
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
- Development: Node.js `24.14.1`, pnpm `10.33.0`
|
|
17
|
+
- Supported runtime: Node.js `>=22.20.0 <25`
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
The repository is managed with `pnpm`, strict `TypeScript`, `Changesets`, and
|
|
20
|
+
GitHub Actions.
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Bundled WSDL/XSD definitions are synced to the ISDS technical appendices from
|
|
23
|
+
September/December 2025.
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
## Installation
|
|
16
26
|
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
57
|
-
|
|
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
|
-
##
|
|
176
|
+
## Message Operations
|
|
62
177
|
|
|
63
|
-
|
|
178
|
+
Inbox and download flow:
|
|
64
179
|
|
|
65
|
-
|
|
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
|
-
|
|
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.
|
package/dist/index.d.ts
ADDED
|
@@ -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 @@
|
|
|
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/ISDSBox.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EAErB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,qBAAqB,EAGrB,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EAErB,yBAAyB,EACzB,kBAAkB,EAIlB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AA0BnD,cAAM,OAAO;IACX,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,cAA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