@cinerino/sdk 16.3.0-alpha.2 → 16.3.0-alpha.4
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/chevreAdmin/order.d.ts +1 -13
- package/lib/abstract/chevreAdmin/order.js +0 -12
- package/lib/abstract/chevreConsole/assetTransaction/pay.d.ts +0 -9
- package/lib/abstract/chevreConsole/assetTransaction/pay.js +0 -41
- package/lib/abstract/chevreConsole/order.js +0 -16
- package/lib/abstract/chevreTxn/transaction/placeOrder/factory.d.ts +2 -3
- package/lib/abstract/chevreTxn/transaction/placeOrder.d.ts +0 -6
- package/lib/abstract/chevreTxn/transaction/placeOrder.js +12 -8
- package/lib/abstract/cloud/admin/order.d.ts +0 -10
- package/lib/abstract/cloud/admin/order.js +0 -14
- package/lib/abstract/cloud/txn/transaction/placeOrder.js +0 -25
- package/lib/bundle.js +2 -2
- package/lib/bundle.js.map +3 -3
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IOrderAsSearchResult, IOrderAsFindAcceptedOffersResult, IReturner, IFindParams, IFindAcceptedOffersParams,
|
|
1
|
+
import { IOrderAsSearchResult, IOrderAsFindAcceptedOffersResult, IReturner, IFindParams, IFindAcceptedOffersParams, IUpdateChangeableAttributesParams } from '../chevreConsole/order/factory';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
3
|
import { Service } from '../service';
|
|
4
4
|
/**
|
|
@@ -17,18 +17,6 @@ export declare class OrderService extends Service {
|
|
|
17
17
|
* 注文オファーを検索する
|
|
18
18
|
*/
|
|
19
19
|
findOrderAcceptedOffers(params: IFindAcceptedOffersParams): Promise<IOrderAsFindAcceptedOffersResult[]>;
|
|
20
|
-
/**
|
|
21
|
-
* 注文取得
|
|
22
|
-
*/
|
|
23
|
-
findByOrderNumber(params: {
|
|
24
|
-
/**
|
|
25
|
-
* 注文番号
|
|
26
|
-
*/
|
|
27
|
-
orderNumber: string;
|
|
28
|
-
}, options: {
|
|
29
|
-
$projection?: IProjection;
|
|
30
|
-
$projectDisabled?: '1';
|
|
31
|
-
}): Promise<Pick<factory.order.IOrder, 'broker' | 'confirmationNumber' | 'customer' | 'dateReturned' | 'id' | 'identifier' | 'name' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'previousOrderStatus' | 'price' | 'priceCurrency' | 'project' | 'seller' | 'typeOf' | 'url'>>;
|
|
32
20
|
/**
|
|
33
21
|
* 返品者検索
|
|
34
22
|
*/
|
|
@@ -46,18 +46,6 @@ class OrderService extends service_1.Service {
|
|
|
46
46
|
})
|
|
47
47
|
.then(async (response) => response.json());
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
* 注文取得
|
|
51
|
-
*/
|
|
52
|
-
async findByOrderNumber(params, options) {
|
|
53
|
-
return this.fetch({
|
|
54
|
-
uri: `/orders/${params.orderNumber}`,
|
|
55
|
-
method: 'GET',
|
|
56
|
-
expectedStatusCodes: [http_status_1.status.OK],
|
|
57
|
-
qs: options
|
|
58
|
-
})
|
|
59
|
-
.then(async (response) => response.json());
|
|
60
|
-
}
|
|
61
49
|
/**
|
|
62
50
|
* 返品者検索
|
|
63
51
|
*/
|
|
@@ -15,15 +15,6 @@ export declare class PayAssetTransactionService extends Service {
|
|
|
15
15
|
check(params: factory.action.check.paymentMethod.movieTicket.IAttributes): Promise<{
|
|
16
16
|
result: ICheckMovieTicketResult;
|
|
17
17
|
}>;
|
|
18
|
-
/**
|
|
19
|
-
* 決済ロケーション無効化
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* 決済ロケーション発行
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* 取引開始
|
|
26
|
-
*/
|
|
27
18
|
/**
|
|
28
19
|
* 取引確定
|
|
29
20
|
*/
|
|
@@ -20,47 +20,6 @@ class PayAssetTransactionService extends service_1.Service {
|
|
|
20
20
|
})
|
|
21
21
|
.then(async (response) => response.json());
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* 決済ロケーション無効化
|
|
25
|
-
*/
|
|
26
|
-
// public async invalidatePaymentUrl(
|
|
27
|
-
// params: factory.task.refund.IData
|
|
28
|
-
// ): Promise<void> {
|
|
29
|
-
// await this.fetch({
|
|
30
|
-
// uri: `/assetTransactions/${factory.assetTransactionType.Pay}/invalidatePaymentUrl`,
|
|
31
|
-
// method: 'PUT',
|
|
32
|
-
// body: params,
|
|
33
|
-
// expectedStatusCodes: [status.NO_CONTENT]
|
|
34
|
-
// });
|
|
35
|
-
// }
|
|
36
|
-
/**
|
|
37
|
-
* 決済ロケーション発行
|
|
38
|
-
*/
|
|
39
|
-
// public async publishPaymentUrl(
|
|
40
|
-
// params: factory.assetTransaction.pay.IStartParamsWithoutDetail
|
|
41
|
-
// ): Promise<IPublishPaymentUrlResult> {
|
|
42
|
-
// return this.fetch({
|
|
43
|
-
// uri: `/assetTransactions/${factory.assetTransactionType.Pay}/publishPaymentUrl`,
|
|
44
|
-
// method: 'POST',
|
|
45
|
-
// body: params,
|
|
46
|
-
// expectedStatusCodes: [status.OK]
|
|
47
|
-
// })
|
|
48
|
-
// .then(async (response) => response.json());
|
|
49
|
-
// }
|
|
50
|
-
/**
|
|
51
|
-
* 取引開始
|
|
52
|
-
*/
|
|
53
|
-
// public async start(
|
|
54
|
-
// params: factory.assetTransaction.pay.IStartParamsWithoutDetail
|
|
55
|
-
// ): Promise<{ id: string }> {
|
|
56
|
-
// return this.fetch({
|
|
57
|
-
// uri: `/assetTransactions/${factory.assetTransactionType.Pay}/start`,
|
|
58
|
-
// method: 'POST',
|
|
59
|
-
// body: params,
|
|
60
|
-
// expectedStatusCodes: [status.OK]
|
|
61
|
-
// })
|
|
62
|
-
// .then(async (response) => response.json());
|
|
63
|
-
// }
|
|
64
23
|
/**
|
|
65
24
|
* 取引確定
|
|
66
25
|
*/
|
|
@@ -41,22 +41,6 @@ class OrderService extends service_1.Service {
|
|
|
41
41
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
// /**
|
|
45
|
-
// * 返品
|
|
46
|
-
// */
|
|
47
|
-
// public async returnOrder(params: {
|
|
48
|
-
// orderNumber: string;
|
|
49
|
-
// dateReturned: Date;
|
|
50
|
-
// returner: factory.order.IReturner;
|
|
51
|
-
// }): Promise<void> {
|
|
52
|
-
// const { dateReturned, orderNumber, returner } = params;
|
|
53
|
-
// await this.fetch({
|
|
54
|
-
// uri: `/orders/${orderNumber}/${factory.orderStatus.OrderReturned}`,
|
|
55
|
-
// method: 'PUT',
|
|
56
|
-
// body: { dateReturned, returner },
|
|
57
|
-
// expectedStatusCodes: [status.NO_CONTENT]
|
|
58
|
-
// });
|
|
59
|
-
// }
|
|
60
44
|
/**
|
|
61
45
|
* 注文に対するアクションを検索する
|
|
62
46
|
*/
|
|
@@ -12,13 +12,12 @@ export interface IStartParams {
|
|
|
12
12
|
*/
|
|
13
13
|
customer?: {
|
|
14
14
|
/**
|
|
15
|
-
* factory.personType.Personを指定すれば会員注文として
|
|
16
15
|
* factory.organizationType.Organizationを指定すれば顧客注文として
|
|
17
16
|
* 処理されます
|
|
18
17
|
*/
|
|
19
|
-
typeOf: factory.
|
|
18
|
+
typeOf: factory.organizationType.Organization;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* 顧客ID
|
|
22
21
|
*/
|
|
23
22
|
id?: string;
|
|
24
23
|
};
|
|
@@ -15,12 +15,6 @@ export declare class PlaceOrderTransactionService extends Service {
|
|
|
15
15
|
* 取引人プロフィール変更
|
|
16
16
|
*/
|
|
17
17
|
setProfile(params: ISetProfileParams): Promise<void>;
|
|
18
|
-
updateObject(params: {
|
|
19
|
-
id: string;
|
|
20
|
-
object: {
|
|
21
|
-
name?: string;
|
|
22
|
-
};
|
|
23
|
-
}): Promise<void>;
|
|
24
18
|
/**
|
|
25
19
|
* 取引期限変更
|
|
26
20
|
*/
|
|
@@ -32,14 +32,18 @@ class PlaceOrderTransactionService extends service_1.Service {
|
|
|
32
32
|
body: params.agent
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
// 進行中取引の名称変更は廃止(2026-06-11~)
|
|
36
|
+
// public async updateObject(params: {
|
|
37
|
+
// id: string;
|
|
38
|
+
// object: { name?: string };
|
|
39
|
+
// }): Promise<void> {
|
|
40
|
+
// await this.fetch({
|
|
41
|
+
// uri: `/transactions/${this.typeOf}/${params.id}/object`,
|
|
42
|
+
// method: 'PATCH',
|
|
43
|
+
// expectedStatusCodes: [status.NO_CONTENT],
|
|
44
|
+
// body: params.object
|
|
45
|
+
// });
|
|
46
|
+
// }
|
|
43
47
|
/**
|
|
44
48
|
* 取引期限変更
|
|
45
49
|
*/
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import { Service } from '../../service';
|
|
3
|
-
import { IOrderAsFindByConfirmationNumberResult } from '../../chevreAsset/order/factory';
|
|
4
3
|
import { IFindParams, IFindAcceptedOffersParams, IOrderAsSearchResult, IOrderAsFindAcceptedOffersResult, IReturner, IUpdateChangeableAttributesParams } from '../../chevreConsole/order/factory';
|
|
5
4
|
type IFindOrderParams = Pick<IFindParams, 'acceptedOffers' | 'confirmationNumbers' | 'customer' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'paymentMethods' | 'limit' | 'page' | 'sort'>;
|
|
6
5
|
/**
|
|
7
6
|
* 注文管理サービス
|
|
8
7
|
*/
|
|
9
8
|
export declare class OrderService extends Service {
|
|
10
|
-
/**
|
|
11
|
-
* 注文取得
|
|
12
|
-
*/
|
|
13
|
-
findByOrderNumber(params: {
|
|
14
|
-
/**
|
|
15
|
-
* 注文番号
|
|
16
|
-
*/
|
|
17
|
-
orderNumber: string;
|
|
18
|
-
}): Promise<IOrderAsFindByConfirmationNumberResult>;
|
|
19
9
|
/**
|
|
20
10
|
* 管理者による注文検索
|
|
21
11
|
*/
|
|
@@ -9,20 +9,6 @@ const MAX_SEARCH_LIMIT = 20;
|
|
|
9
9
|
* 注文管理サービス
|
|
10
10
|
*/
|
|
11
11
|
class OrderService extends service_1.Service {
|
|
12
|
-
/**
|
|
13
|
-
* 注文取得
|
|
14
|
-
*/
|
|
15
|
-
async findByOrderNumber(params) {
|
|
16
|
-
const { auth, endpoint, project, seller } = this.options;
|
|
17
|
-
const chevreAdmin = await (0, index_1.loadChevreAdmin)({ auth, endpoint });
|
|
18
|
-
const orderService = await chevreAdmin.createOrderInstance({
|
|
19
|
-
project,
|
|
20
|
-
seller: { id: (typeof seller?.id === 'string') ? seller.id : '' }
|
|
21
|
-
});
|
|
22
|
-
return orderService.findByOrderNumber({ orderNumber: String(params.orderNumber) }, {
|
|
23
|
-
// $projection: DEFAULT_PROJECTION
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
12
|
/**
|
|
27
13
|
* 管理者による注文検索
|
|
28
14
|
*/
|
|
@@ -106,18 +106,6 @@ class PlaceOrderTransactionService extends service_1.Service {
|
|
|
106
106
|
expectsReservationIds: true,
|
|
107
107
|
id
|
|
108
108
|
});
|
|
109
|
-
// return this.fetch({
|
|
110
|
-
// uri: `/transactions/${this.typeOf}/${params.id}/confirm`,
|
|
111
|
-
// method: 'PUT',
|
|
112
|
-
// expectedStatusCodes: [status.OK],
|
|
113
|
-
// // retry 429(2024-04-01~)
|
|
114
|
-
// // retry 409(2024-04-01~)
|
|
115
|
-
// retryableStatusCodes: [CONFLICT, TOO_MANY_REQUESTS],
|
|
116
|
-
// body: {
|
|
117
|
-
// expectsReservationIds: true
|
|
118
|
-
// }
|
|
119
|
-
// })
|
|
120
|
-
// .then(async (response) => response.json());
|
|
121
109
|
}
|
|
122
110
|
/**
|
|
123
111
|
* 取引確定(レスポンス最小化)
|
|
@@ -139,19 +127,6 @@ class PlaceOrderTransactionService extends service_1.Service {
|
|
|
139
127
|
id, potentialActions, result, sendEmailMessage, email,
|
|
140
128
|
expectsMinimalResponse: true
|
|
141
129
|
});
|
|
142
|
-
// return this.fetch({
|
|
143
|
-
// uri: `/transactions/${this.typeOf}/${params.id}/confirm`,
|
|
144
|
-
// method: 'PUT',
|
|
145
|
-
// expectedStatusCodes: [status.OK],
|
|
146
|
-
// // retry 429(2024-04-01~)
|
|
147
|
-
// // retry 409(2024-04-01~)
|
|
148
|
-
// retryableStatusCodes: [CONFLICT, TOO_MANY_REQUESTS],
|
|
149
|
-
// body: {
|
|
150
|
-
// ...params,
|
|
151
|
-
// expectsMinimalResponse: true
|
|
152
|
-
// }
|
|
153
|
-
// })
|
|
154
|
-
// .then(async (response) => response.json());
|
|
155
130
|
}
|
|
156
131
|
/**
|
|
157
132
|
* 明示的に取引を中止する
|