@cinerino/sdk 10.22.0-alpha.2 → 11.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/example/playground/public/lib/bundle.js +8153 -6839
  2. package/example/src/chevre/{adminSearchTickets.ts → adminSearchOrderActions.ts} +7 -6
  3. package/example/src/findEventById.ts +2 -1
  4. package/example/src/st/processPlaceOrderByPOS.ts +1 -1
  5. package/example/src/st/v2/searchEventsByTokenGrant.ts +54 -0
  6. package/lib/abstract/chevre/event.d.ts +1 -1
  7. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -3
  8. package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +0 -12
  9. package/lib/abstract/chevreAdmin/authorization.d.ts +0 -4
  10. package/lib/abstract/chevreAdmin/authorization.js +0 -19
  11. package/lib/abstract/chevreAdmin/creativeWork.d.ts +1 -16
  12. package/lib/abstract/chevreAdmin/creativeWork.js +0 -89
  13. package/lib/abstract/chevreAdmin/customer.d.ts +1 -20
  14. package/lib/abstract/chevreAdmin/customer.js +0 -58
  15. package/lib/abstract/chevreAdmin/event.d.ts +0 -35
  16. package/lib/abstract/chevreAdmin/event.js +0 -82
  17. package/lib/abstract/chevreAdmin/eventSeries.d.ts +0 -60
  18. package/lib/abstract/chevreAdmin/eventSeries.js +0 -112
  19. package/lib/abstract/chevreAdmin/me.d.ts +0 -8
  20. package/lib/abstract/chevreAdmin/me.js +0 -18
  21. package/lib/abstract/chevreAdmin/member.d.ts +0 -14
  22. package/lib/abstract/chevreAdmin/member.js +0 -66
  23. package/lib/abstract/chevreAdmin/offer.d.ts +0 -12
  24. package/lib/abstract/chevreAdmin/offer.js +0 -39
  25. package/lib/abstract/chevreAdmin/offerCatalog.d.ts +0 -70
  26. package/lib/abstract/chevreAdmin/offerCatalog.js +0 -160
  27. package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +0 -40
  28. package/lib/abstract/chevreAdmin/offerCatalogItem.js +0 -98
  29. package/lib/abstract/chevreAdmin/order.d.ts +1 -79
  30. package/lib/abstract/chevreAdmin/order.js +0 -125
  31. package/lib/abstract/chevreAdmin/product.d.ts +0 -36
  32. package/lib/abstract/chevreAdmin/product.js +0 -129
  33. package/lib/abstract/chevreAdmin/reservation.d.ts +1 -10
  34. package/lib/abstract/chevreAdmin/reservation.js +0 -20
  35. package/lib/abstract/chevreAdmin.d.ts +0 -504
  36. package/lib/abstract/chevreAdmin.js +60 -1177
  37. package/lib/abstract/chevreAuth/identity.d.ts +25 -0
  38. package/lib/abstract/chevreAuth/identity.js +152 -0
  39. package/lib/abstract/chevreAuth.d.ts +9 -0
  40. package/lib/abstract/chevreAuth.js +20 -0
  41. package/lib/abstract/chevreConsole/authorization.d.ts +72 -0
  42. package/lib/abstract/chevreConsole/authorization.js +86 -0
  43. package/lib/abstract/chevreConsole/creativeWork.d.ts +22 -0
  44. package/lib/abstract/chevreConsole/creativeWork.js +156 -0
  45. package/lib/abstract/chevreConsole/customer.d.ts +31 -0
  46. package/lib/abstract/chevreConsole/customer.js +125 -0
  47. package/lib/abstract/chevreConsole/event.d.ts +43 -0
  48. package/lib/abstract/chevreConsole/event.js +149 -0
  49. package/lib/abstract/chevreConsole/eventSeries.d.ts +67 -0
  50. package/lib/abstract/chevreConsole/eventSeries.js +180 -0
  51. package/lib/abstract/chevreConsole/me.d.ts +28 -0
  52. package/lib/abstract/chevreConsole/me.js +124 -0
  53. package/lib/abstract/chevreConsole/member.d.ts +22 -0
  54. package/lib/abstract/chevreConsole/member.js +134 -0
  55. package/lib/abstract/chevreConsole/offer.d.ts +34 -0
  56. package/lib/abstract/chevreConsole/offer.js +125 -0
  57. package/lib/abstract/chevreConsole/offerCatalog.d.ts +77 -0
  58. package/lib/abstract/chevreConsole/offerCatalog.js +227 -0
  59. package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +63 -0
  60. package/lib/abstract/chevreConsole/offerCatalogItem.js +181 -0
  61. package/lib/abstract/chevreConsole/order.d.ts +86 -0
  62. package/lib/abstract/chevreConsole/order.js +192 -0
  63. package/lib/abstract/chevreConsole/product.d.ts +45 -0
  64. package/lib/abstract/chevreConsole/product.js +196 -0
  65. package/lib/abstract/chevreConsole/reservation.d.ts +15 -0
  66. package/lib/abstract/chevreConsole/reservation.js +87 -0
  67. package/lib/abstract/chevreConsole.d.ts +634 -0
  68. package/lib/abstract/chevreConsole.js +1445 -0
  69. package/lib/abstract/cinerino/service/event.d.ts +1 -1
  70. package/lib/abstract/cloud/admin/order.d.ts +1 -1
  71. package/lib/abstract/cloud/admin/reservation.d.ts +1 -1
  72. package/lib/abstract/index.d.ts +3 -1
  73. package/lib/abstract/index.js +24 -1
  74. package/lib/bundle.js +8365 -6877
  75. package/lib/index.d.ts +2 -2
  76. package/lib/index.js +2 -1
  77. package/package.json +2 -2
  78. package/example/src/chevre/adminMovies.ts +0 -45
  79. package/example/src/chevre/adminProjectHasMerchantReturnPolicy.ts +0 -30
  80. package/example/src/chevre/adminSearchIssuers.ts +0 -32
  81. package/example/src/chevre/adminSearchSellers.ts +0 -32
  82. package/example/src/chevre/assetTransaction/processMoneyTransfer.ts +0 -74
  83. package/example/src/chevre/assetTransaction/processRegisterService.ts +0 -70
  84. package/example/src/chevre/assetTransaction/processReserve.ts +0 -193
  85. package/example/src/chevre/findPerson.ts +0 -33
  86. package/example/src/chevre/searchMessages.ts +0 -34
  87. package/example/src/chevre/searchTransactions.ts +0 -36
  88. /package/lib/abstract/{chevreAdmin → chevreConsole}/account.d.ts +0 -0
  89. /package/lib/abstract/{chevreAdmin → chevreConsole}/account.js +0 -0
  90. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.d.ts +0 -0
  91. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.js +0 -0
  92. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.d.ts +0 -0
  93. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.js +0 -0
  94. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.d.ts +0 -0
  95. /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.js +0 -0
  96. /package/lib/abstract/{chevreAdmin → chevreConsole}/action.d.ts +0 -0
  97. /package/lib/abstract/{chevreAdmin → chevreConsole}/action.js +0 -0
  98. /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.d.ts +0 -0
  99. /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.js +0 -0
  100. /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.d.ts +0 -0
  101. /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.js +0 -0
  102. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.d.ts +0 -0
  103. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.js +0 -0
  104. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.d.ts +0 -0
  105. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.js +0 -0
  106. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.d.ts +0 -0
  107. /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.js +0 -0
  108. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.d.ts +0 -0
  109. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.js +0 -0
  110. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.d.ts +0 -0
  111. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.js +0 -0
  112. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.d.ts +0 -0
  113. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.js +0 -0
  114. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.d.ts +0 -0
  115. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.js +0 -0
  116. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.d.ts +0 -0
  117. /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.js +0 -0
  118. /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.d.ts +0 -0
  119. /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.js +0 -0
  120. /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.d.ts +0 -0
  121. /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.js +0 -0
  122. /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.d.ts +0 -0
  123. /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.js +0 -0
  124. /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.d.ts +0 -0
  125. /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.js +0 -0
  126. /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.d.ts +0 -0
  127. /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.js +0 -0
  128. /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.d.ts +0 -0
  129. /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.js +0 -0
  130. /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.d.ts +0 -0
  131. /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.js +0 -0
  132. /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.d.ts +0 -0
  133. /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.js +0 -0
  134. /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.d.ts +0 -0
  135. /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.js +0 -0
  136. /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.d.ts +0 -0
  137. /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.js +0 -0
  138. /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.d.ts +0 -0
  139. /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.js +0 -0
  140. /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.d.ts +0 -0
  141. /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.js +0 -0
  142. /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.d.ts +0 -0
  143. /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.js +0 -0
  144. /package/lib/abstract/{chevreAdmin → chevreConsole}/message.d.ts +0 -0
  145. /package/lib/abstract/{chevreAdmin → chevreConsole}/message.js +0 -0
  146. /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.d.ts +0 -0
  147. /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.js +0 -0
  148. /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.d.ts +0 -0
  149. /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.js +0 -0
  150. /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.d.ts +0 -0
  151. /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.js +0 -0
  152. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.d.ts +0 -0
  153. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.js +0 -0
  154. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.d.ts +0 -0
  155. /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.js +0 -0
  156. /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.d.ts +0 -0
  157. /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.js +0 -0
  158. /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.d.ts +0 -0
  159. /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.js +0 -0
  160. /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.d.ts +0 -0
  161. /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.js +0 -0
  162. /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.d.ts +0 -0
  163. /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.js +0 -0
  164. /package/lib/abstract/{chevreAdmin → chevreConsole}/person.d.ts +0 -0
  165. /package/lib/abstract/{chevreAdmin → chevreConsole}/person.js +0 -0
  166. /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.d.ts +0 -0
  167. /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.js +0 -0
  168. /package/lib/abstract/{chevreAdmin → chevreConsole}/place.d.ts +0 -0
  169. /package/lib/abstract/{chevreAdmin → chevreConsole}/place.js +0 -0
  170. /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.d.ts +0 -0
  171. /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.js +0 -0
  172. /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.d.ts +0 -0
  173. /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.js +0 -0
  174. /package/lib/abstract/{chevreAdmin → chevreConsole}/project.d.ts +0 -0
  175. /package/lib/abstract/{chevreAdmin → chevreConsole}/project.js +0 -0
  176. /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.d.ts +0 -0
  177. /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.js +0 -0
  178. /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.d.ts +0 -0
  179. /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.js +0 -0
  180. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.d.ts +0 -0
  181. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.js +0 -0
  182. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.d.ts +0 -0
  183. /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.js +0 -0
  184. /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.d.ts +0 -0
  185. /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.js +0 -0
  186. /package/lib/abstract/{chevreAdmin → chevreConsole}/task.d.ts +0 -0
  187. /package/lib/abstract/{chevreAdmin → chevreConsole}/task.js +0 -0
  188. /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.d.ts +0 -0
  189. /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.js +0 -0
  190. /package/lib/abstract/{chevreAdmin → chevreConsole}/token.d.ts +0 -0
  191. /package/lib/abstract/{chevreAdmin → chevreConsole}/token.js +0 -0
  192. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.d.ts +0 -0
  193. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.js +0 -0
  194. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.d.ts +0 -0
  195. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.js +0 -0
  196. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.d.ts +0 -0
  197. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.js +0 -0
  198. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.d.ts +0 -0
  199. /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.js +0 -0
  200. /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.d.ts +0 -0
  201. /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.js +0 -0
  202. /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.d.ts +0 -0
  203. /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.js +0 -0
  204. /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.d.ts +0 -0
  205. /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.js +0 -0
  206. /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.d.ts +0 -0
  207. /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.js +0 -0
