@cinerino/sdk 8.0.0-alpha.4 → 8.0.0-alpha.5

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.
@@ -1,6 +1,6 @@
1
- import { cloudPay, factory } from '../../../lib/index';
1
+ import { cloudPay, factory } from '../../../../lib/index';
2
2
 
3
- import { IAuthorizeMovieTicketObject, IPurpose } from '../../../lib/abstract/chevrePay/payment/factory';
3
+ import { IAuthorizeMovieTicketObject, IPurpose } from '../../../../lib/abstract/chevrePay/payment/factory';
4
4
 
5
5
  type IMinimizedPurchaseNumberAuthResult = Pick<
6
6
  factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult,
@@ -223,9 +223,10 @@ async function authorizeSeatReservationByEvent(params: {
223
223
  seller: { id: '' }
224
224
  });
225
225
 
226
- const offerService = new (await client.loadService()).Offer({
227
- endpoint: <string>process.env.API_ENDPOINT,
228
- auth: await auth(),
226
+ const offerService = await (await client.loadCloudTxn({
227
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
228
+ auth: await auth()
229
+ })).createOfferInstance({
229
230
  project,
230
231
  seller: { id: '' }
231
232
  });
@@ -1,7 +1,7 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
2
  import * as moment from 'moment';
3
- import * as client from '../../../lib/index';
4
- import { auth } from '../auth/clientCredentials';
3
+ import * as client from '../../../../lib/index';
4
+ import { auth } from '../../auth/clientCredentials';
5
5
 
6
6
  const project = { id: String(process.env.PROJECT_ID) };
7
7
 
@@ -38,9 +38,10 @@ async function main() {
38
38
  project
39
39
  });
40
40
 
41
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
42
- endpoint: <string>process.env.API_ENDPOINT,
43
- auth: await auth(),
41
+ const placeOrderService = await (await client.loadCloudTxn({
42
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
43
+ auth: await auth()
44
+ })).createPlaceOrderInstance({
44
45
  project,
45
46
  seller: { id: '' }
46
47
  });
@@ -1,7 +1,7 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
2
  import * as moment from 'moment';
3
- import * as client from '../../../lib/index';
4
- import { auth } from '../auth/clientCredentials';
3
+ import * as client from '../../../../lib/index';
4
+ import { auth } from '../../auth/clientCredentials';
5
5
  import { PaymentAsyncForceService } from './paymentAsyncForce';
6
6
 
7
7
  const project = { id: String(process.env.PROJECT_ID) };
@@ -36,9 +36,10 @@ async function main() {
36
36
  auth: await auth(),
37
37
  project
38
38
  });
39
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
40
- endpoint: <string>process.env.API_ENDPOINT,
41
- auth: await auth(),
39
+ const placeOrderService = await (await client.loadCloudTxn({
40
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
41
+ auth: await auth()
42
+ })).createPlaceOrderInstance({
42
43
  project,
43
44
  seller: { id: '' }
44
45
  });
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * 注文返品プロセス
4
4
  */
5
- import * as client from '../../../lib/index';
6
- import * as auth from '../auth/authAsAdmin';
5
+ import * as client from '../../../../lib/index';
6
+ import * as auth from '../../auth/authAsAdmin';
7
7
 
