@cinerino/sdk 3.158.0 → 3.160.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.
Files changed (30) hide show
  1. package/lib/abstract/chevre/account.d.ts +1 -1
  2. package/lib/abstract/chevre/accountTitle.d.ts +1 -1
  3. package/lib/abstract/chevre/accountTransaction.d.ts +1 -1
  4. package/lib/abstract/chevre/accountingReport.d.ts +1 -1
  5. package/lib/abstract/chevre/aggregation.d.ts +2 -1
  6. package/lib/abstract/chevre/aggregation.js +13 -2
  7. package/lib/abstract/chevre/authorization.d.ts +1 -1
  8. package/lib/abstract/chevre/me.d.ts +2 -1
  9. package/lib/abstract/chevre/me.js +13 -2
  10. package/lib/abstract/chevre/merchantReturnPolicy.d.ts +1 -1
  11. package/lib/abstract/chevre/offerItemCondition.d.ts +1 -1
  12. package/lib/abstract/chevre/order.d.ts +2 -2
  13. package/lib/abstract/chevre/ownershipInfo.d.ts +1 -1
  14. package/lib/abstract/chevre/permit.d.ts +1 -1
  15. package/lib/abstract/chevre/project.d.ts +2 -1
  16. package/lib/abstract/chevre/project.js +13 -2
  17. package/lib/abstract/chevre/seller/factory.d.ts +1 -1
  18. package/lib/abstract/chevre/seller.d.ts +3 -3
  19. package/lib/abstract/chevre/task.d.ts +1 -1
  20. package/lib/abstract/chevre/transaction/moneyTransfer.d.ts +1 -1
  21. package/lib/abstract/chevre/transaction/placeOrder.d.ts +1 -1
  22. package/lib/abstract/chevre/transaction/returnOrder.d.ts +1 -1
  23. package/lib/abstract/pecorino/accountTransaction.d.ts +1 -1
  24. package/lib/abstract/service/project.d.ts +2 -1
  25. package/lib/abstract/service/project.js +13 -2
  26. package/lib/abstract/service/seller.d.ts +1 -1
  27. package/lib/abstract/service.d.ts +15 -6
  28. package/lib/abstract/service.js +10 -4
  29. package/lib/bundle.js +62 -12
  30. package/package.json +2 -2
@@ -73,5 +73,5 @@ export declare class AccountService extends Service {
73
73
  /**
74
74
  * 口座を検索する
75
75
  */
76
- search(params: factory.account.ISearchConditions): Promise<ISearchResult<factory.account.IAccount[]>>;
76
+ search(params: Omit<factory.account.ISearchConditions, 'project'>): Promise<ISearchResult<factory.account.IAccount[]>>;
77
77
  }
