@instructure/athena-api-client 2.1.1 → 2.2.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
@@ -62,6 +62,7 @@ All URIs are relative to *http://localhost:3000*
62
62
  *AdminApi* | [**adminGetCohortStats**](docs/AdminApi.md#admingetcohortstats) | **GET** /api/v1/admin/cohort-stats | Get cohort statistics for users created within a date range
63
63
  *AdminApi* | [**adminGetUserChats**](docs/AdminApi.md#admingetuserchats) | **GET** /api/v1/admin/users/{externalId}/chats | Get chats with stats for a user
64
64
  *AdminApi* | [**adminGetUserEngagement**](docs/AdminApi.md#admingetuserengagement) | **GET** /api/v1/admin/users/{externalId}/engagement | Get engagement dates for a user
65
+ *AdminApi* | [**adminListActiveStreaks**](docs/AdminApi.md#adminlistactivestreaks) | **GET** /api/v1/admin/streaks/active | List all active streaks (currentDays > 0) across the account, paginated
65
66
  *AdminApi* | [**adminListChats**](docs/AdminApi.md#adminlistchats) | **GET** /api/v1/admin/chats | List recent chats across all account users
66
67
  *AdminApi* | [**adminListTopStreaks**](docs/AdminApi.md#adminlisttopstreaks) | **GET** /api/v1/admin/streaks | List top N streaks across the account
67
68
  *AdminApi* | [**adminTriggerChatAnalysis**](docs/AdminApi.md#admintriggerchatanalysis) | **POST** /api/v1/admin/chats/{chatId}/analyze | Trigger re-analysis for a chat
@@ -120,10 +121,12 @@ All URIs are relative to *http://localhost:3000*
120
121
  ### Models
121
122
 
122
123
  - [Account](docs/Account.md)
124
+ - [AdminActiveStreak](docs/AdminActiveStreak.md)
123
125
  - [AdminChat](docs/AdminChat.md)
124
126
  - [AdminChatAnalysis](docs/AdminChatAnalysis.md)
125
127
  - [AdminChatWithStats](docs/AdminChatWithStats.md)
126
128
  - [AdminCohortStats](docs/AdminCohortStats.md)
129
+ - [AdminPaginatedActiveStreaks](docs/AdminPaginatedActiveStreaks.md)
127
130
  - [AdminPaginatedChats](docs/AdminPaginatedChats.md)
128
131
  - [AdminStreak](docs/AdminStreak.md)
129
132
  - [AdminTriggerAnalysisResponse](docs/AdminTriggerAnalysisResponse.md)
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedChats, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
14
14
  export interface AdminGetChatRequest {
15
15
  xUserId: string;
16
16
  chatId: string;
@@ -32,6 +32,11 @@ export interface AdminGetUserEngagementRequest {
32
32
  xUserId: string;
33
33
  externalId: string;
34
34
  }
35
+ export interface AdminListActiveStreaksRequest {
36
+ xUserId: string;
37
+ limit?: number;
38
+ cursor?: string;
39
+ }
35
40
  export interface AdminListChatsRequest {
36
41
  xUserId: string;
37
42
  limit?: number;
@@ -96,6 +101,14 @@ export declare class AdminApi extends runtime.BaseAPI {
96
101
  * Get engagement dates for a user
97
102
  */
98
103
  adminGetUserEngagement(requestParameters: AdminGetUserEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminUserEngagement>;
104
+ /**
105
+ * List all active streaks (currentDays > 0) across the account, paginated
106
+ */
107
+ adminListActiveStreaksRaw(requestParameters: AdminListActiveStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPaginatedActiveStreaks>>;
108
+ /**
109
+ * List all active streaks (currentDays > 0) across the account, paginated
110
+ */
111
+ adminListActiveStreaks(requestParameters: AdminListActiveStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedActiveStreaks>;
99
112
  /**
100
113
  * List recent chats across all account users
101
114
  */
@@ -232,6 +232,47 @@ class AdminApi extends runtime.BaseAPI {
232
232
  return yield response.value();
233
233
  });
234
234
  }
235
+ /**
236
+ * List all active streaks (currentDays > 0) across the account, paginated
237
+ */
238
+ adminListActiveStreaksRaw(requestParameters, initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ if (requestParameters['xUserId'] == null) {
241
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
242
+ }
243
+ const queryParameters = {};
244
+ if (requestParameters['limit'] != null) {
245
+ queryParameters['limit'] = requestParameters['limit'];
246
+ }
247
+ if (requestParameters['cursor'] != null) {
248
+ queryParameters['cursor'] = requestParameters['cursor'];
249
+ }
250
+ const headerParameters = {};
251
+ if (requestParameters['xUserId'] != null) {
252
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
253
+ }
254
+ if (this.configuration && this.configuration.apiKey) {
255
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
256
+ }
257
+ let urlPath = `/api/v1/admin/streaks/active`;
258
+ const response = yield this.request({
259
+ path: urlPath,
260
+ method: 'GET',
261
+ headers: headerParameters,
262
+ query: queryParameters,
263
+ }, initOverrides);
264
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedActiveStreaksFromJSON)(jsonValue));
265
+ });
266
+ }
267
+ /**
268
+ * List all active streaks (currentDays > 0) across the account, paginated
269
+ */
270
+ adminListActiveStreaks(requestParameters, initOverrides) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
273
+ return yield response.value();
274
+ });
275
+ }
235
276
  /**
236
277
  * List recent chats across all account users
237
278
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedChats, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
14
14
  export interface AdminGetChatRequest {
15
15
  xUserId: string;
16
16
  chatId: string;
@@ -32,6 +32,11 @@ export interface AdminGetUserEngagementRequest {
32
32
  xUserId: string;
33
33
  externalId: string;
34
34
  }
35
+ export interface AdminListActiveStreaksRequest {
36
+ xUserId: string;
37
+ limit?: number;
38
+ cursor?: string;
39
+ }
35
40
  export interface AdminListChatsRequest {
36
41
  xUserId: string;
37
42
  limit?: number;
@@ -96,6 +101,14 @@ export declare class AdminApi extends runtime.BaseAPI {
96
101
  * Get engagement dates for a user
97
102
  */
98
103
  adminGetUserEngagement(requestParameters: AdminGetUserEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminUserEngagement>;
104
+ /**
105
+ * List all active streaks (currentDays > 0) across the account, paginated
106
+ */
107
+ adminListActiveStreaksRaw(requestParameters: AdminListActiveStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPaginatedActiveStreaks>>;
108
+ /**
109
+ * List all active streaks (currentDays > 0) across the account, paginated
110
+ */
111
+ adminListActiveStreaks(requestParameters: AdminListActiveStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedActiveStreaks>;
99
112
  /**
100
113
  * List recent chats across all account users
101
114
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedChatsFromJSON, AdminStreakFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserEngagementFromJSON, } from '../models/index';
24
+ import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminStreakFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserEngagementFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -229,6 +229,47 @@ export class AdminApi extends runtime.BaseAPI {
229
229
  return yield response.value();
230
230
  });
231
231
  }
232
+ /**
233
+ * List all active streaks (currentDays > 0) across the account, paginated
234
+ */
235
+ adminListActiveStreaksRaw(requestParameters, initOverrides) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ if (requestParameters['xUserId'] == null) {
238
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
239
+ }
240
+ const queryParameters = {};
241
+ if (requestParameters['limit'] != null) {
242
+ queryParameters['limit'] = requestParameters['limit'];
243
+ }
244
+ if (requestParameters['cursor'] != null) {
245
+ queryParameters['cursor'] = requestParameters['cursor'];
246
+ }
247
+ const headerParameters = {};
248
+ if (requestParameters['xUserId'] != null) {
249
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
250
+ }
251
+ if (this.configuration && this.configuration.apiKey) {
252
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
253
+ }
254
+ let urlPath = `/api/v1/admin/streaks/active`;
255
+ const response = yield this.request({
256
+ path: urlPath,
257
+ method: 'GET',
258
+ headers: headerParameters,
259
+ query: queryParameters,
260
+ }, initOverrides);
261
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedActiveStreaksFromJSON(jsonValue));
262
+ });
263
+ }
264
+ /**
265
+ * List all active streaks (currentDays > 0) across the account, paginated
266
+ */
267
+ adminListActiveStreaks(requestParameters, initOverrides) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
270
+ return yield response.value();
271
+ });
272
+ }
232
273
  /**
233
274
  * List recent chats across all account users
234
275
  */
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AdminActiveStreak
16
+ */
17
+ export interface AdminActiveStreak {
18
+ /**
19
+ * External user ID
20
+ * @type {string}
21
+ * @memberof AdminActiveStreak
22
+ */
23
+ userId: string | null;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof AdminActiveStreak
28
+ */
29
+ currentDays: number;
30
+ /**
31
+ *
32
+ * @type {Array<number>}
33
+ * @memberof AdminActiveStreak
34
+ */
35
+ missedDaysInCycle: Array<number>;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof AdminActiveStreak
40
+ */
41
+ lastMomentDate: Date | null;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AdminActiveStreak interface.
45
+ */
46
+ export declare function instanceOfAdminActiveStreak(value: object): value is AdminActiveStreak;
47
+ export declare function AdminActiveStreakFromJSON(json: any): AdminActiveStreak;
48
+ export declare function AdminActiveStreakFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminActiveStreak;
49
+ export declare function AdminActiveStreakToJSON(json: any): AdminActiveStreak;
50
+ export declare function AdminActiveStreakToJSONTyped(value?: AdminActiveStreak | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the AdminActiveStreak interface.
16
+ */
17
+ export function instanceOfAdminActiveStreak(value) {
18
+ if (!('userId' in value) || value['userId'] === undefined)
19
+ return false;
20
+ if (!('currentDays' in value) || value['currentDays'] === undefined)
21
+ return false;
22
+ if (!('missedDaysInCycle' in value) || value['missedDaysInCycle'] === undefined)
23
+ return false;
24
+ if (!('lastMomentDate' in value) || value['lastMomentDate'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function AdminActiveStreakFromJSON(json) {
29
+ return AdminActiveStreakFromJSONTyped(json, false);
30
+ }
31
+ export function AdminActiveStreakFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'userId': json['userId'],
37
+ 'currentDays': json['currentDays'],
38
+ 'missedDaysInCycle': json['missedDaysInCycle'],
39
+ 'lastMomentDate': (json['lastMomentDate'] == null ? null : new Date(json['lastMomentDate'])),
40
+ };
41
+ }
42
+ export function AdminActiveStreakToJSON(json) {
43
+ return AdminActiveStreakToJSONTyped(json, false);
44
+ }
45
+ export function AdminActiveStreakToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'userId': value['userId'],
51
+ 'currentDays': value['currentDays'],
52
+ 'missedDaysInCycle': value['missedDaysInCycle'],
53
+ 'lastMomentDate': value['lastMomentDate'] == null ? value['lastMomentDate'] : value['lastMomentDate'].toISOString().substring(0, 10),
54
+ };
55
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AdminActiveStreak } from './AdminActiveStreak';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AdminPaginatedActiveStreaks
17
+ */
18
+ export interface AdminPaginatedActiveStreaks {
19
+ /**
20
+ *
21
+ * @type {Array<AdminActiveStreak>}
22
+ * @memberof AdminPaginatedActiveStreaks
23
+ */
24
+ data: Array<AdminActiveStreak>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof AdminPaginatedActiveStreaks
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the AdminPaginatedActiveStreaks interface.
34
+ */
35
+ export declare function instanceOfAdminPaginatedActiveStreaks(value: object): value is AdminPaginatedActiveStreaks;
36
+ export declare function AdminPaginatedActiveStreaksFromJSON(json: any): AdminPaginatedActiveStreaks;
37
+ export declare function AdminPaginatedActiveStreaksFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPaginatedActiveStreaks;
38
+ export declare function AdminPaginatedActiveStreaksToJSON(json: any): AdminPaginatedActiveStreaks;
39
+ export declare function AdminPaginatedActiveStreaksToJSONTyped(value?: AdminPaginatedActiveStreaks | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Athena API
5
+ * REST API for the Athena system
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { AdminActiveStreakFromJSON, AdminActiveStreakToJSON, } from './AdminActiveStreak';
15
+ /**
16
+ * Check if a given object implements the AdminPaginatedActiveStreaks interface.
17
+ */
18
+ export function instanceOfAdminPaginatedActiveStreaks(value) {
19
+ if (!('data' in value) || value['data'] === undefined)
20
+ return false;
21
+ if (!('nextCursor' in value) || value['nextCursor'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function AdminPaginatedActiveStreaksFromJSON(json) {
26
+ return AdminPaginatedActiveStreaksFromJSONTyped(json, false);
27
+ }
28
+ export function AdminPaginatedActiveStreaksFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'data': (json['data'].map(AdminActiveStreakFromJSON)),
34
+ 'nextCursor': json['nextCursor'],
35
+ };
36
+ }
37
+ export function AdminPaginatedActiveStreaksToJSON(json) {
38
+ return AdminPaginatedActiveStreaksToJSONTyped(json, false);
39
+ }
40
+ export function AdminPaginatedActiveStreaksToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'data': (value['data'].map(AdminActiveStreakToJSON)),
46
+ 'nextCursor': value['nextCursor'],
47
+ };
48
+ }
@@ -1,8 +1,10 @@
1
1
  export * from './Account';
2
+ export * from './AdminActiveStreak';
2
3
  export * from './AdminChat';
3
4
  export * from './AdminChatAnalysis';
4
5
  export * from './AdminChatWithStats';
5
6
  export * from './AdminCohortStats';
7
+ export * from './AdminPaginatedActiveStreaks';
6
8
  export * from './AdminPaginatedChats';
7
9
  export * from './AdminStreak';
8
10
  export * from './AdminTriggerAnalysisResponse';
@@ -1,10 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './Account';
4
+ export * from './AdminActiveStreak';
4
5
  export * from './AdminChat';
5
6
  export * from './AdminChatAnalysis';
6
7
  export * from './AdminChatWithStats';
7
8
  export * from './AdminCohortStats';
9
+ export * from './AdminPaginatedActiveStreaks';
8
10
  export * from './AdminPaginatedChats';
9
11
  export * from './AdminStreak';
10
12
  export * from './AdminTriggerAnalysisResponse';
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AdminActiveStreak
16
+ */
17
+ export interface AdminActiveStreak {
18
+ /**
19
+ * External user ID
20
+ * @type {string}
21
+ * @memberof AdminActiveStreak
22
+ */
23
+ userId: string | null;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof AdminActiveStreak
28
+ */
29
+ currentDays: number;
30
+ /**
31
+ *
32
+ * @type {Array<number>}
33
+ * @memberof AdminActiveStreak
34
+ */
35
+ missedDaysInCycle: Array<number>;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof AdminActiveStreak
40
+ */
41
+ lastMomentDate: Date | null;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AdminActiveStreak interface.
45
+ */
46
+ export declare function instanceOfAdminActiveStreak(value: object): value is AdminActiveStreak;
47
+ export declare function AdminActiveStreakFromJSON(json: any): AdminActiveStreak;
48
+ export declare function AdminActiveStreakFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminActiveStreak;
49
+ export declare function AdminActiveStreakToJSON(json: any): AdminActiveStreak;
50
+ export declare function AdminActiveStreakToJSONTyped(value?: AdminActiveStreak | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAdminActiveStreak = instanceOfAdminActiveStreak;
17
+ exports.AdminActiveStreakFromJSON = AdminActiveStreakFromJSON;
18
+ exports.AdminActiveStreakFromJSONTyped = AdminActiveStreakFromJSONTyped;
19
+ exports.AdminActiveStreakToJSON = AdminActiveStreakToJSON;
20
+ exports.AdminActiveStreakToJSONTyped = AdminActiveStreakToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AdminActiveStreak interface.
23
+ */
24
+ function instanceOfAdminActiveStreak(value) {
25
+ if (!('userId' in value) || value['userId'] === undefined)
26
+ return false;
27
+ if (!('currentDays' in value) || value['currentDays'] === undefined)
28
+ return false;
29
+ if (!('missedDaysInCycle' in value) || value['missedDaysInCycle'] === undefined)
30
+ return false;
31
+ if (!('lastMomentDate' in value) || value['lastMomentDate'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function AdminActiveStreakFromJSON(json) {
36
+ return AdminActiveStreakFromJSONTyped(json, false);
37
+ }
38
+ function AdminActiveStreakFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'userId': json['userId'],
44
+ 'currentDays': json['currentDays'],
45
+ 'missedDaysInCycle': json['missedDaysInCycle'],
46
+ 'lastMomentDate': (json['lastMomentDate'] == null ? null : new Date(json['lastMomentDate'])),
47
+ };
48
+ }
49
+ function AdminActiveStreakToJSON(json) {
50
+ return AdminActiveStreakToJSONTyped(json, false);
51
+ }
52
+ function AdminActiveStreakToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'userId': value['userId'],
58
+ 'currentDays': value['currentDays'],
59
+ 'missedDaysInCycle': value['missedDaysInCycle'],
60
+ 'lastMomentDate': value['lastMomentDate'] == null ? value['lastMomentDate'] : value['lastMomentDate'].toISOString().substring(0, 10),
61
+ };
62
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AdminActiveStreak } from './AdminActiveStreak';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AdminPaginatedActiveStreaks
17
+ */
18
+ export interface AdminPaginatedActiveStreaks {
19
+ /**
20
+ *
21
+ * @type {Array<AdminActiveStreak>}
22
+ * @memberof AdminPaginatedActiveStreaks
23
+ */
24
+ data: Array<AdminActiveStreak>;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof AdminPaginatedActiveStreaks
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the AdminPaginatedActiveStreaks interface.
34
+ */
35
+ export declare function instanceOfAdminPaginatedActiveStreaks(value: object): value is AdminPaginatedActiveStreaks;
36
+ export declare function AdminPaginatedActiveStreaksFromJSON(json: any): AdminPaginatedActiveStreaks;
37
+ export declare function AdminPaginatedActiveStreaksFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPaginatedActiveStreaks;
38
+ export declare function AdminPaginatedActiveStreaksToJSON(json: any): AdminPaginatedActiveStreaks;
39
+ export declare function AdminPaginatedActiveStreaksToJSONTyped(value?: AdminPaginatedActiveStreaks | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAdminPaginatedActiveStreaks = instanceOfAdminPaginatedActiveStreaks;
17
+ exports.AdminPaginatedActiveStreaksFromJSON = AdminPaginatedActiveStreaksFromJSON;
18
+ exports.AdminPaginatedActiveStreaksFromJSONTyped = AdminPaginatedActiveStreaksFromJSONTyped;
19
+ exports.AdminPaginatedActiveStreaksToJSON = AdminPaginatedActiveStreaksToJSON;
20
+ exports.AdminPaginatedActiveStreaksToJSONTyped = AdminPaginatedActiveStreaksToJSONTyped;
21
+ const AdminActiveStreak_1 = require("./AdminActiveStreak");
22
+ /**
23
+ * Check if a given object implements the AdminPaginatedActiveStreaks interface.
24
+ */
25
+ function instanceOfAdminPaginatedActiveStreaks(value) {
26
+ if (!('data' in value) || value['data'] === undefined)
27
+ return false;
28
+ if (!('nextCursor' in value) || value['nextCursor'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function AdminPaginatedActiveStreaksFromJSON(json) {
33
+ return AdminPaginatedActiveStreaksFromJSONTyped(json, false);
34
+ }
35
+ function AdminPaginatedActiveStreaksFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'data': (json['data'].map(AdminActiveStreak_1.AdminActiveStreakFromJSON)),
41
+ 'nextCursor': json['nextCursor'],
42
+ };
43
+ }
44
+ function AdminPaginatedActiveStreaksToJSON(json) {
45
+ return AdminPaginatedActiveStreaksToJSONTyped(json, false);
46
+ }
47
+ function AdminPaginatedActiveStreaksToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'data': (value['data'].map(AdminActiveStreak_1.AdminActiveStreakToJSON)),
53
+ 'nextCursor': value['nextCursor'],
54
+ };
55
+ }
@@ -1,8 +1,10 @@
1
1
  export * from './Account';
2
+ export * from './AdminActiveStreak';
2
3
  export * from './AdminChat';
3
4
  export * from './AdminChatAnalysis';
4
5
  export * from './AdminChatWithStats';
5
6
  export * from './AdminCohortStats';
7
+ export * from './AdminPaginatedActiveStreaks';
6
8
  export * from './AdminPaginatedChats';
7
9
  export * from './AdminStreak';
8
10
  export * from './AdminTriggerAnalysisResponse';
@@ -17,10 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./Account"), exports);
20
+ __exportStar(require("./AdminActiveStreak"), exports);
20
21
  __exportStar(require("./AdminChat"), exports);
21
22
  __exportStar(require("./AdminChatAnalysis"), exports);
22
23
  __exportStar(require("./AdminChatWithStats"), exports);
23
24
  __exportStar(require("./AdminCohortStats"), exports);
25
+ __exportStar(require("./AdminPaginatedActiveStreaks"), exports);
24
26
  __exportStar(require("./AdminPaginatedChats"), exports);
25
27
  __exportStar(require("./AdminStreak"), exports);
26
28
  __exportStar(require("./AdminTriggerAnalysisResponse"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "2.1.1",
4
+ "version": "2.2.0",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {