@brightoutcome/guidistry-client 0.1.0 → 0.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.
Files changed (3) hide show
  1. package/README.md +19 -0
  2. package/dist/schema.d.ts +1822 -105
  3. package/package.json +8 -3
package/README.md CHANGED
@@ -60,6 +60,25 @@ await api.POST("/v1/invitations", {
60
60
  });
61
61
  ```
62
62
 
63
+ Program templates (called courses in the API) and programs:
64
+
65
+ ```ts
66
+ const { data: templates } = await api.GET("/v1/courses");
67
+ // each: name, current_version ("v1.3"), versions (e.g. Groups / Community / Solo), levels, rights
68
+
69
+ const { data: owl } = await api.GET("/v1/courses/{course_id}/content", {
70
+ params: { path: { course_id: templates![0].id }, query: { version: "groups", view: "participant" } },
71
+ });
72
+ // owl.modules[].topics[].blocks[]: text blocks carry sanitized `html`; media carry a short-lived `signed_url`
73
+
74
+ const { data: program } = await api.POST("/v1/programs", {
75
+ body: { name: "Lakeside OWL", course_id: templates![0].id, version_key: "groups" },
76
+ });
77
+ await api.GET("/v1/programs/{program_id}/content", { params: { path: { program_id: program!.id } } });
78
+ ```
79
+
80
+ Signed media links expire (two hours by default): fetch content again rather than storing them.
81
+
63
82
  Failed calls throw `GuidistryError` with `status` and `problem` (title, detail, request_id). A `409` from most endpoints means "choose a context" (the person has more than one membership).
64
83
 
65
84
  ## Versioning