@cinerino/sdk 12.3.0-alpha.9 → 12.4.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/adminProductOffersByIdentifier.ts +86 -0
  2. package/example/src/chevre/default/findProductOffers.ts +43 -0
  3. package/example/src/cloud/admin/adminProductOffersByIdentifier.ts +78 -0
  4. package/example/src/cloud/admin/adminUpsertManyEventsByAdditionalProperty.ts +3 -1
  5. package/example/src/cloud/search/findProductOffers.ts +30 -0
  6. package/example/src/cloud/transaction/processPlaceOrderUsingMemberProgramTier.ts +10 -2
  7. package/lib/abstract/chevre/productOffer.d.ts +33 -0
  8. package/lib/abstract/chevre/productOffer.js +84 -0
  9. package/lib/abstract/chevre.d.ts +9 -0
  10. package/lib/abstract/chevre.js +20 -0
  11. package/lib/abstract/chevreAdmin/noteAboutOrder.js +4 -3
  12. package/lib/abstract/chevreAdmin/productOffer.d.ts +79 -0
  13. package/lib/abstract/{chevreConsole/eventOffer.js → chevreAdmin/productOffer.js} +54 -63
  14. package/lib/abstract/chevreAdmin.d.ts +9 -0
  15. package/lib/abstract/chevreAdmin.js +20 -0
  16. package/lib/abstract/chevreAsset/order/factory.d.ts +5 -2
  17. package/lib/abstract/chevreAsset/order.d.ts +5 -5
  18. package/lib/abstract/chevreConsole.d.ts +0 -9
  19. package/lib/abstract/chevreConsole.js +0 -20
  20. package/lib/abstract/cloud/admin/order.d.ts +2 -2
  21. package/lib/abstract/cloud/admin/productOffer.d.ts +48 -0
  22. package/lib/abstract/cloud/admin/productOffer.js +153 -0
  23. package/lib/abstract/cloud/admin.d.ts +9 -0
  24. package/lib/abstract/cloud/admin.js +20 -0
  25. package/lib/abstract/cloud/asset/order.d.ts +5 -5
  26. package/lib/abstract/cloud/search/productOffer.d.ts +11 -0
  27. package/lib/abstract/cloud/search/productOffer.js +89 -0
  28. package/lib/abstract/cloud/search.d.ts +12 -0
  29. package/lib/abstract/cloud/search.js +23 -0
  30. package/lib/bundle.js +1421 -987
  31. package/package.json +2 -2
  32. package/lib/abstract/chevreConsole/eventOffer.d.ts +0 -32