@@ -60,7 +60,7 @@ export declare class AccountTitleService extends Service {
60
60
  /**
61
61
  * 細目検索
62
62
  */
63
- search(params: factory.accountTitle.ISearchConditions): Promise<{
63
+ search(params: Omit<factory.accountTitle.ISearchConditions, 'project'>): Promise<{
64
64
  data: factory.accountTitle.IAccountTitle[];
65
65
  }>;
66
66
  /**
@@ -7,7 +7,7 @@ export declare class AccountTransactionService extends Service {
7
7
  /**
8
8
  * 取引検索
9
9
  */
10
- search(params: factory.account.transaction.ISearchConditions & {
10
+ search(params: Omit<factory.account.transaction.ISearchConditions, 'project'> & {
11
11
  /**
12
12
  * 許可証発行元のプロダクト
13
13
  */
@@ -7,5 +7,5 @@ export declare class AccountingReportService extends Service {
7
7
  /**
8
8
  * 検索
9
9
  */
10
- search(params: factory.report.accountingReport.ISearchConditions): Promise<ISearchResult<factory.report.accountingReport.IReport[]>>;
10
+ search(params: Omit<factory.report.accountingReport.ISearchConditions, 'project'>): Promise<ISearchResult<factory.report.accountingReport.IReport[]>>;
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../factory';
2
- import { ISearchResult, Service } from '../service';
2
+ import { IOptions, ISearchResult, Service } from '../service';
3
3
  interface IAggregation {
4
4
  typeOf: string;
5
5
  project: {
@@ -21,6 +21,7 @@ interface ISearchConditions {
21
21
  * 集計サービス
22
22
  */
23
23
  export declare class AggregationService extends Service {
24
+ constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter'>);
24
25
  search(params: ISearchConditions): Promise<ISearchResult<IAggregation[]>>;
25
26
  }
26
27
  export {};
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,8 +70,8 @@ var service_1 = require("../service");
59
70
  */
60
71
  var AggregationService = /** @class */ (function (_super) {
61
72
  __extends(AggregationService, _super);
62
- function AggregationService() {
63
- return _super !== null && _super.apply(this, arguments) || this;
73
+ function AggregationService(options) {
74
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
64
75
  }
65
76
  AggregationService.prototype.search = function (params) {
66
77
  return __awaiter(this, void 0, void 0, function () {
@@ -19,5 +19,5 @@ export declare class AuthorizationService extends Service {
19
19
  /**
20
20
  * 承認検索
21
21
  */
22
- search(params: factory.authorization.ISearchConditions): Promise<ISearchResult<factory.authorization.IAuthorization[]>>;
22
+ search(params: Omit<factory.authorization.ISearchConditions, 'project'>): Promise<ISearchResult<factory.authorization.IAuthorization[]>>;
23
23
  }
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../factory';
2
- import { ISearchResult, Service } from '../service';
2
+ import { IOptions, ISearchResult, Service } from '../service';
3
3
  export interface ISearchProjectConditions {
4
4
  limit?: number;
5
5
  page?: number;
@@ -11,6 +11,7 @@ export interface ISearchProjectConditions {
11
11
  * 管理者サービス
12
12
  */
13
13
  export declare class MeService extends Service {
14
+ constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter'>);
14
15
  /**
15
16
  * マイプロジェクト検索
16
17
  */
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,8 +70,8 @@ var service_1 = require("../service");
59
70
  */
60
71
  var MeService = /** @class */ (function (_super) {
61
72
  __extends(MeService, _super);
62
- function MeService() {
63
- return _super !== null && _super.apply(this, arguments) || this;
73
+ function MeService(options) {
74
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
64
75
  }
65
76
  /**
66
77
  * マイプロジェクト検索
@@ -5,7 +5,7 @@ import { ISearchResult, IUnset, Service } from '../service';
5
5
  */
6
6
  export declare class MerchantReturnPolicyService extends Service {
7
7
  create(params: factory.unitPriceOffer.IOfferMerchantReturnPolicy): Promise<factory.unitPriceOffer.IOfferMerchantReturnPolicy>;
8
- search(params: factory.unitPriceOffer.IOfferMerchantReturnPolicySearchConditions): Promise<ISearchResult<factory.unitPriceOffer.IOfferMerchantReturnPolicy[]>>;
8
+ search(params: Omit<factory.unitPriceOffer.IOfferMerchantReturnPolicySearchConditions, 'project'>): Promise<ISearchResult<factory.unitPriceOffer.IOfferMerchantReturnPolicy[]>>;
9
9
  findById(params: {
10
10
  id: string;
11
11
  }): Promise<factory.unitPriceOffer.IOfferMerchantReturnPolicy>;
@@ -5,7 +5,7 @@ import { IUnset, Service } from '../service';
5
5
  */
6
6
  export declare class OfferItemConditionService extends Service {
7
7
  create(params: factory.offerItemCondition.IOfferItemCondition): Promise<factory.offerItemCondition.IOfferItemCondition>;
8
- search(params: factory.offerItemCondition.ISearchConditions): Promise<{
8
+ search(params: Omit<factory.offerItemCondition.ISearchConditions, 'project'>): Promise<{
9
9
  data: factory.offerItemCondition.IOfferItemCondition[];
10
10
  }>;
11
11
  findById(params: {
@@ -1,10 +1,10 @@
1
1
  import * as factory from '../factory';
2
2
  import { IAcceptedOffer, IAuthorizeResult, IExternalOrder, IReturner, ISearchOrdersOptions, IUpdateChangeableAttributesParams } from './order/factory';
3
- import { IProjectionSearchConditions, ISearchResult, Service } from '../service';
3
+ import { IAdditionalOptions, IOptions, IProjectionSearchConditions, ISearchResult, Service } from '../service';
4
4
  /**
5
5
  * 注文サービス
6
6
  */
7
- export declare class OrderService extends Service {
7
+ export declare class OrderService extends Service<IOptions & IAdditionalOptions> {
8
8
  /**
9
9
  * 取引なしに作成する
10
10
  */
@@ -8,7 +8,7 @@ export declare class OwnershipInfoService extends Service {
8
8
  /**
9
9
  * 所有権検索
10
10
  */
11
- search(params: factory.ownershipInfo.ISearchConditions & {
11
+ search(params: Omit<factory.ownershipInfo.ISearchConditions, 'project'> & {
12
12
  /**
13
13
  * 所有物詳細を取得する
14
14
  */
@@ -22,7 +22,7 @@ export declare class PermitService extends Service {
22
22
  /**
23
23
  * 検索
24
24
  */
25
- search(params: factory.product.IServiceOutputSearchConditions): Promise<ISearchResult<factory.permit.IPermit[]>>;
25
+ search(params: Omit<factory.product.IServiceOutputSearchConditions, 'project'>): Promise<ISearchResult<factory.permit.IPermit[]>>;
26
26
  /**
27
27
  * 許可証照会
28
28
  * 存在しない場合、ステータスコード404を返します
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../factory';
2
- import { IProjectionSearchConditions, ISearchResult, Service } from '../service';
2
+ import { IOptions, IProjectionSearchConditions, ISearchResult, Service } from '../service';
3
3
  export interface IGetHealthResult {
4
4
  version?: string;
5
5
  status?: number;
@@ -9,6 +9,7 @@ export interface IGetHealthResult {
9
9
  * プロジェクトサービス
10
10
  */
11
11
  export declare class ProjectService extends Service {
12
+ constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter'>);
12
13
  /**
13
14
  * プロジェクト作成
14
15
  */
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -70,8 +81,8 @@ var service_1 = require("../service");
70
81
  */
71
82
  var ProjectService = /** @class */ (function (_super) {
72
83
  __extends(ProjectService, _super);
73
- function ProjectService() {
74
- return _super !== null && _super.apply(this, arguments) || this;
84
+ function ProjectService(options) {
85
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
75
86
  }
76
87
  /**
77
88
  * プロジェクト作成
@@ -2,7 +2,7 @@ import * as factory from '../../factory';
2
2
  export declare type IReadableProviderCredentials = Pick<factory.service.paymentService.IProviderCredentials, 'shopId' | 'tokenizationCode' | 'paymentUrl'>;
3
3
  export declare type IPaymentServiceByProvider = Pick<factory.service.paymentService.IService, 'name' | 'description' | 'typeOf' | 'id' | 'productID' | 'serviceType' | 'additionalProperty'> & {
4
4
  provider?: {
5
- creadentials?: IReadableProviderCredentials;
5
+ credentials?: IReadableProviderCredentials;
6
6
  };
7
7
  };
8
8
  export declare type IProvidePaymentService = Pick<factory.service.paymentService.IService, 'id' | 'name' | 'typeOf'> & {
@@ -1,10 +1,10 @@
1
1
  import * as factory from '../factory';
2
- import { ISearchResult, IUnset, Service } from '../service';
2
+ import { IAdditionalOptions, IOptions, ISearchResult, IUnset, Service } from '../service';
3
3
  import { IPaymentAccepted, IPaymentServiceByProvider, IProvidePaymentService, ISearchPaymentServiceConditions } from './seller/factory';
4
4
  /**
5
5
  * 販売者サービス
6
6
  */
7
- export declare class SellerService extends Service {
7
+ export declare class SellerService extends Service<IOptions & IAdditionalOptions> {
8
8
  /**
9
9
  * 販売者作成
10
10
  */
@@ -23,7 +23,7 @@ export declare class SellerService extends Service {
23
23
  /**
24
24
  * 販売者検索
25
25
  */
26
- search(params: Omit<factory.seller.ISearchConditions, 'project'> & {
26
+ search(params: Omit<factory.seller.ISearchConditions, 'project' | 'id'> & {
27
27
  $projection: {
28
28
  [key: string]: 0 | 1;
29
29
  };
@@ -19,5 +19,5 @@ export declare class TaskService extends Service {
19
19
  /**
20
20
  * タスク検索
21
21
  */
22
- search(params: factory.task.ISearchConditions & IProjectionSearchConditions): Promise<ISearchResult<factory.task.ITask<factory.taskName>[]>>;
22
+ search(params: Omit<factory.task.ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<ISearchResult<factory.task.ITask<factory.taskName>[]>>;
23
23
  }
@@ -36,7 +36,7 @@ export declare class MoneyTransferTransactionService extends Service implements
36
36
  /**
37
37
  * 取引検索
38
38
  */
39
- search(params: factory.transaction.ISearchConditions<factory.transactionType.MoneyTransfer>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.MoneyTransfer>[]>>;
39
+ search(params: Omit<factory.transaction.ISearchConditions<factory.transactionType.MoneyTransfer>, 'project'>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.MoneyTransfer>[]>>;
40
40
  /**
41
41
  * 取引に対するアクションを検索する
42
42
  */
@@ -64,7 +64,7 @@ export declare class PlaceOrderTransactionService extends Service implements Tra
64
64
  /**
65
65
  * 取引検索
66
66
  */
67
- search(params: factory.transaction.ISearchConditions<factory.transactionType.PlaceOrder>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>[]>>;
67
+ search(params: Omit<factory.transaction.ISearchConditions<factory.transactionType.PlaceOrder>, 'project'>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>[]>>;
68
68
  /**
69
69
  * 取引に対するアクションを検索する
70
70
  */
@@ -9,7 +9,7 @@ export declare class ReturnOrderTransactionService extends Service implements Tr
9
9
  /**
10
10
  * 取引検索
11
11
  */
12
- search(params: factory.transaction.ISearchConditions<factory.transactionType.ReturnOrder>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.ReturnOrder>[]>>;
12
+ search(params: Omit<factory.transaction.ISearchConditions<factory.transactionType.ReturnOrder>, 'project'>): Promise<ISearchResult<factory.transaction.ITransaction<factory.transactionType.ReturnOrder>[]>>;
13
13
  /**
14
14
  * 取引を開始する
15
15
  */
@@ -7,7 +7,7 @@ export declare class AccountTransactionService extends Service {
7
7
  /**
8
8
  * 取引検索
9
9
  */
10
- search(params: factory.account.transaction.ISearchConditions): Promise<ISearchResult<Pick<factory.account.transaction.ITransaction<factory.account.transactionType>, 'id' | 'status' | 'transactionNumber' | 'agent' | 'endDate' | 'expires' | 'object' | 'project' | 'recipient' | 'startDate' | 'typeOf'>[]>>;
10
+ search(params: Omit<factory.account.transaction.ISearchConditions, 'project'>): Promise<ISearchResult<Pick<factory.account.transaction.ITransaction<factory.account.transactionType>, 'id' | 'status' | 'transactionNumber' | 'agent' | 'endDate' | 'expires' | 'object' | 'project' | 'recipient' | 'startDate' | 'typeOf'>[]>>;
11
11
  /**
12
12
  * 取引開始
13
13
  */
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../factory';
2
- import { ISearchResult, Service } from '../service';
2
+ import { IOptions, ISearchResult, Service } from '../service';
3
3
  export interface IGetHealthResult {
4
4
  version?: string;
5
5
  status?: number;
@@ -9,6 +9,7 @@ export interface IGetHealthResult {
9
9
  * プロジェクトサービス
10
10
  */
11
11
  export declare class ProjectService extends Service {
12
+ constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter'>);
12
13
  /**
13
14
  * プロジェクト検索
14
15
  */
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,8 +70,8 @@ var service_1 = require("../service");
59
70
  */
60
71
  var ProjectService = /** @class */ (function (_super) {
61
72
  __extends(ProjectService, _super);
62
- function ProjectService() {
63
- return _super !== null && _super.apply(this, arguments) || this;
73
+ function ProjectService(options) {
74
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
64
75
  }
65
76
  /**
66
77
  * プロジェクト検索
@@ -14,7 +14,7 @@ export declare class SellerService extends Service {
14
14
  /**
15
15
  * 販売者検索
16
16
  */
17
- search(params: Omit<factory.seller.ISearchConditions, 'project'>): Promise<ISearchResult<Omit<factory.seller.ISeller, 'hasMerchantReturnPolicy' | 'makesOffer' | 'paymentAccepted'>[]>>;
17
+ search(params: Omit<factory.seller.ISearchConditions, 'project' | 'id'>): Promise<ISearchResult<Omit<factory.seller.ISeller, 'hasMerchantReturnPolicy' | 'makesOffer' | 'paymentAccepted'>[]>>;
18
18
  /**
19
19
  * 提供決済サービス検索(public)
20
20
  */
@@ -1,5 +1,6 @@
1
1
  import { AuthClient } from './auth/authClient';
2
2
  import { Transporter } from './transporters';
3
+ export declare const RESOURCE_SELECTOR_SEPARATOR = ":";
3
4
  /**
4
5
  * service constructor options
5
6
  */
@@ -19,10 +20,18 @@ export interface IOptions {
19
20
  */
20
21
  transporter?: Transporter;
21
22
  /**
22
- * サービスを使用するプロジェクト
23
+ * サービスを使用プロジェクト
23
24
  */
24
- project?: {
25
- id?: string;
25
+ project: {
26
+ id: string;
27
+ };
28
+ }
29
+ export interface IAdditionalOptions {
30
+ /**
31
+ * サービス使用販売者
32
+ */
33
+ seller?: {
34
+ id: string;
26
35
  };
27
36
  }
28
37
  export interface IFetchOptions {
@@ -39,9 +48,9 @@ export interface IFetchOptions {
39
48
  /**
40
49
  * base service class
41
50
  */
42
- export declare class Service {
43
- options: IOptions;
44
- constructor(options: IOptions);
51
+ export declare class Service<T extends IOptions & IAdditionalOptions = IOptions> {
52
+ options: IOptions & IAdditionalOptions;
53
+ constructor(options: T);
45
54
  /**
46
55
  * Create and send request to API
47
56
  */
@@ -47,9 +47,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  }
48
48
  };
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.Service = void 0;
50
+ exports.Service = exports.RESOURCE_SELECTOR_SEPARATOR = void 0;
51
51
  var qs = require("qs");
52
52
  var transporters_1 = require("./transporters");
53
+ exports.RESOURCE_SELECTOR_SEPARATOR = ':';
53
54
  /**
54
55
  * base service class
55
56
  */
@@ -61,10 +62,10 @@ var Service = /** @class */ (function () {
61
62
  * Create and send request to API
62
63
  */
63
64
  Service.prototype.fetch = function (options) {
64
- var _a;
65
+ var _a, _b;
65
66
  return __awaiter(this, void 0, void 0, function () {
66
67
  var defaultOptions, baseUrl, url, querystrings, headers, fetchOptions, transporter;
67
- return __generator(this, function (_b) {
68
+ return __generator(this, function (_c) {
68
69
  defaultOptions = __assign(__assign({ headers: {} }, {
69
70
  method: 'GET'
70
71
  }), options);
@@ -72,7 +73,12 @@ var Service = /** @class */ (function () {
72
73
  // tslint:disable-next-line:no-single-line-block-comment
73
74
  /* istanbul ignore else */
74
75
  if (typeof ((_a = this.options.project) === null || _a === void 0 ? void 0 : _a.id) === 'string' && this.options.project.id.length > 0) {
75
- baseUrl = baseUrl + "/projects/" + this.options.project.id;
76
+ if (typeof ((_b = this.options.seller) === null || _b === void 0 ? void 0 : _b.id) === 'string' && this.options.seller.id.length > 0) {
77
+ baseUrl = baseUrl + "/projects/" + this.options.project.id + exports.RESOURCE_SELECTOR_SEPARATOR + this.options.seller.id;
78
+ }
79
+ else {
80
+ baseUrl = baseUrl + "/projects/" + this.options.project.id;
81
+ }
76
82
  }
77
83
  url = "" + baseUrl + defaultOptions.uri;
78
84
  querystrings = qs.stringify(defaultOptions.qs);
package/lib/bundle.js CHANGED
@@ -1708,6 +1708,17 @@ var __extends = (this && this.__extends) || (function () {
1708
1708
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1709
1709
  };
1710
1710
  })();
1711
+ var __assign = (this && this.__assign) || function () {
1712
+ __assign = Object.assign || function(t) {
1713
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1714
+ s = arguments[i];
1715
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
1716
+ t[p] = s[p];
1717
+ }
1718
+ return t;
1719
+ };
1720
+ return __assign.apply(this, arguments);
1721
+ };
1711
1722
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1712
1723
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1713
1724
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1753,8 +1764,8 @@ var service_1 = require("../service");
1753
1764
  */
1754
1765
  var AggregationService = /** @class */ (function (_super) {
1755
1766
  __extends(AggregationService, _super);
1756
- function AggregationService() {
1757
- return _super !== null && _super.apply(this, arguments) || this;
1767
+ function AggregationService(options) {
1768
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
1758
1769
  }
1759
1770
  AggregationService.prototype.search = function (params) {
1760
1771
  return __awaiter(this, void 0, void 0, function () {
@@ -4735,6 +4746,17 @@ var __extends = (this && this.__extends) || (function () {
4735
4746
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4736
4747
  };
4737
4748
  })();
4749
+ var __assign = (this && this.__assign) || function () {
4750
+ __assign = Object.assign || function(t) {
4751
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4752
+ s = arguments[i];
4753
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
4754
+ t[p] = s[p];
4755
+ }
4756
+ return t;
4757
+ };
4758
+ return __assign.apply(this, arguments);
4759
+ };
4738
4760
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4739
4761
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4740
4762
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -4780,8 +4802,8 @@ var service_1 = require("../service");
4780
4802
  */
4781
4803
  var MeService = /** @class */ (function (_super) {
4782
4804
  __extends(MeService, _super);
4783
- function MeService() {
4784
- return _super !== null && _super.apply(this, arguments) || this;
4805
+ function MeService(options) {
4806
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
4785
4807
  }
4786
4808
  /**
4787
4809
  * マイプロジェクト検索
@@ -7977,6 +7999,17 @@ var __extends = (this && this.__extends) || (function () {
7977
7999
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7978
8000
  };
7979
8001
  })();
8002
+ var __assign = (this && this.__assign) || function () {
8003
+ __assign = Object.assign || function(t) {
8004
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8005
+ s = arguments[i];
8006
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8007
+ t[p] = s[p];
8008
+ }
8009
+ return t;
8010
+ };
8011
+ return __assign.apply(this, arguments);
8012
+ };
7980
8013
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7981
8014
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7982
8015
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8033,8 +8066,8 @@ var service_1 = require("../service");
8033
8066
  */
8034
8067
  var ProjectService = /** @class */ (function (_super) {
8035
8068
  __extends(ProjectService, _super);
8036
- function ProjectService() {
8037
- return _super !== null && _super.apply(this, arguments) || this;
8069
+ function ProjectService(options) {
8070
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
8038
8071
  }
8039
8072
  /**
8040
8073
  * プロジェクト作成
@@ -10763,9 +10796,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
10763
10796
  }
10764
10797
  };
10765
10798
  Object.defineProperty(exports, "__esModule", { value: true });
10766
- exports.Service = void 0;
10799
+ exports.Service = exports.RESOURCE_SELECTOR_SEPARATOR = void 0;
10767
10800
  var qs = require("qs");
10768
10801
  var transporters_1 = require("./transporters");
10802
+ exports.RESOURCE_SELECTOR_SEPARATOR = ':';
10769
10803
  /**
10770
10804
  * base service class
10771
10805
  */
@@ -10777,10 +10811,10 @@ var Service = /** @class */ (function () {
10777
10811
  * Create and send request to API
10778
10812
  */
10779
10813
  Service.prototype.fetch = function (options) {
10780
- var _a;
10814
+ var _a, _b;
10781
10815
  return __awaiter(this, void 0, void 0, function () {
10782
10816
  var defaultOptions, baseUrl, url, querystrings, headers, fetchOptions, transporter;
10783
- return __generator(this, function (_b) {
10817
+ return __generator(this, function (_c) {
10784
10818
  defaultOptions = __assign(__assign({ headers: {} }, {
10785
10819
  method: 'GET'
10786
10820
  }), options);
@@ -10788,7 +10822,12 @@ var Service = /** @class */ (function () {
10788
10822
  // tslint:disable-next-line:no-single-line-block-comment
10789
10823
  /* istanbul ignore else */
10790
10824
  if (typeof ((_a = this.options.project) === null || _a === void 0 ? void 0 : _a.id) === 'string' && this.options.project.id.length > 0) {
10791
- baseUrl = baseUrl + "/projects/" + this.options.project.id;
10825
+ if (typeof ((_b = this.options.seller) === null || _b === void 0 ? void 0 : _b.id) === 'string' && this.options.seller.id.length > 0) {
10826
+ baseUrl = baseUrl + "/projects/" + this.options.project.id + exports.RESOURCE_SELECTOR_SEPARATOR + this.options.seller.id;
10827
+ }
10828
+ else {
10829
+ baseUrl = baseUrl + "/projects/" + this.options.project.id;
10830
+ }
10792
10831
  }
10793
10832
  url = "" + baseUrl + defaultOptions.uri;
10794
10833
  querystrings = qs.stringify(defaultOptions.qs);
@@ -13204,6 +13243,17 @@ var __extends = (this && this.__extends) || (function () {
13204
13243
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13205
13244
  };
13206
13245
  })();
13246
+ var __assign = (this && this.__assign) || function () {
13247
+ __assign = Object.assign || function(t) {
13248
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
13249
+ s = arguments[i];
13250
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
13251
+ t[p] = s[p];
13252
+ }
13253
+ return t;
13254
+ };
13255
+ return __assign.apply(this, arguments);
13256
+ };
13207
13257
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13208
13258
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13209
13259
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13249,8 +13299,8 @@ var service_1 = require("../service");
13249
13299
  */
13250
13300
  var ProjectService = /** @class */ (function (_super) {
13251
13301
  __extends(ProjectService, _super);
13252
- function ProjectService() {
13253
- return _super !== null && _super.apply(this, arguments) || this;
13302
+ function ProjectService(options) {
13303
+ return _super.call(this, __assign(__assign({}, options), { project: { id: '' } })) || this;
13254
13304
  }
13255
13305
  /**
13256
13306
  * プロジェクト検索
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.158.0",
3
+ "version": "3.160.0-alpha.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -97,7 +97,7 @@
97
97
  "watchify": "^3.11.1"
98
98
  },
99
99
  "dependencies": {
100
- "@chevre/factory": "4.313.0",
100
+ "@chevre/factory": "4.314.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",