@cinerino/sdk 16.4.0-alpha.1 → 16.4.0-alpha.2

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.
@@ -0,0 +1,13 @@
1
+ import { factory } from '../factory';
2
+ import { IOptions, Service } from '../service';
3
+ type IFindParams = Pick<factory.task.ISearchConditions, 'id' | 'name' | 'runsFrom' | 'runsThrough' | 'status' | 'limit' | 'page' | 'sort'>;
4
+ type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
5
+ /**
6
+ * 非同期アクションサービス
7
+ */
8
+ export declare class AsyncActionService extends Service<IOptions> {
9
+ findAsyncActions(params: IFindParams & {
10
+ $projection?: Partial<Record<IKeyOfProjection, 1>>;
11
+ }): Promise<factory.task.ITask<factory.taskName>[]>;
12
+ }
13
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AsyncActionService = void 0;
4
+ const http_status_1 = require("http-status");
5
+ const service_1 = require("../service");
6
+ /**
7
+ * 非同期アクションサービス
8
+ */
9
+ class AsyncActionService extends service_1.Service {
10
+ async findAsyncActions(params) {
11
+ return this.fetch({
12
+ uri: '/asyncActions',
13
+ method: 'GET',
14
+ qs: params,
15
+ expectedStatusCodes: [http_status_1.status.OK]
16
+ })
17
+ .then(async (response) => response.json());
18
+ }
19
+ }
20
+ exports.AsyncActionService = AsyncActionService;
@@ -48,6 +48,7 @@ import type { ReservationService } from './chevreConsole/reservation';
48
48
  import type { SellerService } from './chevreConsole/seller';
49
49
  import type { SellerMakesOfferService } from './chevreConsole/sellerMakesOffer';
50
50
  import type { SellerReturnPolicyService } from './chevreConsole/sellerReturnPolicy';
51
+ import type { AsyncActionService } from './chevreConsole/asyncAction';
51
52
  import type { TaskService } from './chevreConsole/task';
52
53
  import type { TicketService } from './chevreConsole/ticket';
53
54
  import type { TokenService } from './chevreConsole/token';
@@ -389,6 +390,13 @@ export declare namespace service {
389
390
  namespace SellerReturnPolicy {
390
391
  let svc: typeof SellerReturnPolicyService | undefined;
391
392
  }
393
+ /**
394
+ * 非同期アクションサービス
395
+ */
396
+ type AsyncAction = AsyncActionService;
397
+ namespace AsyncAction {
398
+ let svc: typeof AsyncActionService | undefined;
399
+ }
392
400
  /**
393
401
  * タスクサービス
394
402
  */
@@ -520,6 +528,7 @@ export declare class ChevreConsole {
520
528
  createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
521
529
  createSellerMakesOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SellerMakesOfferService>;
522
530
  createSellerReturnPolicyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SellerReturnPolicyService>;
531
+ createAsyncActionInstance(params: Pick<IOptions, 'project'>): Promise<AsyncActionService>;
523
532
  createTaskInstance(params: Pick<IOptions, 'project'>): Promise<TaskService>;
524
533
  createTicketInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TicketService>;
525
534
  createAssetTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AssetTransactionService>;
@@ -180,6 +180,9 @@ var service;
180
180
  let SellerReturnPolicy;
181
181
  (function (SellerReturnPolicy) {
182
182
  })(SellerReturnPolicy = service.SellerReturnPolicy || (service.SellerReturnPolicy = {}));
183
+ let AsyncAction;
184
+ (function (AsyncAction) {
185
+ })(AsyncAction = service.AsyncAction || (service.AsyncAction = {}));
183
186
  let Task;
184
187
  (function (Task) {
185
188
  })(Task = service.Task || (service.Task = {}));
@@ -510,6 +513,12 @@ class ChevreConsole {
510
513
  }
511
514
  return new service.SellerReturnPolicy.svc({ ...this.options, ...params, retryableStatusCodes: [] });
512
515
  }
516
+ async createAsyncActionInstance(params) {
517
+ if (service.AsyncAction.svc === undefined) {
518
+ service.AsyncAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/asyncAction')))).AsyncActionService;
519
+ }
520
+ return new service.AsyncAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
521
+ }
513
522
  async createTaskInstance(params) {
514
523
  if (service.Task.svc === undefined) {
515
524
  service.Task.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/task.js')))).TaskService;