@cinerino/sdk 16.3.0-alpha.5 → 16.3.0-alpha.7

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.
@@ -50,14 +50,9 @@ export interface IMinimalAuthorizeEventServiceResult {
50
50
  }
51
51
  export interface IOptionalConfirmResult {
52
52
  code?: string;
53
- eventId?: string;
54
53
  reservationIds?: string[];
55
54
  }
56
- export type IOrderAsConfirmResult = Pick<factory.order.IOrder, 'confirmationNumber' | 'orderNumber'> & {
57
- customer: {
58
- telephone: string;
59
- };
60
- };
55
+ export type IOrderAsConfirmResult = Pick<factory.order.IOrder, 'confirmationNumber' | 'orderNumber'> & {};
61
56
  export type IConfirmResult4tttsPOS = {
62
57
  order: IOrderAsConfirmResult;
63
58
  } & IOptionalConfirmResult;
@@ -65,6 +60,29 @@ export type IMinimalOrderAsConfirmResult = Pick<factory.order.IOrder, 'confirmat
65
60
  export interface IMinimalConfirmResult {
66
61
  order: IMinimalOrderAsConfirmResult;
67
62
  }
63
+ /**
64
+ * 注文取引確定時のEメール指定
65
+ */
66
+ export type IEmailCustomization = Pick<factory.creativeWork.message.email.ICustomization, 'text'> & {
67
+ /**
68
+ * 件名
69
+ */
70
+ about?: string;
71
+ /**
72
+ * 本文テンプレート
73
+ * 本文をカスタマイズしたい場合、PUGテンプレートを指定
74
+ * {@link https://pugjs.org/api/getting-started.html}
75
+ */
76
+ template?: string;
77
+ /**
78
+ * 受信者
79
+ */
80
+ toRecipient?: factory.creativeWork.message.email.ICustomizedParticipant;
81
+ /**
82
+ * 送信者
83
+ */
84
+ sender?: Pick<factory.creativeWork.message.email.ICustomizedParticipant, 'name'>;
85
+ };
68
86
  /**
69
87
  * 興行オファーチケット
70
88
  */
@@ -1,7 +1,7 @@
1
1
  import { factory } from '../../factory';
2
2
  import { Service } from '../../service';
3
3
  import { ISetProfileParams } from '../transaction';
4
- import { IConfirmResult4tttsPOS, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from './placeOrder/factory';
4
+ import { IEmailCustomization, IConfirmResult4tttsPOS, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from './placeOrder/factory';
5
5
  /**
6
6
  * 注文取引サービス
7
7
  */
@@ -39,11 +39,7 @@ export declare class PlaceOrderTransactionService extends Service {
39
39
  * 挿入変数として`order`を使用できます
40
40
  * 参考 -> https://pugjs.org/api/getting-started.html
41
41
  */
42
- email?: factory.creativeWork.message.email.ICustomization;
43
- /**
44
- * レスポンスを最小化する
45
- */
46
- expectsMinimalResponse?: boolean;
42
+ email?: IEmailCustomization;
47
43
  /**
48
44
  * @deprecated
49
45
  */
@@ -1,5 +1,5 @@
1
1
  import type { ISetProfileParams } from '../../../chevreTxn/transaction';
2
- import type { IConfirmResult4tttsPOS, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from '../../../chevreTxn/transaction/placeOrder/factory';
2
+ import type { IEmailCustomization, IConfirmResult4tttsPOS, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from '../../../chevreTxn/transaction/placeOrder/factory';
3
3
  import { factory } from '../../../factory';
4
4
  import { Service } from '../../../service';
5
5
  /**
@@ -31,7 +31,7 @@ export declare class PlaceOrderTransactionService extends Service {
31
31
  /**
32
32
  * 取引確定(レスポンス最小化)
33
33
  */
34
- confirmWithMiminalResponse(params: Pick<factory.transaction.placeOrder.IConfirmParams, 'id' | 'potentialActions'> & {
34
+ confirmWithMiminalResponse(params: Pick<factory.transaction.placeOrder.IConfirmParams, 'id'> & {
35
35
  /**
36
36
  * 注文配送メールを送信するかどうか
37
37
  */
@@ -42,9 +42,7 @@ export declare class PlaceOrderTransactionService extends Service {
42
42
  * 挿入変数として`order`を使用できます
43
43
  * 参考 -> https://pugjs.org/api/getting-started.html
44
44
  */
45
- email?: Omit<factory.creativeWork.message.email.ICustomization, 'sender'> & {
46
- sender?: Pick<factory.creativeWork.message.email.ICustomizedParticipant, 'name'>;
47
- };
45
+ email?: IEmailCustomization;
48
46
  }): Promise<IMinimalConfirmResult>;
49
47
  /**
50
48
  * 明示的に取引を中止する
@@ -2,19 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PlaceOrderTransactionService = void 0;
4
4
  const http_status_1 = require("http-status");
5
- // import { IAdditionalOptions, IOptions, Service } from '../../../service';
6
5
  const index_1 = require("../../../index");
7
6
  const service_1 = require("../../../service");
8
7
  /**
9
8
  * 注文取引サービス
10
9
  */
11
10
  class PlaceOrderTransactionService extends service_1.Service {
12
- // constructor(options: Pick<
13
- // IOptions,
14
- // 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'
15
- // > & IAdditionalOptions) {
16
- // super(options);
17
- // }
18
11
  /**
19
12
  * 取引開始
20
13
  */
@@ -111,7 +104,7 @@ class PlaceOrderTransactionService extends service_1.Service {
111
104
  * 取引確定(レスポンス最小化)
112
105
  */
113
106
  async confirmWithMiminalResponse(params) {
114
- const { id, potentialActions, sendEmailMessage, email } = params;
107
+ const { id, sendEmailMessage, email } = params;
115
108
  const { auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes } = this.options;
116
109
  const chevreTxn = await (0, index_1.loadChevreTxn)({ auth, endpoint, disableAutoRetry });
117
110
  const placeOrderService = await chevreTxn.createPlaceOrderTransactionInstance({
@@ -123,10 +116,7 @@ class PlaceOrderTransactionService extends service_1.Service {
123
116
  http_status_1.status.TOO_MANY_REQUESTS
124
117
  ]
125
118
  });
126
- return placeOrderService.confirm({
127
- id, potentialActions, sendEmailMessage, email,
128
- expectsMinimalResponse: true
129
- });
119
+ return placeOrderService.confirm({ id, sendEmailMessage, email });
130
120
  }
131
121
  /**
132
122
  * 明示的に取引を中止する