@cinerino/sdk 5.4.0-alpha.7 → 5.5.0-alpha.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.
@@ -0,0 +1,46 @@
1
+ // tslint:disable:no-console
2
+ import { factory, loadAdmin } from '../../lib/index';
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 offerCatalogService = await (await loadAdmin({
14
+ endpoint: <string>process.env.API_ENDPOINT,
15
+ auth: authClient
16
+ })).createOfferCatalogInstance({
17
+ project,
18
+ seller: { id: '' }
19
+ });
20
+
21
+ await offerCatalogService.upsertByIdentifier([
22
+ {
23
+ identifier: '2023121801',
24
+ itemListElement: [
25
+ { id: '1001', typeOf: factory.offerType.Offer }
26
+ ],
27
+ itemOffered: { typeOf: factory.product.ProductType.EventService },
28
+ name: {
29
+ en: 'xxx',
30
+ ja: 'xxx'
31
+ },
32
+ description: {
33
+ en: 'xxx',
34
+ ja: 'xxx'
35
+ },
36
+ additionalProperty: []
37
+ }
38
+ ]);
39
+ console.log('upserted');
40
+ }
41
+
42
+ main()
43
+ .then(() => {
44
+ console.log('success!');
45
+ })
46
+ .catch(console.error);
@@ -1,9 +1,9 @@
1
1
  // tslint:disable:no-console
2
- // tslint:disable-next-line:no-implicit-dependencies
3
- // import * as moment from 'moment';
4
- import { loadAdmin } from '../../lib/index';
2
+ import { factory, loadAdmin } from '../../lib/index';
5
3
  import * as auth from './auth/authAsAdmin';
6
4
 
5
+ const project = { id: String(process.env.PROJECT_ID) };
6
+
7
7
  async function main() {
8
8
  const authClient = await auth.login();
9
9
  await authClient.refreshAccessToken();
@@ -14,16 +14,37 @@ async function main() {
14
14
  endpoint: <string>process.env.API_ENDPOINT,
15
15
  auth: authClient
16
16
  })).createOfferInstance({
17
- project: { id: 'cinerino' },
17
+ project,
18
18
  seller: { id: '' }
19
19
  });
20
20
 
21
- const offers = await offerService.search({
22
- identifier: { $in: ['2023121301', 'invalid'] }
23
-
24
- });
25
- console.dir(offers, { depth: Infinity });
26
- console.log(offers.length, 'offers found');
21
+ await offerService.upsertByIdentifier([
22
+ {
23
+ // additionalProperty: [],
24
+ alternateName: { en: '', ja: 'xxx' },
25
+ availability: factory.itemAvailability.InStock,
26
+ // availableAtOrFrom: [],
27
+ itemOffered: {
28
+ typeOf: factory.product.ProductType.EventService
29
+ },
30
+ name: { ja: 'xxx', en: 'xxx' },
31
+ priceSpecification: {
32
+ price: 1,
33
+ referenceQuantity: {
34
+ typeOf: 'QuantitativeValue',
35
+ value: 1,
36
+ unitCode: factory.unitCode.C62
37
+ },
38
+ accounting: {
39
+ accountsReceivable: 1
40
+ }
41
+ },
42
+ description: { en: '', ja: 'xxx' },
43
+ // hasMerchantReturnPolicy: [],
44
+ identifier: '20231218'
45
+ }
46
+ ]);
47
+ console.log('upserted');
27
48
  }
28
49
 
29
50
  main()
@@ -5,8 +5,11 @@ import { Service } from '../service';
5
5
  */
6
6
  export declare class CreativeWorkService extends Service {
7
7
  /**
8
- * コンテンツ冪等置換(コードに対してユニーク)
9
- * 存在しなければ作成し、存在すれば置換
8
+ * コードによる冪等置換
10
9
  */
11
- upsertMoviesByIdentifier(params: factory.creativeWork.movie.ICreateParams[]): Promise<void>;
10
+ upsertMoviesByIdentifier(
11
+ /**
12
+ * 最大長:20
13
+ */
14
+ params: factory.creativeWork.movie.ICreateParams[]): Promise<void>;
12
15
  }
