@chevre/factory 7.0.0-alpha.2 → 7.0.0-alpha.3

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.
Files changed (73) hide show
  1. package/lib/account/action/moneyTransfer.d.ts +6 -6
  2. package/lib/account/transaction.d.ts +3 -4
  3. package/lib/account.js +5 -5
  4. package/lib/action/accept/coaOffer.d.ts +5 -5
  5. package/lib/action/accept/pay.d.ts +4 -4
  6. package/lib/action/accept.d.ts +3 -3
  7. package/lib/action/authorize/invoice.d.ts +6 -6
  8. package/lib/action/authorize/offer/any.d.ts +3 -3
  9. package/lib/action/authorize/offer/eventService.d.ts +4 -4
  10. package/lib/action/authorize/offer/eventService.js +1 -1
  11. package/lib/action/authorize/offer/product.d.ts +4 -4
  12. package/lib/action/authorize/offer/product.js +1 -1
  13. package/lib/action/authorize/paymentMethod/any.d.ts +6 -6
  14. package/lib/action/authorize/ticketedObject.d.ts +4 -4
  15. package/lib/action/authorize.d.ts +4 -4
  16. package/lib/action/cancel/coaReserve.d.ts +4 -4
  17. package/lib/action/cancel/reservation.d.ts +4 -4
  18. package/lib/action/check/paymentMethod/movieTicket.d.ts +4 -4
  19. package/lib/action/check/thing.d.ts +5 -5
  20. package/lib/action/consume/use/reservation.d.ts +3 -3
  21. package/lib/action/consume/use.d.ts +3 -3
  22. package/lib/action/create.d.ts +3 -3
  23. package/lib/action/interact/confirm/pay.d.ts +3 -3
  24. package/lib/action/interact/confirm/registerService.d.ts +3 -3
  25. package/lib/action/interact/confirm/reservation.d.ts +3 -3
  26. package/lib/action/interact/confirm.d.ts +4 -4
  27. package/lib/action/interact/inform.d.ts +7 -7
  28. package/lib/action/interact/register/service.d.ts +3 -3
  29. package/lib/action/interact/register.d.ts +5 -5
  30. package/lib/action/reserve.d.ts +4 -4
  31. package/lib/action/trade/order.d.ts +5 -5
  32. package/lib/action/trade/pay.d.ts +5 -5
  33. package/lib/action/trade/refund.d.ts +5 -5
  34. package/lib/action/transfer/give/pointAward.d.ts +5 -5
  35. package/lib/action/transfer/give.d.ts +5 -5
  36. package/lib/action/transfer/moneyTransfer.d.ts +5 -5
  37. package/lib/action/transfer/return/invoice.d.ts +6 -6
  38. package/lib/action/transfer/return/order.d.ts +7 -7
  39. package/lib/action/transfer/return/pointAward.d.ts +6 -6
  40. package/lib/action/transfer/return/reserveTransaction.d.ts +6 -6
  41. package/lib/action/transfer/return.d.ts +3 -3
  42. package/lib/action/transfer/send/message/email.d.ts +3 -3
  43. package/lib/action/transfer/send/order.d.ts +3 -3
  44. package/lib/action/transfer/send.d.ts +6 -6
  45. package/lib/action/update/add.d.ts +4 -4
  46. package/lib/action/update/delete.d.ts +5 -5
  47. package/lib/action/update/replace.d.ts +4 -4
  48. package/lib/action/update/update.d.ts +4 -4
  49. package/lib/error/alreadyInUse.js +12 -31
  50. package/lib/error/argument.js +10 -30
  51. package/lib/error/argumentNull.js +10 -30
  52. package/lib/error/chevre.js +7 -26
  53. package/lib/error/forbidden.js +7 -28
  54. package/lib/error/gatewayTimeout.js +7 -28
  55. package/lib/error/internal.js +7 -28
  56. package/lib/error/notFound.js +10 -30
  57. package/lib/error/notImplemented.js +7 -28
  58. package/lib/error/rateLimitExceeded.js +7 -28
  59. package/lib/error/serviceUnavailable.js +7 -28
  60. package/lib/error/unauthorized.js +7 -28
  61. package/lib/error/unknown.js +7 -28
  62. package/lib/errors.js +13 -13
  63. package/lib/index.js +216 -216
  64. package/lib/invoice.d.ts +4 -4
  65. package/lib/offer.d.ts +2 -2
  66. package/lib/order.d.ts +19 -19
  67. package/lib/ownershipInfo.d.ts +7 -7
  68. package/lib/person.d.ts +3 -3
  69. package/lib/product.d.ts +3 -3
  70. package/lib/reservation.d.ts +1 -2
  71. package/lib/reservedCodeValues.js +24 -24
  72. package/lib/transaction.d.ts +4 -4
  73. package/package.json +2 -3
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipantAsPerson, IParticipantAsProject, IParticipantAsWebApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import * as OrderFactory from '../../order';
4
4
  import { TransactionType } from '../../transactionType';