@@ -0,0 +1,86 @@
1
+ // tslint:disable:no-console
2
+ // tslint:disable-next-line:no-implicit-dependencies
3
+ import * as client from '../../../../lib/index';
4
+ import * as auth from '../../auth/authAsAdmin';
5
+
6
+ const PROJECT_ID = String(process.env.PROJECT_ID);
7
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
8
+ const MEMBER_TIER_IDENTIFIER = 'bronze';
9
+ const OFFER_IDENTIFIER = '20250924ValidForMemberTier';
10
+ const itemOfferedIdentifier = '20250924ValidForMemberTier';
11
+
12
+ // tslint:disable-next-line:max-func-body-length
13
+ async function main() {
14
+ const authClient = await auth.login();
15
+ await authClient.refreshAccessToken();
16
+ const loginTicket = authClient.verifyIdToken({});
17
+ console.log('username is', loginTicket.getUsername());
18
+
19
+ const productOfferService = await (await client.loadChevreAdmin({
20
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
21
+ auth: authClient
22
+ })).createProductOfferInstance({
23
+ project: { id: PROJECT_ID },
24
+ seller: { id: SELLER_ID }
25
+ });
26
+
27
+ const now = new Date();
28
+ await productOfferService.createValidForMemberTierByIdentifier(
29
+ [
30
+ {
31
+ identifier: OFFER_IDENTIFIER,
32
+ validForMemberTier: { identifier: MEMBER_TIER_IDENTIFIER },
33
+ validFrom: now,
34
+ validThrough: now
35
+ },
36
+ {
37
+ identifier: OFFER_IDENTIFIER,
38
+ validForMemberTier: { identifier: MEMBER_TIER_IDENTIFIER },
39
+ validFrom: now,
40
+ validThrough: now
41
+ }
42
+ ],
43
+ {
44
+ itemOfferedIdentifier,
45
+ offeredById: SELLER_ID
46
+ }
47
+ );
48
+ console.log('created.');
49
+
50
+ await productOfferService.updateValidForMemberTierByIdentifier(
51
+ [
52
+ {
53
+ identifier: OFFER_IDENTIFIER,
54
+ validForMemberTier: { identifier: MEMBER_TIER_IDENTIFIER },
55
+ validFrom: now,
56
+ validThrough: now
57
+ },
58
+ {
59
+ identifier: OFFER_IDENTIFIER,
60
+ validForMemberTier: { identifier: MEMBER_TIER_IDENTIFIER },
61
+ validFrom: now,
62
+ validThrough: now
63
+ }
64
+ ],
65
+ {
66
+ itemOfferedIdentifier,
67
+ offeredById: SELLER_ID
68
+ }
69
+ );
70
+ console.log('updated.');
71
+
72
+ const offers = await productOfferService.findProductOffers({
73
+ limit: 10,
74
+ page: 1,
75
+ itemOfferedIdentifier
76
+ });
77
+ // tslint:disable-next-line:no-null-keyword
78
+ console.dir(offers, { depth: null });
79
+ console.log(offers.length, 'offers found');
80
+ }
81
+
82
+ main()
83
+ .then(() => {
84
+ console.log('success!');
85
+ })
86
+ .catch(console.error);
@@ -0,0 +1,43 @@
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 productOfferService = await (await client.loadChevre({
18
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
19
+ auth: authClient
20
+ })).createProductOfferInstance({
21
+ project: { id: PROJECT_ID },
22
+ seller: { id: '' }
23
+ });
24
+
25
+ const result = await productOfferService.findProductOffers({
26
+ page: 1,
27
+ limit: 1,
28
+ // identifiers: ['x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '20250924ValidForMemberTier'],
29
+ itemOfferedIdentifiers: ['x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', '20250924ValidForMemberTier']
30
+ // startFrom: new Date(),
31
+ // startThrough: moment()
32
+ // .add(1, 'days')
33
+ // .toDate()
34
+ });
35
+ console.log(result);
36
+ console.log(result.length, 'offers returned');
37
+ }
38
+
39
+ main()
40
+ .then(() => {
41
+ console.log('success!');
42
+ })
43
+ .catch(console.error);
@@ -0,0 +1,78 @@
1
+ // tslint:disable:no-console
2
+ // tslint:disable-next-line:no-implicit-dependencies
3
+ import * as moment from 'moment-timezone';
4
+ import * as client from '../../../../lib/index';
5
+ import * as auth from '../../auth/authAsAdmin';
6
+
7
+ const PROJECT_ID = String(process.env.PROJECT_ID);
8
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
9
+
10
+ async function main() {
11
+ const authClient = await auth.login();
12
+ await authClient.refreshAccessToken();
13
+ const loginTicket = authClient.verifyIdToken({});
14
+ console.log('username is', loginTicket.getUsername());
15
+
16
+ const productOfferService = await (await client.loadCloudAdmin({
17
+ endpoint: <string>process.env.API_ADMIN_ENDPOINT,
18
+ auth: authClient
19
+ })).createProductOfferInstance({
20
+ project: { id: PROJECT_ID },
21
+ seller: { id: SELLER_ID }
22
+ });
23
+
24
+ const today = moment()
25
+ .tz('Asia/Tokyo')
26
+ .format('YYYY-MM-DD');
27
+ const identifier = '2025093001';
28
+ const itemOfferedIdentifier = '2025093001itemOfferedIdentifier';
29
+ await productOfferService.createValidForMemberTierByIdentifier(
30
+ [
31
+ {
32
+ identifier,
33
+ validFrom: moment(`${today}T13:00:00Z`)
34
+ .toDate(),
35
+ validThrough: moment(`${today}T14:00:00Z`)
36
+ .toDate(),
37
+ validForMemberTier: { identifier: 'bronze' }
38
+ }
39
+ ],
40
+ {
41
+ itemOfferedIdentifier: itemOfferedIdentifier,
42
+ offeredById: SELLER_ID
43
+ }
44
+ );
45
+ console.log('created.');
46
+
47
+ await productOfferService.updateValidForMemberTierByIdentifier(
48
+ [
49
+ {
50
+ identifier,
51
+ validFrom: moment(`${today}T13:00:00Z`)
52
+ .toDate(),
53
+ validThrough: moment(`${today}T14:00:00Z`)
54
+ .toDate(),
55
+ validForMemberTier: { identifier: 'bronze' }
56
+ }
57
+ ],
58
+ {
59
+ itemOfferedIdentifier: itemOfferedIdentifier,
60
+ offeredById: SELLER_ID
61
+ }
62
+ );
63
+ console.log('updated.');
64
+
65
+ const existingOffers = await productOfferService.findProductOffers({
66
+ limit: 10,
67
+ page: 1,
68
+ itemOfferedIdentifier
69
+ // offeredById: SELLER_ID
70
+ });
71
+ console.log(existingOffers.length, 'offers found.', existingOffers);
72
+ }
73
+
74
+ main()
75
+ .then(() => {
76
+ console.log('success!');
77
+ })
78
+ .catch(console.error);
@@ -53,6 +53,7 @@ async function main() {
53
53
  id: '7k9ayl8hc'
54
54
  },