@@ -63,10 +63,13 @@ var CreativeWorkService = /** @class */ (function (_super) {
63
63
  return _super !== null && _super.apply(this, arguments) || this;
64
64
  }
65
65
  /**
66
- * コンテンツ冪等置換(コードに対してユニーク)
67
- * 存在しなければ作成し、存在すれば置換
66
+ * コードによる冪等置換
68
67
  */
69
- CreativeWorkService.prototype.upsertMoviesByIdentifier = function (params) {
68
+ CreativeWorkService.prototype.upsertMoviesByIdentifier = function (
69
+ /**
70
+ * 最大長:20
71
+ */
72
+ params) {
70
73
  return __awaiter(this, void 0, void 0, function () {
71
74
  return __generator(this, function (_a) {
72
75
  switch (_a.label) {
@@ -27,8 +27,11 @@ export declare class EventService extends Service {
27
27
  };
28
28
  }): Promise<void>;
29
29
  /**
30
- * 施設コンテンツ冪等置換(施設+コンテンツ+バージョンに対してユニーク)
31
- * 存在しなければ作成し、存在すれば置換
30
+ * [施設+コンテンツ+バージョン]による施設コンテンツ冪等置換
32
31
  */
33
- upsertScreeningEventSeriesByVersion(params: factory.event.ICreateParams<factory.eventType.ScreeningEventSeries>[]): Promise<void>;
32
+ upsertScreeningEventSeriesByVersion(
33
+ /**
34
+ * 最大長:20
35
+ */
36
+ params: factory.event.ICreateParams<factory.eventType.ScreeningEventSeries>[]): Promise<void>;
34
37
  }
@@ -105,10 +105,13 @@ var EventService = /** @class */ (function (_super) {
105
105
  });
106
106
  };
107
107
  /**
108
- * 施設コンテンツ冪等置換(施設+コンテンツ+バージョンに対してユニーク)
109
- * 存在しなければ作成し、存在すれば置換
108
+ * [施設+コンテンツ+バージョン]による施設コンテンツ冪等置換
110
109
  */
111
- EventService.prototype.upsertScreeningEventSeriesByVersion = function (params) {
110
+ EventService.prototype.upsertScreeningEventSeriesByVersion = function (
111
+ /**
112
+ * 最大長:20
113
+ */
114
+ params) {
112
115
  return __awaiter(this, void 0, void 0, function () {
113
116
  return __generator(this, function (_a) {
114
117
  switch (_a.label) {
@@ -29,5 +29,13 @@ export declare class OfferService extends Service {
29
29
  * 管理者権限が必要です
30
30
  */
31
31
  search(params: ISearchConditions): Promise<IUnitPriceOfferAsSearchResult[]>;
32
+ /**
33
+ * コードによる冪等置換
34
+ */
35
+ upsertByIdentifier(
36
+ /**
37
+ * 最大長:20
38
+ */
39
+ params: Pick<factory.unitPriceOffer.ICreateParams, 'acceptedPaymentMethod' | 'addOn' | 'additionalProperty' | 'advanceBookingRequirement' | 'alternateName' | 'availability' | 'availableAtOrFrom' | 'category' | 'color' | 'description' | 'eligibleSeatingType' | 'hasMerchantReturnPolicy' | 'identifier' | 'itemOffered' | 'name' | 'priceSpecification' | 'settings' | 'validFrom' | 'validThrough'>[]): Promise<void>;
32
40
  }
33
41
  export {};
@@ -82,6 +82,31 @@ var OfferService = /** @class */ (function (_super) {
82
82
  });
83
83
  });
84
84
  };
85
+ /**
86
+ * コードによる冪等置換
87
+ */
88
+ OfferService.prototype.upsertByIdentifier = function (
89
+ /**
90
+ * 最大長:20
91
+ */
92
+ params) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ return __generator(this, function (_a) {
95
+ switch (_a.label) {
96
+ case 0: return [4 /*yield*/, this.fetch({
97
+ uri: '/offers',
98
+ method: 'PUT',
99
+ body: params,
100
+ qs: {},
101
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
102
+ })];
103
+ case 1:
104
+ _a.sent();
105
+ return [2 /*return*/];
106
+ }
107
+ });
108
+ });
109
+ };
85
110
  return OfferService;
86
111
  }(service_1.Service));
87
112
  exports.OfferService = OfferService;
@@ -0,0 +1,15 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ /**
4
+ * カタログサービス
5
+ */
6
+ export declare class OfferCatalogService extends Service {
7
+ /**
8
+ * コードによる冪等置換
9
+ */
10
+ upsertByIdentifier(
11
+ /**
12
+ * 最大長:20
13
+ */
14
+ params: Pick<factory.offerCatalog.IOfferCatalog, 'additionalProperty' | 'description' | 'identifier' | 'itemListElement' | 'itemOffered' | 'name'>[]): Promise<void>;
15
+ }
@@ -0,0 +1,92 @@
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.OfferCatalogService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * カタログサービス
59
+ */
60
+ var OfferCatalogService = /** @class */ (function (_super) {
61
+ __extends(OfferCatalogService, _super);
62
+ function OfferCatalogService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ /**
66
+ * コードによる冪等置換
67
+ */
68
+ OfferCatalogService.prototype.upsertByIdentifier = function (
69
+ /**
70
+ * 最大長:20
71
+ */
72
+ params) {
73
+ return __awaiter(this, void 0, void 0, function () {
74
+ return __generator(this, function (_a) {
75
+ switch (_a.label) {
76
+ case 0: return [4 /*yield*/, this.fetch({
77
+ uri: '/offerCatalogs',
78
+ method: 'PUT',
79
+ body: params,
80
+ qs: {},
81
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
82
+ })];
83
+ case 1:
84
+ _a.sent();
85
+ return [2 /*return*/];
86
+ }
87
+ });
88
+ });
89
+ };
90
+ return OfferCatalogService;
91
+ }(service_1.Service));
92
+ exports.OfferCatalogService = OfferCatalogService;
@@ -2,6 +2,7 @@ import { IAdditionalOptions, IOptions, IUnset as IUnsetOnService } from './servi
2
2
  import type { CreativeWorkService } from './admin/creativeWork';
3
3
  import type { EventService } from './admin/event';
4
4
  import type { OfferService } from './admin/offer';
5
+ import type { OfferCatalogService } from './admin/offerCatalog';
5
6
  export declare namespace service {
6
7
  type IUnset = IUnsetOnService;
7
8
  /**
@@ -25,6 +26,13 @@ export declare namespace service {
25
26
  namespace Offer {
26
27
  let svc: typeof OfferService | undefined;
27
28
  }
29
+ /**
30
+ * カタログサービス
31
+ */
32
+ type OffeCatalogr = OfferCatalogService;
33
+ namespace OfferCatalog {
34
+ let svc: typeof OfferCatalogService | undefined;
35
+ }
28
36
  }
29
37
  /**
30
38
  * 管理サービス
@@ -35,4 +43,5 @@ export declare class Admin {
35
43
  createCreativeWorkInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CreativeWorkService>;
36
44
  createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
37
45
  createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
46
+ createOfferCatalogInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogService>;
38
47
  }
@@ -59,6 +59,9 @@ var service;
59
59
  var Offer;
60
60
  (function (Offer) {
61
61
  })(Offer = service.Offer || (service.Offer = {}));
62
+ var OfferCatalog;
63
+ (function (OfferCatalog) {
64
+ })(OfferCatalog = service.OfferCatalog || (service.OfferCatalog = {}));
62
65
  })(service = exports.service || (exports.service = {}));
63
66
  /**
64
67
  * 管理サービス
@@ -118,6 +121,23 @@ var Admin = /** @class */ (function () {
118
121
  });
119
122
  });
120
123
  };
