@insignia-education/api-sdk-js 0.9.30 → 0.9.31
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/AGENTS.md +13 -0
- package/package.json +1 -1
- package/src/api/v1/Courses.js +5 -0
package/AGENTS.md
CHANGED
|
@@ -80,3 +80,16 @@ The SDK is language-neutral — it must never contain human-readable strings.
|
|
|
80
80
|
- Don't change the constructor signature of `InsigniaApiV1`
|
|
81
81
|
- Don't hardcode API base URLs — always receive from constructor
|
|
82
82
|
- Don't let the SDK lag behind `api` — update both in the same task
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Working Style
|
|
88
|
+
|
|
89
|
+
- **Think before coding.** State your assumptions out loud. If the request is ambiguous, ask. If a simpler approach exists, push back. Stop when confused — name what is unclear; do not pick one interpretation and run.
|
|
90
|
+
- **Simplicity first.** Write the minimum code that solves the problem. No speculative abstractions. No flexibility nobody asked for. The test: would a senior engineer call this overcomplicated?
|
|
91
|
+
- **Surgical changes.** Touch only what the task requires. Do not improve neighboring code. Do not refactor what is not broken. Every changed line must trace back to the request.
|
|
92
|
+
- **Goal-driven execution.** Turn vague instructions into verifiable targets before writing a line. "Add validation" becomes "write tests for invalid inputs, then make them pass."
|
|
93
|
+
## Git
|
|
94
|
+
|
|
95
|
+
- **NEVER commit in the agent's or Claude's name.** All commits must be authored solely by the human developer. Do not add `Co-Authored-By` trailers that name Claude or any AI agent — in shared/collaborative repositories this would falsely attribute work and obscure accountability.
|
package/package.json
CHANGED
package/src/api/v1/Courses.js
CHANGED
|
@@ -15,6 +15,11 @@ export default class Courses {
|
|
|
15
15
|
const qs = params.toString();
|
|
16
16
|
return this.#client.get(qs ? `/courses?${qs}` : '/courses');
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
/** Fetch all courses in a single unpaginated request (per_page=0). */
|
|
20
|
+
getAll() {
|
|
21
|
+
return this.#client.get('/courses?per_page=0');
|
|
22
|
+
}
|
|
18
23
|
create(data) { return this.#client.put('/courses', data); }
|
|
19
24
|
edit(id, data) { return this.#client.patch(`/courses/${id}`, data); }
|
|
20
25
|
delete(id) { return this.#client.del(`/courses/${id}`); }
|