@cinerino/sdk 11.1.0-alpha.0 → 11.1.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.
- package/example/playground/public/lib/bundle.js +154 -51
- package/example/src/chevre/admin/findMySellers.ts +33 -0
- package/example/src/chevre/{searchEvents.ts → default/searchEvents.ts} +1 -1
- package/example/src/cloud/{adminSearchMyProjects.ts → admin/findMyProjects.ts} +2 -3
- package/example/src/cloud/admin/findMySellers.ts +31 -0
- package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +3 -1
- package/lib/abstract/chevreAdmin/me.d.ts +13 -2
- package/lib/abstract/chevreAdmin/me.js +21 -0
- package/lib/abstract/chevrePay/payment.js +57 -36
- package/lib/abstract/cloud/admin/me.d.ts +12 -11
- package/lib/abstract/cloud/admin/me.js +22 -1
- package/lib/bundle.js +100 -37
- package/package.json +1 -1
|
@@ -1331,6 +1331,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
1331
1331
|
});
|
|
1332
1332
|
});
|
|
1333
1333
|
};
|
|
1334
|
+
/**
|
|
1335
|
+
* マイ販売者検索
|
|
1336
|
+
*/
|
|
1337
|
+
MeService.prototype.findMySellers = function (params) {
|
|
1338
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1339
|
+
var project, conditions;
|
|
1340
|
+
var _this = this;
|
|
1341
|
+
return __generator(this, function (_a) {
|
|
1342
|
+
project = params.project, conditions = params.conditions;
|
|
1343
|
+
return [2 /*return*/, this.fetch({
|
|
1344
|
+
uri: "/members/me/projects/" + String(project === null || project === void 0 ? void 0 : project.id) + "/sellers",
|
|
1345
|
+
method: 'GET',
|
|
1346
|
+
qs: conditions,
|
|
1347
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
1348
|
+
})
|
|
1349
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
1350
|
+
return [2 /*return*/, response.json()];
|
|
1351
|
+
}); }); })];
|
|
1352
|
+
});
|
|
1353
|
+
});
|
|
1354
|
+
};
|
|
1334
1355
|
return MeService;
|
|
1335
1356
|
}(service_1.Service));
|
|
1336
1357
|
exports.MeService = MeService;
|
|
@@ -15671,17 +15692,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
15671
15692
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
15672
15693
|
}
|
|
15673
15694
|
};
|
|
15674
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15675
|
-
var t = {};
|
|
15676
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15677
|
-
t[p] = s[p];
|
|
15678
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15679
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15680
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
15681
|
-
t[p[i]] = s[p[i]];
|
|
15682
|
-
}
|
|
15683
|
-
return t;
|
|
15684
|
-
};
|
|
15685
15695
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15686
15696
|
exports.PaymentService = void 0;
|
|
15687
15697
|
var http_status_1 = require("http-status");
|
|
@@ -15700,15 +15710,17 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15700
15710
|
*/
|
|
15701
15711
|
PaymentService.prototype.checkMovieTicket = function (params) {
|
|
15702
15712
|
return __awaiter(this, void 0, void 0, function () {
|
|
15713
|
+
var object, purpose;
|
|
15703
15714
|
var _this = this;
|
|
15704
15715
|
return __generator(this, function (_a) {
|
|
15716
|
+
object = params.object, purpose = params.purpose;
|
|
15705
15717
|
return [2 /*return*/, this.fetch({
|
|
15706
15718
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
15707
15719
|
method: 'POST',
|
|
15708
15720
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
15709
|
-
body:
|
|
15721
|
+
body: { object: object, purpose: purpose },
|
|
15710
15722
|
qs: {
|
|
15711
|
-
purpose: { id:
|
|
15723
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15712
15724
|
}
|
|
15713
15725
|
})
|
|
15714
15726
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15722,16 +15734,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15722
15734
|
*/
|
|
15723
15735
|
PaymentService.prototype.checkMovieTicketAsync = function (params) {
|
|
15724
15736
|
return __awaiter(this, void 0, void 0, function () {
|
|
15737
|
+
var object, purpose;
|
|
15725
15738
|
var _this = this;
|
|
15726
15739
|
return __generator(this, function (_a) {
|
|
15740
|
+
object = params.object, purpose = params.purpose;
|
|
15727
15741
|
return [2 /*return*/, this.fetch({
|
|
15728
15742
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
15729
15743
|
method: 'POST',
|
|
15730
15744
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
15731
|
-
body:
|
|
15745
|
+
body: { object: object, purpose: purpose },
|
|
15732
15746
|
qs: {
|
|
15733
15747
|
async: true,
|
|
15734
|
-
purpose: { id:
|
|
15748
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15735
15749
|
}
|
|
15736
15750
|
})
|
|
15737
15751
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15745,15 +15759,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15745
15759
|
*/
|
|
15746
15760
|
PaymentService.prototype.authorizeAnyPayment = function (params) {
|
|
15747
15761
|
return __awaiter(this, void 0, void 0, function () {
|
|
15762
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, ticketToken;
|
|
15748
15763
|
var _this = this;
|
|
15749
15764
|
return __generator(this, function (_a) {
|
|
15765
|
+
object = params.object, purpose = params.purpose;
|
|
15766
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
15750
15767
|
return [2 /*return*/, this.fetch({
|
|
15751
15768
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize",
|
|
15752
15769
|
method: 'POST',
|
|
15753
15770
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
15754
|
-
body:
|
|
15771
|
+
body: {
|
|
15772
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
15773
|
+
purpose: purpose
|
|
15774
|
+
},
|
|
15755
15775
|
qs: {
|
|
15756
|
-
purpose: { id:
|
|
15776
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15757
15777
|
}
|
|
15758
15778
|
})
|
|
15759
15779
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15767,14 +15787,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15767
15787
|
*/
|
|
15768
15788
|
PaymentService.prototype.authorizeCreditCard = function (params, options) {
|
|
15769
15789
|
return __awaiter(this, void 0, void 0, function () {
|
|
15790
|
+
var object, purpose, amount, issuedThrough, paymentMethod, creditCard, method, paymentMethodId, name, additionalProperty, ticketToken;
|
|
15770
15791
|
var _this = this;
|
|
15771
15792
|
return __generator(this, function (_a) {
|
|
15793
|
+
object = params.object, purpose = params.purpose;
|
|
15794
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, creditCard = object.creditCard, method = object.method, paymentMethodId = object.paymentMethodId, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
15772
15795
|
return [2 /*return*/, this.fetch({
|
|
15773
15796
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/authorize",
|
|
15774
15797
|
method: 'POST',
|
|
15775
15798
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
15776
|
-
body:
|
|
15777
|
-
|
|
15799
|
+
body: {
|
|
15800
|
+
object: __assign(__assign(__assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof paymentMethodId === 'string') ? { paymentMethodId: paymentMethodId } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
15801
|
+
purpose: purpose
|
|
15802
|
+
},
|
|
15803
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15778
15804
|
})
|
|
15779
15805
|
})
|
|
15780
15806
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15788,14 +15814,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15788
15814
|
*/
|
|
15789
15815
|
PaymentService.prototype.authorizeMovieTicket = function (params, options) {
|
|
15790
15816
|
return __awaiter(this, void 0, void 0, function () {
|
|
15817
|
+
var object, purpose, issuedThrough, paymentMethod, movieTickets, name, additionalProperty, ticketToken;
|
|
15791
15818
|
var _this = this;
|
|
15792
15819
|
return __generator(this, function (_a) {
|
|
15820
|
+
object = params.object, purpose = params.purpose;
|
|
15821
|
+
issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, movieTickets = object.movieTickets, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
15793
15822
|
return [2 /*return*/, this.fetch({
|
|
15794
15823
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/authorize",
|
|
15795
15824
|
method: 'POST',
|
|
15796
15825
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
15797
|
-
body:
|
|
15798
|
-
|
|
15826
|
+
body: {
|
|
15827
|
+
object: __assign(__assign(__assign(__assign({ issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (Array.isArray(movieTickets)) ? { movieTickets: movieTickets } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
15828
|
+
purpose: purpose
|
|
15829
|
+
},
|
|
15830
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15799
15831
|
})
|
|
15800
15832
|
})
|
|
15801
15833
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15809,15 +15841,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15809
15841
|
*/
|
|
15810
15842
|
PaymentService.prototype.authorizePaymentCard = function (params) {
|
|
15811
15843
|
return __awaiter(this, void 0, void 0, function () {
|
|
15844
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, fromLocation, description;
|
|
15812
15845
|
var _this = this;
|
|
15813
15846
|
return __generator(this, function (_a) {
|
|
15847
|
+
object = params.object, purpose = params.purpose;
|
|
15848
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, fromLocation = object.fromLocation, description = object.description;
|
|
15814
15849
|
return [2 /*return*/, this.fetch({
|
|
15815
15850
|
uri: "/payment/" + factory.product.ProductType.PaymentCard + "/authorize",
|
|
15816
15851
|
method: 'POST',
|
|
15817
15852
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
15818
|
-
body:
|
|
15853
|
+
body: {
|
|
15854
|
+
object: __assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof fromLocation === 'string') ? { fromLocation: fromLocation } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof description === 'string') ? { description: description } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
15855
|
+
purpose: purpose
|
|
15856
|
+
},
|
|
15819
15857
|
qs: {
|
|
15820
|
-
purpose: { id:
|
|
15858
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15821
15859
|
}
|
|
15822
15860
|
})
|
|
15823
15861
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -15831,15 +15869,19 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15831
15869
|
*/
|
|
15832
15870
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
15833
15871
|
return __awaiter(this, void 0, void 0, function () {
|
|
15834
|
-
var object, purpose;
|
|
15872
|
+
var object, purpose, amount, creditCard, issuedThrough, paymentMethod, method, ticketToken;
|
|
15835
15873
|
var _this = this;
|
|
15836
15874
|
return __generator(this, function (_a) {
|
|
15837
15875
|
object = params.object, purpose = params.purpose;
|
|
15876
|
+
amount = object.amount, creditCard = object.creditCard, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, method = object.method, ticketToken = object.ticketToken;
|
|
15838
15877
|
return [2 /*return*/, this.fetch({
|
|
15839
15878
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
15840
15879
|
method: 'POST',
|
|
15841
15880
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
15842
|
-
body: {
|
|
15881
|
+
body: {
|
|
15882
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined),
|
|
15883
|
+
purpose: purpose
|
|
15884
|
+
},
|
|
15843
15885
|
qs: {
|
|
15844
15886
|
async: true,
|
|
15845
15887
|
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
@@ -15856,18 +15898,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15856
15898
|
*/
|
|
15857
15899
|
PaymentService.prototype.voidAnyPayment = function (params) {
|
|
15858
15900
|
return __awaiter(this, void 0, void 0, function () {
|
|
15859
|
-
var id,
|
|
15901
|
+
var id, purpose;
|
|
15860
15902
|
return __generator(this, function (_a) {
|
|
15861
15903
|
switch (_a.label) {
|
|
15862
15904
|
case 0:
|
|
15863
|
-
id = params.id,
|
|
15905
|
+
id = params.id, purpose = params.purpose;
|
|
15864
15906
|
return [4 /*yield*/, this.fetch({
|
|
15865
15907
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize/" + id + "/void",
|
|
15866
15908
|
method: 'PUT',
|
|
15867
15909
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
15868
|
-
body:
|
|
15910
|
+
body: { purpose: purpose },
|
|
15869
15911
|
qs: {
|
|
15870
|
-
purpose: { id:
|
|
15912
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15871
15913
|
}
|
|
15872
15914
|
})];
|
|
15873
15915
|
case 1:
|
|
@@ -15882,18 +15924,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15882
15924
|
*/
|
|
15883
15925
|
PaymentService.prototype.voidTransaction = function (params) {
|
|
15884
15926
|
return __awaiter(this, void 0, void 0, function () {
|
|
15885
|
-
var id, object,
|
|
15927
|
+
var id, object, purpose;
|
|
15886
15928
|
return __generator(this, function (_a) {
|
|
15887
15929
|
switch (_a.label) {
|
|
15888
15930
|
case 0:
|
|
15889
|
-
id = params.id, object = params.object,
|
|
15931
|
+
id = params.id, object = params.object, purpose = params.purpose;
|
|
15890
15932
|
return [4 /*yield*/, this.fetch({
|
|
15891
15933
|
uri: "/payment/" + object.typeOf + "/authorize/" + id + "/void",
|
|
15892
15934
|
method: 'PUT',
|
|
15893
15935
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
15894
|
-
body:
|
|
15936
|
+
body: { purpose: purpose },
|
|
15895
15937
|
qs: {
|
|
15896
|
-
purpose: { id:
|
|
15938
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15897
15939
|
}
|
|
15898
15940
|
})];
|
|
15899
15941
|
case 1:
|
|
@@ -16023,7 +16065,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16023
16065
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
16024
16066
|
body: { purpose: purpose },
|
|
16025
16067
|
qs: {
|
|
16026
|
-
purpose: { id:
|
|
16068
|
+
purpose: { id: purpose.id }
|
|
16027
16069
|
}
|
|
16028
16070
|
})
|
|
16029
16071
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -16044,7 +16086,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16044
16086
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
16045
16087
|
body: { purpose: purpose, ticketedPermit: ticketedPermit },
|
|
16046
16088
|
qs: {
|
|
16047
|
-
purpose: { id:
|
|
16089
|
+
purpose: { id: purpose.id }
|
|
16048
16090
|
}
|
|
16049
16091
|
})
|
|
16050
16092
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -16065,7 +16107,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16065
16107
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
16066
16108
|
body: { purpose: purpose, ticketedInvoice: ticketedInvoice },
|
|
16067
16109
|
qs: {
|
|
16068
|
-
purpose: { id:
|
|
16110
|
+
purpose: { id: purpose.id }
|
|
16069
16111
|
}
|
|
16070
16112
|
})
|
|
16071
16113
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -20842,7 +20884,7 @@ exports.MeService = void 0;
|
|
|
20842
20884
|
var index_1 = require("../../index");
|
|
20843
20885
|
var service_1 = require("../../service");
|
|
20844
20886
|
/**
|
|
20845
|
-
*
|
|
20887
|
+
* 管理者(自分自身)サービス
|
|
20846
20888
|
*/
|
|
20847
20889
|
var MeService = /** @class */ (function (_super) {
|
|
20848
20890
|
__extends(MeService, _super);
|
|
@@ -20870,6 +20912,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
20870
20912
|
});
|
|
20871
20913
|
});
|
|
20872
20914
|
};
|
|
20915
|
+
/**
|
|
20916
|
+
* マイ販売者検索
|
|
20917
|
+
*/
|
|
20918
|
+
MeService.prototype.findMySellers = function (params) {
|
|
20919
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20920
|
+
var _a, auth, endpoint, chevreAdmin, meService;
|
|
20921
|
+
return __generator(this, function (_b) {
|
|
20922
|
+
switch (_b.label) {
|
|
20923
|
+
case 0:
|
|
20924
|
+
_a = this.options, auth = _a.auth, endpoint = _a.endpoint;
|
|
20925
|
+
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
20926
|
+
case 1:
|
|
20927
|
+
chevreAdmin = _b.sent();
|
|
20928
|
+
return [4 /*yield*/, chevreAdmin.createMeInstance()];
|
|
20929
|
+
case 2:
|
|
20930
|
+
meService = _b.sent();
|
|
20931
|
+
return [2 /*return*/, meService.findMySellers(params)];
|
|
20932
|
+
}
|
|
20933
|
+
});
|
|
20934
|
+
});
|
|
20935
|
+
};
|
|
20873
20936
|
return MeService;
|
|
20874
20937
|
}(service_1.Service));
|
|
20875
20938
|
exports.MeService = MeService;
|
|
@@ -27226,6 +27289,17 @@ exports.LoginTicket = LoginTicket;
|
|
|
27226
27289
|
},{}],173:[function(require,module,exports){
|
|
27227
27290
|
(function (Buffer){
|
|
27228
27291
|
"use strict";
|
|
27292
|
+
var __assign = (this && this.__assign) || function () {
|
|
27293
|
+
__assign = Object.assign || function(t) {
|
|
27294
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27295
|
+
s = arguments[i];
|
|
27296
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27297
|
+
t[p] = s[p];
|
|
27298
|
+
}
|
|
27299
|
+
return t;
|
|
27300
|
+
};
|
|
27301
|
+
return __assign.apply(this, arguments);
|
|
27302
|
+
};
|
|
27229
27303
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27230
27304
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27231
27305
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27297,6 +27371,7 @@ var OAuth2client = /** @class */ (function () {
|
|
|
27297
27371
|
// TODO add minimum validation
|
|
27298
27372
|
this.options = options;
|
|
27299
27373
|
this.credentials = {};
|
|
27374
|
+
this.events = {};
|
|
27300
27375
|
}
|
|
27301
27376
|
OAuth2client.BASE64URLENCODE = function (str) {
|
|
27302
27377
|
return str.toString('base64')
|
|
@@ -27415,12 +27490,22 @@ var OAuth2client = /** @class */ (function () {
|
|
|
27415
27490
|
throw new Error('No refresh token is set.');
|
|
27416
27491
|
}
|
|
27417
27492
|
return [2 /*return*/, this.refreshToken(this.credentials.refresh_token)
|
|
27418
|
-
.then(function (
|
|
27419
|
-
|
|
27420
|
-
|
|
27421
|
-
|
|
27422
|
-
|
|
27423
|
-
|
|
27493
|
+
.then(function (refreshTokenResult) { return __awaiter(_this, void 0, void 0, function () {
|
|
27494
|
+
return __generator(this, function (_a) {
|
|
27495
|
+
switch (_a.label) {
|
|
27496
|
+
case 0:
|
|
27497
|
+
// tokens.refresh_token = this.credentials.refresh_token;
|
|
27498
|
+
debug('setting credentials...', refreshTokenResult);
|
|
27499
|
+
this.credentials = __assign(__assign({}, refreshTokenResult), { refresh_token: this.credentials.refresh_token });
|
|
27500
|
+
if (!(typeof this.events.onTokenRefreshed === 'function')) return [3 /*break*/, 2];
|
|
27501
|
+
return [4 /*yield*/, this.events.onTokenRefreshed(this.credentials)];
|
|
27502
|
+
case 1:
|
|
27503
|
+
_a.sent();
|
|
27504
|
+
_a.label = 2;
|
|
27505
|
+
case 2: return [2 /*return*/, this.credentials];
|
|
27506
|
+
}
|
|
27507
|
+
});
|
|
27508
|
+
}); })];
|
|
27424
27509
|
});
|
|
27425
27510
|
});
|
|
27426
27511
|
};
|
|
@@ -27566,6 +27651,12 @@ var OAuth2client = /** @class */ (function () {
|
|
|
27566
27651
|
// return this.verifySignedJwt(options.idToken, options.audience, OAuth2Client.ISSUERS_);
|
|
27567
27652
|
return this.verifySignedJwt(this.credentials.id_token, options.audience);
|
|
27568
27653
|
};
|
|
27654
|
+
/**
|
|
27655
|
+
* トークン更新イベントハンドラを登録する
|
|
27656
|
+
*/
|
|
27657
|
+
OAuth2client.prototype.onTokenRefreshed = function (params) {
|
|
27658
|
+
this.events.onTokenRefreshed = params;
|
|
27659
|
+
};
|
|
27569
27660
|
/**
|
|
27570
27661
|
* Provides a request implementation with OAuth 2.0 flow.
|
|
27571
27662
|
* If credentials have a refresh_token, in cases of HTTP
|
|
@@ -27631,7 +27722,7 @@ var OAuth2client = /** @class */ (function () {
|
|
|
27631
27722
|
debug('fetching...', options);
|
|
27632
27723
|
return [2 /*return*/, fetch("https://" + this.options.domain + OAuth2client.OAUTH2_TOKEN_URI, options)
|
|
27633
27724
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
27634
|
-
var body, body,
|
|
27725
|
+
var body, body, result, refreshTokenResponse, access_token, id_token, expires_in, token_type;
|
|
27635
27726
|
return __generator(this, function (_a) {
|
|
27636
27727
|
switch (_a.label) {
|
|
27637
27728
|
case 0:
|
|
@@ -27647,17 +27738,29 @@ var OAuth2client = /** @class */ (function () {
|
|
|
27647
27738
|
body = _a.sent();
|
|
27648
27739
|
throw new Error(body);
|
|
27649
27740
|
case 4: return [3 /*break*/, 7];
|
|
27650
|
-
case 5:
|
|
27741
|
+
case 5:
|
|
27742
|
+
result = void 0;
|
|
27743
|
+
return [4 /*yield*/, response.json()];
|
|
27651
27744
|
case 6:
|
|
27652
|
-
|
|
27745
|
+
refreshTokenResponse = _a.sent();
|
|
27653
27746
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
27654
27747
|
/* istanbul ignore else */
|
|
27655
|
-
if (
|
|
27656
|
-
|
|
27657
|
-
|
|
27658
|
-
|
|
27748
|
+
if (refreshTokenResponse !== undefined && typeof refreshTokenResponse.expires_in === 'number') {
|
|
27749
|
+
access_token = refreshTokenResponse.access_token, id_token = refreshTokenResponse.id_token, expires_in = refreshTokenResponse.expires_in, token_type = refreshTokenResponse.token_type;
|
|
27750
|
+
result = {
|
|
27751
|
+
access_token: access_token, id_token: id_token, token_type: token_type,
|
|
27752
|
+
// tslint:disable-next-line:no-magic-numbers
|
|
27753
|
+
expiry_date: ((new Date()).getTime() + (expires_in * 1000))
|
|
27754
|
+
};
|
|
27755
|
+
// delete tokens.expires_in;
|
|
27659
27756
|
}
|
|
27660
|
-
|
|
27757
|
+
else {
|
|
27758
|
+
// 想定していないリフレッシュトークンレスポンスはログ出力
|
|
27759
|
+
// tslint:disable-next-line:no-console
|
|
27760
|
+
console.error('unexpected refreshToken response:', refreshTokenResponse);
|
|
27761
|
+
throw new Error('unexpected refreshToken response.');
|
|
27762
|
+
}
|
|
27763
|
+
return [2 /*return*/, result];
|
|
27661
27764
|
case 7: return [2 /*return*/];
|
|
27662
27765
|
}
|
|
27663
27766
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
+
import * as client from '../../../../lib/';
|
|
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 meService = await (await client.loadChevreAdmin({
|
|
14
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
|
+
auth: authClient
|
|
16
|
+
})).createMeInstance();
|
|
17
|
+
|
|
18
|
+
const data = await meService.findMySellers({
|
|
19
|
+
project: { id: project.id },
|
|
20
|
+
conditions: {
|
|
21
|
+
limit: 10,
|
|
22
|
+
page: 1
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
console.log(data);
|
|
26
|
+
console.log(data.length);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
main()
|
|
30
|
+
.then(() => {
|
|
31
|
+
console.log('main processed.');
|
|
32
|
+
})
|
|
33
|
+
.catch(console.error);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as moment from 'moment';
|
|
3
3
|
|
|
4
4
|
let startTime = process.hrtime();
|
|
5
|
-
import * as client from '
|
|
5
|
+
import * as client from '../../../../lib/index';
|
|
6
6
|
let diff = process.hrtime(startTime);
|
|
7
7
|
console.log(`importing sdk took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
|
|
8
8
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import { loadCloudAdmin } from '
|
|
3
|
-
import * as auth from '
|
|
2
|
+
import { loadCloudAdmin } from '../../../../lib/';
|
|
3
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
4
4
|
|
|
5
5
|
async function main() {
|
|
6
6
|
const authClient = await auth.login();
|
|
7
|
-
await authClient.refreshAccessToken();
|
|
8
7
|
const loginTicket = authClient.verifyIdToken({});
|
|
9
8
|
console.log('username is', loginTicket.getUsername());
|
|
10
9
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
+
import { loadCloudAdmin } from '../../../../lib/';
|
|
3
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
4
|
+
|
|
5
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
6
|
+
async function main() {
|
|
7
|
+
const authClient = await auth.login();
|
|
8
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
9
|
+
console.log('username is', loginTicket.getUsername());
|
|
10
|
+
|
|
11
|
+
const meService = await (await loadCloudAdmin({
|
|
12
|
+
endpoint: <string>process.env.API_ADMIN_ENDPOINT,
|
|
13
|
+
auth: authClient
|
|
14
|
+
})).createMeInstance();
|
|
15
|
+
|
|
16
|
+
const sellers = await meService.findMySellers({
|
|
17
|
+
project: { id: project.id },
|
|
18
|
+
conditions: {
|
|
19
|
+
limit: 3,
|
|
20
|
+
page: 1
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
console.log(sellers);
|
|
24
|
+
console.log(sellers.length, 'sellers found');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
main()
|
|
28
|
+
.then(() => {
|
|
29
|
+
console.log('main processed.');
|
|
30
|
+
})
|
|
31
|
+
.catch(console.error);
|
|
@@ -185,7 +185,9 @@ async function main() {
|
|
|
185
185
|
method: '1',
|
|
186
186
|
creditCard,
|
|
187
187
|
issuedThrough: { id: paymentServiceId },
|
|
188
|
-
ticketToken
|
|
188
|
+
ticketToken,
|
|
189
|
+
name: 'samplePaymentMethodName',
|
|
190
|
+
additionalProperty: [{ name: 'samplePropertyName', value: 'samplePropertyValue' }]
|
|
189
191
|
},
|
|
190
192
|
purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
|
|
191
193
|
})({ paymentService });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { IOptions, Service } from '../service';
|
|
3
|
-
export interface
|
|
3
|
+
export interface IFindMyProjectConditions {
|
|
4
4
|
limit?: number;
|
|
5
5
|
page?: number;
|
|
6
6
|
id?: {
|
|
@@ -8,7 +8,9 @@ export interface ISearchProjectConditions {
|
|
|
8
8
|
$regex?: string;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
+
export declare type IFindMySellerConditions = Pick<factory.seller.ISearchConditions, 'branchCode' | 'id' | 'limit' | 'page' | 'name'>;
|
|
11
12
|
export declare type IMyProject = Pick<factory.project.IProject, 'id' | 'logo' | 'name'>;
|
|
13
|
+
export declare type IMySeller = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'id' | 'name' | 'telephone' | 'url'>;
|
|
12
14
|
/**
|
|
13
15
|
* 管理者(自分自身)サービス
|
|
14
16
|
*/
|
|
@@ -17,5 +19,14 @@ export declare class MeService extends Service<IOptions> {
|
|
|
17
19
|
/**
|
|
18
20
|
* マイプロジェクト検索
|
|
19
21
|
*/
|
|
20
|
-
findMyProjects(params:
|
|
22
|
+
findMyProjects(params: IFindMyProjectConditions): Promise<IMyProject[]>;
|
|
23
|
+
/**
|
|
24
|
+
* マイ販売者検索
|
|
25
|
+
*/
|
|
26
|
+
findMySellers(params: {
|
|
27
|
+
project: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
conditions: IFindMySellerConditions;
|
|
31
|
+
}): Promise<IMySeller[]>;
|
|
21
32
|
}
|
|
@@ -92,6 +92,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* マイ販売者検索
|
|
97
|
+
*/
|
|
98
|
+
MeService.prototype.findMySellers = function (params) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var project, conditions;
|
|
101
|
+
var _this = this;
|
|
102
|
+
return __generator(this, function (_a) {
|
|
103
|
+
project = params.project, conditions = params.conditions;
|
|
104
|
+
return [2 /*return*/, this.fetch({
|
|
105
|
+
uri: "/members/me/projects/" + String(project === null || project === void 0 ? void 0 : project.id) + "/sellers",
|
|
106
|
+
method: 'GET',
|
|
107
|
+
qs: conditions,
|
|
108
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
109
|
+
})
|
|
110
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
111
|
+
return [2 /*return*/, response.json()];
|
|
112
|
+
}); }); })];
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
};
|
|
95
116
|
return MeService;
|
|
96
117
|
}(service_1.Service));
|
|
97
118
|
exports.MeService = MeService;
|
|
@@ -61,17 +61,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
61
61
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
65
|
-
var t = {};
|
|
66
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
67
|
-
t[p] = s[p];
|
|
68
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
69
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
70
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
71
|
-
t[p[i]] = s[p[i]];
|
|
72
|
-
}
|
|
73
|
-
return t;
|
|
74
|
-
};
|
|
75
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
65
|
exports.PaymentService = void 0;
|
|
77
66
|
var http_status_1 = require("http-status");
|
|
@@ -90,15 +79,17 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
90
79
|
*/
|
|
91
80
|
PaymentService.prototype.checkMovieTicket = function (params) {
|
|
92
81
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
+
var object, purpose;
|
|
93
83
|
var _this = this;
|
|
94
84
|
return __generator(this, function (_a) {
|
|
85
|
+
object = params.object, purpose = params.purpose;
|
|
95
86
|
return [2 /*return*/, this.fetch({
|
|
96
87
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
97
88
|
method: 'POST',
|
|
98
89
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
99
|
-
body:
|
|
90
|
+
body: { object: object, purpose: purpose },
|
|
100
91
|
qs: {
|
|
101
|
-
purpose: { id:
|
|
92
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
102
93
|
}
|
|
103
94
|
})
|
|
104
95
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -112,16 +103,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
112
103
|
*/
|
|
113
104
|
PaymentService.prototype.checkMovieTicketAsync = function (params) {
|
|
114
105
|
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
var object, purpose;
|
|
115
107
|
var _this = this;
|
|
116
108
|
return __generator(this, function (_a) {
|
|
109
|
+
object = params.object, purpose = params.purpose;
|
|
117
110
|
return [2 /*return*/, this.fetch({
|
|
118
111
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
119
112
|
method: 'POST',
|
|
120
113
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
121
|
-
body:
|
|
114
|
+
body: { object: object, purpose: purpose },
|
|
122
115
|
qs: {
|
|
123
116
|
async: true,
|
|
124
|
-
purpose: { id:
|
|
117
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
125
118
|
}
|
|
126
119
|
})
|
|
127
120
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -135,15 +128,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
135
128
|
*/
|
|
136
129
|
PaymentService.prototype.authorizeAnyPayment = function (params) {
|
|
137
130
|
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, ticketToken;
|
|
138
132
|
var _this = this;
|
|
139
133
|
return __generator(this, function (_a) {
|
|
134
|
+
object = params.object, purpose = params.purpose;
|
|
135
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
140
136
|
return [2 /*return*/, this.fetch({
|
|
141
137
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize",
|
|
142
138
|
method: 'POST',
|
|
143
139
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
144
|
-
body:
|
|
140
|
+
body: {
|
|
141
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
142
|
+
purpose: purpose
|
|
143
|
+
},
|
|
145
144
|
qs: {
|
|
146
|
-
purpose: { id:
|
|
145
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
147
146
|
}
|
|
148
147
|
})
|
|
149
148
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -157,14 +156,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
157
156
|
*/
|
|
158
157
|
PaymentService.prototype.authorizeCreditCard = function (params, options) {
|
|
159
158
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
+
var object, purpose, amount, issuedThrough, paymentMethod, creditCard, method, paymentMethodId, name, additionalProperty, ticketToken;
|
|
160
160
|
var _this = this;
|
|
161
161
|
return __generator(this, function (_a) {
|
|
162
|
+
object = params.object, purpose = params.purpose;
|
|
163
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, creditCard = object.creditCard, method = object.method, paymentMethodId = object.paymentMethodId, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
162
164
|
return [2 /*return*/, this.fetch({
|
|
163
165
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/authorize",
|
|
164
166
|
method: 'POST',
|
|
165
167
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
166
|
-
body:
|
|
167
|
-
|
|
168
|
+
body: {
|
|
169
|
+
object: __assign(__assign(__assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof paymentMethodId === 'string') ? { paymentMethodId: paymentMethodId } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
170
|
+
purpose: purpose
|
|
171
|
+
},
|
|
172
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
168
173
|
})
|
|
169
174
|
})
|
|
170
175
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -178,14 +183,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
178
183
|
*/
|
|
179
184
|
PaymentService.prototype.authorizeMovieTicket = function (params, options) {
|
|
180
185
|
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
+
var object, purpose, issuedThrough, paymentMethod, movieTickets, name, additionalProperty, ticketToken;
|
|
181
187
|
var _this = this;
|
|
182
188
|
return __generator(this, function (_a) {
|
|
189
|
+
object = params.object, purpose = params.purpose;
|
|
190
|
+
issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, movieTickets = object.movieTickets, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
183
191
|
return [2 /*return*/, this.fetch({
|
|
184
192
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/authorize",
|
|
185
193
|
method: 'POST',
|
|
186
194
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
187
|
-
body:
|
|
188
|
-
|
|
195
|
+
body: {
|
|
196
|
+
object: __assign(__assign(__assign(__assign({ issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (Array.isArray(movieTickets)) ? { movieTickets: movieTickets } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
197
|
+
purpose: purpose
|
|
198
|
+
},
|
|
199
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
189
200
|
})
|
|
190
201
|
})
|
|
191
202
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -199,15 +210,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
199
210
|
*/
|
|
200
211
|
PaymentService.prototype.authorizePaymentCard = function (params) {
|
|
201
212
|
return __awaiter(this, void 0, void 0, function () {
|
|
213
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, fromLocation, description;
|
|
202
214
|
var _this = this;
|
|
203
215
|
return __generator(this, function (_a) {
|
|
216
|
+
object = params.object, purpose = params.purpose;
|
|
217
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, fromLocation = object.fromLocation, description = object.description;
|
|
204
218
|
return [2 /*return*/, this.fetch({
|
|
205
219
|
uri: "/payment/" + factory.product.ProductType.PaymentCard + "/authorize",
|
|
206
220
|
method: 'POST',
|
|
207
221
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
208
|
-
body:
|
|
222
|
+
body: {
|
|
223
|
+
object: __assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof fromLocation === 'string') ? { fromLocation: fromLocation } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof description === 'string') ? { description: description } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
224
|
+
purpose: purpose
|
|
225
|
+
},
|
|
209
226
|
qs: {
|
|
210
|
-
purpose: { id:
|
|
227
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
211
228
|
}
|
|
212
229
|
})
|
|
213
230
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -221,15 +238,19 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
221
238
|
*/
|
|
222
239
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
223
240
|
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
-
var object, purpose;
|
|
241
|
+
var object, purpose, amount, creditCard, issuedThrough, paymentMethod, method, ticketToken;
|
|
225
242
|
var _this = this;
|
|
226
243
|
return __generator(this, function (_a) {
|
|
227
244
|
object = params.object, purpose = params.purpose;
|
|
245
|
+
amount = object.amount, creditCard = object.creditCard, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, method = object.method, ticketToken = object.ticketToken;
|
|
228
246
|
return [2 /*return*/, this.fetch({
|
|
229
247
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
230
248
|
method: 'POST',
|
|
231
249
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
232
|
-
body: {
|
|
250
|
+
body: {
|
|
251
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined),
|
|
252
|
+
purpose: purpose
|
|
253
|
+
},
|
|
233
254
|
qs: {
|
|
234
255
|
async: true,
|
|
235
256
|
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
@@ -246,18 +267,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
246
267
|
*/
|
|
247
268
|
PaymentService.prototype.voidAnyPayment = function (params) {
|
|
248
269
|
return __awaiter(this, void 0, void 0, function () {
|
|
249
|
-
var id,
|
|
270
|
+
var id, purpose;
|
|
250
271
|
return __generator(this, function (_a) {
|
|
251
272
|
switch (_a.label) {
|
|
252
273
|
case 0:
|
|
253
|
-
id = params.id,
|
|
274
|
+
id = params.id, purpose = params.purpose;
|
|
254
275
|
return [4 /*yield*/, this.fetch({
|
|
255
276
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize/" + id + "/void",
|
|
256
277
|
method: 'PUT',
|
|
257
278
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
258
|
-
body:
|
|
279
|
+
body: { purpose: purpose },
|
|
259
280
|
qs: {
|
|
260
|
-
purpose: { id:
|
|
281
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
261
282
|
}
|
|
262
283
|
})];
|
|
263
284
|
case 1:
|
|
@@ -272,18 +293,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
272
293
|
*/
|
|
273
294
|
PaymentService.prototype.voidTransaction = function (params) {
|
|
274
295
|
return __awaiter(this, void 0, void 0, function () {
|
|
275
|
-
var id, object,
|
|
296
|
+
var id, object, purpose;
|
|
276
297
|
return __generator(this, function (_a) {
|
|
277
298
|
switch (_a.label) {
|
|
278
299
|
case 0:
|
|
279
|
-
id = params.id, object = params.object,
|
|
300
|
+
id = params.id, object = params.object, purpose = params.purpose;
|
|
280
301
|
return [4 /*yield*/, this.fetch({
|
|
281
302
|
uri: "/payment/" + object.typeOf + "/authorize/" + id + "/void",
|
|
282
303
|
method: 'PUT',
|
|
283
304
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
284
|
-
body:
|
|
305
|
+
body: { purpose: purpose },
|
|
285
306
|
qs: {
|
|
286
|
-
purpose: { id:
|
|
307
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
287
308
|
}
|
|
288
309
|
})];
|
|
289
310
|
case 1:
|
|
@@ -413,7 +434,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
413
434
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
414
435
|
body: { purpose: purpose },
|
|
415
436
|
qs: {
|
|
416
|
-
purpose: { id:
|
|
437
|
+
purpose: { id: purpose.id }
|
|
417
438
|
}
|
|
418
439
|
})
|
|
419
440
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -434,7 +455,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
434
455
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
435
456
|
body: { purpose: purpose, ticketedPermit: ticketedPermit },
|
|
436
457
|
qs: {
|
|
437
|
-
purpose: { id:
|
|
458
|
+
purpose: { id: purpose.id }
|
|
438
459
|
}
|
|
439
460
|
})
|
|
440
461
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -455,7 +476,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
455
476
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
456
477
|
body: { purpose: purpose, ticketedInvoice: ticketedInvoice },
|
|
457
478
|
qs: {
|
|
458
|
-
purpose: { id:
|
|
479
|
+
purpose: { id: purpose.id }
|
|
459
480
|
}
|
|
460
481
|
})
|
|
461
482
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { IFindMyProjectConditions, IFindMySellerConditions, IMyProject, IMySeller } from '../../chevreAdmin/me';
|
|
2
2
|
import { IOptions, Service } from '../../service';
|
|
3
|
-
export interface ISearchProjectConditions {
|
|
4
|
-
limit?: number;
|
|
5
|
-
page?: number;
|
|
6
|
-
id?: {
|
|
7
|
-
$eq?: string;
|
|
8
|
-
$regex?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
3
|
/**
|
|
12
|
-
*
|
|
4
|
+
* 管理者(自分自身)サービス
|
|
13
5
|
*/
|
|
14
6
|
export declare class MeService extends Service<IOptions> {
|
|
15
7
|
constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'defaultPath'>);
|
|
16
8
|
/**
|
|
17
9
|
* マイプロジェクト検索
|
|
18
10
|
*/
|
|
19
|
-
searchProjects(params:
|
|
11
|
+
searchProjects(params: IFindMyProjectConditions): Promise<IMyProject[]>;
|
|
12
|
+
/**
|
|
13
|
+
* マイ販売者検索
|
|
14
|
+
*/
|
|
15
|
+
findMySellers(params: {
|
|
16
|
+
project: {
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
conditions: IFindMySellerConditions;
|
|
20
|
+
}): Promise<IMySeller[]>;
|
|
20
21
|
}
|
|
@@ -66,7 +66,7 @@ exports.MeService = void 0;
|
|
|
66
66
|
var index_1 = require("../../index");
|
|
67
67
|
var service_1 = require("../../service");
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* 管理者(自分自身)サービス
|
|
70
70
|
*/
|
|
71
71
|
var MeService = /** @class */ (function (_super) {
|
|
72
72
|
__extends(MeService, _super);
|
|
@@ -94,6 +94,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* マイ販売者検索
|
|
99
|
+
*/
|
|
100
|
+
MeService.prototype.findMySellers = function (params) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
+
var _a, auth, endpoint, chevreAdmin, meService;
|
|
103
|
+
return __generator(this, function (_b) {
|
|
104
|
+
switch (_b.label) {
|
|
105
|
+
case 0:
|
|
106
|
+
_a = this.options, auth = _a.auth, endpoint = _a.endpoint;
|
|
107
|
+
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
108
|
+
case 1:
|
|
109
|
+
chevreAdmin = _b.sent();
|
|
110
|
+
return [4 /*yield*/, chevreAdmin.createMeInstance()];
|
|
111
|
+
case 2:
|
|
112
|
+
meService = _b.sent();
|
|
113
|
+
return [2 /*return*/, meService.findMySellers(params)];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
97
118
|
return MeService;
|
|
98
119
|
}(service_1.Service));
|
|
99
120
|
exports.MeService = MeService;
|
package/lib/bundle.js
CHANGED
|
@@ -2693,6 +2693,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
2693
2693
|
});
|
|
2694
2694
|
});
|
|
2695
2695
|
};
|
|
2696
|
+
/**
|
|
2697
|
+
* マイ販売者検索
|
|
2698
|
+
*/
|
|
2699
|
+
MeService.prototype.findMySellers = function (params) {
|
|
2700
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2701
|
+
var project, conditions;
|
|
2702
|
+
var _this = this;
|
|
2703
|
+
return __generator(this, function (_a) {
|
|
2704
|
+
project = params.project, conditions = params.conditions;
|
|
2705
|
+
return [2 /*return*/, this.fetch({
|
|
2706
|
+
uri: "/members/me/projects/" + String(project === null || project === void 0 ? void 0 : project.id) + "/sellers",
|
|
2707
|
+
method: 'GET',
|
|
2708
|
+
qs: conditions,
|
|
2709
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
2710
|
+
})
|
|
2711
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
2712
|
+
return [2 /*return*/, response.json()];
|
|
2713
|
+
}); }); })];
|
|
2714
|
+
});
|
|
2715
|
+
});
|
|
2716
|
+
};
|
|
2696
2717
|
return MeService;
|
|
2697
2718
|
}(service_1.Service));
|
|
2698
2719
|
exports.MeService = MeService;
|
|
@@ -17033,17 +17054,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
17033
17054
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
17034
17055
|
}
|
|
17035
17056
|
};
|
|
17036
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
17037
|
-
var t = {};
|
|
17038
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17039
|
-
t[p] = s[p];
|
|
17040
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17041
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17042
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17043
|
-
t[p[i]] = s[p[i]];
|
|
17044
|
-
}
|
|
17045
|
-
return t;
|
|
17046
|
-
};
|
|
17047
17057
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17048
17058
|
exports.PaymentService = void 0;
|
|
17049
17059
|
var http_status_1 = require("http-status");
|
|
@@ -17062,15 +17072,17 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17062
17072
|
*/
|
|
17063
17073
|
PaymentService.prototype.checkMovieTicket = function (params) {
|
|
17064
17074
|
return __awaiter(this, void 0, void 0, function () {
|
|
17075
|
+
var object, purpose;
|
|
17065
17076
|
var _this = this;
|
|
17066
17077
|
return __generator(this, function (_a) {
|
|
17078
|
+
object = params.object, purpose = params.purpose;
|
|
17067
17079
|
return [2 /*return*/, this.fetch({
|
|
17068
17080
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
17069
17081
|
method: 'POST',
|
|
17070
17082
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17071
|
-
body:
|
|
17083
|
+
body: { object: object, purpose: purpose },
|
|
17072
17084
|
qs: {
|
|
17073
|
-
purpose: { id:
|
|
17085
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17074
17086
|
}
|
|
17075
17087
|
})
|
|
17076
17088
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17084,16 +17096,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17084
17096
|
*/
|
|
17085
17097
|
PaymentService.prototype.checkMovieTicketAsync = function (params) {
|
|
17086
17098
|
return __awaiter(this, void 0, void 0, function () {
|
|
17099
|
+
var object, purpose;
|
|
17087
17100
|
var _this = this;
|
|
17088
17101
|
return __generator(this, function (_a) {
|
|
17102
|
+
object = params.object, purpose = params.purpose;
|
|
17089
17103
|
return [2 /*return*/, this.fetch({
|
|
17090
17104
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
17091
17105
|
method: 'POST',
|
|
17092
17106
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
17093
|
-
body:
|
|
17107
|
+
body: { object: object, purpose: purpose },
|
|
17094
17108
|
qs: {
|
|
17095
17109
|
async: true,
|
|
17096
|
-
purpose: { id:
|
|
17110
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17097
17111
|
}
|
|
17098
17112
|
})
|
|
17099
17113
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17107,15 +17121,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17107
17121
|
*/
|
|
17108
17122
|
PaymentService.prototype.authorizeAnyPayment = function (params) {
|
|
17109
17123
|
return __awaiter(this, void 0, void 0, function () {
|
|
17124
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, ticketToken;
|
|
17110
17125
|
var _this = this;
|
|
17111
17126
|
return __generator(this, function (_a) {
|
|
17127
|
+
object = params.object, purpose = params.purpose;
|
|
17128
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
17112
17129
|
return [2 /*return*/, this.fetch({
|
|
17113
17130
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize",
|
|
17114
17131
|
method: 'POST',
|
|
17115
17132
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17116
|
-
body:
|
|
17133
|
+
body: {
|
|
17134
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
17135
|
+
purpose: purpose
|
|
17136
|
+
},
|
|
17117
17137
|
qs: {
|
|
17118
|
-
purpose: { id:
|
|
17138
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17119
17139
|
}
|
|
17120
17140
|
})
|
|
17121
17141
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17129,14 +17149,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17129
17149
|
*/
|
|
17130
17150
|
PaymentService.prototype.authorizeCreditCard = function (params, options) {
|
|
17131
17151
|
return __awaiter(this, void 0, void 0, function () {
|
|
17152
|
+
var object, purpose, amount, issuedThrough, paymentMethod, creditCard, method, paymentMethodId, name, additionalProperty, ticketToken;
|
|
17132
17153
|
var _this = this;
|
|
17133
17154
|
return __generator(this, function (_a) {
|
|
17155
|
+
object = params.object, purpose = params.purpose;
|
|
17156
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, creditCard = object.creditCard, method = object.method, paymentMethodId = object.paymentMethodId, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
17134
17157
|
return [2 /*return*/, this.fetch({
|
|
17135
17158
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/authorize",
|
|
17136
17159
|
method: 'POST',
|
|
17137
17160
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
17138
|
-
body:
|
|
17139
|
-
|
|
17161
|
+
body: {
|
|
17162
|
+
object: __assign(__assign(__assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof paymentMethodId === 'string') ? { paymentMethodId: paymentMethodId } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
17163
|
+
purpose: purpose
|
|
17164
|
+
},
|
|
17165
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17140
17166
|
})
|
|
17141
17167
|
})
|
|
17142
17168
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17150,14 +17176,20 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17150
17176
|
*/
|
|
17151
17177
|
PaymentService.prototype.authorizeMovieTicket = function (params, options) {
|
|
17152
17178
|
return __awaiter(this, void 0, void 0, function () {
|
|
17179
|
+
var object, purpose, issuedThrough, paymentMethod, movieTickets, name, additionalProperty, ticketToken;
|
|
17153
17180
|
var _this = this;
|
|
17154
17181
|
return __generator(this, function (_a) {
|
|
17182
|
+
object = params.object, purpose = params.purpose;
|
|
17183
|
+
issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, movieTickets = object.movieTickets, name = object.name, additionalProperty = object.additionalProperty, ticketToken = object.ticketToken;
|
|
17155
17184
|
return [2 /*return*/, this.fetch({
|
|
17156
17185
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/authorize",
|
|
17157
17186
|
method: 'POST',
|
|
17158
17187
|
expectedStatusCodes: [http_status_1.ACCEPTED, http_status_1.CREATED],
|
|
17159
|
-
body:
|
|
17160
|
-
|
|
17188
|
+
body: {
|
|
17189
|
+
object: __assign(__assign(__assign(__assign({ issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (Array.isArray(movieTickets)) ? { movieTickets: movieTickets } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
17190
|
+
purpose: purpose
|
|
17191
|
+
},
|
|
17192
|
+
qs: __assign(__assign({}, options), { purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17161
17193
|
})
|
|
17162
17194
|
})
|
|
17163
17195
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17171,15 +17203,21 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17171
17203
|
*/
|
|
17172
17204
|
PaymentService.prototype.authorizePaymentCard = function (params) {
|
|
17173
17205
|
return __awaiter(this, void 0, void 0, function () {
|
|
17206
|
+
var object, purpose, amount, issuedThrough, paymentMethod, name, additionalProperty, fromLocation, description;
|
|
17174
17207
|
var _this = this;
|
|
17175
17208
|
return __generator(this, function (_a) {
|
|
17209
|
+
object = params.object, purpose = params.purpose;
|
|
17210
|
+
amount = object.amount, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, name = object.name, additionalProperty = object.additionalProperty, fromLocation = object.fromLocation, description = object.description;
|
|
17176
17211
|
return [2 /*return*/, this.fetch({
|
|
17177
17212
|
uri: "/payment/" + factory.product.ProductType.PaymentCard + "/authorize",
|
|
17178
17213
|
method: 'POST',
|
|
17179
17214
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17180
|
-
body:
|
|
17215
|
+
body: {
|
|
17216
|
+
object: __assign(__assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (typeof fromLocation === 'string') ? { fromLocation: fromLocation } : undefined), (typeof name === 'string') ? { name: name } : undefined), (typeof description === 'string') ? { description: description } : undefined), (Array.isArray(additionalProperty)) ? { additionalProperty: additionalProperty } : undefined),
|
|
17217
|
+
purpose: purpose
|
|
17218
|
+
},
|
|
17181
17219
|
qs: {
|
|
17182
|
-
purpose: { id:
|
|
17220
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17183
17221
|
}
|
|
17184
17222
|
})
|
|
17185
17223
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17193,15 +17231,19 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17193
17231
|
*/
|
|
17194
17232
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
17195
17233
|
return __awaiter(this, void 0, void 0, function () {
|
|
17196
|
-
var object, purpose;
|
|
17234
|
+
var object, purpose, amount, creditCard, issuedThrough, paymentMethod, method, ticketToken;
|
|
17197
17235
|
var _this = this;
|
|
17198
17236
|
return __generator(this, function (_a) {
|
|
17199
17237
|
object = params.object, purpose = params.purpose;
|
|
17238
|
+
amount = object.amount, creditCard = object.creditCard, issuedThrough = object.issuedThrough, paymentMethod = object.paymentMethod, method = object.method, ticketToken = object.ticketToken;
|
|
17200
17239
|
return [2 /*return*/, this.fetch({
|
|
17201
17240
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
17202
17241
|
method: 'POST',
|
|
17203
17242
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
17204
|
-
body: {
|
|
17243
|
+
body: {
|
|
17244
|
+
object: __assign(__assign(__assign({ amount: amount, issuedThrough: issuedThrough, paymentMethod: paymentMethod }, (creditCard !== undefined && creditCard !== null) ? { creditCard: creditCard } : undefined), (typeof method === 'string') ? { method: method } : undefined), (typeof ticketToken === 'string') ? { ticketToken: ticketToken } : undefined),
|
|
17245
|
+
purpose: purpose
|
|
17246
|
+
},
|
|
17205
17247
|
qs: {
|
|
17206
17248
|
async: true,
|
|
17207
17249
|
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
@@ -17218,18 +17260,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17218
17260
|
*/
|
|
17219
17261
|
PaymentService.prototype.voidAnyPayment = function (params) {
|
|
17220
17262
|
return __awaiter(this, void 0, void 0, function () {
|
|
17221
|
-
var id,
|
|
17263
|
+
var id, purpose;
|
|
17222
17264
|
return __generator(this, function (_a) {
|
|
17223
17265
|
switch (_a.label) {
|
|
17224
17266
|
case 0:
|
|
17225
|
-
id = params.id,
|
|
17267
|
+
id = params.id, purpose = params.purpose;
|
|
17226
17268
|
return [4 /*yield*/, this.fetch({
|
|
17227
17269
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.FaceToFace + "/authorize/" + id + "/void",
|
|
17228
17270
|
method: 'PUT',
|
|
17229
17271
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
17230
|
-
body:
|
|
17272
|
+
body: { purpose: purpose },
|
|
17231
17273
|
qs: {
|
|
17232
|
-
purpose: { id:
|
|
17274
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17233
17275
|
}
|
|
17234
17276
|
})];
|
|
17235
17277
|
case 1:
|
|
@@ -17244,18 +17286,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17244
17286
|
*/
|
|
17245
17287
|
PaymentService.prototype.voidTransaction = function (params) {
|
|
17246
17288
|
return __awaiter(this, void 0, void 0, function () {
|
|
17247
|
-
var id, object,
|
|
17289
|
+
var id, object, purpose;
|
|
17248
17290
|
return __generator(this, function (_a) {
|
|
17249
17291
|
switch (_a.label) {
|
|
17250
17292
|
case 0:
|
|
17251
|
-
id = params.id, object = params.object,
|
|
17293
|
+
id = params.id, object = params.object, purpose = params.purpose;
|
|
17252
17294
|
return [4 /*yield*/, this.fetch({
|
|
17253
17295
|
uri: "/payment/" + object.typeOf + "/authorize/" + id + "/void",
|
|
17254
17296
|
method: 'PUT',
|
|
17255
17297
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
17256
|
-
body:
|
|
17298
|
+
body: { purpose: purpose },
|
|
17257
17299
|
qs: {
|
|
17258
|
-
purpose: { id:
|
|
17300
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17259
17301
|
}
|
|
17260
17302
|
})];
|
|
17261
17303
|
case 1:
|
|
@@ -17385,7 +17427,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17385
17427
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17386
17428
|
body: { purpose: purpose },
|
|
17387
17429
|
qs: {
|
|
17388
|
-
purpose: { id:
|
|
17430
|
+
purpose: { id: purpose.id }
|
|
17389
17431
|
}
|
|
17390
17432
|
})
|
|
17391
17433
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17406,7 +17448,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17406
17448
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17407
17449
|
body: { purpose: purpose, ticketedPermit: ticketedPermit },
|
|
17408
17450
|
qs: {
|
|
17409
|
-
purpose: { id:
|
|
17451
|
+
purpose: { id: purpose.id }
|
|
17410
17452
|
}
|
|
17411
17453
|
})
|
|
17412
17454
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -17427,7 +17469,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17427
17469
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17428
17470
|
body: { purpose: purpose, ticketedInvoice: ticketedInvoice },
|
|
17429
17471
|
qs: {
|
|
17430
|
-
purpose: { id:
|
|
17472
|
+
purpose: { id: purpose.id }
|
|
17431
17473
|
}
|
|
17432
17474
|
})
|
|
17433
17475
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -20842,7 +20884,7 @@ exports.MeService = void 0;
|
|
|
20842
20884
|
var index_1 = require("../../index");
|
|
20843
20885
|
var service_1 = require("../../service");
|
|
20844
20886
|
/**
|
|
20845
|
-
*
|
|
20887
|
+
* 管理者(自分自身)サービス
|
|
20846
20888
|
*/
|
|
20847
20889
|
var MeService = /** @class */ (function (_super) {
|
|
20848
20890
|
__extends(MeService, _super);
|
|
@@ -20870,6 +20912,27 @@ var MeService = /** @class */ (function (_super) {
|
|
|
20870
20912
|
});
|
|
20871
20913
|
});
|
|
20872
20914
|
};
|
|
20915
|
+
/**
|
|
20916
|
+
* マイ販売者検索
|
|
20917
|
+
*/
|
|
20918
|
+
MeService.prototype.findMySellers = function (params) {
|
|
20919
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20920
|
+
var _a, auth, endpoint, chevreAdmin, meService;
|
|
20921
|
+
return __generator(this, function (_b) {
|
|
20922
|
+
switch (_b.label) {
|
|
20923
|
+
case 0:
|
|
20924
|
+
_a = this.options, auth = _a.auth, endpoint = _a.endpoint;
|
|
20925
|
+
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
20926
|
+
case 1:
|
|
20927
|
+
chevreAdmin = _b.sent();
|
|
20928
|
+
return [4 /*yield*/, chevreAdmin.createMeInstance()];
|
|
20929
|
+
case 2:
|
|
20930
|
+
meService = _b.sent();
|
|
20931
|
+
return [2 /*return*/, meService.findMySellers(params)];
|
|
20932
|
+
}
|
|
20933
|
+
});
|
|
20934
|
+
});
|
|
20935
|
+
};
|
|
20873
20936
|
return MeService;
|
|
20874
20937
|
}(service_1.Service));
|
|
20875
20938
|
exports.MeService = MeService;
|