@cinerino/sdk 15.0.0-alpha.2 → 15.0.0-alpha.20
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/chevre/product.js +0 -17
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -1
- package/lib/abstract/chevreAdmin/order.d.ts +3 -23
- package/lib/abstract/chevreAdmin/order.js +2 -6
- package/lib/abstract/chevreAdmin/reservation.d.ts +44 -6
- package/lib/abstract/chevreAdmin/reservation.js +1 -1
- package/lib/abstract/chevreAdmin.d.ts +0 -9
- package/lib/abstract/chevreAdmin.js +0 -9
- package/lib/abstract/chevreConsole/accountingReport.d.ts +5 -5
- package/lib/abstract/chevreConsole/accountingReport.js +2 -9
- package/lib/abstract/chevreConsole/customerType.d.ts +3 -1
- package/lib/abstract/chevreConsole/iam.d.ts +9 -58
- package/lib/abstract/chevreConsole/iam.js +16 -92
- package/lib/abstract/chevreConsole/order/factory.d.ts +89 -1
- package/lib/abstract/chevreConsole/order.d.ts +0 -5
- package/lib/abstract/chevreConsole/order.js +0 -12
- package/lib/abstract/chevreConsole/person.d.ts +6 -54
- package/lib/abstract/chevreConsole/person.js +5 -65
- package/lib/abstract/chevreConsole.d.ts +0 -18
- package/lib/abstract/chevreConsole.js +0 -19
- package/lib/abstract/chevreTxn/offer.d.ts +1 -1
- package/lib/abstract/cloud/admin/eventSeries.d.ts +2 -3
- package/lib/abstract/cloud/admin/offer.d.ts +1 -1
- package/lib/abstract/cloud/admin/order.d.ts +4 -14
- package/lib/abstract/cloud/admin/order.js +15 -3
- package/lib/abstract/cloud/admin/reservation.d.ts +2 -1
- package/lib/abstract/cloud/admin/reservation.js +9 -9
- package/lib/abstract/cloud/search/product.js +0 -3
- package/lib/bundle.js +4 -4
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
- package/lib/abstract/chevreAdmin/authorization.d.ts +0 -72
- package/lib/abstract/chevreAdmin/authorization.js +0 -23
- package/lib/abstract/chevreConsole/advanceBookingRequirement.d.ts +0 -19
- package/lib/abstract/chevreConsole/advanceBookingRequirement.js +0 -46
- package/lib/abstract/chevreConsole/productModel.d.ts +0 -56
- package/lib/abstract/chevreConsole/productModel.js +0 -44
|
@@ -20,23 +20,6 @@ class ProductService extends service_1.Service {
|
|
|
20
20
|
})
|
|
21
21
|
.then(async (response) => response.json());
|
|
22
22
|
}
|
|
23
|
-
// discontinue(2025-08-20~)
|
|
24
|
-
// public async searchPaymentServices(params: Omit<factory.product.ISearchConditions, 'project' | 'typeOf'> & {
|
|
25
|
-
// // 必須化(2023-12-18~)
|
|
26
|
-
// typeOf: {
|
|
27
|
-
// $eq: factory.service.paymentService.PaymentServiceType.CreditCard;
|
|
28
|
-
// };
|
|
29
|
-
// }
|
|
30
|
-
// // & IProjectionSearchConditions // discontinue(2024-10-21~)
|
|
31
|
-
// ): Promise<IPaymentServiceWithoutCredentials[]> {
|
|
32
|
-
// return this.fetch({
|
|
33
|
-
// uri: '/products',
|
|
34
|
-
// method: 'GET',
|
|
35
|
-
// qs: params,
|
|
36
|
-
// expectedStatusCodes: [status.OK]
|
|
37
|
-
// })
|
|
38
|
-
// .then(async (response) => response.json());
|
|
39
|
-
// }
|
|
40
23
|
/**
|
|
41
24
|
* オファー検索
|
|
42
25
|
*/
|
|
@@ -56,7 +56,7 @@ export declare class EventSeriesService extends Service {
|
|
|
56
56
|
* 施設ID
|
|
57
57
|
*/
|
|
58
58
|
locationId: string;
|
|
59
|
-
offerType: factory.offerType.
|
|
59
|
+
offerType: factory.offerType.Offer;
|
|
60
60
|
upsert?: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* 関連リソースへの同期有無(2026-01-28~)
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { IAcceptedOffer, IOrderAsSearchResult, IOrderAsSearchWithUnwindAcceptedOffersResult, IReturner,
|
|
1
|
+
import { IAcceptedOffer, IOrderAsSearchResult, IOrderAsSearchWithUnwindAcceptedOffersResult, IReturner, IFindParams, IProjection, IUpdateChangeableAttributesParams } from '../chevreConsole/order/factory';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
|
-
import {
|
|
4
|
-
type IKeyOfProjection = keyof factory.order.IOrder | '_id';
|
|
5
|
-
/**
|
|
6
|
-
* 注文検索時projection
|
|
7
|
-
* 0->1(2024-07-29~)
|
|
8
|
-
*/
|
|
9
|
-
type IProjection = Partial<Record<IKeyOfProjection, 1>>;
|
|
3
|
+
import { Service } from '../service';
|
|
10
4
|
/**
|
|
11
5
|
* 注文サービス
|
|
12
6
|
*/
|
|
@@ -18,20 +12,7 @@ export declare class OrderService extends Service {
|
|
|
18
12
|
/**
|
|
19
13
|
* 注文を検索する
|
|
20
14
|
*/
|
|
21
|
-
|
|
22
|
-
$projection?: IProjection;
|
|
23
|
-
$projectDisabled?: '1';
|
|
24
|
-
} & ISearchOrdersOptions & {
|
|
25
|
-
/**
|
|
26
|
-
* min: 1
|
|
27
|
-
* max: 20
|
|
28
|
-
*/
|
|
29
|
-
limit: number;
|
|
30
|
-
/**
|
|
31
|
-
* min: 1
|
|
32
|
-
*/
|
|
33
|
-
page: number;
|
|
34
|
-
}): Promise<ISearchResult<IOrderAsSearchResult[] | IOrderAsSearchWithUnwindAcceptedOffersResult[]>>;
|
|
15
|
+
findOrders(params: IFindParams): Promise<IOrderAsSearchResult[] | IOrderAsSearchWithUnwindAcceptedOffersResult[]>;
|
|
35
16
|
/**
|
|
36
17
|
* 注文取得
|
|
37
18
|
*/
|
|
@@ -66,4 +47,3 @@ export declare class OrderService extends Service {
|
|
|
66
47
|
page?: number;
|
|
67
48
|
}): Promise<IAcceptedOffer[]>;
|
|
68
49
|
}
|
|
69
|
-
export {};
|
|
@@ -22,18 +22,14 @@ class OrderService extends service_1.Service {
|
|
|
22
22
|
/**
|
|
23
23
|
* 注文を検索する
|
|
24
24
|
*/
|
|
25
|
-
async
|
|
25
|
+
async findOrders(params) {
|
|
26
26
|
return this.fetch({
|
|
27
27
|
uri: '/orders',
|
|
28
28
|
method: 'GET',
|
|
29
29
|
qs: params,
|
|
30
30
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
31
31
|
})
|
|
32
|
-
.then(async (response) =>
|
|
33
|
-
return {
|
|
34
|
-
data: await response.json()
|
|
35
|
-
};
|
|
36
|
-
});
|
|
32
|
+
.then(async (response) => response.json());
|
|
37
33
|
}
|
|
38
34
|
/**
|
|
39
35
|
* 注文取得
|
|
@@ -4,11 +4,48 @@ import { Service } from '../service';
|
|
|
4
4
|
export interface IUseActionResult {
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 予約検索条件
|
|
9
|
+
*/
|
|
10
|
+
type IFindParams = Pick<factory.reservation.eventReservation.ISearchConditions, 'bookingFrom' | 'bookingThrough' | 'ids' | 'reservationNumbers' | 'reservationStatuses' | 'attended' | 'checkedIn'> & {
|
|
11
|
+
additionalTicketText?: string;
|
|
12
|
+
broker?: {
|
|
13
|
+
id?: string;
|
|
14
|
+
};
|
|
15
|
+
underName?: {
|
|
16
|
+
email?: {
|
|
17
|
+
$regex?: string;
|
|
18
|
+
};
|
|
19
|
+
telephone?: string;
|
|
20
|
+
givenName?: {
|
|
21
|
+
$regex?: string;
|
|
22
|
+
};
|
|
23
|
+
familyName?: {
|
|
24
|
+
$regex?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
reservationFor?: Pick<factory.reservation.eventReservation.IReservationForSearchConditions, 'startFrom' | 'startThrough' | 'ids'> & {
|
|
28
|
+
id?: string;
|
|
29
|
+
location?: {
|
|
30
|
+
branchCodes?: string[];
|
|
31
|
+
};
|
|
32
|
+
superEvent?: {
|
|
33
|
+
id?: string;
|
|
34
|
+
location?: {
|
|
35
|
+
ids?: string[];
|
|
36
|
+
branchCodes?: string[];
|
|
37
|
+
};
|
|
38
|
+
workPerformed?: {
|
|
39
|
+
identifiers?: string[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
reservedTicket?: {
|
|
44
|
+
ticketedSeat?: {
|
|
45
|
+
seatNumbers?: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
12
49
|
/**
|
|
13
50
|
* 予約サービス
|
|
14
51
|
*/
|
|
@@ -16,7 +53,8 @@ export declare class ReservationService extends Service {
|
|
|
16
53
|
/**
|
|
17
54
|
* 予約検索
|
|
18
55
|
*/
|
|
19
|
-
|
|
56
|
+
findReservations(params: IFindParams & {
|
|
57
|
+
$projection?: never;
|
|
20
58
|
/**
|
|
21
59
|
* min: 1
|
|
22
60
|
* max: 20
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IAdditionalOptions, IOptions, IUnset as IUnsetOnService } from './service';
|
|
2
2
|
import type { CancelReservationAssetTransactionService } from './chevreAdmin/assetTransaction/cancelReservation';
|
|
3
|
-
import type { AuthorizationService } from './chevreAdmin/authorization';
|
|
4
3
|
import type { CustomerService } from './chevreAdmin/customer';
|
|
5
4
|
import type { EventService } from './chevreAdmin/event';
|
|
6
5
|
import type { EventOfferService } from './chevreAdmin/eventOffer';
|
|
@@ -24,13 +23,6 @@ import type { SeatSectionService } from './chevreAdmin/seatSection';
|
|
|
24
23
|
import type { SellerService } from './chevreAdmin/seller';
|
|
25
24
|
export declare namespace service {
|
|
26
25
|
type IUnset = IUnsetOnService;
|
|
27
|
-
/**
|
|
28
|
-
* 承認サービス
|
|
29
|
-
*/
|
|
30
|
-
type Authorization = AuthorizationService;
|
|
31
|
-
namespace Authorization {
|
|
32
|
-
let svc: typeof AuthorizationService | undefined;
|
|
33
|
-
}
|
|
34
26
|
/**
|
|
35
27
|
* 顧客サービス
|
|
36
28
|
*/
|
|
@@ -194,7 +186,6 @@ export declare namespace service {
|
|
|
194
186
|
export declare class ChevreAdmin {
|
|
195
187
|
options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>;
|
|
196
188
|
constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>);
|
|
197
|
-
createAuthorizationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AuthorizationService>;
|
|
198
189
|
createCustomerInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CustomerService>;
|
|
199
190
|
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
200
191
|
createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
|
|
@@ -36,9 +36,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.ChevreAdmin = exports.service = void 0;
|
|
37
37
|
var service;
|
|
38
38
|
(function (service) {
|
|
39
|
-
let Authorization;
|
|
40
|
-
(function (Authorization) {
|
|
41
|
-
})(Authorization = service.Authorization || (service.Authorization = {}));
|
|
42
39
|
let Customer;
|
|
43
40
|
(function (Customer) {
|
|
44
41
|
})(Customer = service.Customer || (service.Customer = {}));
|
|
@@ -117,12 +114,6 @@ class ChevreAdmin {
|
|
|
117
114
|
constructor(options) {
|
|
118
115
|
this.options = options;
|
|
119
116
|
}
|
|
120
|
-
async createAuthorizationInstance(params) {
|
|
121
|
-
if (service.Authorization.svc === undefined) {
|
|
122
|
-
service.Authorization.svc = (await Promise.resolve().then(() => __importStar(require('./chevreAdmin/authorization.js')))).AuthorizationService;
|
|
123
|
-
}
|
|
124
|
-
return new service.Authorization.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
125
|
-
}
|
|
126
117
|
async createCustomerInstance(params) {
|
|
127
118
|
if (service.Customer.svc === undefined) {
|
|
128
119
|
service.Customer.svc = (await Promise.resolve().then(() => __importStar(require('./chevreAdmin/customer.js')))).CustomerService;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
|
-
import {
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
type IFindParams = Pick<factory.report.accountingReport.ISearchConditions, '$unwindAcceptedOffers' | 'limit' | 'order' | 'page'>;
|
|
4
|
+
type IReportAsFindResult = factory.report.accountingReport.IReport;
|
|
3
5
|
/**
|
|
4
6
|
* 経理レポートサービス
|
|
5
7
|
*/
|
|
6
8
|
export declare class AccountingReportService extends Service {
|
|
7
|
-
|
|
8
|
-
* 検索
|
|
9
|
-
*/
|
|
10
|
-
search(params: Omit<factory.report.accountingReport.ISearchConditions, 'project'>): Promise<ISearchResult<factory.report.accountingReport.IReport[]>>;
|
|
9
|
+
findAccountingReports(params: IFindParams): Promise<IReportAsFindResult[]>;
|
|
11
10
|
}
|
|
11
|
+
export {};
|
|
@@ -7,21 +7,14 @@ const service_1 = require("../service");
|
|
|
7
7
|
* 経理レポートサービス
|
|
8
8
|
*/
|
|
9
9
|
class AccountingReportService extends service_1.Service {
|
|
10
|
-
|
|
11
|
-
* 検索
|
|
12
|
-
*/
|
|
13
|
-
async search(params) {
|
|
10
|
+
async findAccountingReports(params) {
|
|
14
11
|
return this.fetch({
|
|
15
12
|
uri: '/accountingReports',
|
|
16
13
|
method: 'GET',
|
|
17
14
|
qs: params,
|
|
18
15
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
19
16
|
})
|
|
20
|
-
.then(async (response) =>
|
|
21
|
-
return {
|
|
22
|
-
data: await response.json()
|
|
23
|
-
};
|
|
24
|
-
});
|
|
17
|
+
.then(async (response) => response.json());
|
|
25
18
|
}
|
|
26
19
|
}
|
|
27
20
|
exports.AccountingReportService = AccountingReportService;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
+
type ICustomerType = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'id' | 'name' | 'typeOf'>;
|
|
3
4
|
/**
|
|
4
5
|
* カスタマータイプサービス
|
|
5
6
|
*/
|
|
@@ -7,5 +8,6 @@ export declare class CustomerTypeService extends Service {
|
|
|
7
8
|
/**
|
|
8
9
|
* 検索
|
|
9
10
|
*/
|
|
10
|
-
search(params: Pick<factory.categoryCode.ISearchConditions, 'codeValue' | 'limit' | 'page' | 'sort'>): Promise<
|
|
11
|
+
search(params: Pick<factory.categoryCode.ISearchConditions, 'codeValue' | 'limit' | 'page' | 'sort'>): Promise<ICustomerType[]>;
|
|
11
12
|
}
|
|
13
|
+
export {};
|
|
@@ -4,59 +4,22 @@ import { ISearchResult, Service } from '../service';
|
|
|
4
4
|
* IAMサービス
|
|
5
5
|
*/
|
|
6
6
|
export declare class IAMService extends Service {
|
|
7
|
-
/**
|
|
8
|
-
* ユーザー検索
|
|
9
|
-
*/
|
|
10
|
-
searchUsers(params: {
|
|
11
|
-
id?: string;
|
|
12
|
-
username?: string;
|
|
13
|
-
email?: string;
|
|
14
|
-
telephone?: string;
|
|
15
|
-
givenName?: string;
|
|
16
|
-
familyName?: string;
|
|
17
|
-
}): Promise<ISearchResult<factory.person.IPerson[]>>;
|
|
18
|
-
/**
|
|
19
|
-
* ユーザー取得
|
|
20
|
-
*/
|
|
21
|
-
findUserById(params: {
|
|
22
|
-
id: string;
|
|
23
|
-
}): Promise<factory.person.IPerson>;
|
|
24
|
-
/**
|
|
25
|
-
* プロフィール検索
|
|
26
|
-
*/
|
|
27
|
-
getUserProfile(params: {
|
|
28
|
-
id: string;
|
|
29
|
-
}): Promise<factory.person.IProfile>;
|
|
30
|
-
/**
|
|
31
|
-
* プロフィール更新
|
|
32
|
-
*/
|
|
33
|
-
updateUserProfile(params: factory.person.IProfile & {
|
|
34
|
-
id: string;
|
|
35
|
-
}): Promise<void>;
|
|
36
7
|
/**
|
|
37
8
|
* IAMロール検索
|
|
38
9
|
*/
|
|
39
|
-
|
|
10
|
+
findRoles(params: factory.role.organizationRole.ISearchConditions): Promise<factory.role.organizationRole.IRole[]>;
|
|
40
11
|
/**
|
|
41
12
|
* IAMメンバー作成
|
|
42
13
|
*/
|
|
43
|
-
|
|
14
|
+
addProjectMember(params: factory.iam.IMember[]): Promise<void>;
|
|
44
15
|
/**
|
|
45
16
|
* IAMプロジェクトメンバー検索
|
|
46
17
|
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* IAMメンバー取得
|
|
50
|
-
*/
|
|
51
|
-
findMemberById(params: {
|
|
52
|
-
member: {
|
|
53
|
-
id: string;
|
|
54
|
-
};
|
|
55
|
-
}): Promise<factory.iam.IMember>;
|
|
18
|
+
findProjectMembers(params: factory.iam.ISearchConditions): Promise<factory.iam.IMember[]>;
|
|
56
19
|
/**
|
|
57
20
|
* IAMメンバー更新
|
|
58
21
|
*/
|
|
59
|
-
|
|
22
|
+
updateProjectMember(params: {
|
|
60
23
|
member: {
|
|
61
24
|
id: string;
|
|
62
25
|
hasRole: {
|
|
@@ -71,27 +34,11 @@ export declare class IAMService extends Service {
|
|
|
71
34
|
/**
|
|
72
35
|
* IAMメンバー削除
|
|
73
36
|
*/
|
|
74
|
-
|
|
37
|
+
deleteProjectMember(params: {
|
|
75
38
|
member: {
|
|
76
39
|
id: string;
|
|
77
40
|
};
|
|
78
41
|
}): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* IAMメンバープロフィール検索
|
|
81
|
-
*/
|
|
82
|
-
getMemberProfile(params: {
|
|
83
|
-
member: {
|
|
84
|
-
id: string;
|
|
85
|
-
};
|
|
86
|
-
}): Promise<factory.person.IProfile>;
|
|
87
|
-
/**
|
|
88
|
-
* IAMメンバープロフィール更新
|
|
89
|
-
*/
|
|
90
|
-
updateMemberProfile(params: {
|
|
91
|
-
member: factory.person.IProfile & {
|
|
92
|
-
id: string;
|
|
93
|
-
};
|
|
94
|
-
}): Promise<void>;
|
|
95
42
|
/**
|
|
96
43
|
* カスタマーメンバー検索
|
|
97
44
|
* project.id:*を含む
|
|
@@ -114,4 +61,8 @@ export declare class IAMService extends Service {
|
|
|
114
61
|
}): Promise<ISearchResult<{
|
|
115
62
|
member: Pick<factory.iam.IMemberOfRole, 'hasRole' | 'id' | 'name' | 'memberOf'>;
|
|
116
63
|
}[]>>;
|
|
64
|
+
/**
|
|
65
|
+
* プロジェクトメンバーとしてのme(リクエストユーザー自身)を参照する
|
|
66
|
+
*/
|
|
67
|
+
findMeAsProjectMember(): Promise<factory.iam.IMember>;
|
|
117
68
|
}
|
|
@@ -7,60 +7,10 @@ const service_1 = require("../service");
|
|
|
7
7
|
* IAMサービス
|
|
8
8
|
*/
|
|
9
9
|
class IAMService extends service_1.Service {
|
|
10
|
-
/**
|
|
11
|
-
* ユーザー検索
|
|
12
|
-
*/
|
|
13
|
-
async searchUsers(params) {
|
|
14
|
-
return this.fetch({
|
|
15
|
-
uri: '/iam/users',
|
|
16
|
-
method: 'GET',
|
|
17
|
-
qs: params,
|
|
18
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
19
|
-
})
|
|
20
|
-
.then(async (response) => {
|
|
21
|
-
return {
|
|
22
|
-
data: await response.json()
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* ユーザー取得
|
|
28
|
-
*/
|
|
29
|
-
async findUserById(params) {
|
|
30
|
-
return this.fetch({
|
|
31
|
-
uri: `/iam/users/${params.id}`,
|
|
32
|
-
method: 'GET',
|
|
33
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
34
|
-
})
|
|
35
|
-
.then(async (response) => response.json());
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* プロフィール検索
|
|
39
|
-
*/
|
|
40
|
-
async getUserProfile(params) {
|
|
41
|
-
return this.fetch({
|
|
42
|
-
uri: `/iam/users/${params.id}/profile`,
|
|
43
|
-
method: 'GET',
|
|
44
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
45
|
-
})
|
|
46
|
-
.then(async (response) => response.json());
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* プロフィール更新
|
|
50
|
-
*/
|
|
51
|
-
async updateUserProfile(params) {
|
|
52
|
-
const { id, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
53
|
-
await this.fetch({
|
|
54
|
-
uri: `/iam/users/${params.id}/profile`,
|
|
55
|
-
method: 'PATCH',
|
|
56
|
-
body: query,
|
|
57
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
10
|
/**
|
|
61
11
|
* IAMロール検索
|
|
62
12
|
*/
|
|
63
|
-
async
|
|
13
|
+
async findRoles(params) {
|
|
64
14
|
return this.fetch({
|
|
65
15
|
uri: '/iam/roles',
|
|
66
16
|
method: 'GET',
|
|
@@ -72,7 +22,7 @@ class IAMService extends service_1.Service {
|
|
|
72
22
|
/**
|
|
73
23
|
* IAMメンバー作成
|
|
74
24
|
*/
|
|
75
|
-
async
|
|
25
|
+
async addProjectMember(params) {
|
|
76
26
|
await this.fetch({
|
|
77
27
|
uri: '/iam/members',
|
|
78
28
|
method: 'POST',
|
|
@@ -83,34 +33,19 @@ class IAMService extends service_1.Service {
|
|
|
83
33
|
/**
|
|
84
34
|
* IAMプロジェクトメンバー検索
|
|
85
35
|
*/
|
|
86
|
-
async
|
|
36
|
+
async findProjectMembers(params) {
|
|
87
37
|
return this.fetch({
|
|
88
38
|
uri: '/iam/members',
|
|
89
39
|
method: 'GET',
|
|
90
40
|
qs: params,
|
|
91
41
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
92
|
-
})
|
|
93
|
-
.then(async (response) => {
|
|
94
|
-
return {
|
|
95
|
-
data: await response.json()
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* IAMメンバー取得
|
|
101
|
-
*/
|
|
102
|
-
async findMemberById(params) {
|
|
103
|
-
return this.fetch({
|
|
104
|
-
uri: `/iam/members/${params.member.id}`,
|
|
105
|
-
method: 'GET',
|
|
106
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
107
42
|
})
|
|
108
43
|
.then(async (response) => response.json());
|
|
109
44
|
}
|
|
110
45
|
/**
|
|
111
46
|
* IAMメンバー更新
|
|
112
47
|
*/
|
|
113
|
-
async
|
|
48
|
+
async updateProjectMember(params) {
|
|
114
49
|
await this.fetch({
|
|
115
50
|
uri: `/iam/members/${params.member.id}`,
|
|
116
51
|
method: 'PUT',
|
|
@@ -121,35 +56,13 @@ class IAMService extends service_1.Service {
|
|
|
121
56
|
/**
|
|
122
57
|
* IAMメンバー削除
|
|
123
58
|
*/
|
|
124
|
-
async
|
|
59
|
+
async deleteProjectMember(params) {
|
|
125
60
|
await this.fetch({
|
|
126
61
|
uri: `/iam/members/${params.member.id}`,
|
|
127
62
|
method: 'DELETE',
|
|
128
63
|
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
129
64
|
});
|
|
130
65
|
}
|
|
131
|
-
/**
|
|
132
|
-
* IAMメンバープロフィール検索
|
|
133
|
-
*/
|
|
134
|
-
async getMemberProfile(params) {
|
|
135
|
-
return this.fetch({
|
|
136
|
-
uri: `/iam/members/${params.member.id}/profile`,
|
|
137
|
-
method: 'GET',
|
|
138
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
139
|
-
})
|
|
140
|
-
.then(async (response) => response.json());
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* IAMメンバープロフィール更新
|
|
144
|
-
*/
|
|
145
|
-
async updateMemberProfile(params) {
|
|
146
|
-
await this.fetch({
|
|
147
|
-
uri: `/iam/members/${params.member.id}/profile`,
|
|
148
|
-
method: 'PATCH',
|
|
149
|
-
body: params.member,
|
|
150
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
66
|
/**
|
|
154
67
|
* カスタマーメンバー検索
|
|
155
68
|
* project.id:*を含む
|
|
@@ -167,5 +80,16 @@ class IAMService extends service_1.Service {
|
|
|
167
80
|
};
|
|
168
81
|
});
|
|
169
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* プロジェクトメンバーとしてのme(リクエストユーザー自身)を参照する
|
|
85
|
+
*/
|
|
86
|
+
async findMeAsProjectMember() {
|
|
87
|
+
return this.fetch({
|
|
88
|
+
uri: '/iam/members/me',
|
|
89
|
+
method: 'GET',
|
|
90
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
91
|
+
})
|
|
92
|
+
.then(async (response) => response.json());
|
|
93
|
+
}
|
|
170
94
|
}
|
|
171
95
|
exports.IAMService = IAMService;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
|
+
type IKeyOfProjection = keyof factory.order.IOrder | '_id';
|
|
3
|
+
/**
|
|
4
|
+
* 注文検索時projection
|
|
5
|
+
* 0->1(2024-07-29~)
|
|
6
|
+
*/
|
|
7
|
+
export type IProjection = Partial<Record<IKeyOfProjection, 1>>;
|
|
2
8
|
/**
|
|
3
9
|
* オファー展開の検索結果としての注文
|
|
4
10
|
*/
|
|
@@ -15,9 +21,90 @@ export interface ISearchOrdersOptions {
|
|
|
15
21
|
*/
|
|
16
22
|
$unwindAcceptedOffers?: '1';
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 管理者による注文検索条件
|
|
26
|
+
*/
|
|
27
|
+
export type IFindParams = Pick<factory.order.ISearchConditions, 'confirmationNumbers' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'sort'> & {
|
|
28
|
+
$projection?: IProjection;
|
|
29
|
+
$projectDisabled?: '1';
|
|
30
|
+
} & ISearchOrdersOptions & {
|
|
31
|
+
/**
|
|
32
|
+
* min: 1
|
|
33
|
+
* max: 20
|
|
34
|
+
*/
|
|
35
|
+
limit: number;
|
|
36
|
+
/**
|
|
37
|
+
* min: 1
|
|
38
|
+
*/
|
|
39
|
+
page: number;
|
|
40
|
+
customer?: Pick<factory.order.ICustomerSearchConditions, 'identifiers' | 'ids'> & {
|
|
41
|
+
givenName?: {
|
|
42
|
+
$eq?: string;
|
|
43
|
+
$regex?: string;
|
|
44
|
+
};
|
|
45
|
+
familyName?: {
|
|
46
|
+
$eq?: string;
|
|
47
|
+
$regex?: string;
|
|
48
|
+
};
|
|
49
|
+
email?: {
|
|
50
|
+
$eq?: string;
|
|
51
|
+
$regex?: string;
|
|
52
|
+
};
|
|
53
|
+
telephone?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* 決済方法
|
|
57
|
+
*/
|
|
58
|
+
paymentMethods?: Pick<factory.order.IPaymentMethodsSearchConditions, 'accountIds' | 'paymentMethodIds'> & {
|
|
59
|
+
/**
|
|
60
|
+
* 決済方法区分コード
|
|
61
|
+
*/
|
|
62
|
+
typeOfs?: string[];
|
|
63
|
+
/**
|
|
64
|
+
* 追加特性
|
|
65
|
+
*/
|
|
66
|
+
additionalProperty?: {
|
|
67
|
+
/**
|
|
68
|
+
* すべてに一致する
|
|
69
|
+
*/
|
|
70
|
+
$all?: factory.order.IIdentifier;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* オファー
|
|
75
|
+
*/
|
|
76
|
+
acceptedOffers?: {
|
|
77
|
+
itemOffered?: {
|
|
78
|
+
/**
|
|
79
|
+
* 予約ID
|
|
80
|
+
*/
|
|
81
|
+
ids?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* 予約番号
|
|
84
|
+
*/
|
|
85
|
+
reservationNumbers?: string[];
|
|
86
|
+
reservationFor?: Pick<factory.order.IReservationForSearchConditions, 'ids' | 'location' | 'startFrom' | 'startThrough' | 'inSessionFrom' | 'inSessionThrough'> & {
|
|
87
|
+
superEvent?: {
|
|
88
|
+
/**
|
|
89
|
+
* 施設コンテンツID
|
|
90
|
+
*/
|
|
91
|
+
ids?: string[];
|
|
92
|
+
/**
|
|
93
|
+
* 施設
|
|
94
|
+
*/
|
|
95
|
+
location?: {
|
|
96
|
+
/**
|
|
97
|
+
* 施設コード
|
|
98
|
+
*/
|
|
99
|
+
branchCodes?: string[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
18
106
|
export type IAcceptedOffer = factory.order.IAcceptedOffer;
|
|
19
107
|
export type IReturner = Pick<factory.iam.IMemberOfRole, 'typeOf' | 'id' | 'name'>;
|
|
20
|
-
export type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | 'seller' | 'customer' | 'confirmationNumber' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'name' | 'orderStatus' | 'orderedItem' | 'paymentMethods'>;
|
|
21
108
|
export interface IUpdateChangeableAttributesParams {
|
|
22
109
|
confirmationNumber: string;
|
|
23
110
|
orderNumber: string;
|
|
@@ -26,3 +113,4 @@ export interface IUpdateChangeableAttributesParams {
|
|
|
26
113
|
*/
|
|
27
114
|
name?: string;
|
|
28
115
|
}
|
|
116
|
+
export {};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
import { IExternalOrder } from './order/factory';
|
|
4
3
|
/**
|
|
5
4
|
* 注文サービス
|
|
6
5
|
*/
|
|
7
6
|
export declare class OrderService extends Service {
|
|
8
|
-
/**
|
|
9
|
-
* 取引なしに作成する
|
|
10
|
-
*/
|
|
11
|
-
createWithoutTransaction(params: IExternalOrder): Promise<IExternalOrder>;
|
|
12
7
|
/**
|
|
13
8
|
* 決済取引確定
|
|
14
9
|
*/
|