Skip to content

Commit

Permalink
Eメール送信アクションをメッセージリポジトリに対応
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Apr 29, 2024
1 parent 0457dcc commit 991909a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

### Changed

- Eメール送信アクションをメッセージリポジトリに対応

### Deprecated

### Removed
Expand Down
20 changes: 14 additions & 6 deletions src/action/transfer/send/message/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@ import * as SendActionFactory from '../../send';

export type IAgent = IParticipantAsProject;
export type IRecipient = IParticipantAsWebApplication | IParticipantAsPerson | IParticipantAsCustomer;
/**
* オブジェクト
* 「Eメール通知」を送信する
*/
export type IObject = IEmailMessage;
export type IResult = any;
// メッセージリポジトリに対応(2024-04-29~)
export type IObjectAsEmailMessage = Pick<
IEmailMessage,
'about' | 'identifier' | 'name' | 'sender' | 'text' | 'toRecipient' | 'typeOf'
>;
export type IOptimizedObject = Pick<IEmailMessage, 'identifier' | 'typeOf'> & {
identifier: string;
text?: never;
};
export type IObject = IObjectAsEmailMessage | IOptimizedObject;
export interface IResult {
statusCode?: number;
statusMessage?: string;
}
export type IPurpose = ISimpleOrder;
// tslint:disable-next-line:no-empty-interface
export interface IPotentialActions {
Expand Down
5 changes: 3 additions & 2 deletions src/creativeWork/message/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ export interface ICreativeWork extends Pick<
project?: Pick<IProject, 'id' | 'typeOf'>;
typeOf: CreativeWorkType.EmailMessage;
sender: IParticipant;
// multiple対応(2023-03-06~)
toRecipient: IParticipant[];
toRecipient: IParticipant[]; // multiple対応(2023-03-06~)
about: IAbout;
text: string;
name?: string;
identifier?: string;
}
export interface ICustomizedParticipant {
name?: string;
Expand Down

0 comments on commit 991909a

Please sign in to comment.