@cinerino/sdk 16.3.0-alpha.3 → 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/order.js +0 -16
- 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
|
*/
|
|
@@ -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
|
*/
|
|
@@ -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
|
* 明示的に取引を中止する
|