@cinerino/sdk 10.21.0-alpha.39 → 10.21.0-alpha.40
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.
|
@@ -1,73 +1,7 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
isTierOf?: {
|
|
6
|
-
/**
|
|
7
|
-
* メンバープログラムコード
|
|
8
|
-
*/
|
|
9
|
-
identifier?: string;
|
|
10
|
-
hostingOrganization?: {
|
|
11
|
-
identifier?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
interface IOfferAvailableAtOrFrom {
|
|
16
|
-
id: string;
|
|
17
|
-
}
|
|
18
|
-
declare type ISellerMakesOffer = Pick<factory.event.screeningEvent.ISellerMakesOffer, 'typeOf' | 'validFrom' | 'validThrough'> & {
|
|
19
|
-
availableAtOrFrom: IOfferAvailableAtOrFrom;
|
|
20
|
-
};
|
|
21
|
-
interface IDocType extends ISellerMakesOffer {
|
|
22
|
-
project: {
|
|
23
|
-
id: string;
|
|
24
|
-
typeOf: factory.organizationType.Project;
|
|
25
|
-
};
|
|
26
|
-
seller: {
|
|
27
|
-
id: string;
|
|
28
|
-
typeOf: factory.organizationType.Organization;
|
|
29
|
-
};
|
|
30
|
-
itemOffered: {
|
|
31
|
-
id: string;
|
|
32
|
-
typeOf: factory.eventType.ScreeningEvent;
|
|
33
|
-
};
|
|
34
|
-
identifier: string;
|
|
35
|
-
validForMemberTier?: IMemberProgramTier;
|
|
36
|
-
}
|
|
37
|
-
interface ISearchConditions {
|
|
38
|
-
limit?: number;
|
|
39
|
-
page?: number;
|
|
40
|
-
sort?: {
|
|
41
|
-
validFrom?: factory.sortType;
|
|
42
|
-
};
|
|
43
|
-
project?: {
|
|
44
|
-
id?: {
|
|
45
|
-
$eq?: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
seller?: {
|
|
49
|
-
id?: {
|
|
50
|
-
$eq?: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
id?: {
|
|
54
|
-
$eq?: string;
|
|
55
|
-
$in?: string[];
|
|
56
|
-
};
|
|
57
|
-
identifier?: {
|
|
58
|
-
$eq?: string;
|
|
59
|
-
};
|
|
60
|
-
itemOffered?: {
|
|
61
|
-
id?: {
|
|
62
|
-
$eq?: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
availableAtOrFrom?: {
|
|
66
|
-
id?: {
|
|
67
|
-
$eq?: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
}
|
|
3
|
+
declare type IDocType = factory.eventOffer.IEventOfferForMemberTier;
|
|
4
|
+
declare type ISearchConditions = factory.eventOffer.ISearchConditions;
|
|
71
5
|
declare type ISavingOffer = Pick<IDocType, 'availableAtOrFrom' | 'identifier' | 'itemOffered' | 'typeOf' | 'validForMemberTier' | 'validFrom' | 'validThrough'>;
|
|
72
6
|
declare type IDocWithId = IDocType & {
|
|
73
7
|
id: string;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
|
-
|
|
2
|
+
interface IMemberProgramTier {
|
|
3
|
+
/**
|
|
4
|
+
* ティアコード
|
|
5
|
+
* プロジェクト内でユニーク必須
|
|
6
|
+
*/
|
|
7
|
+
identifier: string;
|
|
8
|
+
typeOf: 'MemberProgramTier';
|
|
9
|
+
}
|
|
10
|
+
interface IMemberProgram {
|
|
3
11
|
typeOf: 'MemberProgram';
|
|
4
12
|
identifier: string;
|
|
5
13
|
hostingOrganization: {
|
|
6
14
|
identifier: string;
|
|
7
15
|
};
|
|
16
|
+
hasTiers?: IMemberProgramTier[];
|
|
8
17
|
}
|
|
9
18
|
interface ISearchConditions {
|
|
10
19
|
limit?: number;
|
|
@@ -18,11 +27,37 @@ interface ISearchConditions {
|
|
|
18
27
|
$eq?: string;
|
|
19
28
|
};
|
|
20
29
|
}
|
|
30
|
+
interface ISearchTierConditions {
|
|
31
|
+
limit?: number;
|
|
32
|
+
page?: number;
|
|
33
|
+
isTierOf?: {
|
|
34
|
+
hostingOrganization?: {
|
|
35
|
+
id?: {
|
|
36
|
+
$eq?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
identifier?: {
|
|
40
|
+
$eq?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
identifier?: {
|
|
44
|
+
$eq?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
declare type IMemberProgramTierAsSearchResult = IMemberProgramTier & {
|
|
48
|
+
isTierOf: {
|
|
49
|
+
identifier: string;
|
|
50
|
+
hostingOrganization: {
|
|
51
|
+
identifier: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
21
55
|
/**
|
|
22
56
|
* メンバープログラムサービス
|
|
23
57
|
*/
|
|
24
58
|
export declare class MemberProgramService extends Service {
|
|
25
|
-
|
|
59
|
+
projectMemberPrograms(params: ISearchConditions): Promise<IMemberProgram[]>;
|
|
60
|
+
projectMemberProgramTiers(params: ISearchTierConditions): Promise<IMemberProgramTierAsSearchResult[]>;
|
|
26
61
|
create(params: {
|
|
27
62
|
identifier: string;
|
|
28
63
|
hostingOrganization: {
|
|
@@ -34,6 +69,7 @@ export declare class MemberProgramService extends Service {
|
|
|
34
69
|
hostingOrganization: {
|
|
35
70
|
id: string;
|
|
36
71
|
};
|
|
72
|
+
hasTiers?: Pick<IMemberProgramTier, 'identifier'>[];
|
|
37
73
|
}): Promise<void>;
|
|
38
74
|
deleteByIdentifier(params: {
|
|
39
75
|
identifier: string;
|
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -62,7 +73,7 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
62
73
|
function MemberProgramService() {
|
|
63
74
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
75
|
}
|
|
65
|
-
MemberProgramService.prototype.
|
|
76
|
+
MemberProgramService.prototype.projectMemberPrograms = function (params) {
|
|
66
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
78
|
var _this = this;
|
|
68
79
|
return __generator(this, function (_a) {
|
|
@@ -78,6 +89,22 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
78
89
|
});
|
|
79
90
|
});
|
|
80
91
|
};
|
|
92
|
+
MemberProgramService.prototype.projectMemberProgramTiers = function (params) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
var _this = this;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
return [2 /*return*/, this.fetch({
|
|
97
|
+
uri: '/memberProgramTiers',
|
|
98
|
+
method: 'GET',
|
|
99
|
+
qs: params,
|
|
100
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
101
|
+
})
|
|
102
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
103
|
+
return [2 /*return*/, response.json()];
|
|
104
|
+
}); }); })];
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
81
108
|
MemberProgramService.prototype.create = function (params) {
|
|
82
109
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
110
|
return __generator(this, function (_a) {
|
|
@@ -97,15 +124,15 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
97
124
|
};
|
|
98
125
|
MemberProgramService.prototype.updateByIdentifier = function (params) {
|
|
99
126
|
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var hostingOrganization;
|
|
127
|
+
var hostingOrganization, hasTiers;
|
|
101
128
|
return __generator(this, function (_a) {
|
|
102
129
|
switch (_a.label) {
|
|
103
130
|
case 0:
|
|
104
|
-
hostingOrganization = params.hostingOrganization;
|
|
131
|
+
hostingOrganization = params.hostingOrganization, hasTiers = params.hasTiers;
|
|
105
132
|
return [4 /*yield*/, this.fetch({
|
|
106
133
|
uri: "/memberPrograms/" + encodeURIComponent(String(params.identifier)),
|
|
107
134
|
method: 'PUT',
|
|
108
|
-
body: { hostingOrganization: hostingOrganization },
|
|
135
|
+
body: __assign({ hostingOrganization: hostingOrganization }, (Array.isArray(hasTiers)) ? { hasTiers: hasTiers } : undefined),
|
|
109
136
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
110
137
|
})];
|
|
111
138
|
case 1:
|
package/lib/bundle.js
CHANGED
|
@@ -8108,6 +8108,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
8108
8108
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8109
8109
|
};
|
|
8110
8110
|
})();
|
|
8111
|
+
var __assign = (this && this.__assign) || function () {
|
|
8112
|
+
__assign = Object.assign || function(t) {
|
|
8113
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8114
|
+
s = arguments[i];
|
|
8115
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8116
|
+
t[p] = s[p];
|
|
8117
|
+
}
|
|
8118
|
+
return t;
|
|
8119
|
+
};
|
|
8120
|
+
return __assign.apply(this, arguments);
|
|
8121
|
+
};
|
|
8111
8122
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8112
8123
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8113
8124
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8156,7 +8167,7 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
8156
8167
|
function MemberProgramService() {
|
|
8157
8168
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
8158
8169
|
}
|
|
8159
|
-
MemberProgramService.prototype.
|
|
8170
|
+
MemberProgramService.prototype.projectMemberPrograms = function (params) {
|
|
8160
8171
|
return __awaiter(this, void 0, void 0, function () {
|
|
8161
8172
|
var _this = this;
|
|
8162
8173
|
return __generator(this, function (_a) {
|
|
@@ -8172,6 +8183,22 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
8172
8183
|
});
|
|
8173
8184
|
});
|
|
8174
8185
|
};
|
|
8186
|
+
MemberProgramService.prototype.projectMemberProgramTiers = function (params) {
|
|
8187
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8188
|
+
var _this = this;
|
|
8189
|
+
return __generator(this, function (_a) {
|
|
8190
|
+
return [2 /*return*/, this.fetch({
|
|
8191
|
+
uri: '/memberProgramTiers',
|
|
8192
|
+
method: 'GET',
|
|
8193
|
+
qs: params,
|
|
8194
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
8195
|
+
})
|
|
8196
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
8197
|
+
return [2 /*return*/, response.json()];
|
|
8198
|
+
}); }); })];
|
|
8199
|
+
});
|
|
8200
|
+
});
|
|
8201
|
+
};
|
|
8175
8202
|
MemberProgramService.prototype.create = function (params) {
|
|
8176
8203
|
return __awaiter(this, void 0, void 0, function () {
|
|
8177
8204
|
return __generator(this, function (_a) {
|
|
@@ -8191,15 +8218,15 @@ var MemberProgramService = /** @class */ (function (_super) {
|
|
|
8191
8218
|
};
|
|
8192
8219
|
MemberProgramService.prototype.updateByIdentifier = function (params) {
|
|
8193
8220
|
return __awaiter(this, void 0, void 0, function () {
|
|
8194
|
-
var hostingOrganization;
|
|
8221
|
+
var hostingOrganization, hasTiers;
|
|
8195
8222
|
return __generator(this, function (_a) {
|
|
8196
8223
|
switch (_a.label) {
|
|
8197
8224
|
case 0:
|
|
8198
|
-
hostingOrganization = params.hostingOrganization;
|
|
8225
|
+
hostingOrganization = params.hostingOrganization, hasTiers = params.hasTiers;
|
|
8199
8226
|
return [4 /*yield*/, this.fetch({
|
|
8200
8227
|
uri: "/memberPrograms/" + encodeURIComponent(String(params.identifier)),
|
|
8201
8228
|
method: 'PUT',
|
|
8202
|
-
body: { hostingOrganization: hostingOrganization },
|
|
8229
|
+
body: __assign({ hostingOrganization: hostingOrganization }, (Array.isArray(hasTiers)) ? { hasTiers: hasTiers } : undefined),
|
|
8203
8230
|
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
8204
8231
|
})];
|
|
8205
8232
|
case 1:
|