8
8
  async function main() {
9
9
  // 管理者として操作する場合はこちら
@@ -20,9 +20,10 @@ async function main() {
20
20
  // state: ''
21
21
  // });
22
22
 
23
- const returnOrderService = new (await client.loadService()).txn.ReturnOrder({
24
- endpoint: <string>process.env.API_ENDPOINT,
25
- auth: authClient,
23
+ const returnOrderService = await (await client.loadCloudTxn({
24
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
25
+ auth: authClient
26
+ })).createReturnOrderInstance({
26
27
  project: { id: 'cinerino' },
27
28
  seller: { id: '' }
28
29
  });
@@ -1,6 +1,6 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
- import * as client from '../../../../lib/index';
3
- import { auth as authClient } from '../../auth/clientCredentials';
2
+ import * as client from '../../../../../lib/index';
3
+ import { auth as authClient } from '../../../auth/clientCredentials';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
6
 
@@ -18,9 +18,10 @@ async function main() {
18
18
  auth: await authClient(),
19
19
  project
20
20
  });
21
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
22
- endpoint: <string>process.env.API_ENDPOINT,
23
- auth: await authClient(),
21
+ const placeOrderService = await (await client.loadCloudTxn({
22
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
23
+ auth: await authClient()
24
+ })).createPlaceOrderInstance({
24
25
  project,
25
26
  seller: { id: 'xxx' }
26
27
  });
@@ -1,6 +1,6 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
- import * as client from '../../../../lib/index';
3
- import { auth as authClient } from '../../auth/clientCredentials';
2
+ import * as client from '../../../../../lib/index';
3
+ import { auth as authClient } from '../../../auth/clientCredentials';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
6
 
@@ -18,9 +18,10 @@ async function main() {
18
18
  auth: await authClient(),
19
19
  project
20
20
  });
21
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
22
- endpoint: <string>process.env.API_ENDPOINT,
23
- auth: await authClient(),
21
+ const placeOrderService = await (await client.loadCloudTxn({
22
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
23
+ auth: await authClient()
24
+ })).createPlaceOrderInstance({
24
25
  project,
25
26
  seller: { id: 'xxx' }
26
27
  });
@@ -10,7 +10,6 @@ import { CreativeWorkService } from './service/creativeWork';
10
10
  import { DeliveryService } from './service/delivery';
11
11
  import { EmailMessageService } from './service/emailMessage';
12
12
  import { EventService } from './service/event';
13
- import { OfferService } from './service/offer';
14
13
  import { OrderService } from './service/order';
15
14
  import { PermitService } from './service/permit';
16
15
  import { PersonService } from './service/person';
@@ -21,9 +20,7 @@ import { ProductService } from './service/product';
21
20
  import { ReservationService } from './service/reservation';
22
21
  import { SellerService } from './service/seller';
23
22
  import { TokenService } from './service/token';
24
- import { PlaceOrderTransactionService } from './service/transaction/placeOrder';
25
23
  import { PlaceOrderTransaction4ssktsService } from './service/transaction/placeOrder4sskts';
26
- import { ReturnOrderTransactionService } from './service/transaction/returnOrder';
27
24
  /**
28
25
  * サービスモジュール
29
26
  */
@@ -61,11 +58,6 @@ export declare namespace service {
61
58
  */
62
59
  class Event extends EventService {
63
60
  }
64
- /**
65
- * オファーサービス
66
- */
67
- class Offer extends OfferService {
68
- }
69
61
  namespace order {
70
62
  export import factory = OrderServiceFactory;
71
63
  }
@@ -133,21 +125,11 @@ export declare namespace service {
133
125
  namespace placeOrder {
134
126
  export import factory = PlaceOrderTransactionServiceFactory;
135
127
  }
136
- /**
137
- * 注文取引サービス
138
- */
139
- class PlaceOrder extends PlaceOrderTransactionService {
140
- }
141
128
  /**
142
129
  * sskts専用注文取引サービス
143
130
  */
144
131
  class PlaceOrder4sskts extends PlaceOrderTransaction4ssktsService {
145
132
  }
146
- /**
147
- * 返品取引サービス
148
- */
149
- class ReturnOrder extends ReturnOrderTransactionService {
150
- }
151
133
  }
152
134
  /**
153
135
  * 取引サービス
@@ -29,7 +29,6 @@ var creativeWork_1 = require("./service/creativeWork");
29
29
  var delivery_1 = require("./service/delivery");
30
30
  var emailMessage_1 = require("./service/emailMessage");
31
31
  var event_1 = require("./service/event");
32
- var offer_1 = require("./service/offer");
33
32
  var order_1 = require("./service/order");
34
33
  var permit_1 = require("./service/permit");
35
34
  var person_1 = require("./service/person");
@@ -40,9 +39,7 @@ var product_1 = require("./service/product");
40
39
  var reservation_1 = require("./service/reservation");
41
40
  var seller_1 = require("./service/seller");
42
41
  var token_1 = require("./service/token");
43
- var placeOrder_1 = require("./service/transaction/placeOrder");
44
42
  var placeOrder4sskts_1 = require("./service/transaction/placeOrder4sskts");
45
- var returnOrder_1 = require("./service/transaction/returnOrder");
46
43
  /**
47
44
  * サービスモジュール
48
45
  */
@@ -114,17 +111,6 @@ var service;
114
111
  return Event;
115
112
  }(event_1.EventService));
116
113
  service.Event = Event;
117
- /**
118
- * オファーサービス
119
- */
120
- var Offer = /** @class */ (function (_super) {
121
- __extends(Offer, _super);
122
- function Offer() {
123
- return _super !== null && _super.apply(this, arguments) || this;
124
- }
125
- return Offer;
126
- }(offer_1.OfferService));
127
- service.Offer = Offer;
128
114
  var order;
129
115
  (function (order) {
130
116
  // tslint:disable-next-line:no-shadowed-variable
@@ -262,17 +248,6 @@ var service;
262
248
  // tslint:disable-next-line:no-shadowed-variable
263
249
  placeOrder.factory = PlaceOrderTransactionServiceFactory;
264
250
  })(placeOrder = transaction.placeOrder || (transaction.placeOrder = {}));
265
- /**
266
- * 注文取引サービス
267
- */
268
- var PlaceOrder = /** @class */ (function (_super) {
269
- __extends(PlaceOrder, _super);
270
- function PlaceOrder() {
271
- return _super !== null && _super.apply(this, arguments) || this;
272
- }
273
- return PlaceOrder;
274
- }(placeOrder_1.PlaceOrderTransactionService));
275
- transaction.PlaceOrder = PlaceOrder;
276
251
  /**
277
252
  * sskts専用注文取引サービス
278
253
  */
@@ -284,17 +259,6 @@ var service;
284
259
  return PlaceOrder4sskts;
285
260
  }(placeOrder4sskts_1.PlaceOrderTransaction4ssktsService));
