From caa4f50d90aa51b1d39fd06686da797109275fd9 Mon Sep 17 00:00:00 2001 From: Tetsu Yamazaki Date: Mon, 6 May 2024 07:28:25 +0900 Subject: [PATCH] =?UTF-8?q?creativeWorkType=E3=81=ABSoftwareApplication?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20=E6=89=BF=E8=AA=8D=E3=81=ABaudien?= =?UTF-8?q?ce,author,issuedBy=E3=82=92=E6=8B=A1=E5=BC=B5=20=E4=BA=88?= =?UTF-8?q?=E7=B4=84=E4=BD=BF=E7=94=A8=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=AEobject=E3=82=92=E6=9C=80=E9=81=A9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++-- src/action/consume/use/reservation.ts | 12 ++++++++++-- src/authorization.ts | 9 ++++++++- src/creativeWork/softwareApplication.ts | 10 ++++++++++ src/creativeWorkType.ts | 1 + src/iam.ts | 2 +- src/index.ts | 2 ++ 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/creativeWork/softwareApplication.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index debbcc99..077346fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/action/consume/use/reservation.ts b/src/action/consume/use/reservation.ts index 1bada76d..6a8f3be9 100644 --- a/src/action/consume/use/reservation.ts +++ b/src/action/consume/use/reservation.ts @@ -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; +// optimize(2024-05-06~) +export interface IReservationAsObject extends Pick { + issuedThrough: Pick; + reservationFor: Pick; + reservedTicket: Pick & { + ticketType: Pick; + }; +} export type IObject = IReservationAsObject[]; // tslint:disable-next-line:no-empty-interface export interface IResult { } diff --git a/src/authorization.ts b/src/authorization.ts index bf549d52..93c78e95 100644 --- a/src/authorization.ts +++ b/src/authorization.ts @@ -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'; @@ -21,12 +22,16 @@ 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; +} /** * 承認 @@ -34,6 +39,7 @@ export interface IAuthor { export interface IAuthorization { project: Pick; typeOf: 'Authorization'; + id?: string; /** * 承認コード */ @@ -52,6 +58,7 @@ export interface IAuthorization { validUntil: Date; audience?: IAudience; author?: IAuthor; + issuedBy?: IIssuedBy; } /** diff --git a/src/creativeWork/softwareApplication.ts b/src/creativeWork/softwareApplication.ts new file mode 100644 index 00000000..5ecd95f5 --- /dev/null +++ b/src/creativeWork/softwareApplication.ts @@ -0,0 +1,10 @@ +import * as CreativeWorkFactory from '../creativeWork'; +import { CreativeWorkType } from '../creativeWorkType'; + +/** + * ソフトウェア + */ +export interface ISoftwareApplication extends Pick { + id: string; + typeOf: CreativeWorkType.SoftwareApplication; +} diff --git a/src/creativeWorkType.ts b/src/creativeWorkType.ts index 9ea46bd0..122272f4 100644 --- a/src/creativeWorkType.ts +++ b/src/creativeWorkType.ts @@ -6,5 +6,6 @@ export enum CreativeWorkType { EmailMessage = 'EmailMessage', Movie = 'Movie', NoteDigitalDocument = 'NoteDigitalDocument', + SoftwareApplication = 'SoftwareApplication', WebApplication = 'WebApplication' } diff --git a/src/iam.ts b/src/iam.ts index c6221978..cc89640e 100644 --- a/src/iam.ts +++ b/src/iam.ts @@ -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; export type IProgramMembershipOfProject = Pick & { issuer: string; diff --git a/src/index.ts b/src/index.ts index fc295a0b..92c24566 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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'; @@ -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; } }