@cinerino/sdk 16.3.0-alpha.6 → 16.3.0-alpha.8
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.
- package/lib/abstract/chevreConsole/emailMessage.d.ts +11 -12
- package/lib/abstract/chevreConsole/emailMessage.js +2 -18
- package/lib/abstract/chevreTxn/transaction/placeOrder/factory.d.ts +23 -0
- package/lib/abstract/chevreTxn/transaction/placeOrder.d.ts +2 -6
- package/lib/abstract/cloud/txn/transaction/placeOrder.d.ts +2 -4
- package/lib/abstract/cloud/txn/transaction/placeOrder.js +1 -11
- package/lib/bundle.js +2 -2
- package/lib/bundle.js.map +2 -2
- package/package.json +1 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
|
-
import {
|
|
3
|
-
export type IEmailMessage =
|
|
2
|
+
import { IUnset, Service } from '../service';
|
|
3
|
+
export type IEmailMessage = Pick<factory.creativeWork.message.email.ICreativeWork, 'about' | 'identifier' | 'name' | 'project' | 'sender' | 'text' | 'typeOf'> & {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
4
6
|
export interface ISearchConditions {
|
|
5
7
|
limit?: number;
|
|
6
8
|
page?: number;
|
|
9
|
+
id?: {
|
|
10
|
+
$eq?: string;
|
|
11
|
+
};
|
|
7
12
|
identifier?: {
|
|
8
13
|
$eq?: string;
|
|
9
14
|
};
|
|
10
15
|
about?: {
|
|
11
16
|
identifier?: {
|
|
12
|
-
$eq?: factory.creativeWork.message.email.AboutIdentifier;
|
|
17
|
+
$eq?: factory.creativeWork.message.email.AboutIdentifier.OnEventStatusChanged;
|
|
13
18
|
};
|
|
14
19
|
};
|
|
15
20
|
}
|
|
@@ -20,25 +25,19 @@ export declare class EmailMessageService extends Service {
|
|
|
20
25
|
/**
|
|
21
26
|
* 作成
|
|
22
27
|
*/
|
|
23
|
-
create(params: IEmailMessage): Promise<{
|
|
28
|
+
create(params: Omit<IEmailMessage, 'id' | 'project'>): Promise<{
|
|
24
29
|
id: string;
|
|
25
30
|
}>;
|
|
26
|
-
/**
|
|
27
|
-
* 取得
|
|
28
|
-
*/
|
|
29
|
-
findById(params: {
|
|
30
|
-
id: string;
|
|
31
|
-
}): Promise<IEmailMessage>;
|
|
32
31
|
/**
|
|
33
32
|
* 検索
|
|
34
33
|
*/
|
|
35
|
-
|
|
34
|
+
findEmailMessages(params: ISearchConditions): Promise<IEmailMessage[]>;
|
|
36
35
|
/**
|
|
37
36
|
* 編集
|
|
38
37
|
*/
|
|
39
38
|
update(params: {
|
|
40
39
|
id: string;
|
|
41
|
-
attributes: IEmailMessage & IUnset;
|
|
40
|
+
attributes: Omit<IEmailMessage, 'id' | 'project'> & IUnset;
|
|
42
41
|
}): Promise<void>;
|
|
43
42
|
/**
|
|
44
43
|
* 削除
|
|
@@ -19,33 +19,17 @@ class EmailMessageService extends service_1.Service {
|
|
|
19
19
|
})
|
|
20
20
|
.then(async (response) => response.json());
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
23
|
-
* 取得
|
|
24
|
-
*/
|
|
25
|
-
async findById(params) {
|
|
26
|
-
return this.fetch({
|
|
27
|
-
uri: `/emailMessages/${params.id}`,
|
|
28
|
-
method: 'GET',
|
|
29
|
-
// qs: params,
|
|
30
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
31
|
-
})
|
|
32
|
-
.then(async (response) => response.json());
|
|
33
|
-
}
|
|
34
22
|
/**
|
|
35
23
|
* 検索
|
|
36
24
|
*/
|
|
37
|
-
async
|
|
25
|
+
async findEmailMessages(params) {
|
|
38
26
|
return this.fetch({
|
|
39
27
|
uri: '/emailMessages',
|
|
40
28
|
method: 'GET',
|
|
41
29
|
qs: params,
|
|
42
30
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
43
31
|
})
|
|
44
|
-
.then(async (response) =>
|
|
45
|
-
return {
|
|
46
|
-
data: await response.json()
|
|
47
|
-
};
|
|
48
|
-
});
|
|
32
|
+
.then(async (response) => response.json());
|
|
49
33
|
}
|
|
50
34
|
/**
|
|
51
35
|
* 編集
|
|
@@ -60,6 +60,29 @@ export type IMinimalOrderAsConfirmResult = Pick<factory.order.IOrder, 'confirmat
|
|
|
60
60
|
export interface IMinimalConfirmResult {
|
|
61
61
|
order: IMinimalOrderAsConfirmResult;
|
|
62
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
|
+
};
|
|
63
86
|
/**
|
|
64
87
|
* 興行オファーチケット
|
|
65
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?:
|
|
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
|
/**
|
|
@@ -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?:
|
|
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
|
*/
|
|
@@ -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, sendEmailMessage, email,
|
|
128
|
-
expectsMinimalResponse: true
|
|
129
|
-
});
|
|
119
|
+
return placeOrderService.confirm({ id, sendEmailMessage, email });
|
|
130
120
|
}
|
|
131
121
|
/**
|
|
132
122
|
* 明示的に取引を中止する
|