@mitumba/sdk 5.15.0 → 5.17.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/dist/index.mjs CHANGED
@@ -2469,6 +2469,40 @@ var AdminModule = class {
2469
2469
  async rotateOidcSigningKey(options) {
2470
2470
  return this.client.post("/auth/oidc/keys/rotate", void 0, options);
2471
2471
  }
2472
+ // ── Operations library ──
2473
+ /**
2474
+ * The library documents the caller may read: summaries only, never bodies. Any operator may call
2475
+ * this; each document's `audience` decides whether it is listed. `can_read_all` is true for a
2476
+ * caller holding `library:read_all`, who sees every document.
2477
+ */
2478
+ async listLibrary(options) {
2479
+ return this.client.get("/admin/library", void 0, options);
2480
+ }
2481
+ /**
2482
+ * One library document with its markdown body. A document the caller may not read is reported
2483
+ * exactly like one that does not exist (404).
2484
+ */
2485
+ async getLibraryDocument(slug, options) {
2486
+ return this.client.get(`/admin/library/${encodeURIComponent(slug)}`, void 0, options);
2487
+ }
2488
+ /**
2489
+ * Record one occurrence of a scheduled routine as done, with an optional note (at most 500
2490
+ * characters). Only an operator whose role is in the document's audience may record it
2491
+ * (`LibraryDocument.can_record`); the librarian's `library:read_all` alone is not enough.
2492
+ *
2493
+ * `dueOn` (YYYY-MM-DD) must be one of the routine's due days, no more than 45 days old and no
2494
+ * further ahead than its notice. Errors: 403 not in the audience, 404 not readable, 409 already
2495
+ * recorded (the body carries the existing `occurrence`), 422 `invalid_occurrence` with a `reason`
2496
+ * (`not_scheduled`, `not_a_due_day`, `too_early`, `too_old`). Recorded on the audit trail as
2497
+ * `library.routine.completed`.
2498
+ */
2499
+ async completeLibraryOccurrence(slug, dueOn, note, options) {
2500
+ return this.client.post(
2501
+ `/admin/library/${encodeURIComponent(slug)}/occurrences/${encodeURIComponent(dueOn)}/complete`,
2502
+ note ? { note } : {},
2503
+ options
2504
+ );
2505
+ }
2472
2506
  // ── Payout approval ──
2473
2507
  async listPayoutsAwaitingApproval(options) {
2474
2508
  return this.client.get("/admin/payouts/pending-approval", void 0, options);