@serve.zone/interfaces 5.4.3 → 5.4.4
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/dist_ts/index.d.ts +2 -1
- package/dist_ts/index.js +3 -2
- package/dist_ts/platform/ai.d.ts +18 -0
- package/dist_ts/platform/ai.js +2 -0
- package/dist_ts/platform/backup.d.ts +9 -0
- package/dist_ts/platform/backup.js +2 -0
- package/dist_ts/platform/database.d.ts +7 -0
- package/dist_ts/platform/database.js +2 -0
- package/dist_ts/platform/email.d.ts +57 -0
- package/dist_ts/platform/email.js +2 -0
- package/dist_ts/platform/index.d.ts +13 -0
- package/dist_ts/platform/index.js +14 -0
- package/dist_ts/platform/letter.d.ts +21 -0
- package/dist_ts/platform/letter.js +2 -0
- package/dist_ts/platform/logging.d.ts +5 -0
- package/dist_ts/platform/logging.js +2 -0
- package/dist_ts/platform/objectstorage.d.ts +6 -0
- package/dist_ts/platform/objectstorage.js +2 -0
- package/dist_ts/platform/pushnotification.d.ts +13 -0
- package/dist_ts/platform/pushnotification.js +2 -0
- package/dist_ts/platform/sip.d.ts +6 -0
- package/dist_ts/platform/sip.js +2 -0
- package/dist_ts/platform/sms.d.ts +25 -0
- package/dist_ts/platform/sms.js +2 -0
- package/dist_ts/platform/types.d.ts +58 -0
- package/dist_ts/platform/types.js +2 -0
- package/dist_ts/platformservice/aibridge.d.ts +1 -0
- package/dist_ts/platformservice/letter.d.ts +1 -0
- package/dist_ts/platformservice/mta.d.ts +4 -0
- package/dist_ts/platformservice/pushnotification.d.ts +1 -0
- package/dist_ts/platformservice/sms.d.ts +2 -0
- package/package.json +7 -8
- package/ts/index.ts +2 -0
- package/ts/platform/ai.ts +23 -0
- package/ts/platform/backup.ts +10 -0
- package/ts/platform/database.ts +8 -0
- package/ts/platform/email.ts +73 -0
- package/ts/platform/index.ts +27 -0
- package/ts/platform/letter.ts +26 -0
- package/ts/platform/logging.ts +5 -0
- package/ts/platform/objectstorage.ts +6 -0
- package/ts/platform/pushnotification.ts +18 -0
- package/ts/platform/sip.ts +6 -0
- package/ts/platform/sms.ts +34 -0
- package/ts/platform/types.ts +82 -0
- package/ts/platformservice/aibridge.ts +3 -1
- package/ts/platformservice/letter.ts +3 -1
- package/ts/platformservice/mta.ts +5 -0
- package/ts/platformservice/pushnotification.ts +3 -1
- package/ts/platformservice/sms.ts +3 -0
package/dist_ts/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as data from './data/index.js';
|
|
2
|
+
import * as platform from './platform/index.js';
|
|
2
3
|
import * as platformservice from './platformservice/index.js';
|
|
3
4
|
import * as requests from './requests/index.js';
|
|
4
|
-
export { data, platformservice, requests };
|
|
5
|
+
export { data, platform, platformservice, requests };
|
package/dist_ts/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as data from './data/index.js';
|
|
2
|
+
import * as platform from './platform/index.js';
|
|
2
3
|
import * as platformservice from './platformservice/index.js';
|
|
3
4
|
import * as requests from './requests/index.js';
|
|
4
|
-
export { data, platformservice, requests };
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
5
|
+
export { data, platform, platformservice, requests };
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGlCQUFpQixDQUFDO0FBQ3hDLE9BQU8sS0FBSyxRQUFRLE1BQU0scUJBQXFCLENBQUM7QUFDaEQsT0FBTyxLQUFLLGVBQWUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEtBQUssUUFBUSxNQUFNLHFCQUFxQixDQUFDO0FBRWhELE9BQU8sRUFDTCxJQUFJLEVBQ0osUUFBUSxFQUNSLGVBQWUsRUFDZixRQUFRLEVBQ1QsQ0FBQSJ9
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export interface IChat {
|
|
3
|
+
systemMessage: string;
|
|
4
|
+
messages: {
|
|
5
|
+
role: 'assistant' | 'user';
|
|
6
|
+
content: string;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
export interface IReq_Chat extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Chat> {
|
|
10
|
+
method: 'chat';
|
|
11
|
+
request: {
|
|
12
|
+
chat: IChat;
|
|
13
|
+
};
|
|
14
|
+
response: {
|
|
15
|
+
chat: IChat;
|
|
16
|
+
latestMessage: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9wbGF0Zm9ybS9haS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
|
3
|
+
export interface IReq_SendEmail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendEmail> {
|
|
4
|
+
method: 'sendEmail';
|
|
5
|
+
request: {
|
|
6
|
+
title: string;
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
body: string;
|
|
10
|
+
attachments?: Array<{
|
|
11
|
+
name: string;
|
|
12
|
+
binaryAttachmentString: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
response: {
|
|
16
|
+
responseId: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface IReq_RegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RegisterRecipient> {
|
|
20
|
+
method: 'registerRecipient';
|
|
21
|
+
request: {
|
|
22
|
+
emailAddress: string;
|
|
23
|
+
};
|
|
24
|
+
response: {
|
|
25
|
+
status: 'ok' | 'not ok';
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface IReq_CheckEmailStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CheckEmailStatus> {
|
|
29
|
+
method: 'checkEmailStatus';
|
|
30
|
+
request: {
|
|
31
|
+
emailId: string;
|
|
32
|
+
};
|
|
33
|
+
response: {
|
|
34
|
+
status: string;
|
|
35
|
+
details?: {
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface IReq_GetEmailStats extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetEmailStats> {
|
|
41
|
+
method: 'getEmailStats';
|
|
42
|
+
request: {
|
|
43
|
+
jwt: string;
|
|
44
|
+
};
|
|
45
|
+
response: {
|
|
46
|
+
totalEmailsSent: number;
|
|
47
|
+
totalEmailsDelivered: number;
|
|
48
|
+
totalEmailsBounced: number;
|
|
49
|
+
averageDeliveryTimeMs: number;
|
|
50
|
+
lastUpdated: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export type IReq_GetEMailStats = IReq_GetEmailStats;
|
|
54
|
+
export type IRequest_SendEmail = IReq_SendEmail;
|
|
55
|
+
export type IRequest_RegisterRecipient = IReq_RegisterRecipient;
|
|
56
|
+
export type IRequest_CheckEmailStatus = IReq_CheckEmailStatus;
|
|
57
|
+
export type IRequest_GetEMailStats = IReq_GetEmailStats;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1haWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9wbGF0Zm9ybS9lbWFpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ai from './ai.js';
|
|
2
|
+
import * as backup from './backup.js';
|
|
3
|
+
import * as database from './database.js';
|
|
4
|
+
import * as email from './email.js';
|
|
5
|
+
import * as letter from './letter.js';
|
|
6
|
+
import * as logging from './logging.js';
|
|
7
|
+
import * as objectstorage from './objectstorage.js';
|
|
8
|
+
import * as pushnotification from './pushnotification.js';
|
|
9
|
+
import * as sip from './sip.js';
|
|
10
|
+
import * as sms from './sms.js';
|
|
11
|
+
import * as types from './types.js';
|
|
12
|
+
export { ai, backup, database, email, letter, logging, objectstorage, pushnotification, sip, sms, types, };
|
|
13
|
+
export * from './types.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as ai from './ai.js';
|
|
2
|
+
import * as backup from './backup.js';
|
|
3
|
+
import * as database from './database.js';
|
|
4
|
+
import * as email from './email.js';
|
|
5
|
+
import * as letter from './letter.js';
|
|
6
|
+
import * as logging from './logging.js';
|
|
7
|
+
import * as objectstorage from './objectstorage.js';
|
|
8
|
+
import * as pushnotification from './pushnotification.js';
|
|
9
|
+
import * as sip from './sip.js';
|
|
10
|
+
import * as sms from './sms.js';
|
|
11
|
+
import * as types from './types.js';
|
|
12
|
+
export { ai, backup, database, email, letter, logging, objectstorage, pushnotification, sip, sms, types, };
|
|
13
|
+
export * from './types.js';
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9wbGF0Zm9ybS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUM5QixPQUFPLEtBQUssTUFBTSxNQUFNLGFBQWEsQ0FBQztBQUN0QyxPQUFPLEtBQUssUUFBUSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEtBQUssS0FBSyxNQUFNLFlBQVksQ0FBQztBQUNwQyxPQUFPLEtBQUssTUFBTSxNQUFNLGFBQWEsQ0FBQztBQUN0QyxPQUFPLEtBQUssT0FBTyxNQUFNLGNBQWMsQ0FBQztBQUN4QyxPQUFPLEtBQUssYUFBYSxNQUFNLG9CQUFvQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxnQkFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRCxPQUFPLEtBQUssR0FBRyxNQUFNLFVBQVUsQ0FBQztBQUNoQyxPQUFPLEtBQUssR0FBRyxNQUFNLFVBQVUsQ0FBQztBQUNoQyxPQUFPLEtBQUssS0FBSyxNQUFNLFlBQVksQ0FBQztBQUVwQyxPQUFPLEVBQ0wsRUFBRSxFQUNGLE1BQU0sRUFDTixRQUFRLEVBQ1IsS0FBSyxFQUNMLE1BQU0sRUFDTixPQUFPLEVBQ1AsYUFBYSxFQUNiLGdCQUFnQixFQUNoQixHQUFHLEVBQ0gsR0FBRyxFQUNILEtBQUssR0FDTixDQUFDO0FBRUYsY0FBYyxZQUFZLENBQUMifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export interface IReq_SendLetter extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendLetter> {
|
|
3
|
+
method: 'sendLetter';
|
|
4
|
+
request: {
|
|
5
|
+
description: string;
|
|
6
|
+
needsCover: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
from?: plugins.tsclass.business.IAddress;
|
|
9
|
+
to?: plugins.tsclass.business.IAddress;
|
|
10
|
+
coverBody?: string;
|
|
11
|
+
service: 'Einschreiben'[];
|
|
12
|
+
pdfAttachments?: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
binaryAttachmentString: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
response: {
|
|
18
|
+
processId: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type IRequest_SendLetter = IReq_SendLetter;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGV0dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcGxhdGZvcm0vbGV0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export interface IReq_SendPushNotification extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendPushNotification> {
|
|
3
|
+
method: 'sendPushNotification';
|
|
4
|
+
request: {
|
|
5
|
+
deviceToken: string;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
response: {
|
|
9
|
+
ok: boolean;
|
|
10
|
+
status: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export type IRequest_SendPushNotification = IReq_SendPushNotification;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVzaG5vdGlmaWNhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3BsYXRmb3JtL3B1c2hub3RpZmljYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
export interface IReq_SendSms extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendSms> {
|
|
3
|
+
method: 'sendSms';
|
|
4
|
+
request: {
|
|
5
|
+
toNumber: number;
|
|
6
|
+
fromName: string;
|
|
7
|
+
messageText: string;
|
|
8
|
+
};
|
|
9
|
+
response: {
|
|
10
|
+
status: 'ok' | 'not ok';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface IReq_SendVerificationCode extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendVerificationCode> {
|
|
14
|
+
method: 'sendVerificationCode';
|
|
15
|
+
request: {
|
|
16
|
+
toNumber: number;
|
|
17
|
+
fromName: string;
|
|
18
|
+
};
|
|
19
|
+
response: {
|
|
20
|
+
status: 'ok' | 'not ok';
|
|
21
|
+
verificationCode: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type IRequest_SendSms = IReq_SendSms;
|
|
25
|
+
export type IRequest_SendVerificationCode = IReq_SendVerificationCode;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcGxhdGZvcm0vc21zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type TPlatformCapability = 'email' | 'sms' | 'pushnotification' | 'letter' | 'ai' | 'database' | 'objectstorage' | 'logging' | 'backup' | 'sip';
|
|
2
|
+
export type TPlatformAccessMode = 'rpc' | 'binding' | 'sidecar' | 'internal';
|
|
3
|
+
export type TPlatformBindingStatus = 'requested' | 'provisioning' | 'ready' | 'degraded' | 'failed' | 'disabled';
|
|
4
|
+
export type TPlatformDesiredState = 'enabled' | 'disabled';
|
|
5
|
+
export type TPlatformEndpointProtocol = 'typedrequest' | 'http' | 'tcp' | 'udp' | 'smtp' | 's3' | 'postgres' | 'mongodb' | 'sip';
|
|
6
|
+
export type TPlatformConfigValue = string | number | boolean | null | TPlatformConfigValue[] | {
|
|
7
|
+
[key: string]: TPlatformConfigValue;
|
|
8
|
+
};
|
|
9
|
+
export interface IPlatformCapability {
|
|
10
|
+
id: TPlatformCapability;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
accessMode: TPlatformAccessMode;
|
|
14
|
+
defaultProviderType?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IPlatformProviderConfig {
|
|
17
|
+
id: string;
|
|
18
|
+
capability: TPlatformCapability;
|
|
19
|
+
providerType: string;
|
|
20
|
+
name: string;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
config?: {
|
|
23
|
+
[key: string]: TPlatformConfigValue;
|
|
24
|
+
};
|
|
25
|
+
secretBundleId?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IPlatformCredentialRef {
|
|
28
|
+
secretBundleId?: string;
|
|
29
|
+
secretGroupIds?: string[];
|
|
30
|
+
dockerSecretName?: string;
|
|
31
|
+
env?: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface IPlatformServiceEndpoint {
|
|
36
|
+
name: string;
|
|
37
|
+
capability: TPlatformCapability;
|
|
38
|
+
protocol: TPlatformEndpointProtocol;
|
|
39
|
+
internalUrl?: string;
|
|
40
|
+
externalUrl?: string;
|
|
41
|
+
networkAlias?: string;
|
|
42
|
+
port?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface IPlatformBinding {
|
|
45
|
+
id: string;
|
|
46
|
+
serviceId: string;
|
|
47
|
+
capability: TPlatformCapability;
|
|
48
|
+
desiredState: TPlatformDesiredState;
|
|
49
|
+
status: TPlatformBindingStatus;
|
|
50
|
+
providerConfigId?: string;
|
|
51
|
+
config?: {
|
|
52
|
+
[key: string]: TPlatformConfigValue;
|
|
53
|
+
};
|
|
54
|
+
endpoints?: IPlatformServiceEndpoint[];
|
|
55
|
+
credentials?: IPlatformCredentialRef[];
|
|
56
|
+
createdAt?: number;
|
|
57
|
+
updatedAt?: number;
|
|
58
|
+
}
|
|
@@ -53,3 +53,7 @@ export interface IReq_GetEMailStats extends plugins.typedrequestInterfaces.imple
|
|
|
53
53
|
lastUpdated: string;
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
export type IRequest_SendEmail = IReq_SendEmail;
|
|
57
|
+
export type IRequest_RegisterRecipient = IReq_RegisterRecipient;
|
|
58
|
+
export type IRequest_CheckEmailStatus = IReq_CheckEmailStatus;
|
|
59
|
+
export type IRequest_GetEMailStats = IReq_GetEMailStats;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/interfaces",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
|
|
6
6
|
"exports": {
|
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"author": "Task Venture Capital GmbH",
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "tstest test/ --verbose --logfile --timeout 60",
|
|
14
|
-
"build": "tsbuild tsfolders --allowimplicitany",
|
|
15
|
-
"buildDocs": "tsdoc"
|
|
16
|
-
},
|
|
17
12
|
"dependencies": {
|
|
18
13
|
"@api.global/typedrequest-interfaces": "^3.0.19",
|
|
19
14
|
"@push.rocks/smartlog-interfaces": "^3.0.2",
|
|
@@ -55,5 +50,9 @@
|
|
|
55
50
|
"browserslist": [
|
|
56
51
|
"last 1 chrome versions"
|
|
57
52
|
],
|
|
58
|
-
"
|
|
59
|
-
|
|
53
|
+
"scripts": {
|
|
54
|
+
"test": "tstest test/ --verbose --logfile --timeout 60",
|
|
55
|
+
"build": "tsbuild tsfolders --allowimplicitany",
|
|
56
|
+
"buildDocs": "tsdoc"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/ts/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as data from './data/index.js';
|
|
2
|
+
import * as platform from './platform/index.js';
|
|
2
3
|
import * as platformservice from './platformservice/index.js';
|
|
3
4
|
import * as requests from './requests/index.js';
|
|
4
5
|
|
|
5
6
|
export {
|
|
6
7
|
data,
|
|
8
|
+
platform,
|
|
7
9
|
platformservice,
|
|
8
10
|
requests
|
|
9
11
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export interface IChat {
|
|
4
|
+
systemMessage: string;
|
|
5
|
+
messages: {
|
|
6
|
+
role: 'assistant' | 'user';
|
|
7
|
+
content: string;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IReq_Chat extends plugins.typedrequestInterfaces.implementsTR<
|
|
12
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
13
|
+
IReq_Chat
|
|
14
|
+
> {
|
|
15
|
+
method: 'chat';
|
|
16
|
+
request: {
|
|
17
|
+
chat: IChat;
|
|
18
|
+
};
|
|
19
|
+
response: {
|
|
20
|
+
chat: IChat;
|
|
21
|
+
latestMessage: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
|
4
|
+
|
|
5
|
+
export interface IReq_SendEmail extends plugins.typedrequestInterfaces.implementsTR<
|
|
6
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
7
|
+
IReq_SendEmail
|
|
8
|
+
> {
|
|
9
|
+
method: 'sendEmail';
|
|
10
|
+
request: {
|
|
11
|
+
title: string;
|
|
12
|
+
from: string;
|
|
13
|
+
to: string;
|
|
14
|
+
body: string;
|
|
15
|
+
attachments?: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
binaryAttachmentString: string;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
response: {
|
|
21
|
+
responseId: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IReq_RegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<
|
|
26
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
27
|
+
IReq_RegisterRecipient
|
|
28
|
+
> {
|
|
29
|
+
method: 'registerRecipient';
|
|
30
|
+
request: {
|
|
31
|
+
emailAddress: string;
|
|
32
|
+
};
|
|
33
|
+
response: {
|
|
34
|
+
status: 'ok' | 'not ok';
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IReq_CheckEmailStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
39
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
40
|
+
IReq_CheckEmailStatus
|
|
41
|
+
> {
|
|
42
|
+
method: 'checkEmailStatus';
|
|
43
|
+
request: {
|
|
44
|
+
emailId: string;
|
|
45
|
+
};
|
|
46
|
+
response: {
|
|
47
|
+
status: string;
|
|
48
|
+
details?: { message: string };
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface IReq_GetEmailStats extends plugins.typedrequestInterfaces.implementsTR<
|
|
53
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
54
|
+
IReq_GetEmailStats
|
|
55
|
+
> {
|
|
56
|
+
method: 'getEmailStats';
|
|
57
|
+
request: {
|
|
58
|
+
jwt: string;
|
|
59
|
+
};
|
|
60
|
+
response: {
|
|
61
|
+
totalEmailsSent: number;
|
|
62
|
+
totalEmailsDelivered: number;
|
|
63
|
+
totalEmailsBounced: number;
|
|
64
|
+
averageDeliveryTimeMs: number;
|
|
65
|
+
lastUpdated: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type IReq_GetEMailStats = IReq_GetEmailStats;
|
|
70
|
+
export type IRequest_SendEmail = IReq_SendEmail;
|
|
71
|
+
export type IRequest_RegisterRecipient = IReq_RegisterRecipient;
|
|
72
|
+
export type IRequest_CheckEmailStatus = IReq_CheckEmailStatus;
|
|
73
|
+
export type IRequest_GetEMailStats = IReq_GetEmailStats;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as ai from './ai.js';
|
|
2
|
+
import * as backup from './backup.js';
|
|
3
|
+
import * as database from './database.js';
|
|
4
|
+
import * as email from './email.js';
|
|
5
|
+
import * as letter from './letter.js';
|
|
6
|
+
import * as logging from './logging.js';
|
|
7
|
+
import * as objectstorage from './objectstorage.js';
|
|
8
|
+
import * as pushnotification from './pushnotification.js';
|
|
9
|
+
import * as sip from './sip.js';
|
|
10
|
+
import * as sms from './sms.js';
|
|
11
|
+
import * as types from './types.js';
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
ai,
|
|
15
|
+
backup,
|
|
16
|
+
database,
|
|
17
|
+
email,
|
|
18
|
+
letter,
|
|
19
|
+
logging,
|
|
20
|
+
objectstorage,
|
|
21
|
+
pushnotification,
|
|
22
|
+
sip,
|
|
23
|
+
sms,
|
|
24
|
+
types,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export * from './types.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export interface IReq_SendLetter extends plugins.typedrequestInterfaces.implementsTR<
|
|
4
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
5
|
+
IReq_SendLetter
|
|
6
|
+
> {
|
|
7
|
+
method: 'sendLetter';
|
|
8
|
+
request: {
|
|
9
|
+
description: string;
|
|
10
|
+
needsCover: boolean;
|
|
11
|
+
title?: string;
|
|
12
|
+
from?: plugins.tsclass.business.IAddress;
|
|
13
|
+
to?: plugins.tsclass.business.IAddress;
|
|
14
|
+
coverBody?: string;
|
|
15
|
+
service: 'Einschreiben'[];
|
|
16
|
+
pdfAttachments?: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
binaryAttachmentString: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
response: {
|
|
22
|
+
processId: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type IRequest_SendLetter = IReq_SendLetter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export interface IReq_SendPushNotification extends plugins.typedrequestInterfaces.implementsTR<
|
|
4
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
5
|
+
IReq_SendPushNotification
|
|
6
|
+
> {
|
|
7
|
+
method: 'sendPushNotification';
|
|
8
|
+
request: {
|
|
9
|
+
deviceToken: string;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
response: {
|
|
13
|
+
ok: boolean;
|
|
14
|
+
status: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type IRequest_SendPushNotification = IReq_SendPushNotification;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
|
|
3
|
+
export interface IReq_SendSms extends plugins.typedrequestInterfaces.implementsTR<
|
|
4
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
5
|
+
IReq_SendSms
|
|
6
|
+
> {
|
|
7
|
+
method: 'sendSms';
|
|
8
|
+
request: {
|
|
9
|
+
toNumber: number;
|
|
10
|
+
fromName: string;
|
|
11
|
+
messageText: string;
|
|
12
|
+
};
|
|
13
|
+
response: {
|
|
14
|
+
status: 'ok' | 'not ok';
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IReq_SendVerificationCode extends plugins.typedrequestInterfaces.implementsTR<
|
|
19
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
20
|
+
IReq_SendVerificationCode
|
|
21
|
+
> {
|
|
22
|
+
method: 'sendVerificationCode';
|
|
23
|
+
request: {
|
|
24
|
+
toNumber: number;
|
|
25
|
+
fromName: string;
|
|
26
|
+
};
|
|
27
|
+
response: {
|
|
28
|
+
status: 'ok' | 'not ok';
|
|
29
|
+
verificationCode: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type IRequest_SendSms = IReq_SendSms;
|
|
34
|
+
export type IRequest_SendVerificationCode = IReq_SendVerificationCode;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type TPlatformCapability =
|
|
2
|
+
| 'email'
|
|
3
|
+
| 'sms'
|
|
4
|
+
| 'pushnotification'
|
|
5
|
+
| 'letter'
|
|
6
|
+
| 'ai'
|
|
7
|
+
| 'database'
|
|
8
|
+
| 'objectstorage'
|
|
9
|
+
| 'logging'
|
|
10
|
+
| 'backup'
|
|
11
|
+
| 'sip';
|
|
12
|
+
|
|
13
|
+
export type TPlatformAccessMode = 'rpc' | 'binding' | 'sidecar' | 'internal';
|
|
14
|
+
export type TPlatformBindingStatus = 'requested' | 'provisioning' | 'ready' | 'degraded' | 'failed' | 'disabled';
|
|
15
|
+
export type TPlatformDesiredState = 'enabled' | 'disabled';
|
|
16
|
+
export type TPlatformEndpointProtocol =
|
|
17
|
+
| 'typedrequest'
|
|
18
|
+
| 'http'
|
|
19
|
+
| 'tcp'
|
|
20
|
+
| 'udp'
|
|
21
|
+
| 'smtp'
|
|
22
|
+
| 's3'
|
|
23
|
+
| 'postgres'
|
|
24
|
+
| 'mongodb'
|
|
25
|
+
| 'sip';
|
|
26
|
+
|
|
27
|
+
export type TPlatformConfigValue =
|
|
28
|
+
| string
|
|
29
|
+
| number
|
|
30
|
+
| boolean
|
|
31
|
+
| null
|
|
32
|
+
| TPlatformConfigValue[]
|
|
33
|
+
| { [key: string]: TPlatformConfigValue };
|
|
34
|
+
|
|
35
|
+
export interface IPlatformCapability {
|
|
36
|
+
id: TPlatformCapability;
|
|
37
|
+
title: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
accessMode: TPlatformAccessMode;
|
|
40
|
+
defaultProviderType?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IPlatformProviderConfig {
|
|
44
|
+
id: string;
|
|
45
|
+
capability: TPlatformCapability;
|
|
46
|
+
providerType: string;
|
|
47
|
+
name: string;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
config?: { [key: string]: TPlatformConfigValue };
|
|
50
|
+
secretBundleId?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface IPlatformCredentialRef {
|
|
54
|
+
secretBundleId?: string;
|
|
55
|
+
secretGroupIds?: string[];
|
|
56
|
+
dockerSecretName?: string;
|
|
57
|
+
env?: { [key: string]: string };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface IPlatformServiceEndpoint {
|
|
61
|
+
name: string;
|
|
62
|
+
capability: TPlatformCapability;
|
|
63
|
+
protocol: TPlatformEndpointProtocol;
|
|
64
|
+
internalUrl?: string;
|
|
65
|
+
externalUrl?: string;
|
|
66
|
+
networkAlias?: string;
|
|
67
|
+
port?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IPlatformBinding {
|
|
71
|
+
id: string;
|
|
72
|
+
serviceId: string;
|
|
73
|
+
capability: TPlatformCapability;
|
|
74
|
+
desiredState: TPlatformDesiredState;
|
|
75
|
+
status: TPlatformBindingStatus;
|
|
76
|
+
providerConfigId?: string;
|
|
77
|
+
config?: { [key: string]: TPlatformConfigValue };
|
|
78
|
+
endpoints?: IPlatformServiceEndpoint[];
|
|
79
|
+
credentials?: IPlatformCredentialRef[];
|
|
80
|
+
createdAt?: number;
|
|
81
|
+
updatedAt?: number;
|
|
82
|
+
}
|
|
@@ -68,3 +68,8 @@ export interface IReq_GetEMailStats extends plugins.typedrequestInterfaces.imple
|
|
|
68
68
|
lastUpdated: string;
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
export type IRequest_SendEmail = IReq_SendEmail;
|
|
73
|
+
export type IRequest_RegisterRecipient = IReq_RegisterRecipient;
|
|
74
|
+
export type IRequest_CheckEmailStatus = IReq_CheckEmailStatus;
|
|
75
|
+
export type IRequest_GetEMailStats = IReq_GetEMailStats;
|