@@ -7,7 +7,7 @@ import { TransactionType } from '../../transactionType';
7
7
  * Projectに統一(2022-05-16~)
8
8
  * 決済取引に関してはクライアントによる確定がありうるので拡張(2024-03-11~)
9
9
  */
10
- export type IAgent = ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsProject | ActionFactory.IParticipantAsWebApplication;
10
+ export type IAgent = IParticipantAsPerson | IParticipantAsProject | IParticipantAsWebApplication;
11
11
  export type IObject = any;
12
12
  export interface ITransactionPurpose {
13
13
  typeOf: TransactionType.PlaceOrder;
@@ -16,11 +16,11 @@ export interface ITransactionPurpose {
16
16
  export type IPurpose = ITransactionPurpose | OrderFactory.ISimpleOrder;
17
17
  export type IResult = any;
18
18
  export type IPotentialActions = any;
19
- export interface IAttributes<TObject, TResult> extends Pick<ActionFactory.IAttributes<ActionType.ConfirmAction, TObject, TResult>, 'agent' | 'error' | 'object' | 'project' | 'purpose' | 'result' | 'typeOf' | 'sameAs'> {
19
+ export interface IAttributes<TObject, TResult> extends Pick<IBaseAttributes<ActionType.ConfirmAction, TObject, TResult>, 'agent' | 'error' | 'object' | 'project' | 'purpose' | 'result' | 'typeOf' | 'sameAs'> {
20
20
  agent: IAgent;
21
21
  purpose: IPurpose;
22
22
  }
23
23
  /**
24
24
  * 確定アクション
25
25
  */
26
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
26
+ export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipantAsProject, IRecipientAsAnonymousWebApplication, IParticipantAsSeller, IParticipantAsWebApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { AssetTransactionType } from '../../assetTransactionType';
4
4
  import { IOrder } from '../../order';
@@ -19,18 +19,18 @@ import { IRefundAction4inform } from '../../notification/refundAction';
19
19
  import { IReservation4inform } from '../../notification/reservation';
20
20
  import { ITask4inform } from '../../notification/task';
21
21
  import { IPlaceOrderAsNotification } from '../../notification/transaction';
22
- export type IAgent = ActionFactory.IParticipantAsProject;
23
- export type IRecipientAsWebApplicationDeprecated = Pick<ActionFactory.IRecipientAsAnonymousWebApplication, 'id' | 'name' | 'typeOf'> & {
22
+ export type IAgent = IParticipantAsProject;
23
+ export type IRecipientAsWebApplicationDeprecated = Pick<IRecipientAsAnonymousWebApplication, 'id' | 'name' | 'typeOf'> & {
24
24
  url?: string;
25
25
  };
26
- export type IRecipientAsSellerDeprecated = Pick<ActionFactory.IParticipantAsSeller, 'id' | 'name' | 'typeOf'> & {
26
+ export type IRecipientAsSellerDeprecated = Pick<IParticipantAsSeller, 'id' | 'name' | 'typeOf'> & {
27
27
  url?: string;
28
28
  };
29
29
  export type IRecipientDeprecated = IRecipientAsWebApplicationDeprecated | IRecipientAsSellerDeprecated;
30
30
  /**
31
31
  * redefine informAction.recipient(2025-02-15~)
32
32
  */
33
- export type IRecipient = Pick<ActionFactory.IParticipantAsWebApplication, 'name' | 'typeOf'> & {
33
+ export type IRecipient = Pick<IParticipantAsWebApplication, 'name' | 'typeOf'> & {
34
34
  id?: never;
35
35
  url?: never;
36
36
  };
@@ -55,7 +55,7 @@ export interface IResult {
55
55
  statusCode?: number;
56
56
  useFetchAPI?: boolean;
57
57
  }
58
- export interface IAttributes<TObject extends IObject> extends Pick<ActionFactory.IAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf' | 'target'> {
58
+ export interface IAttributes<TObject extends IObject> extends Pick<IBaseAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf' | 'target'> {
59
59
  agent: IAgent;
60
60
  recipient: IRecipient | IRecipientDeprecated;
61
61
  purpose?: IPurpose;
@@ -64,4 +64,4 @@ export interface IAttributes<TObject extends IObject> extends Pick<ActionFactory
64
64
  /**
65
65
  * inform action
66
66
  */
67
- export type IAction<TAttributes extends IAttributes<IObject>> = ActionFactory.IAction<TAttributes>;
67
+ export type IAction<TAttributes extends IAttributes<IObject>> = IBaseAction<TAttributes>;
@@ -1,18 +1,18 @@
1
1
  import { IParticipantAsProject } from '../../../action';
2
2
  import { IPermit } from '../../../permit';
3
3
  import { IAttributes as IMoneyTransferActionAttributes } from '../../transfer/moneyTransfer';
4
- import * as RegisterActionFactory from '../register';
4
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../register';
5
5
  export type IAgent = IParticipantAsProject;
6
6
  export type IObject = IPermit;
7
7
  export type IResult = any;
8
8
  export interface IPotentialActions {
9
9
  moneyTransfer: IMoneyTransferActionAttributes[];
10
10
  }
11
- export interface IAttributes extends RegisterActionFactory.IAttributes<IObject, IResult> {
11
+ export interface IAttributes extends IBaseAttributes<IObject, IResult> {
12
12
  agent: IAgent;
13
13
  potentialActions?: IPotentialActions;
14
14
  }
15
15
  /**
16
16
  * サービス登録アクション
17
17
  */
18
- export type IAction = RegisterActionFactory.IAction<IAttributes>;
18
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,15 +1,15 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
- export type IAgent = ActionFactory.IParticipant;
4
- export type IRecipient = ActionFactory.IParticipant;
3
+ export type IAgent = IParticipant;
4
+ export type IRecipient = IParticipant;
5
5
  export type IObject = any;
6
6
  export type IResult = any;
7
7
  export interface IPotentialActions {
8
8
  }
9
- export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.RegisterAction, TObject, TResult> {
9
+ export interface IAttributes<TObject, TResult> extends IBaseAttributes<ActionType.RegisterAction, TObject, TResult> {
10
10
  potentialActions?: IPotentialActions;
11
11
  }
12
12
  /**
13
13
  * 登録アクションインターフェース
14
14
  */
15
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
15
+ export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../action';
1
+ import { IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../action';
2
2
  import { ActionType } from '../actionType';
3
3
  import { AssetTransactionType } from '../assetTransactionType';
4
4
  import { IOrder } from '../order';
@@ -7,7 +7,7 @@ import { IReservationForLegacy as IEventReservationFor } from '../reservation/ev
7
7
  import { ReservationType } from '../reservationType';
8
8
  import { ITransaction as IPlaceOrder } from '../transaction/placeOrder';
9
9
  import { IAttributes as IMoneyTransferActionAttributes } from './transfer/moneyTransfer';
10
- export type IAgent = ActionFactory.IParticipantAsProject;
10
+ export type IAgent = IParticipantAsProject;
11
11
  export type IReservationFor = Pick<IEventReservationFor, 'id' | 'typeOf'> & {
12
12
  optimized: boolean;
13
13
  };
@@ -44,7 +44,7 @@ export interface ITicketAsInstrument {
44
44
  typeOf: 'Ticket';
45
45
  }
46
46
  export type IInstrument = IOrderAsInstrument | IPlaceOrderAsInstrument | ITicketAsInstrument;
47
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.ReserveAction, IObject, IResult>, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf' | 'error' | 'instrument'> {
47
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.ReserveAction, IObject, IResult>, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf' | 'error' | 'instrument'> {
48
48
  agent: IAgent;
49
49
  potentialActions?: IPotentialActions;
50
50
  purpose: IPurpose;
@@ -56,4 +56,4 @@ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.R
56
56
  /**
57
57
  * reserve action
58
58
  */
59
- export type IAction = ActionFactory.IAction<IAttributes>;
59
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,9 +1,9 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { ISimpleOrder } from '../../order';
4
4
  import { TransactionType } from '../../transactionType';
5
- export type IAgent = ActionFactory.IParticipant;
6
- export type IRecipient = ActionFactory.IParticipant;
5
+ export type IAgent = IParticipant;
6
+ export type IRecipient = IParticipant;
7
7
  export type IObject = ISimpleOrder;
8
8
  export interface IResult {
9
9
  }
@@ -11,10 +11,10 @@ export interface IPurpose {
11
11
  typeOf: TransactionType.PlaceOrder;
12
12
  id: string;
13
13
  }
14
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.OrderAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
14
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.OrderAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
15
15
  purpose?: IPurpose;
16
16
  }
17
17
  /**
18
18
  * 注文アクション
19
19
  */
20
- export type IAction = ActionFactory.IAction<IAttributes>;
20
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,5 +1,5 @@
1
1
  import * as AccountFactory from '../../account';
2
- import * as ActionFactory from '../../action';
2
+ import { IParticipantAsProject, IParticipantAsSeller, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
3
3
  import { IAttributes as IReturnOrderActionAttributes } from '../../action/transfer/return/order';
4
4
  import { ActionType } from '../../actionType';
5
5
  import { AssetTransactionType } from '../../assetTransactionType';
@@ -16,8 +16,8 @@ import { IAction as IAuthorizePaymentAction } from '../authorize/paymentMethod/a
16
16
  import { IPayTransactionAsPurpose, IRefundTransactionAsPurpose } from '../interact/inform';
17
17
  import { IAction as IRefundAction } from './refund';
18
18
  export { IAlterTranResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IPayCreditCardRecipe, IPayMovieTicketRecipe };
19
- export import IAgent = ActionFactory.IParticipantAsProject;
20
- export import IRecipient = ActionFactory.IParticipantAsSeller;
19
+ export type IAgent = IParticipantAsProject;
20
+ export type IRecipient = IParticipantAsSeller;
21
21
  export interface IOrderAsPayPurpose {
22
22
  typeOf: OrderType.Order;
23
23
  confirmationNumber: string;
@@ -153,7 +153,7 @@ export interface ILocation {
153
153
  */
154
154
  id: string;
155
155
  }
156
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.PayAction, IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
156
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.PayAction, IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
157
157
  agent: IAgent;
158
158
  /**
159
159
  * 注文決済の場合、決済取引として存在(2024-06-15~)
@@ -168,4 +168,4 @@ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.P
168
168
  /**
169
169
  * 決済アクション
170
170
  */
171
- export type IAction = ActionFactory.IAction<IAttributes>;
171
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipantAsSeller, IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { IOrder } from '../../order';
4
4
  import { IAlterTranResult, IRecipe as IRefundCreditCardRecipe, IResultAsError as IRefundCreditCardResultAsError } from '../../recipe/refundCreditCard';
@@ -8,8 +8,8 @@ import { IRefundTransactionAsPurpose } from '../interact/inform';
8
8
  import { IAction as IReturnInvoiceAction } from '../transfer/return/invoice';
9
9
  import { IOrderAsPayPurpose, IPaymentMethod, IPaymentService as IPaymentServiceOnPay, IPurposeAsReturnAction } from './pay';
10
10
  export { IAlterTranResult, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IRefundCreditCardRecipe, IRefundMovieTicketRecipe };
11
- export type IAgent = ActionFactory.IParticipantAsSeller;
12
- export type IRecipient = ActionFactory.IParticipant;
11
+ export type IAgent = IParticipantAsSeller;
12
+ export type IRecipient = IParticipant;
13
13
  export type IPaymentService = Omit<IPaymentServiceOnPay, 'paymentMethod'> & {
14
14
  refundFee?: number;
15
15
  paymentMethod: Pick<IPaymentMethod, 'accountId' | 'name' | 'paymentMethodId' | 'typeOf' | 'additionalProperty'>;
@@ -47,7 +47,7 @@ export type IPurpose = IOrderAsPayPurpose | IPurposeAsReturnAction | IPurposeAsP
47
47
  export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
48
48
  export type IReturnActionAsInstrument = Pick<IReturnInvoiceAction, 'id' | 'typeOf'>;
49
49
  export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument;
50
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.RefundAction, IObject, IResult>, 'agent' | 'error' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
50
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.RefundAction, IObject, IResult>, 'agent' | 'error' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
51
51
  agent: IAgent;
52
52
  recipient?: IRecipient;
53
53
  purpose: IPurpose;
@@ -60,4 +60,4 @@ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.R
60
60
  /**
61
61
  * refund action
62
62
  */
63
- export type IAction = ActionFactory.IAction<IAttributes>;
63
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,7 +1,7 @@
1
- import * as ActionFactory from '../../../action';
1
+ import { IParticipantAsSeller } from '../../../action';
2
2
  import * as OrderFactory from '../../../order';
3
- import * as GiveActionFactory from '../give';
4
- export type IAgent = ActionFactory.IParticipantAsSeller;
3
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../give';
4
+ export type IAgent = IParticipantAsSeller;
5
5
  export declare enum ObjectType {
6
6
  PointAward = "PointAward"
7
7
  }
@@ -40,11 +40,11 @@ export type IResult = any;
40
40
  */
41
41
  export type IPurpose = OrderFactory.ISimpleOrder;
42
42
  export type IPotentialActions = any;
43
- export interface IAttributes extends GiveActionFactory.IAttributes<IObject, IResult> {
43
+ export interface IAttributes extends IBaseAttributes<IObject, IResult> {
44
44
  agent: IAgent;
45
45
  purpose: IPurpose;
46
46
  }
47
47
  /**
48
48
  * ポイント特典付与アクション
49
49
  */
50
- export type IAction = GiveActionFactory.IAction<IAttributes>;
50
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,11 +1,11 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
- export type IAgent = ActionFactory.IParticipant;
4
- export type IRecipient = ActionFactory.IParticipant;
3
+ export type IAgent = IParticipant;
4
+ export type IRecipient = IParticipant;
5
5
  export type IObject = any;
6
6
  export type IResult = any;
7
7
  export type ILocation = any;
8
- export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.GiveAction, TObject, TResult> {
8
+ export interface IAttributes<TObject, TResult> extends IBaseAttributes<ActionType.GiveAction, TObject, TResult> {
9
9
  recipient: IRecipient;
10
10
  fromLocation?: ILocation;
11
11
  toLocation?: ILocation;
@@ -13,4 +13,4 @@ export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes
13
13
  /**
14
14
  * 付与アクションインターフェース
15
15
  */
16
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
16
+ export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -1,5 +1,5 @@
1
1
  import * as AccountFactory from '../../account';
2
- import * as ActionFactory from '../../action';
2
+ import { IParticipantAsProject, IParticipantAsPerson, IParticipantAsSeller, IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
3
3
  import { ActionType } from '../../actionType';
4
4
  import * as MoneyTransferTransactionFactory from '../../assetTransaction/moneyTransfer';
5
5
  import { AssetTransactionType } from '../../assetTransactionType';
@@ -13,8 +13,8 @@ export interface IPendingTransaction {
13
13
  identifier?: string;
14
14
  transactionNumber: string;
15
15
  }
16
- export type IAgent = ActionFactory.IParticipantAsProject | ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsSeller;
17
- export type IRecipient = ActionFactory.IParticipant;
16
+ export type IAgent = IParticipantAsProject | IParticipantAsPerson | IParticipantAsSeller;
17
+ export type IRecipient = IParticipant;
18
18
  /**
19
19
  * 匿名ロケーション
20
20
  */
@@ -49,7 +49,7 @@ export interface ITransactionPurpose {
49
49
  }
50
50
  export type IPurpose = ITransactionPurpose;
51
51
  export type IAmount = Pick<IMonetaryAmount, 'typeOf' | 'currency' | 'value'>;
52
- export interface IAttributes extends ActionFactory.IAttributes<ActionType.MoneyTransfer, IObject, IResult> {
52
+ export interface IAttributes extends IBaseAttributes<ActionType.MoneyTransfer, IObject, IResult> {
53
53
  typeOf: ActionType.MoneyTransfer;
54
54
  agent: IAgent;
55
55
  recipient: IRecipient;
@@ -67,7 +67,7 @@ export interface IAttributes extends ActionFactory.IAttributes<ActionType.MoneyT
67
67
  */
68
68
  toLocation: ILocation;
69
69
  }
70
- export type IAction = ActionFactory.IAction<IAttributes>;
70
+ export type IAction = IBaseAction<IAttributes>;
71
71
  export type IPointAwardAmount = Pick<IMonetaryAmount, 'typeOf' | 'currency' | 'value'>;
72
72
  /**
73
73
  * ポイント特典
@@ -1,12 +1,12 @@
1
- import * as ActionFactory from '../../../action';
1
+ import { IParticipantAsProject, IParticipantAsCustomer, IParticipantAsPerson, IParticipantAsWebApplication } from '../../../action';
2
2
  import { AssetTransactionType } from '../../../assetTransactionType';
3
3
  import { IInvoice } from '../../../invoice';
4
4
  import { IReferencedInvoice, ISimpleOrder } from '../../../order';
5
5
  import { IAttributes as ISendEmailMessageActionAttributes } from '../../transfer/send/message/email';
6
- import * as ReturnActionFactory from '../return';
7
- export type IAgent = ActionFactory.IParticipantAsProject;
6
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../return';
7
+ export type IAgent = IParticipantAsProject;
8
8
  type IRecipientAttributes = 'id' | 'name' | 'typeOf';
9
- export type IRecipient = Pick<ActionFactory.IParticipantAsCustomer, IRecipientAttributes> | Pick<ActionFactory.IParticipantAsPerson, IRecipientAttributes> | Pick<ActionFactory.IParticipantAsWebApplication, IRecipientAttributes>;
9
+ export type IRecipient = Pick<IParticipantAsCustomer, IRecipientAttributes> | Pick<IParticipantAsPerson, IRecipientAttributes> | Pick<IParticipantAsWebApplication, IRecipientAttributes>;
10
10
  export type IObject = Pick<IReferencedInvoice, 'accountId' | 'issuedThrough' | 'paymentMethod' | 'paymentMethodId' | 'totalPaymentDue' | 'name' | 'additionalProperty'> & Pick<IInvoice, 'typeOf'>;
11
11
  export interface IResult {
12
12
  }
@@ -22,7 +22,7 @@ export interface IInstrument {
22
22
  typeOf: AssetTransactionType.Refund;
23
23
  transactionNumber: string;
24
24
  }
25
- export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObject, IResult>, 'agent' | 'error' | 'instrument' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
25
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'agent' | 'error' | 'instrument' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> {
26
26
  agent: IAgent;
27
27
  recipient: IRecipient;
28
28
  purpose: IPurpose;
@@ -32,5 +32,5 @@ export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObjec
32
32
  /**
33
33
  * 請求返却アクション
34
34
  */
35
- export type IAction = ReturnActionFactory.IAction<IAttributes>;
35
+ export type IAction = IBaseAction<IAttributes>;
36
36
  export {};
@@ -1,13 +1,13 @@
1
- import * as ActionFactory from '../../../action';
1
+ import { IParticipantAsSeller } from '../../../action';
2
2
  import { ICustomerRemorseReturnFeesMovieTicket, IMerchantReturnPolicy, ReturnFeesEnumeration } from '../../../merchantReturnPolicy';
3
3
  import { IOfferItemCondition, OfferItemCondition } from '../../../offerItemCondition';
4
4
  import * as OrderFactory from '../../../order';
5
5
  import { IAttributes as IReturnInvoiceActionAttributes } from '../../transfer/return/invoice';
6
- import * as ReturnActionFactory from '../return';
6
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../return';
7
7
  import { IAttributes as ISendEmailMessageActionAttributes } from '../send/message/email';
8
- import * as ReturnPointAwardActionFactory from './pointAward';
8
+ import { IAttributes as IReturnPointAwardActionAttributes } from './pointAward';
9
9
  export type IAgent = OrderFactory.IParticipantAsReturner;
10
- export type IRecipient = ActionFactory.IParticipantAsSeller;
10
+ export type IRecipient = IParticipantAsSeller;
11
11
  /**
12
12
  * 返却対象は注文
13
13
  */
@@ -20,7 +20,7 @@ export type IObject = OrderFactory.ISimpleOrder & {
20
20
  export interface IResult {
21
21
  }
22
22
  export type IPotentialReturnInvoiceAction = Pick<IReturnInvoiceActionAttributes, 'object' | 'potentialActions'>;
23
- export type IPotentialReturnPointAwardAction = ReturnPointAwardActionFactory.IAttributes;
23
+ export type IPotentialReturnPointAwardAction = IReturnPointAwardActionAttributes;
24
24
  export type IPotentialSendEmailMessageAction = Pick<ISendEmailMessageActionAttributes, 'object'>;
25
25
  export interface IPotentialActions {
26
26
  /**
@@ -79,7 +79,7 @@ export type IReturnPolicy = Pick<IMerchantReturnPolicy, 'typeOf' | 'merchantRetu
79
79
  */
80
80
  export type IReturnPolicyAsInstrument = Pick<IReturnPolicy, 'identifier' | 'restockingFee' | 'returnFees' | 'typeOf'>;
81
81
  export type IInstrument = [IReturnPolicyAsInstrument];
82
- export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'project' | 'potentialActions' | 'object' | 'error' | 'agent' | 'instrument'> {
82
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'project' | 'potentialActions' | 'object' | 'error' | 'agent' | 'instrument'> {
83
83
  agent: IAgent;
84
84
  recipient: IRecipient;
85
85
  potentialActions?: IPotentialActions;
@@ -88,4 +88,4 @@ export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObjec
88
88
  /**
89
89
  * return order action
90
90
  */
91
- export type IAction = ReturnActionFactory.IAction<IAttributes>;
91
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,9 +1,9 @@
1
- import * as ActionFactory from '../../../action';
1
+ import { IParticipantAsProject, IParticipantAsSeller } from '../../../action';
2
2
  import { AssetTransactionType } from '../../../assetTransactionType';
3
3
  import { ISimpleOrder } from '../../../order';
4
- import * as ReturnActionFactory from '../return';
5
- export type IAgent = ActionFactory.IParticipantAsProject;
6
- export type IRecipient = ActionFactory.IParticipantAsSeller;
4
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../return';
5
+ export type IAgent = IParticipantAsProject;
6
+ export type IRecipient = IParticipantAsSeller;
7
7
  /**
8
8
  * 入金取引識別子で指定する場合のオブジェクト
9
9
  */
@@ -27,7 +27,7 @@ export type IPurpose = ISimpleOrder;
27
27
  export type IResult = any;
28
28
  export interface IPotentialActions {
29
29
  }
30
- export interface IAttributes extends ReturnActionFactory.IAttributes<IObject, IResult> {
30
+ export interface IAttributes extends IBaseAttributes<IObject, IResult> {
31
31
  agent: IAgent;
32
32
  recipient: IRecipient;
33
33
  potentialActions?: IPotentialActions;
@@ -36,4 +36,4 @@ export interface IAttributes extends ReturnActionFactory.IAttributes<IObject, IR
36
36
  /**
37
37
  * ポイント特典返却アクション
38
38
  */
39
- export type IAction = ReturnActionFactory.IAction<IAttributes>;
39
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,11 +1,11 @@
1
- import * as ActionFactory from '../../../action';
1
+ import { IParticipantAsProject, IParticipantAsSeller } from '../../../action';
2
2
  import { AssetTransactionType } from '../../../assetTransactionType';
3
3
  import { ISimpleOrder } from '../../../order';
4
4
  import { IRecipe, IStateReserveArgs } from '../../../recipe/returnCOAReserve';
5
- import * as ReturnActionFactory from '../return';
5
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../return';
6
6
  export { IRecipe as IReturnCOAReserveRecipe };
7
- export type IAgent = ActionFactory.IParticipantAsProject;
8
- export type IRecipient = ActionFactory.IParticipantAsSeller;
7
+ export type IAgent = IParticipantAsProject;
8
+ export type IRecipient = IParticipantAsSeller;
9
9
  export type IObject4COA = IStateReserveArgs & {
10
10
  typeOf: AssetTransactionType.COAReserveTransaction;
11
11
  };
@@ -17,7 +17,7 @@ export type IObject = IObject4COA | IObject4Chevre;
17
17
  export type IPurpose = ISimpleOrder;
18
18
  export interface IResult {
19
19
  }
20
- export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
20
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
21
21
  agent: IAgent;
22
22
  instrument?: never;
23
23
  purpose: IPurpose;
@@ -26,4 +26,4 @@ export interface IAttributes extends Pick<ReturnActionFactory.IAttributes<IObjec
26
26
  /**
27
27
  * 予約取引返却アクション
28
28
  */
29
- export type IAction = ReturnActionFactory.IAction<IAttributes>;
29
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,10 +1,10 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  export type IObject = any;
4
4
  export type IResult = any;
5
- export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.ReturnAction, TObject, TResult> {
5
+ export interface IAttributes<TObject, TResult> extends IBaseAttributes<ActionType.ReturnAction, TObject, TResult> {
6
6
  }
7
7
  /**
8
8
  * 返却アクション
9
9
  */
10
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
10
+ export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -2,7 +2,7 @@ import { IParticipantAsCustomer, IParticipantAsPerson, IParticipantAsProject, IP
2
2
  import { ICreativeWork as IEmailMessage } from '../../../../creativeWork/message/email';
3
3
  import { ISimpleOrder } from '../../../../order';
4
4
  import { IRecipe, ISendMultipleArgs, ISendMultipleResult } from '../../../../recipe/sendEmailMessage';
5
- import * as SendActionFactory from '../../send';
5
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../send';
6
6
  export { IRecipe, ISendMultipleArgs, ISendMultipleResult };
7
7
  export type IAgent = IParticipantAsProject;
8
8
  export type IRecipient = IParticipantAsWebApplication | IParticipantAsPerson | IParticipantAsCustomer;
@@ -21,7 +21,7 @@ export interface IResult {
21
21
  statusMessage?: string;
22
22
  }
23
23
  export type IPurpose = ISimpleOrder;
24
- export interface IAttributes extends Pick<SendActionFactory.IAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
24
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'recipient' | 'purpose' | 'project' | 'object' | 'error' | 'agent'> {
25
25
  agent: IAgent;
26
26
  purpose: IPurpose;
27
27
  recipient: IRecipient;
@@ -29,4 +29,4 @@ export interface IAttributes extends Pick<SendActionFactory.IAttributes<IObject,
29
29
  /**
30
30
  * Eメール送信アクション
31
31
  */
32
- export type IAction = SendActionFactory.IAction<IAttributes>;
32
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,7 +1,7 @@
1
1
  import { IParticipantAsCustomer, IParticipantAsPerson, IParticipantAsProject, IParticipantAsWebApplication } from '../../../action';
2
2
  import * as OrderFactory from '../../../order';
3
3
  import { IGood, IOwnershipInfo } from '../../../ownershipInfo';
4
- import * as SendActionFactory from '../send';
4
+ import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../send';
5
5
  export type IAgent = IParticipantAsPerson | IParticipantAsProject | IParticipantAsWebApplication;
6
6
  export type IRecipient = IParticipantAsWebApplication | IParticipantAsPerson | IParticipantAsCustomer;
7
7
  export type IObject = OrderFactory.ISimpleOrder & {
@@ -17,11 +17,11 @@ export type IObject = OrderFactory.ISimpleOrder & {
17
17
  * 注文配送結果としての所有権
18
18
  */
19
19
  export type IResult = Pick<IOwnershipInfo<IGood>, 'id' | 'identifier'>[];
20
- export interface IAttributes extends Pick<SendActionFactory.IAttributes<IObject, IResult>, 'typeOf' | 'result' | 'recipient' | 'project' | 'object' | 'error' | 'agent'> {
20
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'typeOf' | 'result' | 'recipient' | 'project' | 'object' | 'error' | 'agent'> {
21
21
  agent: IAgent;
22
22
  recipient: IRecipient;
23
23
  }
24
24
  /**
25
25
  * 注文配送アクション
26
26
  */
27
- export type IAction = SendActionFactory.IAction<IAttributes>;
27
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,18 +1,18 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
- export type IAgent = ActionFactory.IParticipant;
4
- export type IRecipient = ActionFactory.IParticipant;
3
+ export type IAgent = IParticipant;
4
+ export type IRecipient = IParticipant;
5
5
  export type IObject = any;
6
6
  export type IResult = any;
7
7
  export type IPotentialActions = any;
8
8
  export type IPurpose = any;
9
- export interface IAttributes<TObject, TResult> extends ActionFactory.IAttributes<ActionType.SendAction, TObject, TResult> {
9
+ export interface IAttributes<TObject, TResult> extends IBaseAttributes<ActionType.SendAction, TObject, TResult> {
10
10
  agent: IAgent;
11
- recipient: ActionFactory.IParticipant;
11
+ recipient: IParticipant;
12
12
  potentialActions?: IPotentialActions;
13
13
  purpose?: IPurpose;
14
14
  }
15
15
  /**
16
16
  * 送信(配送)アクションインターフェース
17
17
  */
18
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
18
+ export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipantAsPerson, IParticipantAsWebApplication, IParticipantAsSoftwareApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { IAbout as INoteAbout } from '../../creativeWork/noteDigitalDocument';
4
4
  import { CreativeWorkType } from '../../creativeWorkType';
@@ -8,7 +8,7 @@ import { ProductType } from '../../product';
8
8
  import { IObject } from './add/object';
9
9
  import { IInstrumentAsApplication } from './instrumentAsApplication';
10
10
  export * from './add/object';
11
- export type IAgent = ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsSoftwareApplication;
11
+ export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication | IParticipantAsSoftwareApplication;
12
12
  export interface IAddedObject {
13
13
  id: string;
14
14
  typeOf: CreativeWorkType.NoteDigitalDocument | ProductType | OfferType.Offer | 'ProductModel' | CreativeWorkType.Movie | EventType;
@@ -23,7 +23,7 @@ export interface ITargetCollectionAsResource {
23
23
  typeOf: ProductType | OfferType.Offer | 'ProductModel' | CreativeWorkType.Movie | EventType;
24
24
  }
25
25
  export type ITargetCollection = ITargetCollectionAsNote | ITargetCollectionAsResource;
26
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.AddAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
26
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.AddAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
27
27
  potentialActions?: never;
28
28
  purpose?: never;
29
29
  instrument: IInstrument;
@@ -32,4 +32,4 @@ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.A
32
32
  /**
33
33
  * 追加アクション
34
34
  */
35
- export type IAction = ActionFactory.IAction<IAttributes>;
35
+ export type IAction = IBaseAction<IAttributes>;
@@ -1,4 +1,4 @@
1
- import * as ActionFactory from '../../action';
1
+ import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { IAbout as INoteAbout } from '../../creativeWork/noteDigitalDocument';
4
4
  import { CreativeWorkType } from '../../creativeWorkType';
@@ -15,8 +15,8 @@ import { ISeller } from '../../seller';
15
15
  import { IObject as IPlaceOrderObject, ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
16
16
  import { IObject as IReturnOrderObject, ITransaction as IReturnOrder } from '../../transaction/returnOrder';
17
17
  import { TransactionType } from '../../transactionType';
18
- export type IAgent = ActionFactory.IParticipant;
19
- export type IRecipient = ActionFactory.IParticipant;
18
+ export type IAgent = IParticipant;
19
+ export type IRecipient = IParticipant;
20
20
  export type IObjectAsPerson = Pick<IPerson, 'id' | 'typeOf'> & {
21
21
  /**
22
22
  * ユーザープールから物理削除するかどうか
@@ -73,7 +73,7 @@ export interface ITargetCollectionAsNote {
73
73
  about: Pick<INoteAbout, 'typeOf'>;
74
74
  }
75
75
  export type ITargetCollection = ITargetCollectionAsNote;
76
- export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.DeleteAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
76
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.DeleteAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
77
77
  potentialActions?: never;
78
78
  purpose?: never;
79
79
  instrument?: IInstrument;
@@ -82,4 +82,4 @@ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.D
82
82
  /**
83
83
  * 削除アクション
84
84
  */
85
- export type IAction = ActionFactory.IAction<IAttributes>;
85
+ export type IAction = IBaseAction<IAttributes>;