@cinerino/sdk 11.0.0-alpha.1 → 11.0.0-alpha.2
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/src/st/v2/searchEventsByTokenGrant.ts +1 -1
- package/lib/abstract/chevreAuth/ticket.d.ts +16 -0
- package/lib/abstract/chevreAuth/ticket.js +86 -0
- package/lib/abstract/chevreAuth.d.ts +9 -0
- package/lib/abstract/chevreAuth.js +20 -0
- package/lib/abstract/chevreConsole/member.d.ts +8 -0
- package/lib/abstract/chevreConsole/member.js +66 -0
- package/lib/bundle.js +550 -376
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IOptions, Service } from '../service';
|
|
2
|
+
/**
|
|
3
|
+
* チケットサービス
|
|
4
|
+
*/
|
|
5
|
+
export declare class TicketService extends Service<IOptions> {
|
|
6
|
+
constructor(options: Pick<IOptions, 'endpoint' | 'transporter'>);
|
|
7
|
+
publish(params: {
|
|
8
|
+
audience: {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
expiresInSeconds: number;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
token: string;
|
|
14
|
+
expiresIn: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -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.TicketService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
/**
|
|
58
|
+
* チケットサービス
|
|
59
|
+
*/
|
|
60
|
+
var TicketService = /** @class */ (function (_super) {
|
|
61
|
+
__extends(TicketService, _super);
|
|
62
|
+
function TicketService(options) {
|
|
63
|
+
var _this = this;
|
|
64
|
+
var endpoint = options.endpoint, transporter = options.transporter;
|
|
65
|
+
_this = _super.call(this, { endpoint: endpoint, transporter: transporter, project: { id: '' }, retryableStatusCodes: [] }) || this;
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
TicketService.prototype.publish = 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: '/tickets',
|
|
74
|
+
method: 'POST',
|
|
75
|
+
body: params,
|
|
76
|
+
expectedStatusCodes: [http_status_1.CREATED]
|
|
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 TicketService;
|
|
85
|
+
}(service_1.Service));
|
|
86
|
+
exports.TicketService = TicketService;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IOptions, IUnset as IUnsetOnService } from './service';
|
|
2
2
|
import type { IdentityService } from './chevreAuth/identity';
|
|
3
|
+
import type { TicketService } from './chevreAuth/ticket';
|
|
3
4
|
import type { TokenService } from './chevreAuth/token';
|
|
4
5
|
export declare namespace service {
|
|
5
6
|
type IUnset = IUnsetOnService;
|
|
@@ -17,6 +18,13 @@ export declare namespace service {
|
|
|
17
18
|
namespace Identity {
|
|
18
19
|
let svc: typeof IdentityService | undefined;
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* チケットサービス
|
|
23
|
+
*/
|
|
24
|
+
type Ticket = TicketService;
|
|
25
|
+
namespace Ticket {
|
|
26
|
+
let svc: typeof TicketService | undefined;
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
29
|
/**
|
|
22
30
|
* 認可サービス
|
|
@@ -26,4 +34,5 @@ export declare class ChevreAuth {
|
|
|
26
34
|
constructor(options: Pick<IOptions, 'endpoint'>);
|
|
27
35
|
createTokenInstance(): Promise<TokenService>;
|
|
28
36
|
createIdentityInstance(): Promise<IdentityService>;
|
|
37
|
+
createTicketInstance(): Promise<TicketService>;
|
|
29
38
|
}
|
|
@@ -56,6 +56,9 @@ var service;
|
|
|
56
56
|
var Identity;
|
|
57
57
|
(function (Identity) {
|
|
58
58
|
})(Identity = service.Identity || (service.Identity = {}));
|
|
59
|
+
var Ticket;
|
|
60
|
+
(function (Ticket) {
|
|
61
|
+
})(Ticket = service.Ticket || (service.Ticket = {}));
|
|
59
62
|
})(service = exports.service || (exports.service = {}));
|
|
60
63
|
/**
|
|
61
64
|
* 認可サービス
|
|
@@ -98,6 +101,23 @@ var ChevreAuth = /** @class */ (function () {
|
|
|
98
101
|
});
|
|
99
102
|
});
|
|
100
103
|
};
|
|
104
|
+
ChevreAuth.prototype.createTicketInstance = function () {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
var _a;
|
|
107
|
+
return __generator(this, function (_b) {
|
|
108
|
+
switch (_b.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
if (!(service.Ticket.svc === undefined)) return [3 /*break*/, 2];
|
|
111
|
+
_a = service.Ticket;
|
|
112
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAuth/ticket'); })];
|
|
113
|
+
case 1:
|
|
114
|
+
_a.svc = (_b.sent()).TicketService;
|
|
115
|
+
_b.label = 2;
|
|
116
|
+
case 2: return [2 /*return*/, new service.Ticket.svc(__assign({}, this.options))];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
101
121
|
return ChevreAuth;
|
|
102
122
|
}());
|
|
103
123
|
exports.ChevreAuth = ChevreAuth;
|
|
@@ -18,5 +18,13 @@ export declare class MemberService extends Service {
|
|
|
18
18
|
id: string;
|
|
19
19
|
};
|
|
20
20
|
}): Promise<void>;
|
|
21
|
+
createSoftwareApplication(params: IBody): Promise<void>;
|
|
22
|
+
searchSoftwareApplications(params: factory.iam.ISearchConditions): Promise<factory.iam.IMember[]>;
|
|
23
|
+
updateSoftwareApplication(params: IBody): Promise<void>;
|
|
24
|
+
deleteSoftwareApplication(params: {
|
|
25
|
+
member: {
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
}): Promise<void>;
|
|
21
29
|
}
|
|
22
30
|
export {};
|
|
@@ -129,6 +129,72 @@ var MemberService = /** @class */ (function (_super) {
|
|
|
129
129
|
});
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
|
+
MemberService.prototype.createSoftwareApplication = function (params) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
136
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
137
|
+
uri: "/members/" + factory.creativeWorkType.SoftwareApplication,
|
|
138
|
+
method: 'POST',
|
|
139
|
+
body: params,
|
|
140
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
141
|
+
})];
|
|
142
|
+
case 1:
|
|
143
|
+
_a.sent();
|
|
144
|
+
return [2 /*return*/];
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
MemberService.prototype.searchSoftwareApplications = function (params) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
+
var _this = this;
|
|
152
|
+
return __generator(this, function (_a) {
|
|
153
|
+
return [2 /*return*/, this.fetch({
|
|
154
|
+
uri: "/members/" + factory.creativeWorkType.SoftwareApplication,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
qs: params,
|
|
157
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
158
|
+
})
|
|
159
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
160
|
+
return [2 /*return*/, response.json()];
|
|
161
|
+
}); }); })];
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
MemberService.prototype.updateSoftwareApplication = function (params) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
+
return __generator(this, function (_a) {
|
|
168
|
+
switch (_a.label) {
|
|
169
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
170
|
+
uri: "/members/" + factory.creativeWorkType.SoftwareApplication + "/" + params.member.id,
|
|
171
|
+
method: 'PUT',
|
|
172
|
+
body: params,
|
|
173
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
174
|
+
})];
|
|
175
|
+
case 1:
|
|
176
|
+
_a.sent();
|
|
177
|
+
return [2 /*return*/];
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
MemberService.prototype.deleteSoftwareApplication = function (params) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
184
|
+
return __generator(this, function (_a) {
|
|
185
|
+
switch (_a.label) {
|
|
186
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
187
|
+
uri: "/members/" + factory.creativeWorkType.SoftwareApplication + "/" + params.member.id,
|
|
188
|
+
method: 'DELETE',
|
|
189
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
190
|
+
})];
|
|
191
|
+
case 1:
|
|
192
|
+
_a.sent();
|
|
193
|
+
return [2 /*return*/];
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
};
|
|
132
198
|
return MemberService;
|
|
133
199
|
}(service_1.Service));
|
|
134
200
|
exports.MemberService = MemberService;
|