Skip to content

Commit

Permalink
creativeWorkTypeにSoftwareApplicationを追加
Browse files Browse the repository at this point in the history
承認にaudience,author,issuedByを拡張
予約使用アクションのobjectを最適化
  • Loading branch information
ilovegadd committed May 5, 2024
1 parent e9d914c commit caa4f50
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added

- 決済サービスのavailableChannel.credentialsにuseSeatInfoSyncCancelを追加
- 承認にaudienceを拡張
- 承認オブジェクトをOrganizationRoleに拡張
- 承認にauthorを拡張
- creativeWorkTypeにSoftwareApplicationを追加
- 承認にaudience,author,issuedByを拡張

### Changed

- Eメール送信アクションをメッセージリポジトリに対応
- 返金アクションをseatInfoSyncCancelに対応
- update @surfrock/sdk
- 予約使用アクションのobjectを最適化

### Deprecated

Expand Down
12 changes: 10 additions & 2 deletions src/action/consume/use/reservation.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { IParticipantAsPerson, IParticipantAsWebApplication } from '../../../action';
import { PlaceType } from '../../../placeType';
import { IReservation } from '../../../reservation/event';
import { ITicket, ITicketType } from '../../../reservation';
import { IIssuedThrough, IReservation, IReservationFor } from '../../../reservation/event';
import { ObjectType } from '../../check/token';
import * as UseActionFactory from '../use';

export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication;
export type IReservationAsObject = Pick<IReservation, 'id' | 'issuedThrough' | 'reservationFor' | 'reservationNumber' | 'reservedTicket' | 'typeOf'>;
// optimize(2024-05-06~)
export interface IReservationAsObject extends Pick<IReservation, 'id' | 'reservationNumber' | 'typeOf'> {
issuedThrough: Pick<IIssuedThrough, 'id' | 'typeOf'>;
reservationFor: Pick<IReservationFor, 'id' | 'typeOf'>;
reservedTicket: Pick<ITicket, 'identifier' | 'ticketedSeat' | 'typeOf'> & {
ticketType: Pick<ITicketType, 'id' | 'identifier' | 'typeOf'>;
};
}
export type IObject = IReservationAsObject[];
// tslint:disable-next-line:no-empty-interface
export interface IResult { }
Expand Down
9 changes: 8 additions & 1 deletion src/authorization.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CreativeWorkType } from './creativeWorkType';
import { IMemberRole } from './iam';
import { IOrder } from './order';
import { OrganizationType } from './organizationType';
import { IOwnershipInfo, IPermitAsGood, IPermitIssuedThrough, IReservation } from './ownershipInfo';
import { PersonType } from './personType';
import { IProject } from './project';
Expand All @@ -21,19 +22,24 @@ export interface IAudience {
* クライアントID
*/
id: string;
typeOf: string;
typeOf: CreativeWorkType.SoftwareApplication | CreativeWorkType.WebApplication;
}
export interface IAuthor {
id: string;
typeOf: PersonType.Person | CreativeWorkType.WebApplication;
}
export interface IIssuedBy {
id: string;
typeOf: OrganizationType.Corporation | OrganizationType.Project;
}

/**
* 承認
*/
export interface IAuthorization {
project: Pick<IProject, 'id' | 'typeOf'>;
typeOf: 'Authorization';
id?: string;
/**
* 承認コード
*/
Expand All @@ -52,6 +58,7 @@ export interface IAuthorization {
validUntil: Date;
audience?: IAudience;
author?: IAuthor;
issuedBy?: IIssuedBy;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions src/creativeWork/softwareApplication.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as CreativeWorkFactory from '../creativeWork';
import { CreativeWorkType } from '../creativeWorkType';

/**
* ソフトウェア
*/
export interface ISoftwareApplication extends Pick<CreativeWorkFactory.ICreativeWork, 'id' | 'typeOf'> {
id: string;
typeOf: CreativeWorkType.SoftwareApplication;
}
1 change: 1 addition & 0 deletions src/creativeWorkType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export enum CreativeWorkType {
EmailMessage = 'EmailMessage',
Movie = 'Movie',
NoteDigitalDocument = 'NoteDigitalDocument',
SoftwareApplication = 'SoftwareApplication',
WebApplication = 'WebApplication'
}
2 changes: 1 addition & 1 deletion src/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface IRoleSearchConditions {
};
}

export type IMemberType = PersonType | CreativeWorkType.WebApplication;
export type IMemberType = PersonType | CreativeWorkType.WebApplication | CreativeWorkType.SoftwareApplication;
export type IMemberRole = Pick<IRole, 'typeOf' | 'roleName'>;
export type IProgramMembershipOfProject = Pick<IProgramMembership, 'typeOf'> & {
issuer: string;
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import * as CommentFactory from './creativeWork/comment';
import * as EmailMessageFactory from './creativeWork/message/email';
import * as MovieFactory from './creativeWork/movie';
import * as NoteDigitalDocumentFactory from './creativeWork/noteDigitalDocument';
import * as SoftwareApplicationFactory from './creativeWork/softwareApplication';
import * as WebApplicationFactory from './creativeWork/softwareApplication/webApplication';
import { CreativeWorkType } from './creativeWorkType';
import * as CustomerFactory from './customer';
Expand Down Expand Up @@ -351,6 +352,7 @@ export namespace creativeWork {
export import movie = MovieFactory;
export import noteDigitalDocument = NoteDigitalDocumentFactory;
export namespace softwareApplication {
export import ISoftwareApplication = SoftwareApplicationFactory.ISoftwareApplication;
export import webApplication = WebApplicationFactory;
}
}
Expand Down

0 comments on commit caa4f50

Please sign in to comment.