@cinerino/sdk 15.0.0-alpha.2 → 15.0.0-alpha.21
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/offerCatalog.js +0 -32
- package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +0 -22
- package/lib/abstract/chevreConsole/offerCatalogItem.js +0 -11
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.21",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"watchify": "3.11.1"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@chevre/factory": "8.
|
|
75
|
+
"@chevre/factory": "8.1.0-alpha.7",
|
|
76
76
|
"debug": "4.4.3",
|
|
77
77
|
"http-status": "2.1.0",
|
|
78
78
|
"idtoken-verifier": "2.2.4",
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { factory } from '../factory';
|
|
2
|
-
import { Service } from '../service';
|
|
3
|
-
type AVAILABLE_ROLE_NAMES =
|
|
4
|
-
/**
|
|
5
|
-
* プロジェクト在庫管理
|
|
6
|
-
*/
|
|
7
|
-
'inventoryManager'
|
|
8
|
-
/**
|
|
9
|
-
* 販売者在庫管理
|
|
10
|
-
*/
|
|
11
|
-
| 'sellers.inventoryManager';
|
|
12
|
-
export interface IObjectAsRole {
|
|
13
|
-
typeOf: factory.role.RoleType.OrganizationRole;
|
|
14
|
-
member: {
|
|
15
|
-
/**
|
|
16
|
-
* 承認相手に与えるロール
|
|
17
|
-
*/
|
|
18
|
-
hasRole: [{
|
|
19
|
-
roleName: AVAILABLE_ROLE_NAMES;
|
|
20
|
-
}];
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 承認作成パラメータ
|
|
25
|
-
*/
|
|
26
|
-
export interface ICreateParams {
|
|
27
|
-
/**
|
|
28
|
-
* 何を
|
|
29
|
-
* ロールを指定
|
|
30
|
-
*/
|
|
31
|
-
object: IObjectAsRole;
|
|
32
|
-
/**
|
|
33
|
-
* いつまで
|
|
34
|
-
* max: 1day
|
|
35
|
-
*/
|
|
36
|
-
expiresInSeconds: number;
|
|
37
|
-
/**
|
|
38
|
-
* 誰に
|
|
39
|
-
* メンバーIDを指定
|
|
40
|
-
*/
|
|
41
|
-
audience: Pick<factory.authorization.IAudience, 'id'>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* 作成済承認
|
|
45
|
-
*/
|
|
46
|
-
export interface ICreatedAuthorization {
|
|
47
|
-
/**
|
|
48
|
-
* トークン発行リクエスト情報
|
|
49
|
-
*/
|
|
50
|
-
potentialAction: {
|
|
51
|
-
target: {
|
|
52
|
-
/**
|
|
53
|
-
* リクエストメソッド
|
|
54
|
-
*/
|
|
55
|
-
httpMethod: string;
|
|
56
|
-
/**
|
|
57
|
-
* エンドポイント
|
|
58
|
-
*/
|
|
59
|
-
urlTemplate: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* 承認サービス
|
|
65
|
-
*/
|
|
66
|
-
export declare class AuthorizationService extends Service {
|
|
67
|
-
/**
|
|
68
|
-
* 承認発行
|
|
69
|
-
*/
|
|
70
|
-
create(params: ICreateParams[]): Promise<(ICreatedAuthorization & Pick<factory.authorization.IAuthorization, 'code'>)[]>;
|
|
71
|
-
}
|
|
72
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthorizationService = void 0;
|
|
4
|
-
const http_status_1 = require("http-status");
|
|
5
|
-
const service_1 = require("../service");
|
|
6
|
-
/**
|
|
7
|
-
* 承認サービス
|
|
8
|
-
*/
|
|
9
|
-
class AuthorizationService extends service_1.Service {
|
|
10
|
-
/**
|
|
11
|
-
* 承認発行
|
|
12
|
-
*/
|
|
13
|
-
async create(params) {
|
|
14
|
-
return this.fetch({
|
|
15
|
-
uri: '/authorizations',
|
|
16
|
-
method: 'POST',
|
|
17
|
-
body: params,
|
|
18
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
19
|
-
})
|
|
20
|
-
.then(async (response) => response.json());
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.AuthorizationService = AuthorizationService;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { factory } from '../factory';
|
|
2
|
-
import { Service } from '../service';
|
|
3
|
-
type ISavingRequirement = Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'identifier' | 'description' | 'maxValue' | 'minValue' | 'valueReference'>;
|
|
4
|
-
/**
|
|
5
|
-
* 事前予約要件サービス
|
|
6
|
-
*/
|
|
7
|
-
export declare class AdvanceBookingRequirementService extends Service {
|
|
8
|
-
create(params: ISavingRequirement): Promise<{
|
|
9
|
-
id: string;
|
|
10
|
-
}>;
|
|
11
|
-
projectFields(params: Omit<factory.advanceBookingRequirement.ISearchConditions, 'project'>): Promise<Pick<factory.advanceBookingRequirement.IAdvanceBookingRequirement, 'description' | 'id' | 'identifier' | 'maxValue' | 'minValue' | 'typeOf' | 'unitCode' | 'valueReference'>[]>;
|
|
12
|
-
updateById(params: ISavingRequirement & {
|
|
13
|
-
id: string;
|
|
14
|
-
}): Promise<void>;
|
|
15
|
-
deleteById(params: {
|
|
16
|
-
id: string;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdvanceBookingRequirementService = void 0;
|
|
4
|
-
const http_status_1 = require("http-status");
|
|
5
|
-
const service_1 = require("../service");
|
|
6
|
-
/**
|
|
7
|
-
* 事前予約要件サービス
|
|
8
|
-
*/
|
|
9
|
-
class AdvanceBookingRequirementService extends service_1.Service {
|
|
10
|
-
async create(params) {
|
|
11
|
-
return this.fetch({
|
|
12
|
-
uri: '/advanceBookingRequirements',
|
|
13
|
-
method: 'POST',
|
|
14
|
-
body: params,
|
|
15
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
16
|
-
})
|
|
17
|
-
.then(async (response) => response.json());
|
|
18
|
-
}
|
|
19
|
-
async projectFields(params) {
|
|
20
|
-
return this.fetch({
|
|
21
|
-
uri: '/advanceBookingRequirements',
|
|
22
|
-
method: 'GET',
|
|
23
|
-
qs: params,
|
|
24
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
25
|
-
})
|
|
26
|
-
.then(async (response) => response.json());
|
|
27
|
-
}
|
|
28
|
-
async updateById(params) {
|
|
29
|
-
const { id, ...body } = params;
|
|
30
|
-
await this.fetch({
|
|
31
|
-
uri: `/advanceBookingRequirements/${encodeURIComponent(String(id))}`,
|
|
32
|
-
method: 'PUT',
|
|
33
|
-
body,
|
|
34
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
async deleteById(params) {
|
|
38
|
-
const { id } = params;
|
|
39
|
-
await this.fetch({
|
|
40
|
-
uri: `/advanceBookingRequirements/${encodeURIComponent(String(id))}`,
|
|
41
|
-
method: 'DELETE',
|
|
42
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.AdvanceBookingRequirementService = AdvanceBookingRequirementService;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { factory } from '../factory';
|
|
2
|
-
import { Service } from '../service';
|
|
3
|
-
type ICategory = Pick<factory.categoryCode.ICategoryCode, 'codeValue'> & {
|
|
4
|
-
inCodeSet: {
|
|
5
|
-
typeOf: 'CategoryCodeSet';
|
|
6
|
-
identifier: factory.categoryCode.CategorySetIdentifier.SeatingType;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
interface IProductModel {
|
|
10
|
-
id?: string;
|
|
11
|
-
project: {
|
|
12
|
-
id: string;
|
|
13
|
-
typeOf: factory.organizationType.Project;
|
|
14
|
-
};
|
|
15
|
-
typeOf: 'ProductModel';
|
|
16
|
-
category: ICategory;
|
|
17
|
-
name: factory.multilingualString;
|
|
18
|
-
offers: {
|
|
19
|
-
typeOf: factory.offerType.Offer;
|
|
20
|
-
eligibleCustomerType?: {
|
|
21
|
-
codeValue: string;
|
|
22
|
-
}[];
|
|
23
|
-
}[];
|
|
24
|
-
}
|
|
25
|
-
type IKeyOfProjection = keyof IProductModel | '_id';
|
|
26
|
-
type IProjection = Partial<Record<IKeyOfProjection, 0 | 1>>;
|
|
27
|
-
type ISearchConditions = Pick<factory.product.ISearchConditions, 'id' | 'limit' | 'page' | 'project'> & {
|
|
28
|
-
category?: {
|
|
29
|
-
codeValue?: {
|
|
30
|
-
$in?: string[];
|
|
31
|
-
};
|
|
32
|
-
inCodeSet?: {
|
|
33
|
-
identifier?: {
|
|
34
|
-
$eq?: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* プロダクトモデルサービス
|
|
41
|
-
*/
|
|
42
|
-
export declare class ProductModelService extends Service {
|
|
43
|
-
create(params: IProductModel): Promise<{
|
|
44
|
-
id: string;
|
|
45
|
-
}>;
|
|
46
|
-
search(params: Omit<ISearchConditions, 'project'> & {
|
|
47
|
-
$projection?: IProjection;
|
|
48
|
-
}): Promise<IProductModel[]>;
|
|
49
|
-
updateById(params: IProductModel & {
|
|
50
|
-
id: string;
|
|
51
|
-
}): Promise<void>;
|
|
52
|
-
deleteById(params: {
|
|
53
|
-
id: string;
|
|
54
|
-
}): Promise<void>;
|
|
55
|
-
}
|
|
56
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductModelService = void 0;
|
|
4
|
-
const http_status_1 = require("http-status");
|
|
5
|
-
const service_1 = require("../service");
|
|
6
|
-
/**
|
|
7
|
-
* プロダクトモデルサービス
|
|
8
|
-
*/
|
|
9
|
-
class ProductModelService extends service_1.Service {
|
|
10
|
-
async create(params) {
|
|
11
|
-
return this.fetch({
|
|
12
|
-
uri: '/productModels',
|
|
13
|
-
method: 'POST',
|
|
14
|
-
body: params,
|
|
15
|
-
expectedStatusCodes: [http_status_1.status.CREATED]
|
|
16
|
-
})
|
|
17
|
-
.then(async (response) => response.json());
|
|
18
|
-
}
|
|
19
|
-
async search(params) {
|
|
20
|
-
return this.fetch({
|
|
21
|
-
uri: '/productModels',
|
|
22
|
-
method: 'GET',
|
|
23
|
-
qs: params,
|
|
24
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
25
|
-
})
|
|
26
|
-
.then(async (response) => response.json());
|
|
27
|
-
}
|
|
28
|
-
async updateById(params) {
|
|
29
|
-
await this.fetch({
|
|
30
|
-
uri: `/productModels/${encodeURIComponent(String(params.id))}`,
|
|
31
|
-
method: 'PUT',
|
|
32
|
-
body: params,
|
|
33
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
async deleteById(params) {
|
|
37
|
-
await this.fetch({
|
|
38
|
-
uri: `/productModels/${encodeURIComponent(String(params.id))}`,
|
|
39
|
-
method: 'DELETE',
|
|
40
|
-
expectedStatusCodes: [http_status_1.status.NO_CONTENT]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.ProductModelService = ProductModelService;
|