124
+ Admin.prototype.createOfferCatalogInstance = function (params) {
125
+ return __awaiter(this, void 0, void 0, function () {
126
+ var _a;
127
+ return __generator(this, function (_b) {
128
+ switch (_b.label) {
129
+ case 0:
130
+ if (!(service.OfferCatalog.svc === undefined)) return [3 /*break*/, 2];
131
+ _a = service.OfferCatalog;
132
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/offerCatalog'); })];
133
+ case 1:
134
+ _a.svc = (_b.sent()).OfferCatalogService;
135
+ _b.label = 2;
136
+ case 2: return [2 /*return*/, new service.OfferCatalog.svc(__assign(__assign({}, this.options), params))];
137
+ }
138
+ });
139
+ });
140
+ };
121
141
  return Admin;
122
142
  }());
123
143
  exports.Admin = Admin;
@@ -18,7 +18,11 @@ export declare class ProductService extends Service {
18
18
  /**
19
19
  * 検索
20
20
  */
21
- search(params: Omit<factory.product.ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<{
21
+ search(params: Omit<factory.product.ISearchConditions, 'project'> & {
22
+ typeOf: {
23
+ $eq: string;
24
+ };
25
+ } & IProjectionSearchConditions): Promise<{
22
26
  data: ISearchProductsResult[];
23
27
  }>;
24
28
  /**
@@ -34,7 +34,7 @@ export declare class OfferCatalogService extends Service {
34
34
  update(params: Omit<factory.offerCatalog.IOfferCatalog, 'project' | 'typeOf' | 'relatedOffer'> & {
35
35
  id: string;
36
36
  }): Promise<void>;
37
- upsertByIdentifier(params: Omit<factory.offerCatalog.IOfferCatalog, 'id' | 'project' | 'typeOf' | 'relatedOffer'>[]): Promise<void>;
37
+ upsertByIdentifier(params: Pick<factory.offerCatalog.IOfferCatalog, 'additionalProperty' | 'description' | 'identifier' | 'itemListElement' | 'itemOffered' | 'name'>[]): Promise<void>;
38
38
  /**
39
39
  * カタログ複数編集
40
40
  */
@@ -1,6 +1,5 @@
1
1
  import * as factory from '../factory';
2
- import { IUnset, Service } from '../service';
3
- export declare type IProduct = Omit<factory.product.IProduct, 'offers'> | Omit<factory.service.paymentService.IService, 'provider'>;
2
+ import { Service } from '../service';
4
3
  export declare type IProductWithoutCredentials = Omit<factory.product.IProduct, 'availableChannel' | 'offers'>;
5
4
  export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'provider'>;
6
5
  export declare type ISearchProductsResult = IProductWithoutCredentials | IPaymentServiceWithoutCredentials;
@@ -16,28 +15,61 @@ interface IProjectionSearchConditions {
16
15
  */
17
16
  export declare class ProductService extends Service {
18
17
  /**
19
- * 作成
18
+ * プロダクト作成
20
19
  */
21
- create(params: IProduct): Promise<{
20
+ createProduct(params: factory.product.ICreateParams): Promise<{
21
+ id: string;
22
+ }>;
23
+ /**
24
+ * 決済サービス作成
25
+ */
26
+ createPaymentService(params: Omit<factory.service.paymentService.IService, 'provider'>): Promise<{
22
27
  id: string;
23
28
  }>;
24
29
  /**
25
30
  * プロダクトタイプでなければ作成
26
31
  */
27
- createIfNotExist(params: IProduct): Promise<{
32
+ createIfNotExist(params: factory.product.ICreateParams): Promise<{
28
33
  id: string;
29
34
  }>;
30
35
  /**
31
- * 検索
36
+ * プロダクト検索
37
+ */
38
+ searchProducts(params: Omit<factory.product.ISearchConditions, 'project'> & {
39
+ typeOf?: {
40
+ $eq?: factory.product.ProductType;
41
+ $in?: factory.product.ProductType[];
42
+ };
43
+ } & IProjectionSearchConditions): Promise<{
44
+ data: IProductWithoutCredentials[];
45
+ }>;
46
+ /**
47
+ * 決済サービス検索
32
48
  */
33
- search(params: Omit<factory.product.ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<{
34
- data: ISearchProductsResult[];
49
+ searchPaymentServices(params: Omit<factory.product.ISearchConditions, 'project'> & {
50
+ typeOf?: {
51
+ $eq?: factory.service.paymentService.PaymentServiceType;
52
+ $in?: factory.service.paymentService.PaymentServiceType[];
53
+ };
54
+ } & IProjectionSearchConditions): Promise<{
55
+ data: IPaymentServiceWithoutCredentials[];
35
56
  }>;
36
- findById(params: {
57
+ findProductById(params: {
37
58
  id: string;
38
- } & IProjectionSearchConditions): Promise<IProduct>;
39
- update(params: IProduct & IUnset): Promise<void>;
40
- deleteById(params: {
59
+ } & IProjectionSearchConditions): Promise<Omit<factory.product.IProduct, 'offers'>>;
60
+ findPaymentServiceById(params: {
61
+ id: string;
62
+ } & IProjectionSearchConditions): Promise<Omit<factory.service.paymentService.IService, 'provider'>>;
63
+ updateProduct(params: factory.product.ICreateParams & {
64
+ id: string;
65
+ }): Promise<void>;
66
+ updatePaymentService(params: Omit<factory.service.paymentService.IService, 'provider'> & {
67
+ id: string;
68
+ }): Promise<void>;
69
+ deleteProductById(params: {
70
+ id: string;
71
+ }): Promise<void>;
72
+ deletePaymentServiceById(params: {
41
73
  id: string;
42
74
  }): Promise<void>;
43
75
  }
@@ -74,9 +74,9 @@ var ProductService = /** @class */ (function (_super) {
74
74
  return _super !== null && _super.apply(this, arguments) || this;
75
75
  }
76
76
  /**
77
- * 作成
77
+ * プロダクト作成
78
78
  */
79
- ProductService.prototype.create = function (params) {
79
+ ProductService.prototype.createProduct = function (params) {
80
80
  return __awaiter(this, void 0, void 0, function () {
81
81
  var _this = this;
82
82
  return __generator(this, function (_a) {
@@ -92,6 +92,25 @@ var ProductService = /** @class */ (function (_super) {
92
92
  });
93
93
  });
94
94
  };
95
+ /**
96
+ * 決済サービス作成
97
+ */
98
+ ProductService.prototype.createPaymentService = 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: '/paymentServices',
104
+ method: 'POST',
105
+ body: params,
106
+ expectedStatusCodes: [http_status_1.CREATED]
107
+ })
108
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
109
+ return [2 /*return*/, response.json()];
110
+ }); }); })];
111
+ });
112
+ });
113
+ };
95
114
  /**
96
115
  * プロダクトタイプでなければ作成
97
116
  */
