Skip to content

Commit 2facaf5

Browse files
committed
Version 0.5.3
1 parent 75156d2 commit 2facaf5

File tree

274 files changed

+36562
-155389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+36562
-155389
lines changed

.angular-cli.json

-45
This file was deleted.

.gitignore

-10
This file was deleted.

.stylelint.config.cjs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
plugins: ['stylelint-scss'],
3+
extends: ['stylelint-config-standard', 'stylelint-config-recommended-scss', 'stylelint-config-recommended-vue'],
4+
ignoreFiles: ['/app/assets/**/*.css'],
5+
6+
rules: {
7+
'length-zero-no-unit': null,
8+
'at-rule-empty-line-before': [
9+
'always',
10+
{
11+
ignore: ['after-comment'],
12+
except: ['inside-block', 'after-same-name'],
13+
},
14+
],
15+
'no-empty-source': null,
16+
'no-descending-specificity': null,
17+
'color-function-notation': null,
18+
'selector-class-pattern': null,
19+
'alpha-value-notation': 'number',
20+
'import-notation': 'string',
21+
'media-feature-name-no-unknown': [
22+
true,
23+
{
24+
ignoreMediaFeatureNames: ['/^prefers-/'],
25+
},
26+
],
27+
'at-rule-no-unknown': [
28+
true,
29+
{
30+
ignoreAtRules: ['include', 'function', 'return', 'mixin', 'if', 'else', 'for', 'extend', 'each', 'content'],
31+
},
32+
],
33+
},
34+
};

src/typings/core-defs/asmail.d.ts renamed to @types/core-defs/asmail.d.ts

