@cinerino/sdk 16.4.0-alpha.16 → 16.4.0-alpha.18
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/action.d.ts +10 -9
- package/lib/abstract/chevreConsole/action.js +5 -15
- package/lib/abstract/chevreConsole/checkAction.d.ts +24 -0
- package/lib/abstract/chevreConsole/checkAction.js +20 -0
- package/lib/abstract/chevreConsole.d.ts +7 -1
- package/lib/abstract/chevreConsole.js +9 -0
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
|
-
import {
|
|
2
|
+
import { Service } from '../service';
|
|
3
3
|
export type IAction<T extends factory.actionType> = factory.action.IAction<factory.action.IAttributes<T, any, any>>;
|
|
4
|
+
type IFindParams = Pick<factory.action.ISearchConditions, 'about' | 'actionStatus' | 'actionStatusTypes' | 'agent' | 'id' | 'instrument' | 'limit' | 'location' | 'object' | 'page' | 'purpose' | 'result' | 'sameAs' | 'sort' | 'startFrom' | 'startThrough'> & {
|
|
5
|
+
typeOf?: Exclude<factory.actionType, factory.actionType.AddAction | factory.actionType.ReplaceAction | factory.actionType.UpdateAction | factory.actionType.DeleteAction | factory.actionType.InformAction | factory.actionType.UseAction>;
|
|
6
|
+
};
|
|
4
7
|
/**
|
|
5
8
|
* アクションサービス
|
|
6
9
|
*/
|
|
@@ -8,16 +11,14 @@ export declare class ActionService extends Service {
|
|
|
8
11
|
/**
|
|
9
12
|
* アクション検索
|
|
10
13
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
typeOf: T;
|
|
17
|
-
}): Promise<IAction<T>>;
|
|
18
|
-
searchRecipes(params: {
|
|
14
|
+
adminFindAnyActions<T extends factory.actionType>(params: IFindParams): Promise<IAction<T>[]>;
|
|
15
|
+
/**
|
|
16
|
+
* アクションのレシピ参照
|
|
17
|
+
*/
|
|
18
|
+
findRecipesByActionId(params: {
|
|
19
19
|
recipeFor: {
|
|
20
20
|
id: string;
|
|
21
21
|
};
|
|
22
22
|
}): Promise<Pick<factory.recipe.IRecipe, 'recipeCategory' | 'step'>[]>;
|
|
23
23
|
}
|
|
24
|
+
export {};
|
|
@@ -10,29 +10,19 @@ class ActionService extends service_1.Service {
|
|
|
10
10
|
/**
|
|
11
11
|
* アクション検索
|
|
12
12
|
*/
|
|
13
|
-
async
|
|
13
|
+
async adminFindAnyActions(params) {
|
|
14
14
|
return this.fetch({
|
|
15
15
|
uri: '/actions',
|
|
16
16
|
method: 'GET',
|
|
17
17
|
qs: params,
|
|
18
18
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
19
|
-
})
|
|
20
|
-
.then(async (response) => {
|
|
21
|
-
return {
|
|
22
|
-
data: await response.json()
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
async findById(params) {
|
|
27
|
-
return this.fetch({
|
|
28
|
-
uri: `/actions/${encodeURIComponent(String(params.id))}`,
|
|
29
|
-
method: 'GET',
|
|
30
|
-
expectedStatusCodes: [http_status_1.status.OK],
|
|
31
|
-
qs: { typeOf: params.typeOf }
|
|
32
19
|
})
|
|
33
20
|
.then(async (response) => response.json());
|
|
34
21
|
}
|
|
35
|
-
|
|
22
|
+
/**
|
|
23
|
+
* アクションのレシピ参照
|
|
24
|
+
*/
|
|
25
|
+
async findRecipesByActionId(params) {
|
|
36
26
|
return this.fetch({
|
|
37
27
|
uri: `/actions/${encodeURIComponent(String(params.recipeFor.id))}/recipe`,
|
|
38
28
|
method: 'GET',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { factory } from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
type IAction = factory.action.check.paymentMethod.movieTicket.IAction;
|
|
4
|
+
type IFindParams = Pick<factory.action.ISearchConditions, 'sort' | 'startFrom' | 'startThrough'> & {
|
|
5
|
+
/**
|
|
6
|
+
* max: 20
|
|
7
|
+
*/
|
|
8
|
+
limit: number;
|
|
9
|
+
page: number;
|
|
10
|
+
id?: string;
|
|
11
|
+
sameAs?: {
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
purpose?: {
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 認証アクションサービス
|
|
20
|
+
*/
|
|
21
|
+
export declare class CheckActionService extends Service {
|
|
22
|
+
findCheckActions(params: IFindParams): Promise<IAction[]>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckActionService = void 0;
|
|
4
|
+
const http_status_1 = require("http-status");
|
|
5
|
+
const service_1 = require("../service");
|
|
6
|
+
/**
|
|
7
|
+
* 認証アクションサービス
|
|
8
|
+
*/
|
|
9
|
+
class CheckActionService extends service_1.Service {
|
|
10
|
+
async findCheckActions(params) {
|
|
11
|
+
return this.fetch({
|
|
12
|
+
uri: '/checkActions',
|
|
13
|
+
method: 'GET',
|
|
14
|
+
qs: params,
|
|
15
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
16
|
+
})
|
|
17
|
+
.then(async (response) => response.json());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.CheckActionService = CheckActionService;
|
|
@@ -4,7 +4,8 @@ import type { AccountTitleService } from './chevreConsole/accountTitle';
|
|
|
4
4
|
import type { ActionService } from './chevreConsole/action';
|
|
5
5
|
import type { InformActionService } from './chevreConsole/informAction';
|
|
6
6
|
import type { UpdateActionService } from './chevreConsole/updateAction';
|
|
7
|
-
import { UseActionService } from './chevreConsole/useAction';
|
|
7
|
+
import type { UseActionService } from './chevreConsole/useAction';
|
|
8
|
+
import type { CheckActionService } from './chevreConsole/checkAction';
|
|
8
9
|
import type { AdditionalPropertyService } from './chevreConsole/additionalProperty';
|
|
9
10
|
import type { AggregateOfferService } from './chevreConsole/aggregateOffer';
|
|
10
11
|
import type { AggregateReservationService } from './chevreConsole/aggregateReservation';
|
|
@@ -98,6 +99,10 @@ export declare namespace service {
|
|
|
98
99
|
namespace UseAction {
|
|
99
100
|
let svc: typeof UseActionService | undefined;
|
|
100
101
|
}
|
|
102
|
+
type CheckAction = CheckActionService;
|
|
103
|
+
namespace CheckAction {
|
|
104
|
+
let svc: typeof CheckActionService | undefined;
|
|
105
|
+
}
|
|
101
106
|
/**
|
|
102
107
|
* 追加特性サービス
|
|
103
108
|
*/
|
|
@@ -505,6 +510,7 @@ export declare class ChevreConsole {
|
|
|
505
510
|
createUpdateActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<UpdateActionService>;
|
|
506
511
|
createInformActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<InformActionService>;
|
|
507
512
|
createUseActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<UseActionService>;
|
|
513
|
+
createCheckActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CheckActionService>;
|
|
508
514
|
createAdditionalPropertyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdditionalPropertyService>;
|
|
509
515
|
createAggregateOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateOfferService>;
|
|
510
516
|
createAggregateReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateReservationService>;
|
|
@@ -54,6 +54,9 @@ var service;
|
|
|
54
54
|
let UseAction;
|
|
55
55
|
(function (UseAction) {
|
|
56
56
|
})(UseAction = service.UseAction || (service.UseAction = {}));
|
|
57
|
+
let CheckAction;
|
|
58
|
+
(function (CheckAction) {
|
|
59
|
+
})(CheckAction = service.CheckAction || (service.CheckAction = {}));
|
|
57
60
|
let AdditionalProperty;
|
|
58
61
|
(function (AdditionalProperty) {
|
|
59
62
|
})(AdditionalProperty = service.AdditionalProperty || (service.AdditionalProperty = {}));
|
|
@@ -276,6 +279,12 @@ class ChevreConsole {
|
|
|
276
279
|
}
|
|
277
280
|
return new service.UseAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
278
281
|
}
|
|
282
|
+
async createCheckActionInstance(params) {
|
|
283
|
+
if (service.CheckAction.svc === undefined) {
|
|
284
|
+
service.CheckAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/checkAction.js')))).CheckActionService;
|
|
285
|
+
}
|
|
286
|
+
return new service.CheckAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
287
|
+
}
|
|
279
288
|
async createAdditionalPropertyInstance(params) {
|
|
280
289
|
if (service.AdditionalProperty.svc === undefined) {
|
|
281
290
|
service.AdditionalProperty.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/additionalProperty.js')))).AdditionalPropertyService;
|