@@ -113,9 +132,9 @@ var ProductService = /** @class */ (function (_super) {
113
132
  });
114
133
  };
115
134
  /**
116
- * 検索
135
+ * プロダクト検索
117
136
  */
118
- ProductService.prototype.search = function (params) {
137
+ ProductService.prototype.searchProducts = function (params) {
119
138
  return __awaiter(this, void 0, void 0, function () {
120
139
  var _this = this;
121
140
  return __generator(this, function (_a) {
@@ -140,7 +159,35 @@ var ProductService = /** @class */ (function (_super) {
140
159
  });
141
160
  });
142
161
  };
143
- ProductService.prototype.findById = function (params) {
162
+ /**
163
+ * 決済サービス検索
164
+ */
165
+ ProductService.prototype.searchPaymentServices = function (params) {
166
+ return __awaiter(this, void 0, void 0, function () {
167
+ var _this = this;
168
+ return __generator(this, function (_a) {
169
+ return [2 /*return*/, this.fetch({
170
+ uri: '/paymentServices',
171
+ method: 'GET',
172
+ qs: params,
173
+ expectedStatusCodes: [http_status_1.OK]
174
+ })
175
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
176
+ var _a;
177
+ return __generator(this, function (_b) {
178
+ switch (_b.label) {
179
+ case 0:
180
+ _a = {};
181
+ return [4 /*yield*/, response.json()];
182
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
183
+ _a)];
184
+ }
185
+ });
186
+ }); })];
187
+ });
188
+ });
189
+ };
190
+ ProductService.prototype.findProductById = function (params) {
144
191
  return __awaiter(this, void 0, void 0, function () {
145
192
  var id, query;
146
193
  var _this = this;
@@ -158,7 +205,25 @@ var ProductService = /** @class */ (function (_super) {
158
205
  });
159
206
  });
160
207
  };
