@cinerino/sdk 12.5.0-alpha.9 → 12.5.0

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.
Files changed (32) hide show
  1. package/example/src/chevre/admin/adminCreateNotesIfNotExistByIdentifier.ts +3 -3
  2. package/example/src/chevre/admin/findPaymentServices.ts +45 -0
  3. package/example/src/chevre/admin/findProductHasOfferCatalog.ts +35 -0
  4. package/example/src/chevre/admin/findProducts.ts +48 -0
  5. package/example/src/chevre/default/findCategoryCodes.ts +42 -0
  6. package/example/src/cloud/admin/adminEventsByIdentifier.ts +145 -0
  7. package/lib/abstract/chevre/categoryCode.d.ts +12 -3
  8. package/lib/abstract/chevre/categoryCode.js +1 -1
  9. package/lib/abstract/chevreAdmin/event.d.ts +1 -1
  10. package/lib/abstract/chevreAdmin/event.js +1 -1
  11. package/lib/abstract/chevreAdmin/note.d.ts +2 -6
  12. package/lib/abstract/chevreAdmin/paymentService.d.ts +62 -0
  13. package/lib/abstract/chevreAdmin/paymentService.js +90 -0
  14. package/lib/abstract/chevreAdmin/product.d.ts +94 -2
  15. package/lib/abstract/chevreAdmin/product.js +45 -1
  16. package/lib/abstract/chevreAdmin.d.ts +9 -0
  17. package/lib/abstract/chevreAdmin.js +20 -0
  18. package/lib/abstract/chevreConsole/categoryCode.d.ts +44 -7
  19. package/lib/abstract/chevreConsole/categoryCode.js +46 -2
  20. package/lib/abstract/chevreConsole/creativeWork.d.ts +4 -6
  21. package/lib/abstract/chevreConsole/creativeWork.js +13 -25
  22. package/lib/abstract/chevreConsole/offerCatalog.d.ts +6 -3
  23. package/lib/abstract/chevreConsole/offerCatalog.js +13 -8
  24. package/lib/abstract/chevreConsole/paymentService.d.ts +0 -13
  25. package/lib/abstract/chevreConsole/paymentService.js +23 -19
  26. package/lib/abstract/chevreConsole/product.d.ts +0 -5
  27. package/lib/abstract/chevreConsole/product.js +15 -20
  28. package/lib/abstract/chevreConsole/productModel.d.ts +6 -1
  29. package/lib/abstract/cloud/admin/event.d.ts +1 -1
  30. package/lib/abstract/cloud/admin/event.js +1 -1
  31. package/lib/bundle.js +901 -709
  32. package/package.json +2 -2
@@ -5,7 +5,7 @@ import * as auth from '../../auth/authAsAdmin';
5
5
 
6
6
  const PROJECT_ID = String(process.env.PROJECT_ID);
7
7
  const SELLER_ID = '59d20831e53ebc2b4e774466';
8
- const EVENT_SERVICE_IDENTIFIER = 'xxx';
8
+ const EVENT_SERVICE_ID = 'xxx';
9
9
  // const EVENT_SERVICE_ID = '656038908b1cd5ce629f5991';
10
10
 
11
11
  // tslint:disable-next-line:max-func-body-length