@@ -0,0 +1,25 @@
1
+ import * as factory from '../factory';
2
+ import { IOptions, Service } from '../service';
3
+ declare type IIdentity = Pick<factory.creativeWork.certification.webApplication.ICertification, 'about' | 'id' | 'issuedBy'>;
4
+ interface ISavingIdentity {
5
+ clientId: string;
6
+ clientSecret: string;
7
+ iss: string[];
8
+ }
9
+ /**
10
+ * アイデンティティサービス
11
+ */
12
+ export declare class IdentityService extends Service<IOptions> {
13
+ constructor(options: Pick<IOptions, 'endpoint' | 'transporter'>);
14
+ createIdentity(params: ISavingIdentity): Promise<{
15
+ id: string;
16
+ }>;
17
+ projectIdentityFields(params: Omit<factory.creativeWork.certification.webApplication.ISearchConditions, 'project'>): Promise<IIdentity[]>;
18
+ updateIdentityById(params: ISavingIdentity & {
19
+ id: string;
20
+ }): Promise<void>;
21
+ deleteIdentityById(params: {
22
+ id: string;
23
+ }): Promise<void>;
24
+ }
25
+ export {};
@@ -0,0 +1,152 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
54
+ var t = {};
55
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
56
+ t[p] = s[p];
57
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
58
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
59
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
60
+ t[p[i]] = s[p[i]];
61
+ }
62
+ return t;
63
+ };
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.IdentityService = void 0;
66
+ var http_status_1 = require("http-status");
67
+ var service_1 = require("../service");
68
+ /**
69
+ * アイデンティティサービス
70
+ */
71
+ var IdentityService = /** @class */ (function (_super) {
72
+ __extends(IdentityService, _super);
73
+ function IdentityService(options) {
74
+ var _this = this;
75
+ var endpoint = options.endpoint, transporter = options.transporter;
76
+ _this = _super.call(this, { endpoint: endpoint, transporter: transporter, project: { id: '' }, retryableStatusCodes: [] }) || this;
77
+ return _this;
78
+ }
79
+ IdentityService.prototype.createIdentity = function (params) {
80
+ return __awaiter(this, void 0, void 0, function () {
81
+ var _this = this;
82
+ return __generator(this, function (_a) {
83
+ return [2 /*return*/, this.fetch({
84
+ uri: '/identities',
85
+ method: 'POST',
86
+ body: params,
87
+ expectedStatusCodes: [http_status_1.CREATED]
88
+ })
89
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
90
+ return [2 /*return*/, response.json()];
91
+ }); }); })];
92
+ });
93
+ });
94
+ };
95
+ IdentityService.prototype.projectIdentityFields = function (params) {
96
+ return __awaiter(this, void 0, void 0, function () {
97
+ var _this = this;
98
+ return __generator(this, function (_a) {
99
+ return [2 /*return*/, this.fetch({
100
+ uri: '/identities',
101
+ method: 'GET',
102
+ qs: params,
103
+ expectedStatusCodes: [http_status_1.OK]
104
+ })
105
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
106
+ return [2 /*return*/, response.json()];
107
+ }); }); })];
108
+ });
109
+ });
110
+ };
111
+ IdentityService.prototype.updateIdentityById = function (params) {
112
+ return __awaiter(this, void 0, void 0, function () {
113
+ var id, body;
114
+ return __generator(this, function (_a) {
115
+ switch (_a.label) {
116
+ case 0:
117
+ id = params.id, body = __rest(params, ["id"]);
118
+ return [4 /*yield*/, this.fetch({
119
+ uri: "/identities/" + encodeURIComponent(String(id)),
120
+ method: 'PUT',
121
+ body: body,
122
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
123
+ })];
124
+ case 1:
125
+ _a.sent();
126
+ return [2 /*return*/];
127
+ }
128
+ });
129
+ });
130
+ };
131
+ IdentityService.prototype.deleteIdentityById = function (params) {
132
+ return __awaiter(this, void 0, void 0, function () {
133
+ var id;
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
136
+ case 0:
137
+ id = params.id;
138
+ return [4 /*yield*/, this.fetch({
139
+ uri: "/identities/" + encodeURIComponent(String(id)),
140
+ method: 'DELETE',
141
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
142
+ })];
143
+ case 1:
144
+ _a.sent();
145
+ return [2 /*return*/];
146
+ }
147
+ });
148
+ });
149
+ };
150
+ return IdentityService;
151
+ }(service_1.Service));
152
+ exports.IdentityService = IdentityService;
@@ -1,4 +1,5 @@
1
1
  import { IOptions, IUnset as IUnsetOnService } from './service';
