@knowttl/mg-axi 0.1.2 → 0.1.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.
@@ -1,4 +1,5 @@
1
1
  import { AxiError } from "axi-sdk-js";
2
+ import { listTotals } from "./list-totals.js";
2
3
  // EXT-01 terms-of-use subfamily: the read mapping behind
3
4
  // `mg-axi entra agreement list/show`,
4
5
  // `mg-axi entra agreement acceptance list/show --agreement <agreement-id>`
@@ -264,20 +265,22 @@ export async function listAgreements(session, flags, profile, operation, help, p
264
265
  if (!result.complete) {
265
266
  return {
266
267
  agreements,
267
- count: { returned: agreements.length, complete: false, reason: result.reason },
268
+ ...listTotals(agreements.length, result.total, "agreements", false),
269
+ complete: false,
270
+ reason: result.reason,
268
271
  cursor: result.cursor,
269
272
  help: [...truncationHints, resumeHint(profileName), showHint],
270
273
  };
271
274
  }
272
- const count = { returned: agreements.length, complete: true };
273
275
  if (!agreements.length) {
274
276
  return {
275
277
  agreements,
276
- count,
278
+ ...listTotals(agreements.length, result.total, "agreements", true),
279
+ complete: true,
277
280
  help: ["0 agreements matched; no terms-of-use agreements are configured for the tenant, or no row passed --filter"],
278
281
  };
279
282
  }
280
- return { agreements, count, help: [...truncationHints, showHint] };
283
+ return { agreements, ...listTotals(agreements.length, result.total, "agreements", true), complete: true, help: [...truncationHints, showHint] };
281
284
  }
282
285
  export async function showAgreement(session, flags, profile, operation, help, profileName) {
283
286
  const { select, fields } = selectedFields(flags, KNOWN_AGREEMENTS, KNOWN_AGREEMENT_FIELDS, DEFAULT_AGREEMENT_SHOW_SELECT, help, "agreement");
@@ -325,20 +328,22 @@ async function collectAcceptances(session, flags, profile, operation, help, prof
325
328
  if (!result.complete) {
326
329
  return {
327
330
  agreementAcceptances: acceptances,
328
- count: { returned: acceptances.length, complete: false, reason: result.reason },
331
+ ...listTotals(acceptances.length, result.total, "agreement acceptances", false),
332
+ complete: false,
333
+ reason: result.reason,
329
334
  cursor: result.cursor,
330
335
  help: [...truncationHints, resumeHint(profileName), showHint],
331
336
  };
332
337
  }
333
- const count = { returned: acceptances.length, complete: true };
334
338
  if (!acceptances.length) {
335
339
  return {
336
340
  agreementAcceptances: acceptances,
337
- count,
341
+ ...listTotals(acceptances.length, result.total, "agreement acceptances", true),
342
+ complete: true,
338
343
  help: ["0 agreement acceptances matched; nobody recorded an acceptance in scope yet, or no row passed --filter"],
339
344
  };
340
345
  }
341
- return { agreementAcceptances: acceptances, count, help: [...truncationHints, showHint] };
346
+ return { agreementAcceptances: acceptances, ...listTotals(acceptances.length, result.total, "agreement acceptances", true), complete: true, help: [...truncationHints, showHint] };
342
347
  }
343
348
  async function showAcceptanceById(session, flags, profile, operation, help, profileName, command, agreement) {
344
349
  const { select, fields } = selectedFields(flags, KNOWN_ACCEPTANCES, KNOWN_ACCEPTANCE_FIELDS, DEFAULT_ACCEPTANCE_SELECT, help, "agreement-acceptance");
@@ -25,6 +25,7 @@ const READ_SCOPES = new Set([
25
25
  "AdministrativeUnit.Read.All",
26
26
  "Application.Read.All",
27
27
  "AuditLog.Read.All",
28
+ "AuthenticationContext.Read.All",
28
29
  "CustomSecAttributeDefinition.Read.All",
29
30
  "CrossTenantInformation.ReadBasic.All",
30
31
  "DelegatedAdminRelationship.Read.All",
package/dist/setup.js CHANGED
@@ -15,7 +15,9 @@ const READ_FAMILY_PREFIXES = [
15
15
  ["entra user", "user"],
16
16
  ["entra registration", "registration"],
17
17
  ["entra group", "group"],
18
+ ["entra directory-role-template", "directory-role/PIM"],
18
19
  ["entra directory-role", "directory-role/PIM"],
20
+ ["entra scoped-role-membership", "directory-role/PIM"],
19
21
  ["entra role-assignment", "directory-role/PIM"],
20
22
  ["entra pim", "directory-role/PIM"],
21
23
  ["entra device", "device"],
@@ -49,6 +51,7 @@ const READ_FAMILY_PREFIXES = [
49
51
  ["entra tenant-information", "tenant information"],
50
52
  ["entra sign-in", "sign-in/directory-audit"],
51
53
  ["entra directory-audit", "sign-in/directory-audit"],
54
+ ["entra provisioning", "sign-in/directory-audit"],
52
55
  ["entra application", "application/service-principal and consent grants"],
53
56
  ["entra service-principal", "application/service-principal and consent grants"],
54
57
  ["entra risky-user", "risk"],
@@ -112,7 +115,7 @@ export function setupView(store) {
112
115
  reads,
113
116
  writes,
114
117
  local: implemented.length - reads - writes,
115
- api: `Entra ${families.slice(0, -1).join(", ")} and ${families.at(-1)} reads plus reviewed raw api get, one gated group-membership write, one gated account enable/disable write, one gated session-revocation write and one gated risky-user dismissal write; every other operation is scheduled, blocked, deprecated or excluded`,
118
+ api: `Entra ${families.slice(0, -1).join(", ")} and ${families.at(-1)} reads plus reviewed raw api get, one gated group-membership write, one gated account enable/disable write, one gated session-revocation write and one gated risky-user dismissal write; every other v1.0 operation is deferred out of v1, and every other beta operation remains scheduled (never agreed for v1), blocked, deprecated, unavailable or excluded`,
116
119
  report: "docs/coverage.md",
117
120
  },
118
121
  integration: "Install skills/mg-axi/SKILL.md explicitly through your agent's skill installation mechanism; setup only shows guidance and installs no skills or hooks",