@@ -26,7 +26,7 @@ async function main() {
26
26
  await noteService.createNotesByIdentifier(
27
27
  [
28
28
  {
29
- about: { identifier: EVENT_SERVICE_IDENTIFIER },
29
+ about: { id: EVENT_SERVICE_ID },
30
30
  identifier: 'abcdefgh',
31
31
  text: 'sample note text...'
32
32
  }
@@ -40,7 +40,7 @@ async function main() {
40
40
  await noteService.updateNotesByIdentifier(
41
41
  [
42
42
  {
43
- about: { identifier: EVENT_SERVICE_IDENTIFIER },
43
+ about: { id: EVENT_SERVICE_ID },
44
44
  identifier: 'abcdefgh',
45
45
  text: 'updated text xxxxx'
46
46
  }
@@ -0,0 +1,45 @@
1
+ // tslint:disable:no-implicit-dependencies no-console no-magic-numbers
2
+ import * as client from '../../../../lib/';
3
+ import * as auth from '../../auth/authAsAdmin';
4
+
5
+ const PROJECT_ID = String(process.env.PROJECT_ID);
6
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
7
+
8
+ async function main() {
9
+ const authClient = await auth.login();
10
+ await authClient.refreshAccessToken();
11
+ const loginTicket = authClient.verifyIdToken({});
12
+ console.log('username is', loginTicket.getUsername());
13
+
14
+ const paymentProductService = await (await client.loadChevreAdmin({
15
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
16
+ auth: authClient
17
+ })).createPaymentProductInstance({
18
+ project: { id: PROJECT_ID },
19
+ seller: { id: SELLER_ID }
20
+ });
21
+
22
+ const data = await paymentProductService.findPaymentServices({
23
+ limit: 10,
24
+ page: 1
25
+ // typeOf: client.factory.service.paymentService.PaymentServiceType.MovieTicket
26
+ // typeOfs: [
27
+ // client.factory.service.paymentService.PaymentServiceType.CreditCard,
28
+ // client.factory.service.paymentService.PaymentServiceType.MovieTicket
29
+ // ],
30
+ // sortByProductID: client.factory.sortType.Descending
31
+ // id: '5f9a52ca4f3709000abe6490'
32
+ // ids: ['5f9a52ca4f3709000abe6490', '5f9a52994f3709000abe6417'],
33
+ // nameRegex: 'Surf',
34
+ // productID: 'xxx',
35
+ // productIDRegex: 'Surf',
36
+ });
37
+ console.log(data);
38
+ console.log(data.length);
39
+ }
40
+
41
+ main()
42
+ .then(() => {
43
+ console.log('main processed.');
44
+ })
45
+ .catch(console.error);
@@ -0,0 +1,35 @@
1
+ // tslint:disable:no-implicit-dependencies no-console no-magic-numbers
2
+ import * as client from '../../../../lib/';
3
+ import * as auth from '../../auth/authAsAdmin';
4
+
5
+ const PROJECT_ID = String(process.env.PROJECT_ID);
6
+
7
+ async function main() {
8
+ const authClient = await auth.login();
9
+ await authClient.refreshAccessToken();
10
+ const loginTicket = authClient.verifyIdToken({});
11
+ console.log('username is', loginTicket.getUsername());
12
+
13
+ const productService = await (await client.loadChevreAdmin({
14
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
15
+ auth: authClient
16
+ })).createProductInstance({
17
+ project: { id: PROJECT_ID },
18
+ seller: { id: '' }
19
+ });
20
+
21
+ const data = await productService.findProductHasOfferCatalog({
22
+ limit: 10,
23
+ page: 1,
24
+ itemOfferedIds: ['656038908b1cd5ce629f5992']
25
+ });
26
+ // tslint:disable-next-line:no-null-keyword
27
+ console.dir(data, { depth: null });
28
+ console.log(data.length);
29
+ }
30
+
31
+ main()
32
+ .then(() => {
33
+ console.log('main processed.');
34
+ })
35
+ .catch(console.error);
@@ -0,0 +1,48 @@
1
+ // tslint:disable:no-implicit-dependencies no-console no-magic-numbers
2
+ import * as client from '../../../../lib/';
3
+ import * as auth from '../../auth/authAsAdmin';
4
+
5
+ const PROJECT_ID = String(process.env.PROJECT_ID);
6
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
7
+
8
+ async function main() {
9
+ const authClient = await auth.login();
10
+ await authClient.refreshAccessToken();
11
+ const loginTicket = authClient.verifyIdToken({});
12
+ console.log('username is', loginTicket.getUsername());
13
+
14
+ const productService = await (await client.loadChevreAdmin({
15
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
16
+ auth: authClient
17
+ })).createProductInstance({
18
+ project: { id: PROJECT_ID },
19
+ seller: { id: SELLER_ID }
20
+ });
21
+
22
+ const data = await productService.findProducts({
23
+ limit: 10,
24
+ page: 1,
25
+ typeOf: client.factory.product.ProductType.EventService,
26
+ // typeOfs: [client.factory.product.ProductType.EventService, client.factory.product.ProductType.Product],
27
+ sortByProductID: client.factory.sortType.Ascending
28
+ // id: '67fdca202e75a6d9af33d5c4'
29
+ // ids: ['67fdca202e75a6d9af33d5c4'],
30
+ // typeOf?: factory.product.ProductType;
31
+ // typeOfs?: factory.product.ProductType[];
32
+ // hasOfferCatalogId: '7iri37omad6t6ji',
33
+ // nameRegex: 'Free',
34
+ // productID: 'sampleFreeEventServiceBySub',
35
+ // productIDRegex: 'Free',
36
+ // serviceTypeCodeValue: '0001',
37
+ // serviceOutputAmountCurrency: 'Point',
38
+ // additionalPropertyName: 'te'
39
+ });
40
+ console.log(data);
41
+ console.log(data.length);
42
+ }
43
+
44
+ main()
45
+ .then(() => {
46
+ console.log('main processed.');
47
+ })
48
+ .catch(console.error);
@@ -0,0 +1,42 @@
1
+ // tslint:disable:no-implicit-dependencies no-console
2
+ // import * as moment from 'moment';
3
+
4
+ import * as client from '../../../../lib/index';
5
+
6
+ const PROJECT_ID = String(process.env.PROJECT_ID);
7
+
8
+ async function main() {
9
+ const authClient = await client.auth.ClientCredentials.createInstance({
10
+ domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
11
+ clientId: <string>process.env.CHEVRE_CLIENT_ID,
12
+ clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
13
+ scopes: [],
14
+ state: ''
15
+ });
16
+
17
+ const categoryCodeService = await (await client.loadChevre({
18
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
19
+ auth: authClient
20
+ })).createCategoryCodeInstance({
21
+ project: { id: PROJECT_ID },
22
+ seller: { id: '' }
23
+ });
24
+
25
+ const result = await categoryCodeService.search({
26
+ page: 1,
27
+ limit: 10,
28
+ inCodeSet: {
29
+ identifier: {
30
+ $eq: client.factory.categoryCode.CategorySetIdentifier.SeatingType
31
+ }
32
+ }
33
+ });
34
+ // tslint:disable-next-line:no-null-keyword
35
+ console.dir(result, { depth: null });
36
+ }
37
+
38
+ main()
39
+ .then(() => {
40
+ console.log('success!');
41
+ })
42
+ .catch(console.error);
@@ -0,0 +1,145 @@
1
+ // tslint:disable:no-console
2
+ // tslint:disable-next-line:no-implicit-dependencies
3
+ import * as moment from 'moment-timezone';
4
+ import { format } from 'util';
5
+ import * as client from '../../../../lib/index';
6
+ import * as auth from '../../auth/authAsAdmin';
7
+
8
+ const PROJECT_ID = String(process.env.PROJECT_ID);
9
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
10
+ const EVENT_SERVICE_ID = '681aa7c1b53b6dbbe5efbec7';
11
+ const AVAILABLE_AT_OR_FROM_ID = '51qbjcfr72h62m06vtv5kkhgje';
12
+ const ADDITIONAL_PROPERTY_NAME = 'sampleCreateId';
13
+ const SUPER_EVENT_ID = '7k9ayl8hc';
14
+ const LOCATION_BRANCH_CODE = '10';
15
+
16
+ /**
17
+ * 識別子によるイベント管理サンプル
18
+ */
19
+ // tslint:disable-next-line:max-func-body-length
20
+ async function main() {
21
+ const authClient = await auth.login();
22
+ await authClient.refreshAccessToken();
23
+ const loginTicket = authClient.verifyIdToken({});
24
+ console.log('username is', loginTicket.getUsername());
25
+
26
+ const adminEventService = await (await client.loadCloudAdmin({
27
+ endpoint: <string>process.env.API_ADMIN_ENDPOINT,
28
+ auth: authClient
29
+ })).createEventInstance({
30
+ project: { id: PROJECT_ID },
31
+ seller: { id: SELLER_ID }
32
+ });
33
+
34
+ const today = moment()
35
+ .tz('Asia/Tokyo')
36
+ .format('YYYY-MM-DD');
37
+ const startDate = moment(`${today}T13:00:00Z`)
38
+ .toDate();
39
+ const endDate = moment(startDate)
40
+ .add(1, 'hour')
41
+ .toDate();
42
+ const validFrom = moment(`${today}T00:00:00+09:00`)
43
+ .toDate();
44
+ const validThrough = endDate;
45
+ const identifier = format(
46
+ '%s%s%s%s%s',
47
+ moment()
48
+ .tz('Asia/Tokyo')
49
+ .format('YYYYMMDD'),
50
+ 'ABC',
51
+ '12345',
52
+ LOCATION_BRANCH_CODE,
53
+ moment(startDate)
54
+ .tz('Asia/Tokyo')
55
+ .format('HHmm')
56
+ );
57
+ console.log('creating if not exists...', identifier);
58
+
59
+ await adminEventService.createIfNotExistByIdentifier(
60
+ [
61
+ {
62
+ identifier,
63
+ doorTime: startDate,
64
+ startDate,
65
+ endDate,
66
+ eventStatus: client.factory.eventStatusType.EventScheduled,
67
+ additionalProperty: [
68
+ {
69
+ name: ADDITIONAL_PROPERTY_NAME,
70
+ value: `fromSamples:${moment()
71
+ .format('YYYY-MM-DD HH:mm')}`
72
+ }
73
+ ],
74
+ offers: {
75
+ eligibleQuantity: { maxValue: 6 },
76
+ itemOffered: { id: EVENT_SERVICE_ID },
77
+ seller: {
78
+ makesOffer: [
79
+ {
80
+ typeOf: client.factory.offerType.Offer,
81
+ availableAtOrFrom: { id: AVAILABLE_AT_OR_FROM_ID },
82
+ availabilityStarts: validFrom,
83
+ availabilityEnds: validThrough,
84
+ validFrom,
85
+ validThrough
86
+ }
87
+ ]
88
+ }
89
+ }
90
+ }
91
+ ],
92
+ {
93
+ locationBranchCode: LOCATION_BRANCH_CODE,
94
+ superEventId: SUPER_EVENT_ID,
95
+ hasTicketedSeat: true,
96
+ typeOf: client.factory.eventType.ScreeningEvent
97
+ }
98
+ );
99
+ console.log('created.');
100
+
101
+ await adminEventService.updateEventsByIdentifier(
102
+ [
103
+ {
104
+ identifier,
105
+ doorTime: startDate,
106
+ startDate,
107
+ endDate,
108
+ eventStatus: client.factory.eventStatusType.EventCancelled,
109
+ additionalProperty: [
110
+ {
111
+ name: ADDITIONAL_PROPERTY_NAME,
112
+ value: `update fromSamples:${moment()
113
+ .format('YYYY-MM-DD HH:mm')}`
114
+ }
115
+ ],
116
+ offers: {
117
+ eligibleQuantity: { maxValue: 6 },
118
+ itemOffered: { id: EVENT_SERVICE_ID },
119
+ seller: {
120
+ makesOffer: [
121
+ {
122
+ typeOf: client.factory.offerType.Offer,
123
+ availableAtOrFrom: { id: AVAILABLE_AT_OR_FROM_ID },
124
+ availabilityStarts: validFrom,
125
+ availabilityEnds: validThrough,
126
+ validFrom,
127
+ validThrough
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ }
133
+ ],
134
+ {
135
+ typeOf: client.factory.eventType.ScreeningEvent
136
+ }
137
+ );
138
+ console.log('updated.');
139
+ }
140
+
141
+ main()
142
+ .then(() => {
143
+ console.log('success!');
144
+ })
145
+ .catch(console.error);
@@ -1,13 +1,22 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
+ declare type IFindParams = Pick<factory.categoryCode.ISearchConditions, 'codeValue' | 'limit' | 'page'> & {
4
+ inCodeSet?: {
5
+ identifier?: {
6
+ $eq?: string;
7
+ };
8
+ };
9
+ };
10
+ declare type ICategoryCodeAsFindResult = Pick<factory.categoryCode.ICategoryCode, 'additionalProperty' | 'codeValue' | 'color' | 'image' | 'name' | 'typeOf'>;
3
11
  /**
4
12
  * 区分サービス
5
13
  */
6
14
  export declare class CategoryCodeService extends Service {
7
15
  /**
8
- * 検索
16
+ * 区分検索(決済カード区分を除く)
9
17
  */
10
- search(params: Omit<factory.categoryCode.ISearchConditions, 'project'>): Promise<{
11
- data: factory.categoryCode.ICategoryCode[];
18
+ search(params: IFindParams): Promise<{
19
+ data: ICategoryCodeAsFindResult[];
12
20
  }>;
13
21
  }
22
+ export {};
@@ -63,7 +63,7 @@ var CategoryCodeService = /** @class */ (function (_super) {
63
63
  return _super !== null && _super.apply(this, arguments) || this;
64
64
  }
65
65
  /**
66
- * 検索
66
+ * 区分検索(決済カード区分を除く)
67
67
  */
68
68
  CategoryCodeService.prototype.search = function (params) {
69
69
  return __awaiter(this, void 0, void 0, function () {
@@ -23,7 +23,7 @@ export declare type IUpdateParamsByIdentifier = Pick<factory.event.screeningEven
23
23
  export declare class EventService extends Service {
24
24
  /**
25
25
  * イベント冪等複数作成
26
- * イベントコードをキーにして、存在しなければ作成する
26
+ * イベント識別子をキーにして、存在しなければ作成する
27
27
  */
28
28
  createIfNotExistByIdentifier(params: ICreateParamsByIdentifier[], options: {
29
29
  /**
@@ -65,7 +65,7 @@ var EventService = /** @class */ (function (_super) {
65
65
  }
66
66
  /**
67
67
  * イベント冪等複数作成
68
- * イベントコードをキーにして、存在しなければ作成する
68
+ * イベント識別子をキーにして、存在しなければ作成する
69
69
  */
70
70
  EventService.prototype.createIfNotExistByIdentifier = function (params, options) {
71
71
  return __awaiter(this, void 0, void 0, function () {
@@ -12,9 +12,9 @@ interface ICreateParams {
12
12
  text: string;
13
13
  about: {
14
14
  /**
15
- * メモの主題リソースコード
15
+ * メモの主題リソースID
16
16
  */
17
- identifier: string;
17
+ id: string;
18
18
  };
19
19
  }
20
20
  export interface IFindParams {
@@ -30,10 +30,6 @@ export interface IFindParams {
30
30
  * max: 10
31
31
  */
32
32
  aboutIds?: string[];
33
- /**
34
- * 主題リソースコードリスト
35
- * max: 10
36
- */
37
33
  /**
38
34
  * メモ識別子リスト
39
35
  * max: 10
@@ -0,0 +1,62 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type IPaymentServiceAsFindResult = Pick<factory.service.paymentService.IService, 'additionalProperty' | 'description' | 'name' | 'productID' | 'serviceOutput' | 'serviceType' | 'typeOf'> & {
4
+ /**
5
+ * 決済サービスID
6
+ */
7
+ id: string;
8
+ project?: never;
9
+ };
10
+ export interface IFindParams {
11
+ /**
12
+ * max: 20
13
+ */
14
+ limit: number;
15
+ /**
16
+ * min: 1
17
+ */
18
+ page: number;
19
+ sortByProductID?: factory.sortType;
20
+ availableChannelId?: string;
21
+ id?: string;
22
+ ids?: string[];
23
+ nameRegex?: string;
24
+ productID?: string;
25
+ productIDs?: string[];
26
+ productIDRegex?: string;
27
+ /**
28
+ * プロバイダーに指定IDの販売者が含まれる
29
+ */
30
+ providerId?: string;
31
+ typeOf?: factory.service.paymentService.PaymentServiceType;
32
+ typeOfs?: factory.service.paymentService.PaymentServiceType[];
33
+ /**
34
+ * Invoice or Permit
35
+ */
36
+ serviceOutputTypeOf?: string;
37
+ /**
38
+ * 出力通貨区分コード
39
+ */
40
+ currencyType?: string;
41
+ /**
42
+ * 出力メンバーシップ区分コード
43
+ */
44
+ membershipType?: string;
45
+ /**
46
+ * 決済方法区分
47
+ */
48
+ paymentMethodType?: string;
49
+ }
50
+ /**
51
+ * 決済商品サービス
52
+ */
53
+ export declare class PaymentProductService extends Service {
54
+ /**
55
+ * 決済サービス検索
56
+ * 公開属性のみ
57
+ * 管理者の決済サービス読取権限で使用可能
58
+ * 2025-10-18~
59
+ */
60
+ findPaymentServices(params: IFindParams): Promise<IPaymentServiceAsFindResult[]>;
61
+ }
62
+ export {};
@@ -0,0 +1,90 @@
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.PaymentProductService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ var BASE_URI = '/paymentServices';
58
+ /**
59
+ * 決済商品サービス
60
+ */
61
+ var PaymentProductService = /** @class */ (function (_super) {
62
+ __extends(PaymentProductService, _super);
63
+ function PaymentProductService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ /**
67
+ * 決済サービス検索
68
+ * 公開属性のみ
69
+ * 管理者の決済サービス読取権限で使用可能
70
+ * 2025-10-18~
71
+ */
72
+ PaymentProductService.prototype.findPaymentServices = function (params) {
73
+ return __awaiter(this, void 0, void 0, function () {
74
+ var _this = this;
75
+ return __generator(this, function (_a) {
76
+ return [2 /*return*/, this.fetch({
77
+ uri: BASE_URI,
78
+ method: 'GET',
79
+ qs: params,
80
+ expectedStatusCodes: [http_status_1.OK]
81
+ })
82
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
83
+ return [2 /*return*/, response.json()];
84
+ }); }); })];
85
+ });
86
+ });
87
+ };
88
+ return PaymentProductService;
89
+ }(service_1.Service));
90
+ exports.PaymentProductService = PaymentProductService;
@@ -1,13 +1,105 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
- export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel'>;
4
- export declare type ISearchProductsResult = IProductWithoutCredentials;
3
+ declare type IProductAsFindResult = Pick<factory.product.IProduct, 'description' | 'id' | 'name' | 'productID' | 'serviceOutput' | 'serviceType' | 'typeOf'> & {
4
+ /**
5
+ * プロダクトID
6
+ */
7
+ id: string;
8
+ project?: never;
9
+ hasOfferCatalog?: never;
10
+ additionalProperty?: never;
11
+ };
12
+ export interface IFindParams {
13
+ /**
14
+ * max: 20
15
+ */
16
+ limit: number;
17
+ /**
18
+ * min: 1
19
+ */
20
+ page: number;
21
+ sortByProductID?: factory.sortType;
22
+ id?: string;
23
+ ids?: string[];
24
+ typeOf?: factory.product.ProductType;
25
+ typeOfs?: factory.product.ProductType[];
26
+ /**
27
+ * カタログID
28
+ */
29
+ hasOfferCatalogId?: string;
30
+ /**
31
+ * 名称部分一致
32
+ */
33
+ nameRegex?: string;
34
+ /**
35
+ * プロダクトコード完全一致
36
+ */
37
+ productID?: string;
38
+ /**
39
+ * プロダクトコード部分一致
40
+ */
41
+ productIDRegex?: string;
42
+ /**
43
+ * 興行区分コード
44
+ */
45
+ serviceTypeCodeValue?: string;
46
+ /**
47
+ * ペイメントカードの場合、通貨区分
48
+ */
49
+ serviceOutputAmountCurrency?: string;
50
+ additionalPropertyName?: string;
51
+ }
52
+ interface IFindProductHasOfferCatalogParams {
53
+ /**
54
+ * max: 20
55
+ */
56
+ limit: number;
57
+ /**
58
+ * min: 1
59
+ */
60
+ page: number;
61
+ /**
62
+ * プロダクトIDリスト
63
+ */
64
+ itemOfferedIds?: string[];
65
+ }
66
+ interface IOfferCatalogAsFindResult {
67
+ /**
68
+ * カタログID
69
+ */
70
+ id: string;
71
+ /**
72
+ * 対象オファー
73
+ */
74
+ aggregateElement: {
75
+ itemOffered: {
76
+ /**
77
+ * プロダクトID
78
+ */
79
+ id: string;
80
+ typeOf: factory.product.ProductType;
81
+ };
82
+ };
83
+ }
5
84
  /**
6
85
  * プロダクトサービス
7
86
  */
8
87
  export declare class ProductService extends Service {
9
88
  /**
10
89
  * プロダクトコードによる冪等置換
90
+ * 在庫管理ロールが必要
11
91
  */
12
92
  upsertByProductId(params: factory.product.ICreateParams[]): Promise<void>;
93
+ /**
94
+ * プロダクト検索
95
+ * 公開属性のみ
96
+ * 管理者のプロダクト読取権限で使用可能
97
+ * 2025-10-14~
98
+ */
99
+ findProducts(params: IFindParams): Promise<IProductAsFindResult[]>;
100
+ /**
101
+ * プロダクトオファーカタログ検索
102
+ */
103
+ findProductHasOfferCatalog(params: IFindProductHasOfferCatalogParams): Promise<IOfferCatalogAsFindResult[]>;
13
104
  }
105
+ export {};