161
- ProductService.prototype.update = function (params) {
208
+ ProductService.prototype.findPaymentServiceById = function (params) {
209
+ return __awaiter(this, void 0, void 0, function () {
210
+ var id, query;
211
+ var _this = this;
212
+ return __generator(this, function (_a) {
213
+ id = params.id, query = __rest(params, ["id"]);
214
+ return [2 /*return*/, this.fetch({
215
+ uri: "/paymentServices/" + encodeURIComponent(String(id)),
216
+ method: 'GET',
217
+ expectedStatusCodes: [http_status_1.OK],
218
+ qs: query
219
+ })
220
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
221
+ return [2 /*return*/, response.json()];
222
+ }); }); })];
223
+ });
224
+ });
225
+ };
226
+ ProductService.prototype.updateProduct = function (params) {
162
227
  return __awaiter(this, void 0, void 0, function () {
163
228
  return __generator(this, function (_a) {
164
229
  switch (_a.label) {
@@ -175,7 +240,24 @@ var ProductService = /** @class */ (function (_super) {
175
240
  });
176
241
  });
177
242
  };
178
- ProductService.prototype.deleteById = function (params) {
243
+ ProductService.prototype.updatePaymentService = function (params) {
244
+ return __awaiter(this, void 0, void 0, function () {
245
+ return __generator(this, function (_a) {
246
+ switch (_a.label) {
247
+ case 0: return [4 /*yield*/, this.fetch({
248
+ uri: "/paymentServices/" + encodeURIComponent(String(params.id)),
249
+ method: 'PUT',
250
+ body: params,
251
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
252
+ })];
253
+ case 1:
254
+ _a.sent();
255
+ return [2 /*return*/];
256
+ }
257
+ });
258
+ });
259
+ };
260
+ ProductService.prototype.deleteProductById = function (params) {
179
261
  return __awaiter(this, void 0, void 0, function () {
180
262
  return __generator(this, function (_a) {
181
263
  switch (_a.label) {
@@ -191,6 +273,22 @@ var ProductService = /** @class */ (function (_super) {
191
273
  });
192
274
  });
193
275
  };
276
+ ProductService.prototype.deletePaymentServiceById = function (params) {
277
+ return __awaiter(this, void 0, void 0, function () {
278
+ return __generator(this, function (_a) {
279
+ switch (_a.label) {
280
+ case 0: return [4 /*yield*/, this.fetch({
281
+ uri: "/paymentServices/" + encodeURIComponent(String(params.id)),
282
+ method: 'DELETE',
283
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
284
+ })];
285
+ case 1:
286
+ _a.sent();
287
+ return [2 /*return*/];
288
+ }
289
+ });
290
+ });
291
+ };
194
292
  return ProductService;
195
293
  }(service_1.Service));
196
294
  exports.ProductService = ProductService;