@cinerino/sdk 12.5.0 → 12.6.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.
@@ -18,7 +18,7 @@ async function main() {
18
18
  });
19
19
 
20
20
  startTime = process.hrtime();
21
- let chevre = await client.loadChevre({
21
+ const chevre = await client.loadChevre({
22
22
  endpoint: <string>process.env.CHEVRE_ENDPOINT,
23
23
  auth: authClient
24
24
  });
@@ -26,23 +26,7 @@ async function main() {
26
26
  console.log(`laoding chevre took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
27
27
 
28
28
  startTime = process.hrtime();
29
- chevre = await client.loadChevre({
30
- endpoint: <string>process.env.CHEVRE_ENDPOINT,
31
- auth: authClient
32
- });
33
- diff = process.hrtime(startTime);
34
- console.log(`laoding chevre took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
35
-
36
- startTime = process.hrtime();
37
- let eventService = await chevre.createEventInstance({
38
- project: { id: PROJECT_ID },
39
- seller: { id: '' }
40
- });
41
- diff = process.hrtime(startTime);
42
- console.log(`creating service instance took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
43
-
44
- startTime = process.hrtime();
45
- eventService = await chevre.createEventInstance({
29
+ const eventService = await chevre.createEventInstance({
46
30
  project: { id: PROJECT_ID },
47
31
  seller: { id: '' }
48
32
  });
@@ -59,16 +43,16 @@ async function main() {
59
43
  .toDate(),
60
44
  sort: {
61
45
  startDate: client.factory.sortType.Ascending
62
- },
63
- $projection: {
64
- checkInCount: 0,
65
- maximumAttendeeCapacity: 0,
66
- remainingAttendeeCapacity: 0,
67
- offers: 0,
68
- additionalProperty: 0,
69
- superEvent: 0
70
- },
71
- $minimumProjection: true
46
+ }
47
+ // $projection: {
48
+ // checkInCount: 0,
49
+ // maximumAttendeeCapacity: 0,
50
+ // remainingAttendeeCapacity: 0,
51
+ // offers: 0,
52
+ // additionalProperty: 0,
53
+ // superEvent: 0
54
+ // },
55
+ // $minimumProjection: true
72
56
  });
73
57
  console.log(result);
74
58
  console.log(result.length, 'events returned');
@@ -23,7 +23,7 @@ export declare class CategoryCodeService extends Service {
23
23
  /**
24
24
  * 作成
25
25
  */
26
- create(params: factory.categoryCode.ICategoryCode & {
26
+ createCategoryCode(params: Omit<ICategoryCodeExceptMovieTicketType, 'id'> & {
27
27
  $unset?: never;
28
28
  }): Promise<{
29
29
  /**
@@ -31,35 +31,15 @@ export declare class CategoryCodeService extends Service {
31
31
  */
32
32
  id: string;
33
33
  }>;
34
- /**
35
- * 検索
36
- */
37
- search(params: IFindParamsExceptMovieTicketType): Promise<{
38
- data: factory.categoryCode.ICategoryCode[];
39
- }>;
40
34
  /**
41
35
  * 決済カード区分を除外して区分を検索する
42
36
  */
43
- findCategoryCodesExceptMovieTicketTypes(params: Omit<factory.categoryCode.ISearchConditions, 'project'> & {
44
- excludeMovieTicketType?: boolean;
45
- }): Promise<ICategoryCodeExceptMovieTicketType[]>;
46
- /**
47
- * 決済カード区分検索
48
- * support(2025-10-21~)
49
- */
50
- findMovieTicketTypes(params: Pick<factory.categoryCode.ISearchConditions, 'additionalProperty' | 'codeValue' | 'id' | 'name' | 'paymentMethod' | 'sort'> & {
51
- limit: number;
52
- page: number;
53
- inCodeSet: {
54
- identifier: {
55
- $eq: factory.categoryCode.CategorySetIdentifier.MovieTicketType;
56
- };
57
- };
58
- }): Promise<factory.categoryCode.ICategoryCode[]>;
59
- update(params: factory.categoryCode.ICategoryCode & {
37
+ findCategoryCodes(params: IFindParamsExceptMovieTicketType): Promise<ICategoryCodeExceptMovieTicketType[]>;
38
+ updateCategoryCode(params: ICategoryCodeExceptMovieTicketType & {
39
+ id: string;
60
40
  $unset?: never;
61
41
  }): Promise<void>;
62
- deleteById(params: {
42
+ deleteCategoryCodeById(params: {
63
43
  id: string;
64
44
  }): Promise<void>;
65
45
  }
@@ -65,6 +65,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.CategoryCodeService = void 0;
66
66
  var http_status_1 = require("http-status");
67
67
  var service_1 = require("../service");
68
+ var BASE_URI = '/categoryCodes';
68
69
  /**
69
70
  * 区分サービス
70
71
  */
@@ -76,12 +77,12 @@ var CategoryCodeService = /** @class */ (function (_super) {
76
77
  /**
77
78
  * 作成
78
79
  */
79
- CategoryCodeService.prototype.create = function (params) {
80
+ CategoryCodeService.prototype.createCategoryCode = function (params) {
80
81
  return __awaiter(this, void 0, void 0, function () {
81
82
  var _this = this;
82
83
  return __generator(this, function (_a) {
83
84
  return [2 /*return*/, this.fetch({
84
- uri: '/categoryCodes',
85
+ uri: BASE_URI,
85
86
  method: 'POST',
86
87
  body: params,
87
88
  expectedStatusCodes: [http_status_1.CREATED]
@@ -92,45 +93,37 @@ var CategoryCodeService = /** @class */ (function (_super) {
92
93
  });
93
94
  });
94
95
  };
95
- /**
96
- * 検索
97
- */
98
- CategoryCodeService.prototype.search = function (params) {
99
- return __awaiter(this, void 0, void 0, function () {
100
- var _this = this;
101
- return __generator(this, function (_a) {
102
- return [2 /*return*/, this.fetch({
103
- uri: '/categoryCodes',
104
- method: 'GET',
105
- qs: params,
106
- expectedStatusCodes: [http_status_1.OK]
107
- })
108
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
109
- var _a;
110
- return __generator(this, function (_b) {
111
- switch (_b.label) {
112
- case 0:
113
- _a = {};
114
- return [4 /*yield*/, response.json()];
115
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
116
- _a)];
117
- }
118
- });
119
- }); })];
120
- });
121
- });
122
- };
96
+ // discontinue(2025-10-23~)
97
+ // /**
98
+ // * 検索
99
+ // */
100
+ // public async search(params: IFindParamsExceptMovieTicketType): Promise<{
101
+ // data: factory.categoryCode.ICategoryCode[];
102
+ // }> {
103
+ // return this.fetch({
104
+ // uri: BASE_URI,
105
+ // method: 'GET',
106
+ // qs: params,
107
+ // expectedStatusCodes: [OK]
108
+ // })
109
+ // .then(async (response) => {
110
+ // return {
111
+ // data: await response.json()
112
+ // };
113
+ // });
114
+ // }
123
115
  /**
124
116
  * 決済カード区分を除外して区分を検索する
125
117
  */
126
- CategoryCodeService.prototype.findCategoryCodesExceptMovieTicketTypes = function (params) {
118
+ CategoryCodeService.prototype.findCategoryCodes = function (params) {
127
119
  return __awaiter(this, void 0, void 0, function () {
128
120
  var _this = this;
129
121
  return __generator(this, function (_a) {
130
122
  return [2 /*return*/, this.fetch({
131
- uri: '/categoryCodes',
123
+ uri: BASE_URI,
132
124
  method: 'GET',
133
- qs: __assign(__assign({}, params), { excludeMovieTicketType: true }),
125
+ qs: __assign(__assign({}, params), { excludeMovieTicketType: true // 強制的に決済カード区分を除外
126
+ }),
134
127
  expectedStatusCodes: [http_status_1.OK]
135
128
  })
136
129
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
@@ -139,41 +132,12 @@ var CategoryCodeService = /** @class */ (function (_super) {
139
132
  });
140
133
  });
141
134
  };
142
- /**
143
- * 決済カード区分検索
144
- * support(2025-10-21~)
145
- */
146
- CategoryCodeService.prototype.findMovieTicketTypes = function (params) {
147
- return __awaiter(this, void 0, void 0, function () {
148
- var _this = this;
149
- return __generator(this, function (_a) {
150
- return [2 /*return*/, this.fetch({
151
- uri: '/movieTicketTypes',
152
- method: 'GET',
153
- qs: params,
154
- expectedStatusCodes: [http_status_1.OK]
155
- })
156
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
157
- return [2 /*return*/, response.json()];
158
- }); }); })];
159
- });
160
- });
161
- };
162
- // discontinue(2025-10-21~)
163
- // public async findById(params: { id: string }): Promise<factory.categoryCode.ICategoryCode> {
164
- // return this.fetch({
165
- // uri: `/categoryCodes/${encodeURIComponent(String(params.id))}`,
166
- // method: 'GET',
167
- // expectedStatusCodes: [OK]
168
- // })
169
- // .then(async (response) => response.json());
170
- // }
171
- CategoryCodeService.prototype.update = function (params) {
135
+ CategoryCodeService.prototype.updateCategoryCode = function (params) {
172
136
  return __awaiter(this, void 0, void 0, function () {
173
137
  return __generator(this, function (_a) {
174
138
  switch (_a.label) {
175
139
  case 0: return [4 /*yield*/, this.fetch({
176
- uri: "/categoryCodes/" + encodeURIComponent(String(params.id)),
140
+ uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
177
141
  method: 'PUT',
178
142
  body: params,
179
143
  expectedStatusCodes: [http_status_1.NO_CONTENT]
@@ -185,12 +149,12 @@ var CategoryCodeService = /** @class */ (function (_super) {
185
149
  });
186
150
  });
187
151
  };
188
- CategoryCodeService.prototype.deleteById = function (params) {
152
+ CategoryCodeService.prototype.deleteCategoryCodeById = function (params) {
189
153
  return __awaiter(this, void 0, void 0, function () {
190
154
  return __generator(this, function (_a) {
191
155
  switch (_a.label) {
192
156
  case 0: return [4 /*yield*/, this.fetch({
193
- uri: "/categoryCodes/" + encodeURIComponent(String(params.id)),
157
+ uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
194
158
  method: 'DELETE',
195
159
  expectedStatusCodes: [http_status_1.NO_CONTENT]
196
160
  })];
@@ -0,0 +1,56 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type IMovieTicketType = Pick<factory.categoryCode.ICategoryCode, 'additionalProperty' | 'codeValue' | 'color' | 'id' | 'image' | 'name' | 'project' | 'typeOf'> & {
4
+ inCodeSet: {
5
+ typeOf: 'CategoryCodeSet';
6
+ identifier: factory.categoryCode.CategorySetIdentifier.MovieTicketType;
7
+ };
8
+ paymentMethod: {
9
+ /**
10
+ * 決済カード区分の場合、対応決済方法区分
11
+ */
12
+ typeOf: string;
13
+ };
14
+ };
15
+ /**
16
+ * 決済カード区分サービス
17
+ */
18
+ export declare class MovieTicketTypeService extends Service {
19
+ /**
20
+ * 決済カード区分追加
21
+ */
22
+ createMovieTicketType(params: IMovieTicketType & {
23
+ $unset?: never;
24
+ }): Promise<{
25
+ /**
26
+ * 区分ID
27
+ */
28
+ id: string;
29
+ }>;
30
+ /**
31
+ * 決済カード区分検索
32
+ * support(2025-10-21~)
33
+ */
34
+ findMovieTicketTypes(params: Pick<factory.categoryCode.ISearchConditions, 'additionalProperty' | 'codeValue' | 'id' | 'name' | 'paymentMethod' | 'sort'> & {
35
+ limit: number;
36
+ page: number;
37
+ inCodeSet: {
38
+ identifier: {
39
+ $eq: factory.categoryCode.CategorySetIdentifier.MovieTicketType;
40
+ };
41
+ };
42
+ }): Promise<IMovieTicketType[]>;
43
+ /**
44
+ * 決済カード区分編集
45
+ */
46
+ updateMovieTicketType(params: IMovieTicketType & {
47
+ $unset?: never;
48
+ }): Promise<void>;
49
+ /**
50
+ * 決済カード区分削除
51
+ */
52
+ deleteMovieTicketTypeById(params: {
53
+ id: string;
54
+ }): Promise<void>;
55
+ }
56
+ export {};
@@ -0,0 +1,146 @@
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.MovieTicketTypeService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ var BASE_URI = '/movieTicketTypes';
58
+ /**
59
+ * 決済カード区分サービス
60
+ */
61
+ var MovieTicketTypeService = /** @class */ (function (_super) {
62
+ __extends(MovieTicketTypeService, _super);
63
+ function MovieTicketTypeService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ /**
67
+ * 決済カード区分追加
68
+ */
69
+ MovieTicketTypeService.prototype.createMovieTicketType = function (params) {
70
+ return __awaiter(this, void 0, void 0, function () {
71
+ var _this = this;
72
+ return __generator(this, function (_a) {
73
+ return [2 /*return*/, this.fetch({
74
+ uri: BASE_URI,
75
+ method: 'POST',
76
+ body: params,
77
+ expectedStatusCodes: [http_status_1.CREATED]
78
+ })
79
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
80
+ return [2 /*return*/, response.json()];
81
+ }); }); })];
82
+ });
83
+ });
84
+ };
85
+ /**
86
+ * 決済カード区分検索
87
+ * support(2025-10-21~)
88
+ */
89
+ MovieTicketTypeService.prototype.findMovieTicketTypes = function (params) {
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ var _this = this;
92
+ return __generator(this, function (_a) {
93
+ return [2 /*return*/, this.fetch({
94
+ uri: BASE_URI,
95
+ method: 'GET',
96
+ qs: params,
97
+ expectedStatusCodes: [http_status_1.OK]
98
+ })
99
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
100
+ return [2 /*return*/, response.json()];
101
+ }); }); })];
102
+ });
103
+ });
104
+ };
105
+ /**
106
+ * 決済カード区分編集
107
+ */
108
+ MovieTicketTypeService.prototype.updateMovieTicketType = function (params) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0: return [4 /*yield*/, this.fetch({
113
+ uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
114
+ method: 'PUT',
115
+ body: params,
116
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
117
+ })];
118
+ case 1:
119
+ _a.sent();
120
+ return [2 /*return*/];
121
+ }
122
+ });
123
+ });
124
+ };
125
+ /**
126
+ * 決済カード区分削除
127
+ */
128
+ MovieTicketTypeService.prototype.deleteMovieTicketTypeById = function (params) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0: return [4 /*yield*/, this.fetch({
133
+ uri: BASE_URI + "/" + encodeURIComponent(String(params.id)),
134
+ method: 'DELETE',
135
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
136
+ })];
137
+ case 1:
138
+ _a.sent();
139
+ return [2 /*return*/];
140
+ }
141
+ });
142
+ });
143
+ };
144
+ return MovieTicketTypeService;
145
+ }(service_1.Service));
146
+ exports.MovieTicketTypeService = MovieTicketTypeService;
@@ -33,6 +33,7 @@ import type { MemberService } from './chevreConsole/member';
33
33
  import type { MemberProgramService } from './chevreConsole/memberProgram';
34
34
  import type { MerchantReturnPolicyService } from './chevreConsole/merchantReturnPolicy';
35
35
  import type { MessageService } from './chevreConsole/message';
36
+ import type { MovieTicketTypeService } from './chevreConsole/movieTicketType';
36
37
  import type { OfferService } from './chevreConsole/offer';
37
38
  import type { OfferCatalogService } from './chevreConsole/offerCatalog';
38
39
  import type { OfferCatalogItemService } from './chevreConsole/offerCatalogItem';
@@ -272,6 +273,13 @@ export declare namespace service {
272
273
  namespace Message {
273
274
  let svc: typeof MessageService | undefined;
274
275
  }
276
+ /**
277
+ * 決済カード区分サービス
278
+ */
279
+ type MovieTicketType = MovieTicketTypeService;
280
+ namespace MovieTicketType {
281
+ let svc: typeof MovieTicketTypeService | undefined;
282
+ }
275
283
  /**
276
284
  * 注文サービス
277
285
  */
@@ -592,6 +600,7 @@ export declare class ChevreConsole {
592
600
  createMemberProgramInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MemberProgramService>;
593
601
  createMerchantReturnPolicyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MerchantReturnPolicyService>;
594
602
  createMessageInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MessageService>;
603
+ createMovieTicketTypeInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MovieTicketTypeService>;
595
604
  createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
596
605
  createOwnershipInfoInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OwnershipInfoService>;
597
606
  createPaymentProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentProductService>;
@@ -137,6 +137,9 @@ var service;
137
137
  var Message;
138
138
  (function (Message) {
139
139
  })(Message = service.Message || (service.Message = {}));
140
+ var MovieTicketType;
141
+ (function (MovieTicketType) {
142
+ })(MovieTicketType = service.MovieTicketType || (service.MovieTicketType = {}));
140
143
  var Order;
141
144
  (function (Order) {
142
145
  })(Order = service.Order || (service.Order = {}));
@@ -772,6 +775,23 @@ var ChevreConsole = /** @class */ (function () {
772
775
  });
773
776
  });
774
777
  };
778
+ ChevreConsole.prototype.createMovieTicketTypeInstance = function (params) {
779
+ return __awaiter(this, void 0, void 0, function () {
780
+ var _a;
781
+ return __generator(this, function (_b) {
782
+ switch (_b.label) {
783
+ case 0:
784
+ if (!(service.MovieTicketType.svc === undefined)) return [3 /*break*/, 2];
785
+ _a = service.MovieTicketType;
786
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreConsole/movieTicketType'); })];
787
+ case 1:
788
+ _a.svc = (_b.sent()).MovieTicketTypeService;
789
+ _b.label = 2;
790
+ case 2: return [2 /*return*/, new service.MovieTicketType.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
791
+ }
792
+ });
793
+ });
794
+ };
775
795
  ChevreConsole.prototype.createOrderInstance = function (params) {
776
796
  return __awaiter(this, void 0, void 0, function () {
777
797
  var _a;