2
+ import type { IdentityService } from './chevreAuth/identity';
2
3
  import type { TokenService } from './chevreAuth/token';
3
4
  export declare namespace service {
4
5
  type IUnset = IUnsetOnService;
@@ -9,6 +10,13 @@ export declare namespace service {
9
10
  namespace Token {
10
11
  let svc: typeof TokenService | undefined;
11
12
  }
13
+ /**
14
+ * アイデンティティサービス
15
+ */
16
+ type Identity = IdentityService;
17
+ namespace Identity {
18
+ let svc: typeof IdentityService | undefined;
19
+ }
12
20
  }
13
21
  /**
14
22
  * 認可サービス
@@ -17,4 +25,5 @@ export declare class ChevreAuth {
17
25
  options: Pick<IOptions, 'endpoint'>;
18
26
  constructor(options: Pick<IOptions, 'endpoint'>);
19
27
  createTokenInstance(): Promise<TokenService>;
28
+ createIdentityInstance(): Promise<IdentityService>;
20
29
  }
@@ -53,6 +53,9 @@ var service;
53
53
  var Token;
54
54
  (function (Token) {
55
55
  })(Token = service.Token || (service.Token = {}));
56
+ var Identity;
57
+ (function (Identity) {
58
+ })(Identity = service.Identity || (service.Identity = {}));
56
59
  })(service = exports.service || (exports.service = {}));
57
60
  /**
58
61
  * 認可サービス
@@ -78,6 +81,23 @@ var ChevreAuth = /** @class */ (function () {
78
81
  });
79
82
  });
