@groton/canvas-api 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.3.3](https://github.com/groton-school/canvas-cli/compare/api/0.3.2...api/0.3.3) (2025-09-02)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * get_custom_colors now recognized as list() ([f5512ed](https://github.com/groton-school/canvas-cli/commit/f5512ed819958500b1bba28e05f9e3f6f972a78c))
11
+
5
12
  ## [0.3.2](https://github.com/groton-school/canvas-cli/compare/api/0.3.1...api/0.3.2) (2025-08-14)
6
13
 
7
14
 
@@ -16,17 +16,6 @@ export type updatePathParameters = {
16
16
  };
17
17
  export type updateSearchParameters = Masquerade;
18
18
  export type updateFormParameters = Masquerade & {
19
- /** The assignment name. */
20
- 'assignment[name]': string;
21
- /**
22
- * The position of this assignment in the group when displaying assignment
23
- * lists.
24
- *
25
- * Type: integer
26
- *
27
- * Format: 'int64'
28
- */
29
- 'assignment[position]': number | string;
30
19
  /**
31
20
  * Only applies if the assignment doesn't have student submissions.
32
21
  *
@@ -44,6 +33,17 @@ export type updateFormParameters = Masquerade & {
44
33
  * valid when the Kaltura plugin is enabled) "student_annotation"
45
34
  */
46
35
  'assignment[submission_types]'?: ('online_quiz' | 'none' | 'on_paper' | 'discussion_topic' | 'external_tool' | 'online_upload' | 'online_text_entry' | 'online_url' | 'media_recording' | 'student_annotation')[];
36
+ /** The assignment name. */
37
+ 'assignment[name]': string;
38
+ /**
39
+ * The position of this assignment in the group when displaying assignment
40
+ * lists.
41
+ *
42
+ * Type: integer
43
+ *
44
+ * Format: 'int64'
45
+ */
46
+ 'assignment[position]': number | string;
47
47
  /**
48
48
  * Allowed extensions if submission_types includes "online_upload"
49
49
  *
@@ -22,15 +22,6 @@ export type uploadFormParameters = Masquerade & {
22
22
  * a sub-folder.
23
23
  */
24
24
  name: string;
25
- /**
26
- * How to handle duplicate filenames. If `overwrite`, then this file upload
27
- * will overwrite any other file in the folder with the same name. If
28
- * `rename`, then this file will be renamed if another file in the folder
29
- * exists with the given name. If no parameter is given, the default is
30
- * `overwrite`. This doesn't apply to file uploads in a context that doesn't
31
- * have folders.
32
- */
33
- on_duplicate?: 'overwrite' | 'rename';
34
25
  /**
35
26
  * The size of the file, in bytes. This field is recommended, as it will let
36
27
  * you find out if there's a quota issue before uploading the raw file.
@@ -74,6 +65,15 @@ export type uploadFormParameters = Masquerade & {
74
65
  * @deprecated Use parent_folder_path instead.
75
66
  */
76
67
  folder?: string;
68
+ /**
69
+ * How to handle duplicate filenames. If `overwrite`, then this file upload
70
+ * will overwrite any other file in the folder with the same name. If
71
+ * `rename`, then this file will be renamed if another file in the folder
72
+ * exists with the given name. If no parameter is given, the default is
73
+ * `overwrite`. This doesn't apply to file uploads in a context that doesn't
74
+ * have folders.
75
+ */
76
+ on_duplicate?: 'overwrite' | 'rename';
77
77
  /**
78
78
  * An array of additional information to include in the upload success
79
79
  * response. See Files API for more information.
@@ -1,2 +1,3 @@
1
1
  export * from './get.js';
2
+ export * from './list.js';
2
3
  export * from './update.js';
@@ -1,2 +1,3 @@
1
1
  export * from './get.js';
2
+ export * from './list.js';
2
3
  export * from './update.js';
@@ -0,0 +1,28 @@
1
+ import { Masquerade } from '@groton/canvas-api.client.base';
2
+ export type listPathParameters = {
3
+ /**
4
+ * ID
5
+ *
6
+ * Type: string
7
+ */
8
+ id: string | number;
9
+ };
10
+ export type listSearchParameters = Masquerade;
11
+ type Options = {
12
+ pathParams: listPathParameters;
13
+ } & ({
14
+ searchParams?: Partial<listSearchParameters>;
15
+ strict?: false;
16
+ } | {
17
+ searchParams: listSearchParameters;
18
+ strict: true;
19
+ });
20
+ /**
21
+ * Get custom colors
22
+ *
23
+ * Returns all custom colors that have been saved for a user.
24
+ *
25
+ * Nickname: get_custom_colors
26
+ */
27
+ export declare function list(options: Options): Promise<void>;
28
+ export {};
@@ -0,0 +1,15 @@
1
+ import { client } from '../../../../Client.js';
2
+ /**
3
+ * Get custom colors
4
+ *
5
+ * Returns all custom colors that have been saved for a user.
6
+ *
7
+ * Nickname: get_custom_colors
8
+ */
9
+ export async function list(options) {
10
+ const response = await client().fetchAs(`/api/v1/users/{id}/colors`, {
11
+ method: 'GET',
12
+ ...options
13
+ });
14
+ return response;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groton/canvas-api",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Typed access to Canvas LMS API with embedded documentation",
5
5
  "homepage": "https://github.com/groton-school/canvas-cli/tree/main/packages/api/canvas-api#readme",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "del-cli": "^6.0.0",
29
29
  "npm-run-all": "^4.1.5",
30
30
  "typescript": "~5.8.3",
31
- "@groton/canvas-api.swagger-renderer": "0.1.1"
31
+ "@groton/canvas-api.swagger-renderer": "0.1.2"
32
32
  },
33
33
  "scripts": {
34
34
  "clean": "run-s clean:*",