286
261
  transaction.PlaceOrder4sskts = PlaceOrder4sskts;
287
- /**
288
- * 返品取引サービス
289
- */
290
- var ReturnOrder = /** @class */ (function (_super) {
291
- __extends(ReturnOrder, _super);
292
- function ReturnOrder() {
293
- return _super !== null && _super.apply(this, arguments) || this;
294
- }
295
- return ReturnOrder;
296
- }(returnOrder_1.ReturnOrderTransactionService));
297
- transaction.ReturnOrder = ReturnOrder;
298
262
  })(transaction = service.transaction || (service.transaction = {}));
299
263
  /**
300
264
  * 取引サービス
@@ -1,7 +1,6 @@
1
1
  import { IAuthorizeCOAEventServiceResult } from '../../../chevreTxc/offer/factory';
2
2
  import * as factory from '../../../factory';
3
- import { IAdditionalOptions, IOptions } from '../../../service';
4
- import { PlaceOrderTransactionService } from './placeOrder';
3
+ import { IAdditionalOptions, IOptions, Service } from '../../../service';
5
4
  interface IAppliesToSurfrock {
6
5
  identifier: string;
7
6
  serviceOutput: {
@@ -11,7 +10,8 @@ interface IAppliesToSurfrock {
11
10
  /**
12
11
  * 注文取引サービス(sskts専用)
13
12
  */
14
- export declare class PlaceOrderTransaction4ssktsService extends PlaceOrderTransactionService {
13
+ export declare class PlaceOrderTransaction4ssktsService extends Service {
14
+ typeOf: factory.transactionType.PlaceOrder;
15
15
  constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'> & IAdditionalOptions);
16
16
  /**
17
17
  * COA興行オファー承認
@@ -64,14 +64,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.PlaceOrderTransaction4ssktsService = void 0;
66
66
  var http_status_1 = require("http-status");
67
- var placeOrder_1 = require("./placeOrder");
67
+ var factory = require("../../../factory");
68
+ var service_1 = require("../../../service");
68
69
  /**
69
70
  * 注文取引サービス(sskts専用)
70
71
  */
71
72
  var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
72
73
  __extends(PlaceOrderTransaction4ssktsService, _super);
73
74
  function PlaceOrderTransaction4ssktsService(options) {
74
- return _super.call(this, __assign(__assign({}, options), { defaultPath: '/txn' })) || this;
75
+ var _this = _super.call(this, __assign(__assign({}, options), { defaultPath: '/txn' })) || this;
76
+ _this.typeOf = factory.transactionType.PlaceOrder;
77
+ return _this;
75
78
  }
76
79
  /**
77
80
  * COA興行オファー承認
@@ -138,5 +141,5 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
138
141
  });
139
142
  };
140
143
  return PlaceOrderTransaction4ssktsService;
141
- }(placeOrder_1.PlaceOrderTransactionService));
144
+ }(service_1.Service));
142
145
  exports.PlaceOrderTransaction4ssktsService = PlaceOrderTransaction4ssktsService;