55
55
  offers: {
56
+ identifier: '12345678', // <-プロダクトオファーでメンバープログラムティアごとのオファーを定義する場合に指定
56
57
  unacceptedPaymentMethod: [],
57
58
  eligibleQuantity: {
58
59
  maxValue: 6
@@ -76,7 +77,8 @@ async function main() {
76
77
  validFrom: moment(`${today}T13:00:00Z`)
77
78
  .toDate(),
78
79
  validThrough: moment(`${today}T14:00:00Z`)
79
- .toDate()
80
+ .toDate(),
81
+ validForMemberTier: { typeOf: 'MemberProgramTier' } // <-プロダクトオファーでメンバープログラムティアごとのオファーを定義する場合に指定
80
82
  }
81
83
  ]
82
84
  // makesOfferDefaultを指定するとmakesOfferよりも優先される
@@ -0,0 +1,30 @@
1
+ // tslint:disable:no-console
2
+ import { loadCloudSearch } from '../../../../lib/';
3
+ import { auth } from '../../auth/clientCredentials';
4
+
5
+ const PROJECT_ID = String(process.env.PROJECT_ID);
6
+
7
+ async function main() {
8
+ const productOfferService = await (await loadCloudSearch({
9
+ endpoint: <string>process.env.API_ENDPOINT,
10
+ auth: await auth()
11
+ })).createProductOfferInstance({
12
+ project: { id: PROJECT_ID },
13
+ seller: { id: '' }
14
+ });
15
+
16
+ const result = await productOfferService.findProductOffers({
17
+ limit: 10,
18
+ page: 1,
19
+ itemOfferedIdentifiers: ['xxx']
20
+ });
21
+ // tslint:disable-next-line:no-null-keyword
22
+ console.dir(result, { depth: null });
23
+ console.log(result.length, 'data found');
24
+ }
25
+
26
+ main()
27
+ .then(() => {
28
+ console.log('success!');
29
+ })
30
+ .catch(console.error);
@@ -237,7 +237,7 @@ type IAuthorizeReservationAction = Pick<client.factory.action.authorize.offer.ev
237
237
 
238
238
  // tslint:disable-next-line:max-func-body-length
239
239
  async function authorizeSeatReservationByEvent(params: {
240
- event: Omit<client.factory.event.screeningEvent.IEvent, 'offers'>;
240
+ event: { id: string };
241
241
  transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
242
242
  }): Promise<{
243
243
  price: number;
@@ -320,12 +320,20 @@ async function authorizeSeatReservationByEvent(params: {
320
320
  console.log(selectedSeatOffers.length, 'seats selected');
321
321
 
322
322
  await wait(3000);
323
+ if (typeof MEMBER_PROGRAM_TIER_TOKEN !== 'string') {
324
+ throw new Error('process.env.MEMBER_PROGRAM_TIER_TOKEN required');
325
+ }
323
326
  console.log('authorizing seat reservation...');
324
327
  const seatReservationAuth = <IAuthorizeReservationAction>await offerService.authorizeEventService({
325
328
  object: {
326
329
  reservationFor: {
327
330
  id: screeningEvent.id,
328
- offers: { validForMemberTier: MEMBER_PROGRAM_TIER_TOKEN }
331
+ offers: {
332
+ validForMemberTier: {
333
+ token: MEMBER_PROGRAM_TIER_TOKEN,
334
+ isTierOf: { identifier: 'DefaultMemberProgram' }
335
+ }
336
+ }
329
337
  },
330
338
  acceptedOffer: selectedSeatOffers.map((o) => {
331
339
  return {
@@ -0,0 +1,33 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ export declare type IProductOfferAsFindResult = Pick<factory.productOffer.IProductOffer, 'acceptedPaymentMethod' | 'availability' | 'identifier' | 'itemOffered' | 'validForMemberTier' | 'validFrom' | 'validThrough'> & {
4
+ id: string;
5
+ };
6
+ export interface IFindParams {
7
+ /**
8
+ * max: 100
9
+ */
10
+ limit: number;
11
+ page: number;
12
+ /**
13
+ * オファーコレクションコード
14
+ * max length: 10
15
+ */
16
+ itemOfferedIdentifiers?: string[];
17
+ /**
18
+ * オファーコード
19
+ * max length: 10
20
+ */
21
+ identifiers?: string[];
22
+ id?: string;
23
+ /**
24
+ * 有効なメンバープログラムティアコード
25
+ */
26
+ validForMemberTierIdentifier?: string;
27
+ }
28
+ /**
29
+ * プロダクトオファーサービス
30
+ */
31
+ export declare class ProductOfferService extends Service {
32
+ findProductOffers(params: IFindParams): Promise<IProductOfferAsFindResult[]>;
33
+ }
@@ -0,0 +1,84 @@
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.ProductOfferService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ var BASE_URI = '/productOffers';
58
+ /**
59
+ * プロダクトオファーサービス
60
+ */
61
+ var ProductOfferService = /** @class */ (function (_super) {
62
+ __extends(ProductOfferService, _super);
63
+ function ProductOfferService() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ ProductOfferService.prototype.findProductOffers = function (params) {
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ var _this = this;
69
+ return __generator(this, function (_a) {
70
+ return [2 /*return*/, this.fetch({
71
+ uri: BASE_URI,
72
+ method: 'GET',
73
+ qs: params,
74
+ expectedStatusCodes: [http_status_1.OK]
75
+ })
76
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
77
+ return [2 /*return*/, response.json()];
78
+ }); }); })];
79
+ });
80
+ });
81
+ };
82
+ return ProductOfferService;
83
+ }(service_1.Service));
84
+ exports.ProductOfferService = ProductOfferService;
@@ -8,6 +8,7 @@ import type { PaymentProductService } from './chevre/paymentService';
8
8
  import type { PlaceService } from './chevre/place';
9
9
  import type { HasPOSService } from './chevre/place/hasPOS';
10
10
  import type { ProductService } from './chevre/product';
11
+ import type { ProductOfferService } from './chevre/productOffer';
11
12
  import type { SellerService } from './chevre/seller';
12
13
  import type { TripService } from './chevre/trip';
13
14
  export declare namespace service {
@@ -77,6 +78,13 @@ export declare namespace service {
77
78
  namespace Product {
78
79
  let svc: typeof ProductService | undefined;
79
80
  }
81
+ /**
82
+ * プロダクトオファーサービス
83
+ */
84
+ type ProductOffer = ProductOfferService;
85
+ namespace ProductOffer {
86
+ let svc: typeof ProductOfferService | undefined;
87
+ }
80
88
  /**
81
89
  * 販売者サービス
82
90
  */
@@ -107,6 +115,7 @@ export declare class Chevre {
107
115
  createPlaceInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceService>;
108
116
  createHasPOSInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<HasPOSService>;
109
117
  createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
118
+ createProductOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductOfferService>;
110
119
  createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
111
120
  createTripInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TripService>;
112
121
  }
@@ -80,6 +80,9 @@ var service;
80
80
  var Product;
81
81
  (function (Product) {
82
82
  })(Product = service.Product || (service.Product = {}));
83
+ var ProductOffer;
84
+ (function (ProductOffer) {
85
+ })(ProductOffer = service.ProductOffer || (service.ProductOffer = {}));
83
86
  var Seller;
84
87
  (function (Seller) {
85
88
  })(Seller = service.Seller || (service.Seller = {}));
@@ -247,6 +250,23 @@ var Chevre = /** @class */ (function () {
247
250
  });
248
251
  });
249
252
  };
253
+ Chevre.prototype.createProductOfferInstance = function (params) {
254
+ return __awaiter(this, void 0, void 0, function () {
255
+ var _a;
256
+ return __generator(this, function (_b) {
257
+ switch (_b.label) {
258
+ case 0:
259
+ if (!(service.ProductOffer.svc === undefined)) return [3 /*break*/, 2];
260
+ _a = service.ProductOffer;
261
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevre/productOffer'); })];
262
+ case 1:
263
+ _a.svc = (_b.sent()).ProductOfferService;
264
+ _b.label = 2;
265
+ case 2: return [2 /*return*/, new service.ProductOffer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
266
+ }
267
+ });
268
+ });
269
+ };
250
270
  Chevre.prototype.createSellerInstance = function (params) {
251
271
  return __awaiter(this, void 0, void 0, function () {
252
272
  var _a;
@@ -54,6 +54,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.NoteAboutOrderService = void 0;
55
55
  var http_status_1 = require("http-status");
56
56
  var service_1 = require("../service");
57
+ var BASE_URI = '/orderNotes';
57
58
  /**
58
59
  * 注文メモサービス
59
60
  */
@@ -67,7 +68,7 @@ var NoteAboutOrderService = /** @class */ (function (_super) {
67
68
  return __generator(this, function (_a) {
68
69
  switch (_a.label) {
69
70
  case 0: return [4 /*yield*/, this.fetch({
70
- uri: '/notes',
71
+ uri: BASE_URI,
71
72
  method: 'PUT',
72
73
  body: params,
73
74
  expectedStatusCodes: [http_status_1.NO_CONTENT]
@@ -84,7 +85,7 @@ var NoteAboutOrderService = /** @class */ (function (_super) {
84
85
  var _this = this;
85
86
  return __generator(this, function (_a) {
86
87
  return [2 /*return*/, this.fetch({
87
- uri: '/notes',
88
+ uri: BASE_URI,
88
89
  method: 'GET',
89
90
  qs: params,
90
91
  expectedStatusCodes: [http_status_1.OK]
@@ -103,7 +104,7 @@ var NoteAboutOrderService = /** @class */ (function (_super) {
103
104
  case 0:
104
105
  text = body.text;
105
106
  return [4 /*yield*/, this.fetch({
106
- uri: "/notes/" + String(id),
107
+ uri: BASE_URI + "/" + String(id),
107
108
  method: 'PUT',
108
109
  body: { text: text },
109
110
  expectedStatusCodes: [http_status_1.NO_CONTENT]
@@ -0,0 +1,79 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ export interface IFindParams {
4
+ /**
5
+ * max: 20
6
+ */
7
+ limit: number;
8
+ page: number;
9
+ /**
10
+ * プロダクトオファーコレクションコード
11
+ */
12
+ itemOfferedIdentifier?: string;
13
+ /**
14
+ * プロダクトオファーコレクションコードリスト
15
+ * max length: 10
16
+ */
17
+ itemOfferedIdentifiers?: string[];
18
+ /**
19
+ * プロダクトオファーコードリスト
20
+ * max length: 10
21
+ */
22
+ identifiers?: string[];
23
+ id?: string;
24
+ /**
25
+ * 有効なメンバープログラムティアコード
26
+ */
27
+ validForMemberTierIdentifier?: string;
28
+ offeredById?: string;
29
+ }
30
+ /**
31
+ * プロダクトオファーサービス
32
+ */
33
+ export declare class ProductOfferService extends Service {
34
+ /**
35
+ * メンバープログラムティアで有効なプロダクトオファーを追加する
36
+ */
37
+ createValidForMemberTierByIdentifier(
38
+ /**
39
+ * max: 20
40
+ */
41
+ params: factory.productOffer.IAddValidForMemberTierParams[], options: {
42
+ /**
43
+ * プロダクトオファーコレクションコード
44
+ */
45
+ itemOfferedIdentifier: string;
46
+ /**
47
+ * オファー提供販売者ID
48
+ */
49
+ offeredById: string;
50
+ }): Promise<void>;
51
+ /**
52
+ * メンバープログラムティアで有効なプロダクトオファーを編集する
53
+ */
54
+ updateValidForMemberTierByIdentifier(
55
+ /**
56
+ * max: 20
57
+ */
58
+ params: factory.productOffer.IAddValidForMemberTierParams[], options: {
59
+ /**
60
+ * プロダクトオファーコレクションコード
61
+ */
62
+ itemOfferedIdentifier: string;
63
+ /**
64
+ * オファー提供販売者ID
65
+ */
66
+ offeredById: string;
67
+ }): Promise<void>;
68
+ findProductOffers(params: IFindParams): Promise<(Omit<factory.productOffer.IProductOffer, 'project'> & {
69
+ id: string;
70
+ })[]>;
71
+ /**
72
+ * 有効なメンバーティアトークンを発行する(開発使用目的)
73
+ */
74
+ publishMemberTierToken(params: {
75
+ id: string;
76
+ }): Promise<{
77
+ token: string;
78
+ }>;
79
+ }