fix(core): update
This commit is contained in:
parent
ea2e80bfea
commit
a817814959
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/interfaces',
|
||||
version: '1.0.30',
|
||||
version: '1.0.31',
|
||||
description: 'interfaces for working with containers'
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
import * as data from './data/index.js';
|
||||
import * as platformservice from './platformservice/index.js';
|
||||
import * as requests from './requests/index.js';
|
||||
|
||||
export {
|
||||
data,
|
||||
platformservice,
|
||||
requests
|
||||
}
|
||||
|
1
ts/platformservice/00readme.md
Normal file
1
ts/platformservice/00readme.md
Normal file
@ -0,0 +1 @@
|
||||
The platform folder contains types that can be used for talking with the underlying platform by apps running on serve.zone.
|
23
ts/platformservice/aibridge.ts
Normal file
23
ts/platformservice/aibridge.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IChat {
|
||||
systemMessage: string;
|
||||
messages: {
|
||||
role: 'assistant' | 'user';
|
||||
content: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface IReq_Chat extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Chat
|
||||
> {
|
||||
method: 'chat',
|
||||
request: {
|
||||
chat: IChat;
|
||||
};
|
||||
response: {
|
||||
chat: IChat;
|
||||
latestMessage: string;
|
||||
}
|
||||
}
|
11
ts/platformservice/index.ts
Normal file
11
ts/platformservice/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import * as aibridge from './aibridge.js';
|
||||
import * as letter from './letter.js';
|
||||
import * as mta from './mta.js';
|
||||
import * as sms from './sms.js';
|
||||
|
||||
export {
|
||||
aibridge,
|
||||
letter,
|
||||
mta,
|
||||
sms,
|
||||
}
|
0
ts/platformservice/letter.ts
Normal file
0
ts/platformservice/letter.ts
Normal file
39
ts/platformservice/mta.ts
Normal file
39
ts/platformservice/mta.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
||||
|
||||
export interface IRequestSendEmail extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequestSendEmail
|
||||
> {
|
||||
method: 'sendEmail';
|
||||
request: {
|
||||
title: string;
|
||||
from: string;
|
||||
to: string;
|
||||
body: string;
|
||||
attachments?: Array<{
|
||||
name: string;
|
||||
binaryAttachmentString: string;
|
||||
}>
|
||||
};
|
||||
response: {
|
||||
/**
|
||||
* the response id allows for handling of responses to that email
|
||||
*/
|
||||
responseId: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequestRegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequestRegisterRecipient
|
||||
> {
|
||||
method: 'registerRecepient';
|
||||
request: {
|
||||
emailAddress: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
};
|
||||
}
|
33
ts/platformservice/sms.ts
Normal file
33
ts/platformservice/sms.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_SendSms
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendSms
|
||||
> {
|
||||
method: 'sendSms';
|
||||
request: {
|
||||
toNumber: number;
|
||||
fromName: string;
|
||||
messageText: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
}
|
||||
}
|
||||
|
||||
export interface IRequest_SendVerificationCode
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendVerificationCode
|
||||
> {
|
||||
method: 'sendVerificationCode';
|
||||
request: {
|
||||
toNumber: number;
|
||||
fromName: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
verificationCode: string;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user