@easyedu/js-lsm-api 1.53.0 → 1.55.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/README.md +2 -2
- package/dist/apis/CourseShareApi.d.ts +19 -3
- package/dist/apis/CourseShareApi.js +22 -7
- package/dist/esm/apis/CourseShareApi.d.ts +19 -3
- package/dist/esm/apis/CourseShareApi.js +21 -6
- package/dist/esm/models/CourseShare.d.ts +12 -3
- package/dist/esm/models/CourseShare.js +7 -3
- package/dist/esm/models/PostOfferCatalogResponse.d.ts +25 -1
- package/dist/esm/models/PostOfferCatalogResponse.js +12 -0
- package/dist/models/CourseShare.d.ts +12 -3
- package/dist/models/CourseShare.js +7 -3
- package/dist/models/PostOfferCatalogResponse.d.ts +25 -1
- package/dist/models/PostOfferCatalogResponse.js +12 -0
- package/docs/CourseShare.md +5 -2
- package/docs/CourseShareApi.md +14 -3
- package/docs/PostOfferCatalogResponse.md +7 -0
- package/package.json +1 -1
- package/src/apis/CourseShareApi.ts +27 -5
- package/src/models/CourseShare.ts +18 -6
- package/src/models/PostOfferCatalogResponse.ts +34 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.55.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -472,7 +472,7 @@ and is automatically generated by the
|
|
|
472
472
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
473
473
|
|
|
474
474
|
- API version: `1.0.0`
|
|
475
|
-
- Package version: `1.
|
|
475
|
+
- Package version: `1.55.0`
|
|
476
476
|
- Generator version: `7.21.0`
|
|
477
477
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
478
478
|
|
|
@@ -14,6 +14,9 @@ import type { CourseShare, PostOfferCatalog, PostOfferCatalogResponse, PostOffer
|
|
|
14
14
|
export interface DeleteCourseShareRequest {
|
|
15
15
|
shareId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface GetCourseSharesOfferedToMeRequest {
|
|
18
|
+
state?: GetCourseSharesOfferedToMeStateEnum;
|
|
19
|
+
}
|
|
17
20
|
export interface PostOfferCatalogRequest {
|
|
18
21
|
catalogId: string;
|
|
19
22
|
postOfferCatalog: PostOfferCatalog;
|
|
@@ -67,15 +70,17 @@ export declare class CourseShareApi extends runtime.BaseAPI {
|
|
|
67
70
|
/**
|
|
68
71
|
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
69
72
|
*/
|
|
70
|
-
getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts>;
|
|
73
|
+
getCourseSharesOfferedToMeRequestOpts(requestParameters: GetCourseSharesOfferedToMeRequest): Promise<runtime.RequestOpts>;
|
|
71
74
|
/**
|
|
75
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
72
76
|
* List shares offered to the current portal
|
|
73
77
|
*/
|
|
74
|
-
getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
78
|
+
getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
75
79
|
/**
|
|
80
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
76
81
|
* List shares offered to the current portal
|
|
77
82
|
*/
|
|
78
|
-
getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
83
|
+
getCourseSharesOfferedToMe(requestParameters?: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
79
84
|
/**
|
|
80
85
|
* Creates request options for postOfferCatalog without sending the request
|
|
81
86
|
*/
|
|
@@ -151,3 +156,14 @@ export declare class CourseShareApi extends runtime.BaseAPI {
|
|
|
151
156
|
*/
|
|
152
157
|
putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
153
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* @export
|
|
161
|
+
*/
|
|
162
|
+
export declare const GetCourseSharesOfferedToMeStateEnum: {
|
|
163
|
+
readonly Offered: "offered";
|
|
164
|
+
readonly AcceptedMirror: "accepted_mirror";
|
|
165
|
+
readonly AcceptedClone: "accepted_clone";
|
|
166
|
+
readonly Declined: "declined";
|
|
167
|
+
readonly Revoked: "revoked";
|
|
168
|
+
};
|
|
169
|
+
export type GetCourseSharesOfferedToMeStateEnum = typeof GetCourseSharesOfferedToMeStateEnum[keyof typeof GetCourseSharesOfferedToMeStateEnum];
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.CourseShareApi = void 0;
|
|
25
|
+
exports.GetCourseSharesOfferedToMeStateEnum = exports.CourseShareApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
@@ -107,9 +107,12 @@ class CourseShareApi extends runtime.BaseAPI {
|
|
|
107
107
|
/**
|
|
108
108
|
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
109
109
|
*/
|
|
110
|
-
getCourseSharesOfferedToMeRequestOpts() {
|
|
110
|
+
getCourseSharesOfferedToMeRequestOpts(requestParameters) {
|
|
111
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
112
112
|
const queryParameters = {};
|
|
113
|
+
if (requestParameters['state'] != null) {
|
|
114
|
+
queryParameters['state'] = requestParameters['state'];
|
|
115
|
+
}
|
|
113
116
|
const headerParameters = {};
|
|
114
117
|
let urlPath = `/course-shares/offered-to-me`;
|
|
115
118
|
return {
|
|
@@ -121,21 +124,23 @@ class CourseShareApi extends runtime.BaseAPI {
|
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
126
|
/**
|
|
127
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
124
128
|
* List shares offered to the current portal
|
|
125
129
|
*/
|
|
126
|
-
getCourseSharesOfferedToMeRaw(initOverrides) {
|
|
130
|
+
getCourseSharesOfferedToMeRaw(requestParameters, initOverrides) {
|
|
127
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts();
|
|
132
|
+
const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts(requestParameters);
|
|
129
133
|
const response = yield this.request(requestOptions, initOverrides);
|
|
130
134
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.CourseShareFromJSON));
|
|
131
135
|
});
|
|
132
136
|
}
|
|
133
137
|
/**
|
|
138
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
134
139
|
* List shares offered to the current portal
|
|
135
140
|
*/
|
|
136
|
-
getCourseSharesOfferedToMe(
|
|
137
|
-
return __awaiter(this,
|
|
138
|
-
const response = yield this.getCourseSharesOfferedToMeRaw(initOverrides);
|
|
141
|
+
getCourseSharesOfferedToMe() {
|
|
142
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
143
|
+
const response = yield this.getCourseSharesOfferedToMeRaw(requestParameters, initOverrides);
|
|
139
144
|
return yield response.value();
|
|
140
145
|
});
|
|
141
146
|
}
|
|
@@ -383,3 +388,13 @@ class CourseShareApi extends runtime.BaseAPI {
|
|
|
383
388
|
}
|
|
384
389
|
}
|
|
385
390
|
exports.CourseShareApi = CourseShareApi;
|
|
391
|
+
/**
|
|
392
|
+
* @export
|
|
393
|
+
*/
|
|
394
|
+
exports.GetCourseSharesOfferedToMeStateEnum = {
|
|
395
|
+
Offered: 'offered',
|
|
396
|
+
AcceptedMirror: 'accepted_mirror',
|
|
397
|
+
AcceptedClone: 'accepted_clone',
|
|
398
|
+
Declined: 'declined',
|
|
399
|
+
Revoked: 'revoked'
|
|
400
|
+
};
|
|
@@ -14,6 +14,9 @@ import type { CourseShare, PostOfferCatalog, PostOfferCatalogResponse, PostOffer
|
|
|
14
14
|
export interface DeleteCourseShareRequest {
|
|
15
15
|
shareId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface GetCourseSharesOfferedToMeRequest {
|
|
18
|
+
state?: GetCourseSharesOfferedToMeStateEnum;
|
|
19
|
+
}
|
|
17
20
|
export interface PostOfferCatalogRequest {
|
|
18
21
|
catalogId: string;
|
|
19
22
|
postOfferCatalog: PostOfferCatalog;
|
|
@@ -67,15 +70,17 @@ export declare class CourseShareApi extends runtime.BaseAPI {
|
|
|
67
70
|
/**
|
|
68
71
|
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
69
72
|
*/
|
|
70
|
-
getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts>;
|
|
73
|
+
getCourseSharesOfferedToMeRequestOpts(requestParameters: GetCourseSharesOfferedToMeRequest): Promise<runtime.RequestOpts>;
|
|
71
74
|
/**
|
|
75
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
72
76
|
* List shares offered to the current portal
|
|
73
77
|
*/
|
|
74
|
-
getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
78
|
+
getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
75
79
|
/**
|
|
80
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
76
81
|
* List shares offered to the current portal
|
|
77
82
|
*/
|
|
78
|
-
getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
83
|
+
getCourseSharesOfferedToMe(requestParameters?: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
79
84
|
/**
|
|
80
85
|
* Creates request options for postOfferCatalog without sending the request
|
|
81
86
|
*/
|
|
@@ -151,3 +156,14 @@ export declare class CourseShareApi extends runtime.BaseAPI {
|
|
|
151
156
|
*/
|
|
152
157
|
putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
153
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* @export
|
|
161
|
+
*/
|
|
162
|
+
export declare const GetCourseSharesOfferedToMeStateEnum: {
|
|
163
|
+
readonly Offered: "offered";
|
|
164
|
+
readonly AcceptedMirror: "accepted_mirror";
|
|
165
|
+
readonly AcceptedClone: "accepted_clone";
|
|
166
|
+
readonly Declined: "declined";
|
|
167
|
+
readonly Revoked: "revoked";
|
|
168
|
+
};
|
|
169
|
+
export type GetCourseSharesOfferedToMeStateEnum = typeof GetCourseSharesOfferedToMeStateEnum[keyof typeof GetCourseSharesOfferedToMeStateEnum];
|
|
@@ -104,9 +104,12 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
104
104
|
/**
|
|
105
105
|
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
106
106
|
*/
|
|
107
|
-
getCourseSharesOfferedToMeRequestOpts() {
|
|
107
|
+
getCourseSharesOfferedToMeRequestOpts(requestParameters) {
|
|
108
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
109
|
const queryParameters = {};
|
|
110
|
+
if (requestParameters['state'] != null) {
|
|
111
|
+
queryParameters['state'] = requestParameters['state'];
|
|
112
|
+
}
|
|
110
113
|
const headerParameters = {};
|
|
111
114
|
let urlPath = `/course-shares/offered-to-me`;
|
|
112
115
|
return {
|
|
@@ -118,21 +121,23 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
118
121
|
});
|
|
119
122
|
}
|
|
120
123
|
/**
|
|
124
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
121
125
|
* List shares offered to the current portal
|
|
122
126
|
*/
|
|
123
|
-
getCourseSharesOfferedToMeRaw(initOverrides) {
|
|
127
|
+
getCourseSharesOfferedToMeRaw(requestParameters, initOverrides) {
|
|
124
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts();
|
|
129
|
+
const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts(requestParameters);
|
|
126
130
|
const response = yield this.request(requestOptions, initOverrides);
|
|
127
131
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
|
|
128
132
|
});
|
|
129
133
|
}
|
|
130
134
|
/**
|
|
135
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
131
136
|
* List shares offered to the current portal
|
|
132
137
|
*/
|
|
133
|
-
getCourseSharesOfferedToMe(
|
|
134
|
-
return __awaiter(this,
|
|
135
|
-
const response = yield this.getCourseSharesOfferedToMeRaw(initOverrides);
|
|
138
|
+
getCourseSharesOfferedToMe() {
|
|
139
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
140
|
+
const response = yield this.getCourseSharesOfferedToMeRaw(requestParameters, initOverrides);
|
|
136
141
|
return yield response.value();
|
|
137
142
|
});
|
|
138
143
|
}
|
|
@@ -379,3 +384,13 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
379
384
|
});
|
|
380
385
|
}
|
|
381
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* @export
|
|
389
|
+
*/
|
|
390
|
+
export const GetCourseSharesOfferedToMeStateEnum = {
|
|
391
|
+
Offered: 'offered',
|
|
392
|
+
AcceptedMirror: 'accepted_mirror',
|
|
393
|
+
AcceptedClone: 'accepted_clone',
|
|
394
|
+
Declined: 'declined',
|
|
395
|
+
Revoked: 'revoked'
|
|
396
|
+
};
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
+
* Shape returned by `GET /course-shares/offered-to-me`. Includes joined source
|
|
14
|
+
* portal name and course name so the child portal can render an inbox without
|
|
15
|
+
* follow-up requests.
|
|
13
16
|
*
|
|
14
17
|
* @export
|
|
15
18
|
* @interface CourseShare
|
|
@@ -28,17 +31,23 @@ export interface CourseShare {
|
|
|
28
31
|
*/
|
|
29
32
|
sourcePortalId: number;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {
|
|
34
|
+
* Display name of the offering portal
|
|
35
|
+
* @type {string}
|
|
33
36
|
* @memberof CourseShare
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
sourcePortalName: string;
|
|
36
39
|
/**
|
|
37
40
|
* Internal ID of the offered course
|
|
38
41
|
* @type {number}
|
|
39
42
|
* @memberof CourseShare
|
|
40
43
|
*/
|
|
41
44
|
courseId: number;
|
|
45
|
+
/**
|
|
46
|
+
* Display name of the offered course
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof CourseShare
|
|
49
|
+
*/
|
|
50
|
+
courseName: string;
|
|
42
51
|
/**
|
|
43
52
|
*
|
|
44
53
|
* @type {CourseShareAllowedModeEnum}
|
|
@@ -37,10 +37,12 @@ export function instanceOfCourseShare(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('sourcePortalId' in value) || value['sourcePortalId'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
-
if (!('
|
|
40
|
+
if (!('sourcePortalName' in value) || value['sourcePortalName'] === undefined)
|
|
41
41
|
return false;
|
|
42
42
|
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
43
43
|
return false;
|
|
44
|
+
if (!('courseName' in value) || value['courseName'] === undefined)
|
|
45
|
+
return false;
|
|
44
46
|
if (!('allowedMode' in value) || value['allowedMode'] === undefined)
|
|
45
47
|
return false;
|
|
46
48
|
if (!('state' in value) || value['state'] === undefined)
|
|
@@ -59,8 +61,9 @@ export function CourseShareFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
61
|
return {
|
|
60
62
|
'id': json['id'],
|
|
61
63
|
'sourcePortalId': json['source_portal_id'],
|
|
62
|
-
'
|
|
64
|
+
'sourcePortalName': json['source_portal_name'],
|
|
63
65
|
'courseId': json['course_id'],
|
|
66
|
+
'courseName': json['course_name'],
|
|
64
67
|
'allowedMode': json['allowed_mode'],
|
|
65
68
|
'state': json['state'],
|
|
66
69
|
'allowResharing': json['allow_resharing'],
|
|
@@ -76,8 +79,9 @@ export function CourseShareToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
76
79
|
return {
|
|
77
80
|
'id': value['id'],
|
|
78
81
|
'source_portal_id': value['sourcePortalId'],
|
|
79
|
-
'
|
|
82
|
+
'source_portal_name': value['sourcePortalName'],
|
|
80
83
|
'course_id': value['courseId'],
|
|
84
|
+
'course_name': value['courseName'],
|
|
81
85
|
'allowed_mode': value['allowedMode'],
|
|
82
86
|
'state': value['state'],
|
|
83
87
|
'allow_resharing': value['allowResharing'],
|
|
@@ -10,17 +10,41 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
+
* Result of fanning a catalog out into per-course offers. Outcomes are bucketed
|
|
14
|
+
* so operators can distinguish brand-new shares from reactivations of
|
|
15
|
+
* previously-revoked shares, idempotent no-ops on already-active shares, and
|
|
16
|
+
* real failures.
|
|
13
17
|
*
|
|
14
18
|
* @export
|
|
15
19
|
* @interface PostOfferCatalogResponse
|
|
16
20
|
*/
|
|
17
21
|
export interface PostOfferCatalogResponse {
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Brand-new `course_share` rows inserted from this catalog offer
|
|
20
24
|
* @type {number}
|
|
21
25
|
* @memberof PostOfferCatalogResponse
|
|
22
26
|
*/
|
|
23
27
|
createdShareCount: number;
|
|
28
|
+
/**
|
|
29
|
+
* Existing Revoked or Declined shares that were flipped back to Offered
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PostOfferCatalogResponse
|
|
32
|
+
*/
|
|
33
|
+
reactivatedShareCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* Already-active shares (Offered / AcceptedMirror / AcceptedClone). Terms
|
|
36
|
+
* may have been updated in place without disturbing the target's state.
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PostOfferCatalogResponse
|
|
40
|
+
*/
|
|
41
|
+
unchangedShareCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* Shares that could not be created due to a database or validation error
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PostOfferCatalogResponse
|
|
46
|
+
*/
|
|
47
|
+
failedShareCount: number;
|
|
24
48
|
}
|
|
25
49
|
/**
|
|
26
50
|
* Check if a given object implements the PostOfferCatalogResponse interface.
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
export function instanceOfPostOfferCatalogResponse(value) {
|
|
18
18
|
if (!('createdShareCount' in value) || value['createdShareCount'] === undefined)
|
|
19
19
|
return false;
|
|
20
|
+
if (!('reactivatedShareCount' in value) || value['reactivatedShareCount'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('unchangedShareCount' in value) || value['unchangedShareCount'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('failedShareCount' in value) || value['failedShareCount'] === undefined)
|
|
25
|
+
return false;
|
|
20
26
|
return true;
|
|
21
27
|
}
|
|
22
28
|
export function PostOfferCatalogResponseFromJSON(json) {
|
|
@@ -28,6 +34,9 @@ export function PostOfferCatalogResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
28
34
|
}
|
|
29
35
|
return {
|
|
30
36
|
'createdShareCount': json['created_share_count'],
|
|
37
|
+
'reactivatedShareCount': json['reactivated_share_count'],
|
|
38
|
+
'unchangedShareCount': json['unchanged_share_count'],
|
|
39
|
+
'failedShareCount': json['failed_share_count'],
|
|
31
40
|
};
|
|
32
41
|
}
|
|
33
42
|
export function PostOfferCatalogResponseToJSON(json) {
|
|
@@ -39,5 +48,8 @@ export function PostOfferCatalogResponseToJSONTyped(value, ignoreDiscriminator =
|
|
|
39
48
|
}
|
|
40
49
|
return {
|
|
41
50
|
'created_share_count': value['createdShareCount'],
|
|
51
|
+
'reactivated_share_count': value['reactivatedShareCount'],
|
|
52
|
+
'unchanged_share_count': value['unchangedShareCount'],
|
|
53
|
+
'failed_share_count': value['failedShareCount'],
|
|
42
54
|
};
|
|
43
55
|
}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
+
* Shape returned by `GET /course-shares/offered-to-me`. Includes joined source
|
|
14
|
+
* portal name and course name so the child portal can render an inbox without
|
|
15
|
+
* follow-up requests.
|
|
13
16
|
*
|
|
14
17
|
* @export
|
|
15
18
|
* @interface CourseShare
|
|
@@ -28,17 +31,23 @@ export interface CourseShare {
|
|
|
28
31
|
*/
|
|
29
32
|
sourcePortalId: number;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {
|
|
34
|
+
* Display name of the offering portal
|
|
35
|
+
* @type {string}
|
|
33
36
|
* @memberof CourseShare
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
sourcePortalName: string;
|
|
36
39
|
/**
|
|
37
40
|
* Internal ID of the offered course
|
|
38
41
|
* @type {number}
|
|
39
42
|
* @memberof CourseShare
|
|
40
43
|
*/
|
|
41
44
|
courseId: number;
|
|
45
|
+
/**
|
|
46
|
+
* Display name of the offered course
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof CourseShare
|
|
49
|
+
*/
|
|
50
|
+
courseName: string;
|
|
42
51
|
/**
|
|
43
52
|
*
|
|
44
53
|
* @type {CourseShareAllowedModeEnum}
|
|
@@ -45,10 +45,12 @@ function instanceOfCourseShare(value) {
|
|
|
45
45
|
return false;
|
|
46
46
|
if (!('sourcePortalId' in value) || value['sourcePortalId'] === undefined)
|
|
47
47
|
return false;
|
|
48
|
-
if (!('
|
|
48
|
+
if (!('sourcePortalName' in value) || value['sourcePortalName'] === undefined)
|
|
49
49
|
return false;
|
|
50
50
|
if (!('courseId' in value) || value['courseId'] === undefined)
|
|
51
51
|
return false;
|
|
52
|
+
if (!('courseName' in value) || value['courseName'] === undefined)
|
|
53
|
+
return false;
|
|
52
54
|
if (!('allowedMode' in value) || value['allowedMode'] === undefined)
|
|
53
55
|
return false;
|
|
54
56
|
if (!('state' in value) || value['state'] === undefined)
|
|
@@ -67,8 +69,9 @@ function CourseShareFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
69
|
return {
|
|
68
70
|
'id': json['id'],
|
|
69
71
|
'sourcePortalId': json['source_portal_id'],
|
|
70
|
-
'
|
|
72
|
+
'sourcePortalName': json['source_portal_name'],
|
|
71
73
|
'courseId': json['course_id'],
|
|
74
|
+
'courseName': json['course_name'],
|
|
72
75
|
'allowedMode': json['allowed_mode'],
|
|
73
76
|
'state': json['state'],
|
|
74
77
|
'allowResharing': json['allow_resharing'],
|
|
@@ -84,8 +87,9 @@ function CourseShareToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
84
87
|
return {
|
|
85
88
|
'id': value['id'],
|
|
86
89
|
'source_portal_id': value['sourcePortalId'],
|
|
87
|
-
'
|
|
90
|
+
'source_portal_name': value['sourcePortalName'],
|
|
88
91
|
'course_id': value['courseId'],
|
|
92
|
+
'course_name': value['courseName'],
|
|
89
93
|
'allowed_mode': value['allowedMode'],
|
|
90
94
|
'state': value['state'],
|
|
91
95
|
'allow_resharing': value['allowResharing'],
|
|
@@ -10,17 +10,41 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
+
* Result of fanning a catalog out into per-course offers. Outcomes are bucketed
|
|
14
|
+
* so operators can distinguish brand-new shares from reactivations of
|
|
15
|
+
* previously-revoked shares, idempotent no-ops on already-active shares, and
|
|
16
|
+
* real failures.
|
|
13
17
|
*
|
|
14
18
|
* @export
|
|
15
19
|
* @interface PostOfferCatalogResponse
|
|
16
20
|
*/
|
|
17
21
|
export interface PostOfferCatalogResponse {
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Brand-new `course_share` rows inserted from this catalog offer
|
|
20
24
|
* @type {number}
|
|
21
25
|
* @memberof PostOfferCatalogResponse
|
|
22
26
|
*/
|
|
23
27
|
createdShareCount: number;
|
|
28
|
+
/**
|
|
29
|
+
* Existing Revoked or Declined shares that were flipped back to Offered
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PostOfferCatalogResponse
|
|
32
|
+
*/
|
|
33
|
+
reactivatedShareCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* Already-active shares (Offered / AcceptedMirror / AcceptedClone). Terms
|
|
36
|
+
* may have been updated in place without disturbing the target's state.
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PostOfferCatalogResponse
|
|
40
|
+
*/
|
|
41
|
+
unchangedShareCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* Shares that could not be created due to a database or validation error
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PostOfferCatalogResponse
|
|
46
|
+
*/
|
|
47
|
+
failedShareCount: number;
|
|
24
48
|
}
|
|
25
49
|
/**
|
|
26
50
|
* Check if a given object implements the PostOfferCatalogResponse interface.
|
|
@@ -24,6 +24,12 @@ exports.PostOfferCatalogResponseToJSONTyped = PostOfferCatalogResponseToJSONType
|
|
|
24
24
|
function instanceOfPostOfferCatalogResponse(value) {
|
|
25
25
|
if (!('createdShareCount' in value) || value['createdShareCount'] === undefined)
|
|
26
26
|
return false;
|
|
27
|
+
if (!('reactivatedShareCount' in value) || value['reactivatedShareCount'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('unchangedShareCount' in value) || value['unchangedShareCount'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('failedShareCount' in value) || value['failedShareCount'] === undefined)
|
|
32
|
+
return false;
|
|
27
33
|
return true;
|
|
28
34
|
}
|
|
29
35
|
function PostOfferCatalogResponseFromJSON(json) {
|
|
@@ -35,6 +41,9 @@ function PostOfferCatalogResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
41
|
}
|
|
36
42
|
return {
|
|
37
43
|
'createdShareCount': json['created_share_count'],
|
|
44
|
+
'reactivatedShareCount': json['reactivated_share_count'],
|
|
45
|
+
'unchangedShareCount': json['unchanged_share_count'],
|
|
46
|
+
'failedShareCount': json['failed_share_count'],
|
|
38
47
|
};
|
|
39
48
|
}
|
|
40
49
|
function PostOfferCatalogResponseToJSON(json) {
|
|
@@ -46,5 +55,8 @@ function PostOfferCatalogResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
46
55
|
}
|
|
47
56
|
return {
|
|
48
57
|
'created_share_count': value['createdShareCount'],
|
|
58
|
+
'reactivated_share_count': value['reactivatedShareCount'],
|
|
59
|
+
'unchanged_share_count': value['unchangedShareCount'],
|
|
60
|
+
'failed_share_count': value['failedShareCount'],
|
|
49
61
|
};
|
|
50
62
|
}
|
package/docs/CourseShare.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# CourseShare
|
|
3
3
|
|
|
4
|
+
Shape returned by `GET /course-shares/offered-to-me`. Includes joined source portal name and course name so the child portal can render an inbox without follow-up requests.
|
|
4
5
|
|
|
5
6
|
## Properties
|
|
6
7
|
|
|
@@ -8,8 +9,9 @@ Name | Type
|
|
|
8
9
|
------------ | -------------
|
|
9
10
|
`id` | string
|
|
10
11
|
`sourcePortalId` | number
|
|
11
|
-
`
|
|
12
|
+
`sourcePortalName` | string
|
|
12
13
|
`courseId` | number
|
|
14
|
+
`courseName` | string
|
|
13
15
|
`allowedMode` | string
|
|
14
16
|
`state` | string
|
|
15
17
|
`allowResharing` | boolean
|
|
@@ -23,8 +25,9 @@ import type { CourseShare } from '@easyedu/js-lsm-api'
|
|
|
23
25
|
const example = {
|
|
24
26
|
"id": null,
|
|
25
27
|
"sourcePortalId": null,
|
|
26
|
-
"
|
|
28
|
+
"sourcePortalName": null,
|
|
27
29
|
"courseId": null,
|
|
30
|
+
"courseName": null,
|
|
28
31
|
"allowedMode": null,
|
|
29
32
|
"state": null,
|
|
30
33
|
"allowResharing": null,
|
package/docs/CourseShareApi.md
CHANGED
|
@@ -144,10 +144,12 @@ No authorization required
|
|
|
144
144
|
|
|
145
145
|
## getCourseSharesOfferedToMe
|
|
146
146
|
|
|
147
|
-
> Array<CourseShare> getCourseSharesOfferedToMe()
|
|
147
|
+
> Array<CourseShare> getCourseSharesOfferedToMe(state)
|
|
148
148
|
|
|
149
149
|
List shares offered to the current portal
|
|
150
150
|
|
|
151
|
+
Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
152
|
+
|
|
151
153
|
### Example
|
|
152
154
|
|
|
153
155
|
```ts
|
|
@@ -161,8 +163,13 @@ async function example() {
|
|
|
161
163
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
162
164
|
const api = new CourseShareApi();
|
|
163
165
|
|
|
166
|
+
const body = {
|
|
167
|
+
// 'offered' | 'accepted_mirror' | 'accepted_clone' | 'declined' | 'revoked' | Filter by share state (case-insensitive) (optional)
|
|
168
|
+
state: state_example,
|
|
169
|
+
} satisfies GetCourseSharesOfferedToMeRequest;
|
|
170
|
+
|
|
164
171
|
try {
|
|
165
|
-
const data = await api.getCourseSharesOfferedToMe();
|
|
172
|
+
const data = await api.getCourseSharesOfferedToMe(body);
|
|
166
173
|
console.log(data);
|
|
167
174
|
} catch (error) {
|
|
168
175
|
console.error(error);
|
|
@@ -175,7 +182,10 @@ example().catch(console.error);
|
|
|
175
182
|
|
|
176
183
|
### Parameters
|
|
177
184
|
|
|
178
|
-
|
|
185
|
+
|
|
186
|
+
| Name | Type | Description | Notes |
|
|
187
|
+
|------------- | ------------- | ------------- | -------------|
|
|
188
|
+
| **state** | `offered`, `accepted_mirror`, `accepted_clone`, `declined`, `revoked` | Filter by share state (case-insensitive) | [Optional] [Defaults to `undefined`] [Enum: offered, accepted_mirror, accepted_clone, declined, revoked] |
|
|
179
189
|
|
|
180
190
|
### Return type
|
|
181
191
|
|
|
@@ -195,6 +205,7 @@ No authorization required
|
|
|
195
205
|
| Status code | Description | Response headers |
|
|
196
206
|
|-------------|-------------|------------------|
|
|
197
207
|
| **200** | Shares | - |
|
|
208
|
+
| **400** | Invalid state filter | - |
|
|
198
209
|
|
|
199
210
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
200
211
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
# PostOfferCatalogResponse
|
|
3
3
|
|
|
4
|
+
Result of fanning a catalog out into per-course offers. Outcomes are bucketed so operators can distinguish brand-new shares from reactivations of previously-revoked shares, idempotent no-ops on already-active shares, and real failures.
|
|
4
5
|
|
|
5
6
|
## Properties
|
|
6
7
|
|
|
7
8
|
Name | Type
|
|
8
9
|
------------ | -------------
|
|
9
10
|
`createdShareCount` | number
|
|
11
|
+
`reactivatedShareCount` | number
|
|
12
|
+
`unchangedShareCount` | number
|
|
13
|
+
`failedShareCount` | number
|
|
10
14
|
|
|
11
15
|
## Example
|
|
12
16
|
|
|
@@ -16,6 +20,9 @@ import type { PostOfferCatalogResponse } from '@easyedu/js-lsm-api'
|
|
|
16
20
|
// TODO: Update the object below with actual values
|
|
17
21
|
const example = {
|
|
18
22
|
"createdShareCount": null,
|
|
23
|
+
"reactivatedShareCount": null,
|
|
24
|
+
"unchangedShareCount": null,
|
|
25
|
+
"failedShareCount": null,
|
|
19
26
|
} satisfies PostOfferCatalogResponse
|
|
20
27
|
|
|
21
28
|
console.log(example)
|
package/package.json
CHANGED
|
@@ -38,6 +38,10 @@ export interface DeleteCourseShareRequest {
|
|
|
38
38
|
shareId: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export interface GetCourseSharesOfferedToMeRequest {
|
|
42
|
+
state?: GetCourseSharesOfferedToMeStateEnum;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
export interface PostOfferCatalogRequest {
|
|
42
46
|
catalogId: string;
|
|
43
47
|
postOfferCatalog: PostOfferCatalog;
|
|
@@ -155,9 +159,13 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
155
159
|
/**
|
|
156
160
|
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
157
161
|
*/
|
|
158
|
-
async getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts> {
|
|
162
|
+
async getCourseSharesOfferedToMeRequestOpts(requestParameters: GetCourseSharesOfferedToMeRequest): Promise<runtime.RequestOpts> {
|
|
159
163
|
const queryParameters: any = {};
|
|
160
164
|
|
|
165
|
+
if (requestParameters['state'] != null) {
|
|
166
|
+
queryParameters['state'] = requestParameters['state'];
|
|
167
|
+
}
|
|
168
|
+
|
|
161
169
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
162
170
|
|
|
163
171
|
|
|
@@ -172,20 +180,22 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
172
180
|
}
|
|
173
181
|
|
|
174
182
|
/**
|
|
183
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
175
184
|
* List shares offered to the current portal
|
|
176
185
|
*/
|
|
177
|
-
async getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
|
|
178
|
-
const requestOptions = await this.getCourseSharesOfferedToMeRequestOpts();
|
|
186
|
+
async getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
|
|
187
|
+
const requestOptions = await this.getCourseSharesOfferedToMeRequestOpts(requestParameters);
|
|
179
188
|
const response = await this.request(requestOptions, initOverrides);
|
|
180
189
|
|
|
181
190
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
|
|
182
191
|
}
|
|
183
192
|
|
|
184
193
|
/**
|
|
194
|
+
* Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
|
|
185
195
|
* List shares offered to the current portal
|
|
186
196
|
*/
|
|
187
|
-
async getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
|
|
188
|
-
const response = await this.getCourseSharesOfferedToMeRaw(initOverrides);
|
|
197
|
+
async getCourseSharesOfferedToMe(requestParameters: GetCourseSharesOfferedToMeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
|
|
198
|
+
const response = await this.getCourseSharesOfferedToMeRaw(requestParameters, initOverrides);
|
|
189
199
|
return await response.value();
|
|
190
200
|
}
|
|
191
201
|
|
|
@@ -478,3 +488,15 @@ export class CourseShareApi extends runtime.BaseAPI {
|
|
|
478
488
|
}
|
|
479
489
|
|
|
480
490
|
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @export
|
|
494
|
+
*/
|
|
495
|
+
export const GetCourseSharesOfferedToMeStateEnum = {
|
|
496
|
+
Offered: 'offered',
|
|
497
|
+
AcceptedMirror: 'accepted_mirror',
|
|
498
|
+
AcceptedClone: 'accepted_clone',
|
|
499
|
+
Declined: 'declined',
|
|
500
|
+
Revoked: 'revoked'
|
|
501
|
+
} as const;
|
|
502
|
+
export type GetCourseSharesOfferedToMeStateEnum = typeof GetCourseSharesOfferedToMeStateEnum[keyof typeof GetCourseSharesOfferedToMeStateEnum];
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
|
+
* Shape returned by `GET /course-shares/offered-to-me`. Includes joined source
|
|
18
|
+
* portal name and course name so the child portal can render an inbox without
|
|
19
|
+
* follow-up requests.
|
|
17
20
|
*
|
|
18
21
|
* @export
|
|
19
22
|
* @interface CourseShare
|
|
@@ -32,17 +35,23 @@ export interface CourseShare {
|
|
|
32
35
|
*/
|
|
33
36
|
sourcePortalId: number;
|
|
34
37
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {
|
|
38
|
+
* Display name of the offering portal
|
|
39
|
+
* @type {string}
|
|
37
40
|
* @memberof CourseShare
|
|
38
41
|
*/
|
|
39
|
-
|
|
42
|
+
sourcePortalName: string;
|
|
40
43
|
/**
|
|
41
44
|
* Internal ID of the offered course
|
|
42
45
|
* @type {number}
|
|
43
46
|
* @memberof CourseShare
|
|
44
47
|
*/
|
|
45
48
|
courseId: number;
|
|
49
|
+
/**
|
|
50
|
+
* Display name of the offered course
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CourseShare
|
|
53
|
+
*/
|
|
54
|
+
courseName: string;
|
|
46
55
|
/**
|
|
47
56
|
*
|
|
48
57
|
* @type {CourseShareAllowedModeEnum}
|
|
@@ -93,8 +102,9 @@ export type CourseShareStateEnum = typeof CourseShareStateEnum[keyof typeof Cour
|
|
|
93
102
|
export function instanceOfCourseShare(value: object): value is CourseShare {
|
|
94
103
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
95
104
|
if (!('sourcePortalId' in value) || value['sourcePortalId'] === undefined) return false;
|
|
96
|
-
if (!('
|
|
105
|
+
if (!('sourcePortalName' in value) || value['sourcePortalName'] === undefined) return false;
|
|
97
106
|
if (!('courseId' in value) || value['courseId'] === undefined) return false;
|
|
107
|
+
if (!('courseName' in value) || value['courseName'] === undefined) return false;
|
|
98
108
|
if (!('allowedMode' in value) || value['allowedMode'] === undefined) return false;
|
|
99
109
|
if (!('state' in value) || value['state'] === undefined) return false;
|
|
100
110
|
if (!('allowResharing' in value) || value['allowResharing'] === undefined) return false;
|
|
@@ -113,8 +123,9 @@ export function CourseShareFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
113
123
|
|
|
114
124
|
'id': json['id'],
|
|
115
125
|
'sourcePortalId': json['source_portal_id'],
|
|
116
|
-
'
|
|
126
|
+
'sourcePortalName': json['source_portal_name'],
|
|
117
127
|
'courseId': json['course_id'],
|
|
128
|
+
'courseName': json['course_name'],
|
|
118
129
|
'allowedMode': json['allowed_mode'],
|
|
119
130
|
'state': json['state'],
|
|
120
131
|
'allowResharing': json['allow_resharing'],
|
|
@@ -134,8 +145,9 @@ export function CourseShareToJSONTyped(value?: CourseShare | null, ignoreDiscrim
|
|
|
134
145
|
|
|
135
146
|
'id': value['id'],
|
|
136
147
|
'source_portal_id': value['sourcePortalId'],
|
|
137
|
-
'
|
|
148
|
+
'source_portal_name': value['sourcePortalName'],
|
|
138
149
|
'course_id': value['courseId'],
|
|
150
|
+
'course_name': value['courseName'],
|
|
139
151
|
'allowed_mode': value['allowedMode'],
|
|
140
152
|
'state': value['state'],
|
|
141
153
|
'allow_resharing': value['allowResharing'],
|
|
@@ -14,17 +14,41 @@
|
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
|
+
* Result of fanning a catalog out into per-course offers. Outcomes are bucketed
|
|
18
|
+
* so operators can distinguish brand-new shares from reactivations of
|
|
19
|
+
* previously-revoked shares, idempotent no-ops on already-active shares, and
|
|
20
|
+
* real failures.
|
|
17
21
|
*
|
|
18
22
|
* @export
|
|
19
23
|
* @interface PostOfferCatalogResponse
|
|
20
24
|
*/
|
|
21
25
|
export interface PostOfferCatalogResponse {
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
27
|
+
* Brand-new `course_share` rows inserted from this catalog offer
|
|
24
28
|
* @type {number}
|
|
25
29
|
* @memberof PostOfferCatalogResponse
|
|
26
30
|
*/
|
|
27
31
|
createdShareCount: number;
|
|
32
|
+
/**
|
|
33
|
+
* Existing Revoked or Declined shares that were flipped back to Offered
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof PostOfferCatalogResponse
|
|
36
|
+
*/
|
|
37
|
+
reactivatedShareCount: number;
|
|
38
|
+
/**
|
|
39
|
+
* Already-active shares (Offered / AcceptedMirror / AcceptedClone). Terms
|
|
40
|
+
* may have been updated in place without disturbing the target's state.
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof PostOfferCatalogResponse
|
|
44
|
+
*/
|
|
45
|
+
unchangedShareCount: number;
|
|
46
|
+
/**
|
|
47
|
+
* Shares that could not be created due to a database or validation error
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PostOfferCatalogResponse
|
|
50
|
+
*/
|
|
51
|
+
failedShareCount: number;
|
|
28
52
|
}
|
|
29
53
|
|
|
30
54
|
/**
|
|
@@ -32,6 +56,9 @@ export interface PostOfferCatalogResponse {
|
|
|
32
56
|
*/
|
|
33
57
|
export function instanceOfPostOfferCatalogResponse(value: object): value is PostOfferCatalogResponse {
|
|
34
58
|
if (!('createdShareCount' in value) || value['createdShareCount'] === undefined) return false;
|
|
59
|
+
if (!('reactivatedShareCount' in value) || value['reactivatedShareCount'] === undefined) return false;
|
|
60
|
+
if (!('unchangedShareCount' in value) || value['unchangedShareCount'] === undefined) return false;
|
|
61
|
+
if (!('failedShareCount' in value) || value['failedShareCount'] === undefined) return false;
|
|
35
62
|
return true;
|
|
36
63
|
}
|
|
37
64
|
|
|
@@ -46,6 +73,9 @@ export function PostOfferCatalogResponseFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
46
73
|
return {
|
|
47
74
|
|
|
48
75
|
'createdShareCount': json['created_share_count'],
|
|
76
|
+
'reactivatedShareCount': json['reactivated_share_count'],
|
|
77
|
+
'unchangedShareCount': json['unchanged_share_count'],
|
|
78
|
+
'failedShareCount': json['failed_share_count'],
|
|
49
79
|
};
|
|
50
80
|
}
|
|
51
81
|
|
|
@@ -61,6 +91,9 @@ export function PostOfferCatalogResponseToJSONTyped(value?: PostOfferCatalogResp
|
|
|
61
91
|
return {
|
|
62
92
|
|
|
63
93
|
'created_share_count': value['createdShareCount'],
|
|
94
|
+
'reactivated_share_count': value['reactivatedShareCount'],
|
|
95
|
+
'unchanged_share_count': value['unchangedShareCount'],
|
|
96
|
+
'failed_share_count': value['failedShareCount'],
|
|
64
97
|
};
|
|
65
98
|
}
|
|
66
99
|
|