80
83
  };
84
+ ChevreAuth.prototype.createIdentityInstance = function () {
85
+ return __awaiter(this, void 0, void 0, function () {
86
+ var _a;
87
+ return __generator(this, function (_b) {
88
+ switch (_b.label) {
89
+ case 0:
90
+ if (!(service.Identity.svc === undefined)) return [3 /*break*/, 2];
91
+ _a = service.Identity;
92
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAuth/identity'); })];
93
+ case 1:
94
+ _a.svc = (_b.sent()).IdentityService;
95
+ _b.label = 2;
96
+ case 2: return [2 /*return*/, new service.Identity.svc(__assign({}, this.options))];
97
+ }
98
+ });
99
+ });
100
+ };
81
101
  return ChevreAuth;
82
102
  }());
83
103
  exports.ChevreAuth = ChevreAuth;
@@ -0,0 +1,72 @@
1
+ import * as factory from '../factory';
2
+ import { Service } from '../service';
3
+ declare type AVAILABLE_ROLE_NAMES =
4
+ /**
5
+ * プロジェクト在庫管理
6
+ */
7
+ 'inventoryManager'
8
+ /**
9
+ * 販売者在庫管理
10
+ */
11
+ | 'sellers.inventoryManager';
12
+ export interface IObjectAsRole {
13
+ typeOf: factory.role.RoleType.OrganizationRole;
14
+ member: {
15
+ /**
16
+ * 承認相手に与えるロール
17
+ */
18
+ hasRole: [{
19
+ roleName: AVAILABLE_ROLE_NAMES;
20
+ }];
21
+ };
22
+ }
23
+ /**
24
+ * 承認作成パラメータ
25
+ */
26
+ export interface ICreateParams {
27
+ /**
28
+ * 何を
29
+ * ロールを指定
30
+ */
31
+ object: IObjectAsRole;
32
+ /**
33
+ * いつまで
34
+ * max: 1day
35
+ */
36
+ expiresInSeconds: number;
37
+ /**
38
+ * 誰に
39
+ * メンバーIDを指定
40
+ */
41
+ audience: Pick<factory.authorization.IAudience, 'id'>;
42
+ }
43
+ /**
44
+ * 作成済承認
45
+ */
46
+ export interface ICreatedAuthorization {
47
+ /**
48
+ * トークン発行リクエスト情報
49
+ */
50
+ potentialAction: {
51
+ target: {
52
+ /**
53
+ * リクエストメソッド
54
+ */
55
+ httpMethod: string;
56
+ /**
57
+ * エンドポイント
58
+ */
59
+ urlTemplate: string;
60
+ };
61
+ };
62
+ }
63
+ /**
64
+ * 承認サービス
65
+ */
66
+ export declare class AuthorizationService extends Service {
67
+ /**
68
+ * 承認検索
69
+ */
70
+ search(params: Omit<factory.authorization.ISearchConditions, 'project'>): Promise<factory.authorization.IAuthorization[]>;
71
+ }
72
+ export {};
@@ -0,0 +1,86 @@
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.AuthorizationService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * 承認サービス
59
+ */
60
+ var AuthorizationService = /** @class */ (function (_super) {
61
+ __extends(AuthorizationService, _super);
62
+ function AuthorizationService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ /**
66
+ * 承認検索
67
+ */
68
+ AuthorizationService.prototype.search = 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: '/authorizations',
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
+ return AuthorizationService;
85
+ }(service_1.Service));
86
+ exports.AuthorizationService = AuthorizationService;
@@ -0,0 +1,22 @@
1
+ import * as factory from '../factory';
2
+ import { IUnset, Service } from '../service';
3
+ /**
4
+ * コンテンツサービス
5
+ */
6
+ export declare class CreativeWorkService extends Service {
7
+ createMovie(params: factory.creativeWork.movie.ICreateParams): Promise<{
8
+ id: string;
9
+ }>;
10
+ searchMovies(params: Omit<factory.creativeWork.movie.ISearchConditions, 'project'>): Promise<{
11
+ data: factory.creativeWork.movie.ICreativeWork[];
12
+ }>;
13
+ findMovieById(params: {
14
+ id: string;
15
+ }): Promise<factory.creativeWork.movie.ICreativeWork>;
16
+ updateMovie(params: factory.creativeWork.movie.ICreateParams & {
17
+ id: string;
18
+ } & IUnset): Promise<void>;
19
+ deleteMovie(params: {
20
+ id: string;
21
+ }): Promise<void>;
22
+ }
@@ -0,0 +1,156 @@
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.CreativeWorkService = void 0;
55
+ var http_status_1 = require("http-status");
56
+ var service_1 = require("../service");
57
+ /**
58
+ * コンテンツサービス
59
+ */
60
+ var CreativeWorkService = /** @class */ (function (_super) {
61
+ __extends(CreativeWorkService, _super);
62
+ function CreativeWorkService() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ CreativeWorkService.prototype.createMovie = function (params) {
66
+ return __awaiter(this, void 0, void 0, function () {
67
+ var _this = this;
68
+ return __generator(this, function (_a) {
69
+ return [2 /*return*/, this.fetch({
70
+ uri: '/creativeWorks/movie',
71
+ method: 'POST',
72
+ body: params,
73
+ expectedStatusCodes: [http_status_1.CREATED]
74
+ })
75
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
76
+ return [2 /*return*/, response.json()];
77
+ }); }); })];
78
+ });
79
+ });
80
+ };
81
+ CreativeWorkService.prototype.searchMovies = function (params) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var _this = this;
84
+ return __generator(this, function (_a) {
85
+ return [2 /*return*/, this.fetch({
86
+ uri: '/creativeWorks/movie',
87
+ method: 'GET',
88
+ qs: params,
89
+ expectedStatusCodes: [http_status_1.OK]
90
+ })
91
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
92
+ var _a;
93
+ return __generator(this, function (_b) {
94
+ switch (_b.label) {
95
+ case 0:
96
+ _a = {};
97
+ return [4 /*yield*/, response.json()];
98
+ case 1: return [2 /*return*/, (_a.data = _b.sent(),
99
+ _a)];
100
+ }
101
+ });
102
+ }); })];
103
+ });
104
+ });
105
+ };
106
+ CreativeWorkService.prototype.findMovieById = function (params) {
107
+ return __awaiter(this, void 0, void 0, function () {
108
+ var _this = this;
109
+ return __generator(this, function (_a) {
110
+ return [2 /*return*/, this.fetch({
111
+ uri: "/creativeWorks/movie/" + encodeURIComponent(String(params.id)),
112
+ method: 'GET',
113
+ expectedStatusCodes: [http_status_1.OK]
114
+ })
115
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
116
+ return [2 /*return*/, response.json()];
117
+ }); }); })];
118
+ });
119
+ });
120
+ };
121
+ CreativeWorkService.prototype.updateMovie = function (params) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ return __generator(this, function (_a) {
124
+ switch (_a.label) {
125
+ case 0: return [4 /*yield*/, this.fetch({
126
+ uri: "/creativeWorks/movie/" + encodeURIComponent(String(params.id)),
127
+ method: 'PUT',
128
+ body: params,
129
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
130
+ })];
131
+ case 1:
132
+ _a.sent();
133
+ return [2 /*return*/];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ CreativeWorkService.prototype.deleteMovie = function (params) {
139
+ return __awaiter(this, void 0, void 0, function () {
140
+ return __generator(this, function (_a) {
141
+ switch (_a.label) {
142
+ case 0: return [4 /*yield*/, this.fetch({
143
+ uri: "/creativeWorks/movie/" + encodeURIComponent(String(params.id)),
144
+ method: 'DELETE',
145
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
146
+ })];
147
+ case 1:
148
+ _a.sent();
149
+ return [2 /*return*/];
150
+ }
151
+ });
152
+ });
153
+ };
154
+ return CreativeWorkService;
155
+ }(service_1.Service));
156
+ exports.CreativeWorkService = CreativeWorkService;
@@ -0,0 +1,31 @@
1
+ import * as factory from '../factory';
2
+ import { IUnset, Service } from '../service';
3
+ export interface IProjection {
4
+ $projection?: {
5
+ [key: string]: 1;
6
+ };
7
+ }
8
+ /**
9
+ * 顧客サービス
10
+ */
11
+ export declare class CustomerService extends Service {
12
+ /**
13
+ * 顧客作成
14
+ */
15
+ create(params: factory.customer.ICustomer): Promise<{
16
+ id: string;
17
+ }>;
18
+ /**
19
+ * 顧客編集
20
+ */
21
+ update(params: {
22
+ id: string;
23
+ attributes: factory.customer.ICustomer & IUnset;
24
+ }): Promise<void>;
25
+ /**
26
+ * 顧客削除
27
+ */
28
+ deleteById(params: {
29
+ id: string;
30
+ }): Promise<void>;
31
+ }