+46-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2016, 2020, 2022 3NSoft Inc.
2+
Copyright (C) 2016, 2020, 2022, 2024 3NSoft Inc.
33
44
This program is free software: you can redistribute it and/or modify it under
55
the terms of the GNU General Public License as published by the Free Software
@@ -36,19 +36,28 @@ declare namespace web3n.asmail {
3636

3737
interface DeliveryProgress {
3838
notConnected?: true;
39-
allDone: boolean;
39+
allDone?: 'all-ok' | 'with-errors';
4040
msgSize: number;
4141
localMeta?: any;
4242
recipients: {
4343
[address: string]: {
4444
done: boolean;
4545
idOnDelivery?: string;
46-
err?: any;
46+
deliveryTS?: number;
47+
err?: DeliveryException | RuntimeException | Error;
4748
bytesSent: number;
49+
// XXX
50+
awaitingRetry?: boolean;
51+
failedAttempts?: {
52+
attemptTS: number;
53+
err: any;
54+
}[];
4855
}
4956
};
5057
}
5158

59+
type DeliveryException = ASMailSendException | ServLocException | ASMailSendException;
60+
5261
interface DeliveryOptions {
5362
/**
5463
* sendImmediately flag forces immediate delivery with true value.
@@ -60,6 +69,14 @@ declare namespace web3n.asmail {
6069
* associated with particular delivery.
6170
*/
6271
localMeta?: any;
72+
73+
// XXX
74+
75+
retryRecipient?: {
76+
numOfAttempts: number;
77+
// XXX default client says "ASAP" => core applies own sane default
78+
timeBetweenAttempts?: number;
79+
};
6380
}
6481

6582
interface DeliveryService {
@@ -200,18 +217,21 @@ declare namespace web3n.asmail {
200217
* from event source, or if next throws something, although it must
201218
* handle its own stuff.
202219
*/
203-
subscribe(event: 'message', observer: Observer<IncomingMessage>):
220+
subscribe(event: InboxEventType, observer: Observer<IncomingMessage>):
204221
() => void;
205222

206223
}
207224

225+
type InboxEventType = 'message';
226+
208227
interface MsgStruct {
209228
/**
210229
* Message type can be
211-
* (a) "mail" for messages that better be viewed in mail styly UI,
212-
* (b) "chat" for messages that better be viewed in chat style UI,
213-
* (c) "app:<app-domain>" for application messages, for example, messages
214-
* for app with domain app.com should have type "app:app.com".
230+
* - "mail" for messages that better be viewed in mail styly UI,
231+
* - "chat" for messages that better be viewed in chat style UI,
232+
* - "app:<app-domain>" for application messages, for example, messages
233+
* with type "app:app.example.com" is for app.example.com app,
234+
* - "webrtc-signaling" for WebRTC off band signalling.
215235
*/
216236
msgType: string;
217237
subject?: string;
@@ -221,24 +241,25 @@ declare namespace web3n.asmail {
221241
carbonCopy?: string[];
222242
recipients?: string[];
223243
}
224-
244+
225245
interface MsgInfo {
226246
msgId: string;
227247
msgType: string;
228248
deliveryTS: number;
229249
}
230-
250+
231251
interface IncomingMessage extends MsgInfo, MsgStruct {
232252
sender: string;
233253
establishedSenderKeyChain: boolean;
234254
attachments?: files.ReadonlyFS;
255+
// XXX info if not from the first attempt
235256
}
236-
257+
237258
interface OutgoingMessage extends MsgStruct {
238259
msgId?: string;
239260
attachments?: AttachmentsContainer;
240261
}
241-
262+
242263
/**
243264
* This container is for entities that will be present in attachments
244265
* fs/folder of recipient's incoming message.
@@ -251,7 +272,7 @@ declare namespace web3n.asmail {
251272
[name: string]: files.FS;
252273
};
253274
}
254-
275+
255276
interface InboxException extends RuntimeException {
256277
type: "inbox";
257278
msgId: string;
@@ -260,14 +281,23 @@ declare namespace web3n.asmail {
260281
objId?: string;
261282
msgIsBroken?: true;
262283
}
263-
284+
264285
interface ServLocException extends RuntimeException {
265286
type: 'service-locating';
266287
address: string;
288+
289+
/**
290+
* domainNotFound flag indicates that domain in the address doesn't exist.
291+
*/
267292
domainNotFound?: true;
293+
294+
/**
295+
* noServiceRecord flag indicates that 3NWeb services are not set at
296+
* domain in the address.
297+
*/
268298
noServiceRecord?: true;
269299
}
270-
300+
271301
interface ASMailSendException extends RuntimeException {
272302
type: 'asmail-delivery';
273303
address?: string;
@@ -288,5 +318,5 @@ declare namespace web3n.asmail {
288318
// errors that are due to this side
289319
msgCancelled?: true;
290320
}
291-
321+
292322
}

src/typings/core-defs/common-caps.d.ts renamed to @types/core-defs/common-caps.d.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare namespace web3n.caps.common {
3232
mail?: MailCAPSetting;
3333
storage?: StorageCAPSetting;
3434
mailerid?: true;
35-
log?: LogCAPSetting;
35+
logToPlatform?: true;
3636
}
3737

3838
interface StorageCAPSetting {
@@ -65,12 +65,10 @@ declare namespace web3n.caps.common {
6565
receivingFrom?: 'all' | { whitelist: string[]; };
6666
}
6767

68-
type LogCAPSetting = 'all';
69-
7068
interface W3N {
69+
log: Logger;
7170
mail?: asmail.Service;
7271
storage?: storage.Service;
73-
log?: Logger;
7472
mailerid?: mailerid.Service;
7573
}
7674

src/typings/core-defs/files.d.ts renamed to @types/core-defs/files.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ declare namespace web3n.files {
2222
type: 'file';
2323
code: string|undefined;
2424
path: string;
25+
fsEtityType?: 'file' | 'link' | 'folder';
2526
}
2627

2728
interface FileExceptionFlag {
File renamed without changes.

src/typings/core-defs/startup.d.ts renamed to @types/core-defs/startup.d.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2016 - 2017, 2020 3NSoft Inc.
2+
Copyright (C) 2016 - 2017, 2020, 2023 3NSoft Inc.
33
44
This program is free software: you can redistribute it and/or modify it under
55
the terms of the GNU General Public License as published by the Free Software
@@ -23,7 +23,19 @@ declare namespace web3n.startup {
2323
* functionality, when user creates new account in 3NWeb domains.
2424
*/
2525
interface SignUpService {
26-
26+
27+
/**
28+
* @param serviceUrl of 3NWeb signup service url.
29+
*/
30+
setSignUpServer(serviceUrl: string): Promise<void>;
31+
32+
/**
33+
* @param signupToken
34+
* @return a promise, resolvable to an array of available domains for
35+
* creation of a new account.
36+
*/
37+
getAvailableDomains(signupToken?: string): Promise<string[]>;
38+
2739
/**
2840
* @param name is a part of address that comes before @domain
2941
* @param signupToken
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)