@cinerino/sdk 10.21.0-alpha.4 → 10.21.0-alpha.41
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.
- package/example/playground/public/lib/bundle.js +1824 -890
- package/example/src/chevre/searchProjects.ts +17 -1
- package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +50 -3
- package/example/src/cloud/transaction/processPlaceOrderUsingMemberProgramTier.ts +517 -0
- package/lib/abstract/chevre/event.d.ts +3 -0
- package/lib/abstract/chevreAdmin/advanceBookingRequirement.d.ts +19 -0
- package/lib/abstract/chevreAdmin/advanceBookingRequirement.js +149 -0
- package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -13
- package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +9 -70
- package/lib/abstract/chevreAdmin/assetTransaction/pay.d.ts +0 -5
- package/lib/abstract/chevreAdmin/assetTransaction/pay.js +32 -51
- package/lib/abstract/chevreAdmin/eventOffer.d.ts +32 -0
- package/lib/abstract/chevreAdmin/eventOffer.js +169 -0
- package/lib/abstract/chevreAdmin/identity.d.ts +2 -2
- package/lib/abstract/chevreAdmin/identityProvider.d.ts +2 -30
- package/lib/abstract/chevreAdmin/identityProvider.js +2 -2
- package/lib/abstract/chevreAdmin/issuer.d.ts +12 -2
- package/lib/abstract/chevreAdmin/memberProgram.d.ts +38 -2
- package/lib/abstract/chevreAdmin/memberProgram.js +31 -4
- package/lib/abstract/chevreAdmin/offerCatalog.d.ts +8 -3
- package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +4 -3
- package/lib/abstract/chevreAdmin/paymentService.d.ts +29 -9
- package/lib/abstract/chevreAdmin/paymentService.js +16 -0
- package/lib/abstract/chevreAdmin/paymentServiceChannel.d.ts +20 -0
- package/lib/abstract/chevreAdmin/{assetTransaction/refund.js → paymentServiceChannel.js} +41 -37
- package/lib/abstract/chevreAdmin/pendingReservation.d.ts +58 -0
- package/lib/abstract/chevreAdmin/pendingReservation.js +104 -0
- package/lib/abstract/chevreAdmin/task.d.ts +2 -6
- package/lib/abstract/chevreAdmin/task.js +12 -13
- package/lib/abstract/chevreAdmin/webSite.d.ts +23 -0
- package/lib/abstract/chevreAdmin/webSite.js +138 -0
- package/lib/abstract/chevreAdmin.d.ts +45 -9
- package/lib/abstract/chevreAdmin.js +101 -20
- package/lib/abstract/chevrePay/payment/factory.d.ts +5 -5
- package/lib/abstract/cinerino/service/event.d.ts +3 -0
- package/lib/bundle.js +1825 -891
- package/package.json +2 -2
- package/example/src/chevre/assetTransaction/processCancelReservation.ts +0 -61
- package/example/src/chevre/assetTransaction/processPayMovieTicket.ts +0 -101
- package/example/src/chevre/assetTransaction/processPublishPaymentUrl.ts +0 -95
- package/example/src/chevre/assetTransaction/processRefundCreditCard.ts +0 -76
- package/lib/abstract/chevreAdmin/assetTransaction/refund.d.ts +0 -24
|
@@ -105,7 +105,7 @@ var IdentityProviderService = /** @class */ (function (_super) {
|
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
|
-
IdentityProviderService.prototype.
|
|
108
|
+
IdentityProviderService.prototype.updateById = function (params) {
|
|
109
109
|
return __awaiter(this, void 0, void 0, function () {
|
|
110
110
|
var id, body;
|
|
111
111
|
return __generator(this, function (_a) {
|
|
@@ -113,7 +113,7 @@ var IdentityProviderService = /** @class */ (function (_super) {
|
|
|
113
113
|
case 0:
|
|
114
114
|
id = params.id, body = __rest(params, ["id"]);
|
|
115
115
|
return [4 /*yield*/, this.fetch({
|
|
116
|
-
uri: "/identityProviders/" + encodeURIComponent(String(id))
|
|
116
|
+
uri: "/identityProviders/" + encodeURIComponent(String(id)),
|
|
117
117
|
method: 'PUT',
|
|
118
118
|
body: body,
|
|
119
119
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
@@ -20,9 +20,19 @@ interface ISearchConditions {
|
|
|
20
20
|
}
|
|
21
21
|
interface IIssuer {
|
|
22
22
|
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* 管理者定義の識別子
|
|
25
|
+
*/
|
|
23
26
|
identifier: string;
|
|
27
|
+
name: {
|
|
28
|
+
ja: string;
|
|
29
|
+
};
|
|
24
30
|
project: Pick<factory.project.IProject, 'id' | 'typeOf'>;
|
|
25
31
|
tokenSecret?: string;
|
|
32
|
+
/**
|
|
33
|
+
* トークンのiss
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* 発行者サービス
|
|
@@ -38,11 +48,11 @@ export declare class IssuerService extends Service {
|
|
|
38
48
|
* 検索
|
|
39
49
|
* secretは含まれない
|
|
40
50
|
*/
|
|
41
|
-
projectPublicFields(params: Omit<ISearchConditions, 'project'>): Promise<Pick<IIssuer, 'id' | 'identifier' | 'project'>[]>;
|
|
51
|
+
projectPublicFields(params: Omit<ISearchConditions, 'project'>): Promise<Pick<IIssuer, 'id' | 'identifier' | 'project' | 'name' | 'url'>[]>;
|
|
42
52
|
findById(params: {
|
|
43
53
|
id: string;
|
|
44
54
|
}): Promise<IIssuer>;
|
|
45
|
-
updateById(params: Pick<IIssuer, 'id' | 'identifier' | 'tokenSecret'>): Promise<void>;
|
|
55
|
+
updateById(params: Pick<IIssuer, 'id' | 'identifier' | 'tokenSecret' | 'name' | 'url'>): Promise<void>;
|
|
46
56
|
deleteById(params: {
|
|
47
57
|
id: string;
|
|
48
58
|
}): Promise<void>;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
|
-
|
|
2
|
+
interface IMemberProgramTier {
|
|
3
|
+
/**
|
|
4
|
+
* ティアコード
|
|
5
|
+
* プロジェクト内でユニーク必須
|
|
6
|
+
*/
|
|
7
|
+
identifier: string;
|
|
8
|
+
typeOf: 'MemberProgramTier';
|
|
9
|
+
}
|
|
10
|
+
interface IMemberProgram {
|
|
3
11
|
typeOf: 'MemberProgram';
|
|
4
12
|
identifier: string;
|
|
5
13
|
hostingOrganization: {
|
|
6
14
|
identifier: string;
|
|
7
15
|
};
|
|
16
|
+
hasTiers?: IMemberProgramTier[];
|
|
8
17
|
}
|
|
9
18
|
interface ISearchConditions {
|
|
10
19
|
limit?: number;
|
|
@@ -18,11 +27,37 @@ interface ISearchConditions {
|
|
|
18
27
|
$eq?: string;
|
|
19
28
|
};
|
|
20
29
|
}
|
|
30
|
+
interface ISearchTierConditions {
|
|
31
|
+
limit?: number;
|
|
32
|
+
page?: number;
|
|
33
|
+
isTierOf?: {
|
|
34
|
+
hostingOrganization?: {
|
|
35
|
+
id?: {
|
|
36
|
+
$eq?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
identifier?: {
|
|
40
|
+
$eq?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
identifier?: {
|
|
44
|
+
$eq?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
declare type IMemberProgramTierAsSearchResult = IMemberProgramTier & {
|
|
48
|
+
isTierOf: {
|
|
49
|
+
identifier: string;
|
|
50
|
+
hostingOrganization: {
|
|
51
|
+
identifier: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
21
55
|
/**
|
|
22
56
|
* メンバープログラムサービス
|
|
23
57
|
*/
|
|
24
58
|
export declare class MemberProgramService extends Service {
|
|
25
|
-
|
|
59
|
+
projectMemberPrograms(params: ISearchConditions): Promise<IMemberProgram[]>;
|
|
60
|
+
projectMemberProgramTiers(params: ISearchTierConditions): Promise<IMemberProgramTierAsSearchResult[]>;
|
|
26
61
|
create(params: {
|
|
27
62
|
identifier: string;
|
|
28
63
|
hostingOrganization: {
|
|
@@ -34,6 +69,7 @@ export declare class MemberProgramService extends Service {
|
|
|
34
69
|
hostingOrganization: {
|
|
35
70
|
id: string;
|
|
36
71
|
};
|
|
72
|
+
hasTiers?: Pick<IMemberProgramTier, 'identifier'>[];
|
|
37
73
|
}): Promise<void>;
|
|
38
74
|
deleteByIdentifier(params: {
|
|
39
75
|
identifier: string;
|
|
@@ -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) {
|
|
@@ -62,7 +73,7 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
62
73
|
function MemberProgramService() {
|
|
63
74
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
75
|
}
|
|
65
|
-
MemberProgramService.prototype.
|
|
76
|
+
MemberProgramService.prototype.projectMemberPrograms = function (params) {
|
|
66
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
78
|
var _this = this;
|
|
68
79
|
return __generator(this, function (_a) {
|
|
@@ -78,6 +89,22 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
78
89
|
});
|
|
79
90
|
});
|
|
80
91
|
};
|
|
92
|
+
MemberProgramService.prototype.projectMemberProgramTiers = function (params) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
var _this = this;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
return [2 /*return*/, this.fetch({
|
|
97
|
+
uri: '/memberProgramTiers',
|
|
98
|
+
method: 'GET',
|
|
99
|
+
qs: params,
|
|
100
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
101
|
+
})
|
|
102
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
103
|
+
return [2 /*return*/, response.json()];
|
|
104
|
+
}); }); })];
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
81
108
|
MemberProgramService.prototype.create = function (params) {
|
|
82
109
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
110
|
return __generator(this, function (_a) {
|
|
@@ -97,15 +124,15 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
97
124
|
};
|
|
98
125
|
MemberProgramService.prototype.updateByIdentifier = function (params) {
|
|
99
126
|
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var hostingOrganization;
|
|
127
|
+
var hostingOrganization, hasTiers;
|
|
101
128
|
return __generator(this, function (_a) {
|
|
102
129
|
switch (_a.label) {
|
|
103
130
|
case 0:
|
|
104
|
-
hostingOrganization = params.hostingOrganization;
|
|
131
|
+
hostingOrganization = params.hostingOrganization, hasTiers = params.hasTiers;
|
|
105
132
|
return [4 /*yield*/, this.fetch({
|
|
106
133
|
uri: "/memberPrograms/" + encodeURIComponent(String(params.identifier)),
|
|
107
134
|
method: 'PUT',
|
|
108
|
-
body: { hostingOrganization: hostingOrganization },
|
|
135
|
+
body: __assign({ hostingOrganization: hostingOrganization }, (Array.isArray(hasTiers)) ? { hasTiers: hasTiers } : undefined),
|
|
109
136
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
110
137
|
})];
|
|
111
138
|
case 1:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
|
|
3
|
+
declare type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'additionalProperty'> & {
|
|
4
4
|
/**
|
|
5
5
|
* アイテム数
|
|
6
6
|
*/
|
|
@@ -10,10 +10,14 @@ export declare type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOff
|
|
|
10
10
|
*/
|
|
11
11
|
itemListElementTypeOf: factory.offerType.Offer | 'OfferCatalog';
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
declare type IItemAsOffer = Pick<factory.unitPriceOffer.IUnitPriceOffer, 'id' | 'identifier' | 'name' | 'alternateName' | 'priceSpecification' | 'typeOf'> & {
|
|
14
14
|
sortIndex?: number;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
declare type IItemAsOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'typeOf' | 'identifier' | 'itemOffered' | 'additionalProperty' | 'relatedOffer'> & {
|
|
17
|
+
sortIndex?: number;
|
|
18
|
+
};
|
|
19
|
+
declare type IItemListElement = IItemAsOffer | IItemAsOfferCatalog;
|
|
20
|
+
interface ICreateResult {
|
|
17
21
|
id: string;
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
@@ -71,3 +75,4 @@ export declare class OfferCatalogService extends Service {
|
|
|
71
75
|
sync2aggregateOffers(): Promise<void>;
|
|
72
76
|
convert2offerCatalogItems(params: Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'identifier' | 'name'>): Promise<Pick<ICreateResult, 'id'>>;
|
|
73
77
|
}
|
|
78
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
|
|
3
|
+
declare type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'additionalProperty' | 'relatedOffer'> & {
|
|
4
4
|
/**
|
|
5
5
|
* アイテム数
|
|
6
6
|
*/
|
|
@@ -10,10 +10,10 @@ export declare type IOfferCatalogAsSearchResult = Pick<factory.offerCatalog.IOff
|
|
|
10
10
|
*/
|
|
11
11
|
itemListElementTypeOf: factory.offerType.Offer;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
declare type IItemListElement = Pick<factory.unitPriceOffer.IUnitPriceOffer, 'id' | 'identifier' | 'name' | 'alternateName' | 'priceSpecification' | 'typeOf'> & {
|
|
14
14
|
sortIndex?: number;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
interface ICreateResult {
|
|
17
17
|
id: string;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
@@ -61,3 +61,4 @@ export declare class OfferCatalogItemService extends Service {
|
|
|
61
61
|
page?: number;
|
|
62
62
|
}): Promise<IItemListElement[]>;
|
|
63
63
|
}
|
|
64
|
+
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
|
|
3
|
+
declare type ISavingAvailableChannel = Pick<factory.service.paymentService.IAvailableChannel, 'totalPaymentDue' | 'typeOf'> & {
|
|
4
|
+
serviceUrl: string;
|
|
5
|
+
};
|
|
6
|
+
declare type ISavingPaymentService = Pick<factory.service.paymentService.IService, 'additionalProperty' | 'description' | 'name' | 'productID' | 'project' | 'serviceOutput' | 'serviceType' | 'typeOf' | 'potentialAction'> & {
|
|
7
|
+
availableChannel: ISavingAvailableChannel;
|
|
8
|
+
};
|
|
9
|
+
export declare type IPaymentServiceWithoutCredentials = Omit<factory.service.paymentService.IService, 'availableChannel' | 'potentialAction'> & {
|
|
4
10
|
id: string;
|
|
5
11
|
};
|
|
6
|
-
declare type IKeyOfProjection = keyof factory.service.paymentService.IService
|
|
12
|
+
declare type IKeyOfProjection = Exclude<keyof factory.service.paymentService.IService, 'id' | 'availableChannel' | 'potentialAction'>;
|
|
7
13
|
declare type IProjection = {
|
|
8
|
-
[key in IKeyOfProjection]?:
|
|
14
|
+
[key in IKeyOfProjection]?: 1;
|
|
9
15
|
};
|
|
10
16
|
/**
|
|
11
17
|
* 決済商品サービス
|
|
@@ -14,7 +20,7 @@ export declare class PaymentProductService extends Service {
|
|
|
14
20
|
/**
|
|
15
21
|
* 決済サービス作成
|
|
16
22
|
*/
|
|
17
|
-
createPaymentService(params:
|
|
23
|
+
createPaymentService(params: ISavingPaymentService): Promise<{
|
|
18
24
|
id: string;
|
|
19
25
|
}>;
|
|
20
26
|
/**
|
|
@@ -25,10 +31,12 @@ export declare class PaymentProductService extends Service {
|
|
|
25
31
|
}): Promise<IPaymentServiceWithoutCredentials[]>;
|
|
26
32
|
findPaymentServiceById(params: {
|
|
27
33
|
id: string;
|
|
28
|
-
} & {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
}): Promise<Omit<factory.service.paymentService.IService, 'availableChannel' | 'typeOf'> & {
|
|
35
|
+
typeOf: factory.service.paymentService.PaymentServiceType.CreditCard | factory.service.paymentService.PaymentServiceType.MovieTicket;
|
|
36
|
+
availableChannel: Omit<factory.service.paymentService.IAvailableChannel, 'serviceUrl'>;
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
39
|
+
updatePaymentService(params: ISavingPaymentService & {
|
|
32
40
|
id: string;
|
|
33
41
|
}): Promise<void>;
|
|
34
42
|
deletePaymentServiceById(params: {
|
|
@@ -45,6 +53,18 @@ export declare class PaymentProductService extends Service {
|
|
|
45
53
|
serviceUrl?: {
|
|
46
54
|
$regex?: string;
|
|
47
55
|
};
|
|
48
|
-
|
|
56
|
+
id?: {
|
|
57
|
+
$eq?: string;
|
|
58
|
+
};
|
|
59
|
+
}): Promise<(Pick<factory.serviceChannel.IServiceChannel, 'serviceUrl'> & {
|
|
60
|
+
id: string;
|
|
61
|
+
})[]>;
|
|
62
|
+
searchPotentialActions(params: {
|
|
63
|
+
limit?: number;
|
|
64
|
+
page?: number;
|
|
65
|
+
id?: {
|
|
66
|
+
$eq?: string;
|
|
67
|
+
};
|
|
68
|
+
}): Promise<Pick<factory.potentialAction.IPotentialAction, 'id' | 'identifier' | 'target' | 'typeOf' | 'recipient'>[]>;
|
|
49
69
|
}
|
|
50
70
|
export {};
|
|
@@ -178,6 +178,22 @@ var PaymentProductService = /** @class */ (function (_super) {
|
|
|
178
178
|
});
|
|
179
179
|
});
|
|
180
180
|
};
|
|
181
|
+
PaymentProductService.prototype.searchPotentialActions = function (params) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
+
var _this = this;
|
|
184
|
+
return __generator(this, function (_a) {
|
|
185
|
+
return [2 /*return*/, this.fetch({
|
|
186
|
+
uri: '/paymentServices/potentialActions',
|
|
187
|
+
method: 'GET',
|
|
188
|
+
qs: params,
|
|
189
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
190
|
+
})
|
|
191
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
192
|
+
return [2 /*return*/, response.json()];
|
|
193
|
+
}); }); })];
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
};
|
|
181
197
|
return PaymentProductService;
|
|
182
198
|
}(service_1.Service));
|
|
183
199
|
exports.PaymentProductService = PaymentProductService;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
declare type IServiceChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'id' | 'providesService' | 'serviceUrl' | 'typeOf'>;
|
|
4
|
+
declare type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'providesService' | 'serviceUrl'>;
|
|
5
|
+
/**
|
|
6
|
+
* 決済サービスチャネルサービス
|
|
7
|
+
*/
|
|
8
|
+
export declare class PaymentServiceChannelService extends Service {
|
|
9
|
+
create(params: ISavingChannel): Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
12
|
+
projectFields(params: Omit<factory.serviceChannel.ISearchConditions, 'project'>): Promise<IServiceChannel[]>;
|
|
13
|
+
updateById(params: ISavingChannel & {
|
|
14
|
+
id: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
deleteById(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -62,29 +62,41 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
62
62
|
return t;
|
|
63
63
|
};
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.
|
|
65
|
+
exports.PaymentServiceChannelService = void 0;
|
|
66
66
|
var http_status_1 = require("http-status");
|
|
67
|
-
var
|
|
68
|
-
var service_1 = require("../../service");
|
|
67
|
+
var service_1 = require("../service");
|
|
69
68
|
/**
|
|
70
|
-
*
|
|
69
|
+
* 決済サービスチャネルサービス
|
|
71
70
|
*/
|
|
72
|
-
var
|
|
73
|
-
__extends(
|
|
74
|
-
function
|
|
71
|
+
var PaymentServiceChannelService = /** @class */ (function (_super) {
|
|
72
|
+
__extends(PaymentServiceChannelService, _super);
|
|
73
|
+
function PaymentServiceChannelService() {
|
|
75
74
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
75
|
}
|
|
77
|
-
|
|
78
|
-
* 取引開始
|
|
79
|
-
*/
|
|
80
|
-
RefundAssetTransactionService.prototype.start = function (params) {
|
|
76
|
+
PaymentServiceChannelService.prototype.create = function (params) {
|
|
81
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
78
|
var _this = this;
|
|
83
79
|
return __generator(this, function (_a) {
|
|
84
80
|
return [2 /*return*/, this.fetch({
|
|
85
|
-
uri:
|
|
81
|
+
uri: '/paymentServiceChannels',
|
|
86
82
|
method: 'POST',
|
|
87
83
|
body: params,
|
|
84
|
+
expectedStatusCodes: [http_status_1.CREATED]
|
|
85
|
+
})
|
|
86
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
87
|
+
return [2 /*return*/, response.json()];
|
|
88
|
+
}); }); })];
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
PaymentServiceChannelService.prototype.projectFields = function (params) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
var _this = this;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
return [2 /*return*/, this.fetch({
|
|
97
|
+
uri: '/paymentServiceChannels',
|
|
98
|
+
method: 'GET',
|
|
99
|
+
qs: params,
|
|
88
100
|
expectedStatusCodes: [http_status_1.OK]
|
|
89
101
|
})
|
|
90
102
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -93,23 +105,18 @@ var RefundAssetTransactionService = /** @class */ (function (_super) {
|
|
|
93
105
|
});
|
|
94
106
|
});
|
|
95
107
|
};
|
|
96
|
-
|
|
97
|
-
* 取引確定
|
|
98
|
-
*/
|
|
99
|
-
RefundAssetTransactionService.prototype.confirm = function (params) {
|
|
108
|
+
PaymentServiceChannelService.prototype.updateById = function (params) {
|
|
100
109
|
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
-
var
|
|
110
|
+
var id, body;
|
|
102
111
|
return __generator(this, function (_a) {
|
|
103
112
|
switch (_a.label) {
|
|
104
113
|
case 0:
|
|
105
|
-
|
|
114
|
+
id = params.id, body = __rest(params, ["id"]);
|
|
106
115
|
return [4 /*yield*/, this.fetch({
|
|
107
|
-
uri:
|
|
108
|
-
? "/assetTransactions/" + factory.assetTransactionType.Refund + "/" + transactionNumber + "/confirm?transactionNumber=1"
|
|
109
|
-
: "/assetTransactions/" + factory.assetTransactionType.Refund + "/" + encodeURIComponent(String(id)) + "/confirm",
|
|
116
|
+
uri: "/paymentServiceChannels/" + encodeURIComponent(String(id)),
|
|
110
117
|
method: 'PUT',
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
body: body,
|
|
119
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
113
120
|
})];
|
|
114
121
|
case 1:
|
|
115
122
|
_a.sent();
|
|
@@ -118,21 +125,18 @@ var RefundAssetTransactionService = /** @class */ (function (_super) {
|
|
|
118
125
|
});
|
|
119
126
|
});
|
|
120
127
|
};
|
|
121
|
-
|
|
122
|
-
* 取引中止
|
|
123
|
-
*/
|
|
124
|
-
RefundAssetTransactionService.prototype.cancel = function (params) {
|
|
128
|
+
PaymentServiceChannelService.prototype.deleteById = function (params) {
|
|
125
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
+
var id;
|
|
126
131
|
return __generator(this, function (_a) {
|
|
127
132
|
switch (_a.label) {
|
|
128
|
-
case 0:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
: "/
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
})];
|
|
133
|
+
case 0:
|
|
134
|
+
id = params.id;
|
|
135
|
+
return [4 /*yield*/, this.fetch({
|
|
136
|
+
uri: "/paymentServiceChannels/" + encodeURIComponent(String(id)),
|
|
137
|
+
method: 'DELETE',
|
|
138
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
139
|
+
})];
|
|
136
140
|
case 1:
|
|
137
141
|
_a.sent();
|
|
138
142
|
return [2 /*return*/];
|
|
@@ -140,6 +144,6 @@ var RefundAssetTransactionService = /** @class */ (function (_super) {
|
|
|
140
144
|
});
|
|
141
145
|
});
|
|
142
146
|
};
|
|
143
|
-
return
|
|
147
|
+
return PaymentServiceChannelService;
|
|
144
148
|
}(service_1.Service));
|
|
145
|
-
exports.
|
|
149
|
+
exports.PaymentServiceChannelService = PaymentServiceChannelService;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
interface IReservationPackage {
|
|
4
|
+
typeOf: factory.reservationType.ReservationPackage;
|
|
5
|
+
bookingTime: Date;
|
|
6
|
+
dateCreated: Date;
|
|
7
|
+
dateModified?: Date;
|
|
8
|
+
numSeats: number;
|
|
9
|
+
reservationFor: {
|
|
10
|
+
id: string;
|
|
11
|
+
startDate: Date;
|
|
12
|
+
};
|
|
13
|
+
reservationNumber: string;
|
|
14
|
+
expires: Date;
|
|
15
|
+
subReservationCount: number;
|
|
16
|
+
}
|
|
17
|
+
interface IProjectSubReservationResult {
|
|
18
|
+
identifier: string;
|
|
19
|
+
index: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 保留予約サービス
|
|
23
|
+
*/
|
|
24
|
+
export declare class PendingReservationService extends Service {
|
|
25
|
+
/**
|
|
26
|
+
* 保留予約検索
|
|
27
|
+
*/
|
|
28
|
+
find(params: {
|
|
29
|
+
/**
|
|
30
|
+
* min: 1
|
|
31
|
+
* max: 20
|
|
32
|
+
*/
|
|
33
|
+
limit: number;
|
|
34
|
+
/**
|
|
35
|
+
* min: 1
|
|
36
|
+
*/
|
|
37
|
+
page: number;
|
|
38
|
+
reservationFor?: {
|
|
39
|
+
id?: {
|
|
40
|
+
$eq?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
reservationNumber?: {
|
|
44
|
+
$eq?: string;
|
|
45
|
+
};
|
|
46
|
+
subReservation?: {
|
|
47
|
+
identifier?: {
|
|
48
|
+
$eq?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}): Promise<IReservationPackage[]>;
|
|
52
|
+
projectSubReservationByReservationNumber(params: {
|
|
53
|
+
reservationNumber: {
|
|
54
|
+
$eq: string;
|
|
55
|
+
};
|
|
56
|
+
}): Promise<IProjectSubReservationResult[]>;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
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.PendingReservationService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
/**
|
|
58
|
+
* 保留予約サービス
|
|
59
|
+
*/
|
|
60
|
+
var PendingReservationService = /** @class */ (function (_super) {
|
|
61
|
+
__extends(PendingReservationService, _super);
|
|
62
|
+
function PendingReservationService() {
|
|
63
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 保留予約検索
|
|
67
|
+
*/
|
|
68
|
+
PendingReservationService.prototype.find = function (params) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
return [2 /*return*/, this.fetch({
|
|
73
|
+
uri: '/pendingReservations',
|
|
74
|
+
method: 'GET',
|
|
75
|
+
qs: params,
|
|
76
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
77
|
+
})
|
|
78
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
79
|
+
return [2 /*return*/, response.json()];
|
|
80
|
+
}); }); })];
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
PendingReservationService.prototype.projectSubReservationByReservationNumber = function (params) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
+
var reservationNumber;
|
|
87
|
+
var _this = this;
|
|
88
|
+
return __generator(this, function (_a) {
|
|
89
|
+
reservationNumber = params.reservationNumber;
|
|
90
|
+
return [2 /*return*/, this.fetch({
|
|
91
|
+
uri: "/pendingReservations/" + encodeURIComponent(String(reservationNumber.$eq)) + "/subReservation",
|
|
92
|
+
method: 'GET',
|
|
93
|
+
// qs: params,
|
|
94
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
95
|
+
})
|
|
96
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
97
|
+
return [2 /*return*/, response.json()];
|
|
98
|
+
}); }); })];
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
return PendingReservationService;
|
|
103
|
+
}(service_1.Service));
|
|
104
|
+
exports.PendingReservationService = PendingReservationService;
|
|
@@ -9,13 +9,9 @@ export declare class TaskService extends Service<IOptions> {
|
|
|
9
9
|
* タスク作成
|
|
10
10
|
*/
|
|
11
11
|
create(params: factory.task.IAttributes<factory.taskName>): Promise<Pick<factory.task.ITask<factory.taskName>, 'id'>>;
|
|
12
|
-
|
|
13
|
-
* タスク取得
|
|
14
|
-
*/
|
|
15
|
-
findById<T extends factory.taskName>(params: {
|
|
16
|
-
name: T;
|
|
12
|
+
retryForciblyIfAborted(params: {
|
|
17
13
|
id: string;
|
|
18
|
-
}): Promise<
|
|
14
|
+
}): Promise<void>;
|
|
19
15
|
/**
|
|
20
16
|
* タスク検索
|
|
21
17
|
*/
|