@easyedu/js-lsm-api 1.53.0 → 1.54.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 CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.53.0
1
+ # @easyedu/js-lsm-api@1.54.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.53.0`
475
+ - Package version: `1.54.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(initOverrides) {
137
- return __awaiter(this, void 0, void 0, function* () {
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(initOverrides) {
134
- return __awaiter(this, void 0, void 0, function* () {
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
- * Internal ID of the receiving portal
32
- * @type {number}
34
+ * Display name of the offering portal
35
+ * @type {string}
33
36
  * @memberof CourseShare
34
37
  */
35
- targetPortalId: number;
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 (!('targetPortalId' in value) || value['targetPortalId'] === undefined)
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
- 'targetPortalId': json['target_portal_id'],
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
- 'target_portal_id': value['targetPortalId'],
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,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
- * Internal ID of the receiving portal
32
- * @type {number}
34
+ * Display name of the offering portal
35
+ * @type {string}
33
36
  * @memberof CourseShare
34
37
  */
35
- targetPortalId: number;
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 (!('targetPortalId' in value) || value['targetPortalId'] === undefined)
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
- 'targetPortalId': json['target_portal_id'],
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
- 'target_portal_id': value['targetPortalId'],
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'],
@@ -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
- `targetPortalId` | number
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
- "targetPortalId": null,
28
+ "sourcePortalName": null,
27
29
  "courseId": null,
30
+ "courseName": null,
28
31
  "allowedMode": null,
29
32
  "state": null,
30
33
  "allowResharing": null,
@@ -144,10 +144,12 @@ No authorization required
144
144
 
145
145
  ## getCourseSharesOfferedToMe
146
146
 
147
- > Array&lt;CourseShare&gt; getCourseSharesOfferedToMe()
147
+ > Array&lt;CourseShare&gt; getCourseSharesOfferedToMe(state)
148
148
 
149
149
  List shares offered to the current portal
150
150
 
151
+ Returns every &#x60;course_share&#x60; 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 &#x60;state&#x60; 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
- This endpoint does not need any parameter.
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
- * Internal ID of the receiving portal
36
- * @type {number}
38
+ * Display name of the offering portal
39
+ * @type {string}
37
40
  * @memberof CourseShare
38
41
  */
39
- targetPortalId: number;
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 (!('targetPortalId' in value) || value['targetPortalId'] === undefined) return false;
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
- 'targetPortalId': json['target_portal_id'],
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
- 'target_portal_id': value['targetPortalId'],
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'],