@cinerino/sdk 5.14.1 → 5.15.0-alpha.1

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.
@@ -108,8 +108,7 @@ async function main() {
108
108
  // additionalProperty
109
109
  amount: 10,
110
110
  issuedThrough: { id: '' },
111
- paymentMethod: 'Cash',
112
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment
111
+ paymentMethod: 'Cash'
113
112
 
114
113
  },
115
114
  purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
@@ -140,7 +140,6 @@ async function main() {
140
140
  console.log('authorizing credit card payment...');
141
141
  let creditCardPaymentAuth = await paymentService.authorizeCreditCard({
142
142
  object: {
143
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
144
143
  amount: amount,
145
144
  paymentMethod: 'CreditCard',
146
145
  method: '1',
@@ -164,7 +163,6 @@ async function main() {
164
163
  console.log('authorizing credit card payment...');
165
164
  creditCardPaymentAuth = await paymentService.authorizeCreditCard({
166
165
  object: {
167
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
168
166
  amount: amount,
169
167
  paymentMethod: 'CreditCard',
170
168
  method: '1',
@@ -164,7 +164,6 @@ async function main() {
164
164
  console.log('authorizing credit card payment...');
165
165
  let creditCardPaymentAuth = await paymentService.authorizeCreditCard({
166
166
  object: {
167
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
168
167
  amount: amount,
169
168
  paymentMethod: 'CreditCard',
170
169
  method: '1',
@@ -188,7 +187,6 @@ async function main() {
188
187
  console.log('authorizing credit card payment...');
189
188
  creditCardPaymentAuth = await paymentService.authorizeCreditCard({
190
189
  object: {
191
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
192
190
  amount: amount,
193
191
  paymentMethod: 'CreditCard',
194
192
  method: '1',
@@ -272,7 +272,6 @@ async function main() {
272
272
  console.log('authorizing any payment...');
273
273
  const anyPaymentAuth = await paymentService.authorizeAnyPayment({
274
274
  object: {
275
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
276
275
  paymentMethod: 'Cash',
277
276
  amount: amount,
278
277
  additionalProperty: [{ name: 'useCoin', value: '0' }],
@@ -119,7 +119,6 @@ async function main() {
119
119
  // 決済URL発行
120
120
  const { paymentMethodId, paymentUrl } = await paymentService.publishCreditCardPaymentUrl({
121
121
  object: {
122
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
123
122
  amount,
124
123
  paymentMethod: paymentMethodType,
125
124
  method: '1',
@@ -145,7 +144,6 @@ async function main() {
145
144
  console.log('authorizing credit card payment...');
146
145
  const creditCardPaymentAuth = await paymentService.authorizeCreditCard({
147
146
  object: {
148
- typeOf: client.factory.action.authorize.paymentMethod.any.ResultType.Payment,
149
147
  amount,
150
148
  paymentMethod: paymentMethodType,
151
149
  paymentMethodId, // URL発行時のpaymentMethodIdを指定
@@ -18,7 +18,7 @@ export declare class EventService extends Service {
18
18
  /**
19
19
  * イベント集計検索
20
20
  */
21
- searchAggregations(params: Omit<factory.event.ISearchConditions<factory.eventType.ScreeningEvent>, 'project' | 'organizer'> & {
21
+ searchAggregations(params: Pick<factory.event.ISearchConditions<factory.eventType.ScreeningEvent>, 'page' | 'limit' | 'sort' | 'typeOf' | 'id' | 'startFrom' | 'startThrough'> & {
22
22
  $projection?: {
23
23
  aggregateEntranceGate?: 1;
24
24
  aggregateOffer?: 1;
@@ -0,0 +1,59 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ export interface ISortOrder {
4
+ 'reservationFor.startDate'?: factory.sortType;
5
+ }
6
+ export interface ISearchConditions {
7
+ limit?: number;
8
+ page?: number;
9
+ sort?: ISortOrder;
10
+ project?: {
11
+ id?: {
12
+ $eq?: string;
13
+ };
14
+ };
15
+ reservationFor?: {
16
+ id?: {
17
+ $eq?: string;
18
+ $in?: string[];
19
+ };
20
+ typeOf?: factory.eventType;
21
+ startFrom?: Date;
22
+ startThrough?: Date;
23
+ };
24
+ }
25
+ export interface IProjectionSearchConditions {
26
+ $projection?: {
27
+ aggregateEntranceGate?: 1;
28
+ aggregateOffer?: 1;
29
+ aggregateReservation?: 1;
30
+ };
31
+ }
32
+ export interface IAggregateReservation {
33
+ project: {
34
+ id: string;
35
+ typeOf: factory.organizationType.Project;
36
+ };
37
+ typeOf: 'AggregateReservation';
38
+ reservationFor: {
39
+ id: string;
40
+ typeOf: factory.eventType;
41
+ startDate: Date;
42
+ };
43
+ aggregateEntranceGate?: factory.event.screeningEvent.IAggregateEntranceGate;
44
+ aggregateReservation?: factory.event.screeningEvent.IAggregateReservation;
45
+ aggregateOffer?: factory.event.screeningEvent.IAggregateOffer;
46
+ }
47
+ declare type ISearchWithReservationForIdResult = Pick<IAggregateReservation, 'aggregateEntranceGate' | 'aggregateOffer' | 'aggregateReservation'> & {
48
+ /**
49
+ * イベントID
50
+ */
51
+ id: string;
52
+ };
53
+ /**
54
+ * 予約集計サービス
55
+ */
56
+ export declare class AggregateReservationService extends Service {
57
+ search(params: Omit<ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<ISearchWithReservationForIdResult[]>;
58
+ }
59
+ export {};
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.AggregateReservationService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * 予約集計サービス
59
+ */
60
+ var AggregateReservationService = /** @class */ (function (_super) {
61
+ __extends(AggregateReservationService, _super);
62
+ function AggregateReservationService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ AggregateReservationService.prototype.search = function (params) {
66
+ return __awaiter(this, void 0, void 0, function () {
67
+ var _this = this;
68
+ return __generator(this, function (_a) {
69
+ return [2 /*return*/, this.fetch({
70
+ uri: '/aggregateReservations',
71
+ method: 'GET',
72
+ qs: params,
73
+ expectedStatusCodes: [http_status_1.OK]
74
+ })
75
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
76
+ return [2 /*return*/, response.json()];
77
+ }); }); })];
78
+ });
79
+ });
80
+ };
81
+ return AggregateReservationService;
82
+ }(service_1.Service));
83
+ exports.AggregateReservationService = AggregateReservationService;
@@ -1,2 +1,2 @@
1
1
  import * as factory from '../../factory';
2
- export declare type ISearchedEvent<T extends factory.eventType> = T extends factory.eventType.Event ? Omit<factory.event.IEvent<factory.eventType.Event>, 'workPerformed'> : T extends factory.eventType.ScreeningEvent ? Omit<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'workPerformed'> : T extends factory.eventType.ScreeningEventSeries ? factory.event.IEvent<factory.eventType.ScreeningEventSeries> : never;
2
+ export declare type ISearchedEvent<T extends factory.eventType> = T extends factory.eventType.Event ? Omit<factory.event.IEvent<factory.eventType.Event>, 'workPerformed' | 'aggregateEntranceGate' | 'aggregateOffer'> : T extends factory.eventType.ScreeningEvent ? Omit<factory.event.IEvent<factory.eventType.ScreeningEvent>, 'workPerformed' | 'aggregateEntranceGate' | 'aggregateOffer'> : T extends factory.eventType.ScreeningEventSeries ? factory.event.IEvent<factory.eventType.ScreeningEventSeries> : never;
@@ -6,6 +6,7 @@ import type { AccountTransactionService } from './chevreAdmin/accountTransaction
6
6
  import type { ActionService } from './chevreAdmin/action';
7
7
  import type { AdditionalPropertyService } from './chevreAdmin/additionalProperty';
8
8
  import type { AggregateOfferService } from './chevreAdmin/aggregateOffer';
9
+ import type { AggregateReservationService } from './chevreAdmin/aggregateReservation';
9
10
  import type { AggregationService } from './chevreAdmin/aggregation';
10
11
  import type { AssetTransactionService } from './chevreAdmin/assetTransaction';
11
12
  import type { CancelReservationAssetTransactionService } from './chevreAdmin/assetTransaction/cancelReservation';
@@ -103,6 +104,13 @@ export declare namespace service {
103
104
  namespace AggregateOffer {
104
105
  let svc: typeof AggregateOfferService | undefined;
105
106
  }
107
+ /**
108
+ * 予約集計サービス
109
+ */
110
+ type AggregateReservation = AggregateReservationService;
111
+ namespace AggregateReservation {
112
+ let svc: typeof AggregateReservationService | undefined;
113
+ }
106
114
  /**
107
115
  * 集計サービス
108
116
  */
@@ -450,6 +458,7 @@ export declare class ChevreAdmin {
450
458
  createActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ActionService>;
451
459
  createAdditionalPropertyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdditionalPropertyService>;
452
460
  createAggregateOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateOfferService>;
461
+ createAggregateReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateReservationService>;
453
462
  createAggregationInstance(): Promise<AggregationService>;
454
463
  createAuthorizationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AuthorizationService>;
455
464
  createCommentInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CommentService>;
@@ -71,6 +71,9 @@ var service;
71
71
  var AggregateOffer;
72
72
  (function (AggregateOffer) {
73
73
  })(AggregateOffer = service.AggregateOffer || (service.AggregateOffer = {}));
74
+ var AggregateReservation;
75
+ (function (AggregateReservation) {
76
+ })(AggregateReservation = service.AggregateReservation || (service.AggregateReservation = {}));
74
77
  var Aggregation;
75
78
  (function (Aggregation) {
76
79
  })(Aggregation = service.Aggregation || (service.Aggregation = {}));
@@ -352,6 +355,23 @@ var ChevreAdmin = /** @class */ (function () {
352
355
  });
353
356
  });
354
357
  };
358
+ ChevreAdmin.prototype.createAggregateReservationInstance = function (params) {
359
+ return __awaiter(this, void 0, void 0, function () {
360
+ var _a;
361
+ return __generator(this, function (_b) {
362
+ switch (_b.label) {
363
+ case 0:
364
+ if (!(service.AggregateReservation.svc === undefined)) return [3 /*break*/, 2];
365
+ _a = service.AggregateReservation;
366
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/aggregateReservation'); })];
367
+ case 1:
368
+ _a.svc = (_b.sent()).AggregateReservationService;
369
+ _b.label = 2;
370
+ case 2: return [2 /*return*/, new service.AggregateReservation.svc(__assign(__assign({}, this.options), params))];
371
+ }
372
+ });
373
+ });
374
+ };
355
375
  ChevreAdmin.prototype.createAggregationInstance = function () {
356
376
  return __awaiter(this, void 0, void 0, function () {
357
377
  var _a;
@@ -1,9 +1,5 @@
1
1
  import * as factory from '../../factory';
2
2
  export import IPurpose = factory.action.authorize.paymentMethod.any.IPurpose;
3
- export interface IPublishPaymentUrlResult {
4
- paymentMethodId: string;
5
- paymentUrl: string;
6
- }
7
3
  /**
8
4
  * 決済承認レスポンス
9
5
  * 最適化(2023-02-02~)
@@ -17,7 +13,14 @@ export interface IAuthorizeResult {
17
13
  export interface ICheckMovieTicketResult {
18
14
  purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
19
15
  }
20
- export declare type IAuthorizeAnyPaymentObject = Pick<factory.action.authorize.paymentMethod.any.IObject, 'additionalProperty' | 'amount' | 'issuedThrough' | 'name' | 'paymentMethod' | 'typeOf'>;
21
- export declare type IAuthorizeCreditCardObject = Pick<factory.action.authorize.paymentMethod.any.IObject, 'additionalProperty' | 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'name' | 'paymentMethod' | 'paymentMethodId' | 'typeOf'>;
22
- export declare type IAuthorizeMovieTicketObject = Pick<factory.action.authorize.paymentMethod.any.IObject, 'additionalProperty' | 'amount' | 'issuedThrough' | 'movieTickets' | 'name' | 'paymentMethod' | 'typeOf'>;
23
- export declare type IPublishPaymentUrlObject = Pick<factory.action.authorize.paymentMethod.any.IObject, 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'paymentMethod' | 'typeOf'>;
16
+ export declare type IAuthorizeAnyPaymentObject = Pick<factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'issuedThrough' | 'paymentMethod' | 'name' | 'additionalProperty'>;
17
+ export declare type IAuthorizeCreditCardObject = Pick<factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'paymentMethodId' | 'name' | 'additionalProperty'>;
18
+ export declare type IAuthorizeMovieTicketObject = Pick<factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'issuedThrough' | 'paymentMethod' | 'movieTickets' | 'name' | 'additionalProperty'>;
19
+ export declare type IAuthorizePaymentCardObject = Pick<factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'issuedThrough' | 'paymentMethod' | 'fromLocation' | 'name' | 'additionalProperty'> & {
20
+ description?: string;
21
+ };
22
+ export declare type IPublishPaymentUrlObject = Pick<factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'creditCard' | 'issuedThrough' | 'paymentMethod' | 'method'>;
23
+ export interface IPublishPaymentUrlResult {
24
+ paymentMethodId: string;
25
+ paymentUrl: string;
26
+ }
@@ -1,6 +1,6 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- import { IAuthorizeAnyPaymentObject, IAuthorizeCreditCardObject, IAuthorizeMovieTicketObject, IAuthorizeResult, ICheckMovieTicketResult, IPublishPaymentUrlObject, IPublishPaymentUrlResult, IPurpose } from './payment/factory';
3
+ import { IAuthorizeAnyPaymentObject, IAuthorizeCreditCardObject, IAuthorizeMovieTicketObject, IAuthorizePaymentCardObject, IAuthorizeResult, ICheckMovieTicketResult, IPublishPaymentUrlObject, IPublishPaymentUrlResult, IPurpose } from './payment/factory';
4
4
  /**
5
5
  * 決済サービス
6
6
  */
@@ -38,7 +38,7 @@ export declare class PaymentService extends Service {
38
38
  * ペイメントカード決済承認
39
39
  */
40
40
  authorizePaymentCard(params: {
41
- object: factory.action.authorize.paymentMethod.any.IObject;
41
+ object: IAuthorizePaymentCardObject;
42
42
  purpose: IPurpose;
43
43
  }): Promise<IAuthorizeResult>;
44
44
  /**
@@ -111,7 +111,7 @@ export declare class EventService extends Service {
111
111
  /**
112
112
  * イベント集計検索
113
113
  */
114
- searchAggregations(params: Omit<factory.event.ISearchConditions<factory.eventType.ScreeningEvent>, 'project' | 'organizer'> & {
114
+ searchAggregations(params: Pick<factory.event.ISearchConditions<factory.eventType.ScreeningEvent>, 'page' | 'limit' | 'sort' | 'typeOf' | 'id' | 'startFrom' | 'startThrough'> & {
115
115
  $projection?: {
116
116
  aggregateEntranceGate?: 1;
117
117
  aggregateOffer?: 1;
@@ -1,4 +1,4 @@
1
- import { IAuthorizeAnyPaymentObject, IAuthorizeCreditCardObject, IAuthorizeMovieTicketObject, IAuthorizeResult, ICheckMovieTicketResult, IPublishPaymentUrlObject, IPublishPaymentUrlResult, IPurpose } from '../chevreTxn/payment/factory';
1
+ import { IAuthorizeAnyPaymentObject, IAuthorizeCreditCardObject, IAuthorizeMovieTicketObject, IAuthorizePaymentCardObject, IAuthorizeResult, ICheckMovieTicketResult, IPublishPaymentUrlObject, IPublishPaymentUrlResult, IPurpose } from '../chevreTxn/payment/factory';
2
2
  import * as factory from '../factory';
3
3
  import { Service } from '../service';
4
4
  /**
@@ -30,7 +30,7 @@ export declare class PaymentService extends Service {
30
30
  * ペイメントカード決済承認
31
31
  */
32
32
  authorizePaymentCard(params: {
33
- object: factory.action.authorize.paymentMethod.any.IObject;
33
+ object: IAuthorizePaymentCardObject;
34
34
  purpose: IPurpose;
35
35
  }): Promise<IAuthorizeResult>;
36
36
  /**