@wayai/cli 0.3.360 → 0.3.361

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.js CHANGED
@@ -16739,10 +16739,10 @@ var init_chunk_VYINA6YP = __esm({
16739
16739
  }
16740
16740
  });
16741
16741
 
16742
- // ../../packages/core/dist/chunk-TYI6QVPX.js
16742
+ // ../../packages/core/dist/chunk-CLGTGGVN.js
16743
16743
  var CASE_SPACE_NAME_MAX_LENGTH, CASE_SPACE_DEFAULT_TIME_ZONE, CASE_TEAM_NAME_MAX_LENGTH, CASE_TEAM_MEMBERS_MAX, CASE_TEAM_SCOPES_MAX, CASE_MEMBERS_PAGE_MAX, CASE_PAGE_CURSOR_MAX_LENGTH, CASE_LEVELS, CASE_TEAM_TARGET_KINDS, CASE_REGISTRY_CLOSED_REASON, caseSpaceNameSchema, caseSpaceTimeZoneSchema, updateCaseSpaceSettingsBody, adminCreateCaseSpaceBody, caseOrgParam, caseSpaceParam, caseMemberParam, caseAdministratorParam, caseTeamParam, casePageQuery, saveCaseMemberBody, caseTeamScopeSchema, caseTeamMemberInput, caseTeamFields, createCaseTeamBody, updateCaseTeamBody;
16744
- var init_chunk_TYI6QVPX = __esm({
16745
- "../../packages/core/dist/chunk-TYI6QVPX.js"() {
16744
+ var init_chunk_CLGTGGVN = __esm({
16745
+ "../../packages/core/dist/chunk-CLGTGGVN.js"() {
16746
16746
  "use strict";
16747
16747
  init_chunk_VYINA6YP();
16748
16748
  init_chunk_ZVXO3XL6();
@@ -16802,13 +16802,13 @@ var init_chunk_TYI6QVPX = __esm({
16802
16802
  }
16803
16803
  });
16804
16804
 
16805
- // ../../packages/core/dist/chunk-AMKBCOOH.js
16805
+ // ../../packages/core/dist/chunk-MQQRYOE6.js
16806
16806
  var CASE_FILE_SHA_PATTERN, caseFileShaSchema, CASE_REVISION_MESSAGE_MAX_LENGTH, CASE_REVISION_SESSION_MAX_LENGTH, CASE_REVISION_ENTRIES_MAX, caseRevisionEntryShape, caseRevisionShape, CASE_FILE_SEALED_REASON, CASE_UPLOAD_BODY_MAX_BYTES, CASE_UPLOAD_REVISION_FIELD, CASE_FILE_CONFLICT_REASON, CASE_FILES_FULL_REASON, CASE_FILES_QUOTA_REASON, CASE_UPLOADS_BUSY_REASON, isBlob, caseUploadForm, CASE_FILES_PAGE_MAX, caseFilesQuery, caseFileReadPath, CASE_FILE_VERSIONS_PAGE_MAX, caseFileVersionsQuery, caseFileContentQuery, CASE_REVISIONS_PAGE_MAX, caseRevisionsQuery, CASE_FILE_COMPARE_MAX_BYTES, caseFileCompareQuery;
16807
- var init_chunk_AMKBCOOH = __esm({
16808
- "../../packages/core/dist/chunk-AMKBCOOH.js"() {
16807
+ var init_chunk_MQQRYOE6 = __esm({
16808
+ "../../packages/core/dist/chunk-MQQRYOE6.js"() {
16809
16809
  "use strict";
16810
16810
  init_chunk_KWRHZBGU();
16811
- init_chunk_TYI6QVPX();
16811
+ init_chunk_CLGTGGVN();
16812
16812
  init_chunk_HZ6CADSY();
16813
16813
  init_zod();
16814
16814
  CASE_FILE_SHA_PATTERN = /^[0-9a-f]{64}$/;
@@ -16972,7 +16972,7 @@ var init_chunk_M2T55BV6 = __esm({
16972
16972
  }
16973
16973
  });
16974
16974
 
16975
- // ../../packages/core/dist/chunk-WLKYA2B2.js
16975
+ // ../../packages/core/dist/chunk-JFD3FZM6.js
16976
16976
  function resolveItemLink(phaseFolder, target) {
16977
16977
  const slash = target.lastIndexOf("/");
16978
16978
  const folder = slash < 0 ? phaseFolder : target.slice(0, slash);
@@ -17197,11 +17197,11 @@ function caseTypeDefinitionReasonOf(error) {
17197
17197
  return first && reason3 ? { reason: reason3, at: first.path.join(".") } : null;
17198
17198
  }
17199
17199
  var CASE_CODE_PATTERN, CASE_PHASE_CODE_PATTERN, CASE_PHASE_FOLDER_PATTERN, CASE_INPUT_KEY_PATTERN, CASE_CALCULATION_CODE_PATTERN, CASE_AGENDA_GROUP_CODE_PATTERN, CASE_DECISION_CODE_PATTERN, CASE_DECISION_OPTION_CODE_PATTERN, CASE_DECISION_EFFECT_PATTERN, FILE_PATH_SEGMENT_PATTERN, CASE_REVIEW_MODES, CASE_OUTPUT_FORMATS, CASE_INPUT_ORIGINS, CASE_TEMPLATE_MODES, CASE_AGENDA_QUORUMS, CASE_DECISION_TYPES, CASE_NUMERIC_DECISION_TYPES, CASE_TYPE_NAME_MAX_LENGTH, CASE_CODE_MAX_LENGTH, CASE_FILE_PATH_MAX_LENGTH, CASE_TASK_NAME_MAX_LENGTH, CASE_TASK_DEPENDENCIES_MAX, CASE_FIXED_TEXT_MAX_LENGTH, CASE_TYPE_DEFINITION_MAX_CHARS, CASE_TYPE_DEFINITION_ROWS_MAX, CASE_TYPE_VERSIONS_MAX, CASE_TYPES_PAGE_MAX, code, phaseCode, inputKey, caseAgendaGroupCodeSchema, caseDecisionCodeSchema, decisionCode, label2, optionalText, itemLinkTarget, filePath, caseTypePartyRoleSchema, caseTypeOutcomeSchema, caseItemRequirementsSchema, caseItemLinksSchema, caseOutputItemSchema, casePhaseOutputSchema, casePhaseInputSchema, caseDecisionOptionSchema, decisionBound, caseAgendaDecisionSchema, caseAgendaGroupSchema, caseTypeTaskSchema, caseTypePhaseSchema, caseTypeDefinitionShape, caseValuesRepeated, CHAPTER_PROBE, caseTypeDefinitionSchema, caseTypeAbbreviationSchema, caseTypeNameSchema, createCaseTypeBody, publishCaseTypeVersionBody, setCaseTypeActiveBody, caseTypeParam, caseTypesPageQuery, caseTypeVersionQuery, CASE_TYPE_VERSION_CONFLICT_REASON;
17200
- var init_chunk_WLKYA2B2 = __esm({
17201
- "../../packages/core/dist/chunk-WLKYA2B2.js"() {
17200
+ var init_chunk_JFD3FZM6 = __esm({
17201
+ "../../packages/core/dist/chunk-JFD3FZM6.js"() {
17202
17202
  "use strict";
17203
17203
  init_chunk_KWRHZBGU();
17204
- init_chunk_TYI6QVPX();
17204
+ init_chunk_CLGTGGVN();
17205
17205
  init_chunk_M2T55BV6();
17206
17206
  init_chunk_HZ6CADSY();
17207
17207
  init_chunk_ZTNFLGW5();
@@ -17413,7 +17413,7 @@ var init_chunk_WLKYA2B2 = __esm({
17413
17413
  }
17414
17414
  });
17415
17415
 
17416
- // ../../packages/core/dist/chunk-S2LXF4LF.js
17416
+ // ../../packages/core/dist/chunk-YFUYMQR2.js
17417
17417
  function openCaseProblem(body) {
17418
17418
  const pairs = /* @__PURE__ */ new Set();
17419
17419
  for (const [index, party] of body.parties.entries()) {
@@ -17426,11 +17426,11 @@ ${party.role}`;
17426
17426
  return null;
17427
17427
  }
17428
17428
  var CASE_RECORD_CODE_PATTERN, CASE_RECORD_CODE_MAX_LENGTH, CASE_RECORD_PARTIES_MAX, CASE_RECORD_INSTRUMENTS_MAX, CASE_RECORD_ROLE_MAX_LENGTH, CASE_RECORDS_PAGE_MAX, CASE_RECORDS_QUERY_MAX_LENGTH, caseRecordPartySchema, openCaseShape, openCaseBody, previewOpenCaseShape, caseRecordParam, CASE_RECORD_STATUSES, caseRecordsQuery, CASE_STATE_SUMMARIES_MAX, caseStatesQuery, CASE_CLOSED_REASON, CASE_CLOSURE_REASON_MAX_LENGTH, closeCaseBody, setCaseConfidentialityBody;
17429
- var init_chunk_S2LXF4LF = __esm({
17430
- "../../packages/core/dist/chunk-S2LXF4LF.js"() {
17429
+ var init_chunk_YFUYMQR2 = __esm({
17430
+ "../../packages/core/dist/chunk-YFUYMQR2.js"() {
17431
17431
  "use strict";
17432
- init_chunk_WLKYA2B2();
17433
- init_chunk_TYI6QVPX();
17432
+ init_chunk_JFD3FZM6();
17433
+ init_chunk_CLGTGGVN();
17434
17434
  init_chunk_HZ6CADSY();
17435
17435
  init_chunk_ZTNFLGW5();
17436
17436
  init_zod();
@@ -17490,14 +17490,14 @@ var init_chunk_S2LXF4LF = __esm({
17490
17490
  }
17491
17491
  });
17492
17492
 
17493
- // ../../packages/core/dist/chunk-VHA3AQE4.js
17493
+ // ../../packages/core/dist/chunk-72TNUJVF.js
17494
17494
  var CASE_OFFICIAL_FILE_KINDS, CASE_OFFICIAL_FILE_NAME_PATTERN, publishCaseSubmissionBody, caseOfficialVersionParam, caseOfficialFileQuery;
17495
- var init_chunk_VHA3AQE4 = __esm({
17496
- "../../packages/core/dist/chunk-VHA3AQE4.js"() {
17495
+ var init_chunk_72TNUJVF = __esm({
17496
+ "../../packages/core/dist/chunk-72TNUJVF.js"() {
17497
17497
  "use strict";
17498
17498
  init_chunk_YR7QALGP();
17499
- init_chunk_AMKBCOOH();
17500
- init_chunk_S2LXF4LF();
17499
+ init_chunk_MQQRYOE6();
17500
+ init_chunk_YFUYMQR2();
17501
17501
  init_chunk_HZ6CADSY();
17502
17502
  init_zod();
17503
17503
  CASE_OFFICIAL_FILE_KINDS = [...CASE_SUBMISSION_ISSUED_KINDS, "file"];
@@ -17511,12 +17511,12 @@ var init_chunk_VHA3AQE4 = __esm({
17511
17511
  }
17512
17512
  });
17513
17513
 
17514
- // ../../packages/core/dist/chunk-2S6LIRGD.js
17514
+ // ../../packages/core/dist/chunk-TRK5L5I5.js
17515
17515
  var casePhaseParam;
17516
- var init_chunk_2S6LIRGD = __esm({
17517
- "../../packages/core/dist/chunk-2S6LIRGD.js"() {
17516
+ var init_chunk_TRK5L5I5 = __esm({
17517
+ "../../packages/core/dist/chunk-TRK5L5I5.js"() {
17518
17518
  "use strict";
17519
- init_chunk_S2LXF4LF();
17519
+ init_chunk_YFUYMQR2();
17520
17520
  init_chunk_HZ6CADSY();
17521
17521
  casePhaseParam = caseRecordParam.extend({ phase_id: uuidSchema });
17522
17522
  }
@@ -17539,18 +17539,18 @@ var init_chunk_K6O2P77D = __esm({
17539
17539
  }
17540
17540
  });
17541
17541
 
17542
- // ../../packages/core/dist/chunk-AQRCKNQP.js
17542
+ // ../../packages/core/dist/chunk-NUJ5GZHA.js
17543
17543
  var CASE_REVIEW_DECISIONS, CASE_ISSUED_FORMATS, CASE_REVIEW_COMMENT_MAX_LENGTH, CASE_REVIEW_JUSTIFICATION_MAX_LENGTH, text2, caseSubmissionParam, decideCaseSubmissionBody, caseIssuedQuery, CASE_APPROVALS_STATES, caseApprovalsQuery, caseCompareDefaultQuery, caseApprovalsAgendaQuery;
17544
- var init_chunk_AQRCKNQP = __esm({
17545
- "../../packages/core/dist/chunk-AQRCKNQP.js"() {
17544
+ var init_chunk_NUJ5GZHA = __esm({
17545
+ "../../packages/core/dist/chunk-NUJ5GZHA.js"() {
17546
17546
  "use strict";
17547
- init_chunk_VHA3AQE4();
17548
- init_chunk_2S6LIRGD();
17547
+ init_chunk_72TNUJVF();
17548
+ init_chunk_TRK5L5I5();
17549
17549
  init_chunk_K6O2P77D();
17550
17550
  init_chunk_YR7QALGP();
17551
- init_chunk_AMKBCOOH();
17552
- init_chunk_S2LXF4LF();
17553
- init_chunk_TYI6QVPX();
17551
+ init_chunk_MQQRYOE6();
17552
+ init_chunk_YFUYMQR2();
17553
+ init_chunk_CLGTGGVN();
17554
17554
  init_chunk_HZ6CADSY();
17555
17555
  init_zod();
17556
17556
  CASE_REVIEW_DECISIONS = ["sign_off", "approve", "return"];
@@ -17596,23 +17596,23 @@ var init_chunk_K3PD6AOF = __esm({
17596
17596
  }
17597
17597
  });
17598
17598
 
17599
- // ../../packages/core/dist/chunk-F4264AMK.js
17599
+ // ../../packages/core/dist/chunk-JNZVVHKO.js
17600
17600
  var caseTeamPreviewBody;
17601
- var init_chunk_F4264AMK = __esm({
17602
- "../../packages/core/dist/chunk-F4264AMK.js"() {
17601
+ var init_chunk_JNZVVHKO = __esm({
17602
+ "../../packages/core/dist/chunk-JNZVVHKO.js"() {
17603
17603
  "use strict";
17604
- init_chunk_TYI6QVPX();
17604
+ init_chunk_CLGTGGVN();
17605
17605
  init_chunk_HZ6CADSY();
17606
17606
  caseTeamPreviewBody = createCaseTeamBody.pick({ active: true, scopes: true, members: true }).extend({ team_id: uuidSchema.optional() }).strict();
17607
17607
  }
17608
17608
  });
17609
17609
 
17610
- // ../../packages/core/dist/chunk-ZTRVP4OT.js
17610
+ // ../../packages/core/dist/chunk-KY3ZNL3E.js
17611
17611
  var CASE_TIMELINE_PAGE_MAX, caseTimelineQuery;
17612
- var init_chunk_ZTRVP4OT = __esm({
17613
- "../../packages/core/dist/chunk-ZTRVP4OT.js"() {
17612
+ var init_chunk_KY3ZNL3E = __esm({
17613
+ "../../packages/core/dist/chunk-KY3ZNL3E.js"() {
17614
17614
  "use strict";
17615
- init_chunk_TYI6QVPX();
17615
+ init_chunk_CLGTGGVN();
17616
17616
  init_zod();
17617
17617
  CASE_TIMELINE_PAGE_MAX = 100;
17618
17618
  caseTimelineQuery = external_exports.object({
@@ -17623,13 +17623,13 @@ var init_chunk_ZTRVP4OT = __esm({
17623
17623
  }
17624
17624
  });
17625
17625
 
17626
- // ../../packages/core/dist/chunk-5WMOQ5NC.js
17626
+ // ../../packages/core/dist/chunk-4Y76ZGBB.js
17627
17627
  var CASE_RELATION_TYPE_CODE_PATTERN, CASE_RELATION_TYPE_CODE_MAX_LENGTH, CASE_RELATION_TYPE_NAME_MAX_LENGTH, CASE_RELATION_TYPES_PER_SPACE_MAX, CASE_RELATION_DESCRIPTION_MAX_LENGTH, CASE_RELATION_SIDES, CASE_EXTERNAL_SYSTEM_PATTERN, CASE_EXTERNAL_NUMBER_MAX_LENGTH, CASE_EXTERNAL_URL_MAX_LENGTH, trimmedName, relationTypeFields, createCaseRelationTypeBody, updateCaseRelationTypeBody, relateCasesBody, addCaseExternalReferenceBody, caseRelationTypeParam, caseRelationParam, caseExternalReferenceParam, caseRelationTypesQuery;
17628
- var init_chunk_5WMOQ5NC = __esm({
17629
- "../../packages/core/dist/chunk-5WMOQ5NC.js"() {
17628
+ var init_chunk_4Y76ZGBB = __esm({
17629
+ "../../packages/core/dist/chunk-4Y76ZGBB.js"() {
17630
17630
  "use strict";
17631
- init_chunk_S2LXF4LF();
17632
- init_chunk_TYI6QVPX();
17631
+ init_chunk_YFUYMQR2();
17632
+ init_chunk_CLGTGGVN();
17633
17633
  init_chunk_HZ6CADSY();
17634
17634
  init_zod();
17635
17635
  CASE_RELATION_TYPE_CODE_PATTERN = /^[a-z0-9]+(_[a-z0-9]+)*$/;
@@ -17669,12 +17669,12 @@ var init_chunk_5WMOQ5NC = __esm({
17669
17669
  }
17670
17670
  });
17671
17671
 
17672
- // ../../packages/core/dist/chunk-UPGAWPE2.js
17672
+ // ../../packages/core/dist/chunk-SC6HGQ5X.js
17673
17673
  var CASE_CHANGE_TOPICS, caseChangedFrameSchema;
17674
- var init_chunk_UPGAWPE2 = __esm({
17675
- "../../packages/core/dist/chunk-UPGAWPE2.js"() {
17674
+ var init_chunk_SC6HGQ5X = __esm({
17675
+ "../../packages/core/dist/chunk-SC6HGQ5X.js"() {
17676
17676
  "use strict";
17677
- init_chunk_S2LXF4LF();
17677
+ init_chunk_YFUYMQR2();
17678
17678
  init_chunk_HZ6CADSY();
17679
17679
  init_zod();
17680
17680
  CASE_CHANGE_TOPICS = ["submission", "agenda", "access"];
@@ -17688,12 +17688,12 @@ var init_chunk_UPGAWPE2 = __esm({
17688
17688
  }
17689
17689
  });
17690
17690
 
17691
- // ../../packages/core/dist/chunk-AKG7A2TR.js
17691
+ // ../../packages/core/dist/chunk-KIJJEAS2.js
17692
17692
  var CASE_MEMBER_CASES_PAGE_MAX, caseMemberReachQuery;
17693
- var init_chunk_AKG7A2TR = __esm({
17694
- "../../packages/core/dist/chunk-AKG7A2TR.js"() {
17693
+ var init_chunk_KIJJEAS2 = __esm({
17694
+ "../../packages/core/dist/chunk-KIJJEAS2.js"() {
17695
17695
  "use strict";
17696
- init_chunk_TYI6QVPX();
17696
+ init_chunk_CLGTGGVN();
17697
17697
  init_zod();
17698
17698
  CASE_MEMBER_CASES_PAGE_MAX = 50;
17699
17699
  caseMemberReachQuery = casePageQuery.extend({
@@ -17702,7 +17702,7 @@ var init_chunk_AKG7A2TR = __esm({
17702
17702
  }
17703
17703
  });
17704
17704
 
17705
- // ../../packages/core/dist/chunk-ATX6AHPZ.js
17705
+ // ../../packages/core/dist/chunk-3SZD2H6D.js
17706
17706
  function withProblem(shape, problemOf) {
17707
17707
  return shape.superRefine((value, ctx) => {
17708
17708
  const found = problemOf(value);
@@ -17739,10 +17739,10 @@ ${party.role}`);
17739
17739
  return new Set(keys).size === keys.length ? null : { reason: "instrument_party_repeated", at: "parties" };
17740
17740
  }
17741
17741
  var CASE_REGISTRY_TYPE_CODE_PATTERN, CASE_REGISTRY_TYPE_CODE_MAX_LENGTH, CASE_REGISTRY_NAME_MAX_LENGTH, CASE_REGISTRY_TYPE_SCHEMA_MAX_CHARS, CASE_PARTY_ABBREVIATION_PATTERN, CASE_PARTY_PERSON_KINDS, CASE_PARTY_DOCUMENT_KINDS, CASE_PARTY_DOCUMENT_MAX_LENGTH, CASE_PARTY_GROUP_MEMBERS_MAX, CASE_INSTRUMENT_NUMBER_MAX_LENGTH, CASE_INSTRUMENT_ROLE_MAX_LENGTH, CASE_INSTRUMENT_PARTIES_MAX, CASE_REGISTRY_PAGE_MAX, CASE_REGISTRY_QUERY_MAX_LENGTH, trimmedName2, dateSchema, attributesValues, registryTypeFields, createCaseRegistryTypeShape, updateCaseRegistryTypeShape, createCaseRegistryTypeBody, updateCaseRegistryTypeBody, saveCasePartyShape, saveCasePartyBody, saveCasePartyGroupShape, saveCasePartyGroupBody, caseInstrumentPartyInput, saveCaseInstrumentShape, saveCaseInstrumentBody, registryPage, searchText, casePartiesQuery, casePartyGroupsQuery, caseInstrumentsQuery, caseRegistryTypeParam, casePartyParam, casePartyGroupParam, caseInstrumentParam;
17742
- var init_chunk_ATX6AHPZ = __esm({
17743
- "../../packages/core/dist/chunk-ATX6AHPZ.js"() {
17742
+ var init_chunk_3SZD2H6D = __esm({
17743
+ "../../packages/core/dist/chunk-3SZD2H6D.js"() {
17744
17744
  "use strict";
17745
- init_chunk_TYI6QVPX();
17745
+ init_chunk_CLGTGGVN();
17746
17746
  init_chunk_M2T55BV6();
17747
17747
  init_chunk_HZ6CADSY();
17748
17748
  init_zod();
@@ -17834,13 +17834,13 @@ var init_chunk_ATX6AHPZ = __esm({
17834
17834
  }
17835
17835
  });
17836
17836
 
17837
- // ../../packages/core/dist/chunk-NKJ2DQCV.js
17837
+ // ../../packages/core/dist/chunk-A5TJEV6T.js
17838
17838
  var CASE_STYLE_KINDS, caseStyleParam, CASE_STYLE_VERSIONS_PAGE_MAX, caseStyleVersionsQuery, caseStyleContentQuery, CASE_STYLE_UPLOAD_BODY_MAX_BYTES, CASE_STYLE_FILE_FIELD, CASE_STYLE_EXPECT_FIELD, caseStyleUploadForm;
17839
- var init_chunk_NKJ2DQCV = __esm({
17840
- "../../packages/core/dist/chunk-NKJ2DQCV.js"() {
17839
+ var init_chunk_A5TJEV6T = __esm({
17840
+ "../../packages/core/dist/chunk-A5TJEV6T.js"() {
17841
17841
  "use strict";
17842
- init_chunk_AMKBCOOH();
17843
- init_chunk_TYI6QVPX();
17842
+ init_chunk_MQQRYOE6();
17843
+ init_chunk_CLGTGGVN();
17844
17844
  init_chunk_HZ6CADSY();
17845
17845
  init_zod();
17846
17846
  CASE_STYLE_KINDS = ["pdf_stylesheet", "word_reference"];
@@ -17861,7 +17861,7 @@ var init_chunk_NKJ2DQCV = __esm({
17861
17861
  }
17862
17862
  });
17863
17863
 
17864
- // ../../packages/core/dist/chunk-ZZZ65EIA.js
17864
+ // ../../packages/core/dist/chunk-7Y3IO67N.js
17865
17865
  function collectionUploadForm(field, shape) {
17866
17866
  return external_exports.record(external_exports.string(), external_exports.unknown()).transform((form2, ctx) => {
17867
17867
  const refuse2 = (message, path55) => {
@@ -17901,13 +17901,13 @@ function caseCollectionFileName(sent) {
17901
17901
  return name || "document";
17902
17902
  }
17903
17903
  var CASE_COLLECTION_FOLDERS, CASE_COLLECTION_PARTS, isCaseCollectionPart, CASE_COLLECTION_TITLE_MAX_LENGTH, CASE_COLLECTION_TYPE_MAX_LENGTH, CASE_COLLECTION_REASON_MAX_LENGTH, CASE_COLLECTION_FILE_NAME_MAX_LENGTH, caseCollectionDocumentParam, dateOnly, title, registerCaseCollectionDocumentShape, addCaseCollectionVersionShape, CASE_COLLECTION_UPLOAD_BODY_MAX_BYTES, CASE_COLLECTION_DOCUMENT_FIELD, CASE_COLLECTION_VERSION_FIELD, caseCollectionDocumentUploadForm, caseCollectionVersionUploadForm, CASE_COLLECTION_PAGE_MAX, CASE_COLLECTION_CURSOR_MAX_LENGTH, caseCollectionQuery, CASE_COLLECTION_VERSIONS_PAGE_MAX, caseCollectionVersionsQuery, caseCollectionContentQuery;
17904
- var init_chunk_ZZZ65EIA = __esm({
17905
- "../../packages/core/dist/chunk-ZZZ65EIA.js"() {
17904
+ var init_chunk_7Y3IO67N = __esm({
17905
+ "../../packages/core/dist/chunk-7Y3IO67N.js"() {
17906
17906
  "use strict";
17907
- init_chunk_ATX6AHPZ();
17908
- init_chunk_NKJ2DQCV();
17909
- init_chunk_AMKBCOOH();
17910
- init_chunk_TYI6QVPX();
17907
+ init_chunk_3SZD2H6D();
17908
+ init_chunk_A5TJEV6T();
17909
+ init_chunk_MQQRYOE6();
17910
+ init_chunk_CLGTGGVN();
17911
17911
  init_chunk_M2T55BV6();
17912
17912
  init_chunk_HZ6CADSY();
17913
17913
  init_zod();
@@ -17967,7 +17967,7 @@ var init_chunk_ZZZ65EIA = __esm({
17967
17967
  }
17968
17968
  });
17969
17969
 
17970
- // ../../packages/core/dist/chunk-WJJJFHIA.js
17970
+ // ../../packages/core/dist/chunk-TRBCWOW2.js
17971
17971
  function caseReceivedFormat(fileName) {
17972
17972
  const dot = fileName.lastIndexOf(".");
17973
17973
  if (dot < 0) return null;
@@ -17975,14 +17975,14 @@ function caseReceivedFormat(fileName) {
17975
17975
  return isCaseReceivedFormat(extension) ? extension : null;
17976
17976
  }
17977
17977
  var ZIP_SIGNATURE, CASE_RECEIVED_FORMATS, isCaseReceivedFormat, CASE_RECEIVED_PARTS, CASE_RECEIVED_TITLE_MAX_LENGTH, CASE_RECEIVED_TYPE_MAX_LENGTH, CASE_RECEIVED_TEXT_MAX_BYTES, CASE_RECEIVED_UPLOAD_BODY_MAX_BYTES, CASE_RECEIVED_DOCUMENT_FIELD, caseReceivedParam, registerCaseReceivedDocumentShape, caseReceivedUploadForm, caseReceivedFileName, ZIP_DIRECTORY_MAX_BYTES, CONTENT_TYPES_MAX_BYTES, CONTENT_TYPES_INFLATED_MAX_BYTES, CASE_RECEIVED_PAGE_MAX, caseReceivedQuery, caseReceivedContentQuery;
17978
- var init_chunk_WJJJFHIA = __esm({
17979
- "../../packages/core/dist/chunk-WJJJFHIA.js"() {
17980
- "use strict";
17981
- init_chunk_ZZZ65EIA();
17982
- init_chunk_NKJ2DQCV();
17983
- init_chunk_AMKBCOOH();
17984
- init_chunk_S2LXF4LF();
17985
- init_chunk_TYI6QVPX();
17978
+ var init_chunk_TRBCWOW2 = __esm({
17979
+ "../../packages/core/dist/chunk-TRBCWOW2.js"() {
17980
+ "use strict";
17981
+ init_chunk_7Y3IO67N();
17982
+ init_chunk_A5TJEV6T();
17983
+ init_chunk_MQQRYOE6();
17984
+ init_chunk_YFUYMQR2();
17985
+ init_chunk_CLGTGGVN();
17986
17986
  init_chunk_HZ6CADSY();
17987
17987
  init_zod();
17988
17988
  ZIP_SIGNATURE = [80, 75, 3, 4];
@@ -18056,16 +18056,16 @@ var init_chunk_WJJJFHIA = __esm({
18056
18056
  }
18057
18057
  });
18058
18058
 
18059
- // ../../packages/core/dist/chunk-74HGW6HA.js
18059
+ // ../../packages/core/dist/chunk-6GSDWCB5.js
18060
18060
  function addCaseNoteProblem(note) {
18061
18061
  return note.origin !== null && note.kind !== "contribution" ? { reason: "origin_not_contribution", at: "origin" } : null;
18062
18062
  }
18063
18063
  var CASE_NOTE_KINDS, CASE_NOTE_TEXT_MAX_LENGTH, CASE_NOTE_ORIGIN_MAX_LENGTH, CASE_NOTES_PAGE_MAX, addCaseNoteShape, addCaseNoteBody, caseNoteParam, caseTaskParam, caseNotesQuery;
18064
- var init_chunk_74HGW6HA = __esm({
18065
- "../../packages/core/dist/chunk-74HGW6HA.js"() {
18064
+ var init_chunk_6GSDWCB5 = __esm({
18065
+ "../../packages/core/dist/chunk-6GSDWCB5.js"() {
18066
18066
  "use strict";
18067
- init_chunk_S2LXF4LF();
18068
- init_chunk_TYI6QVPX();
18067
+ init_chunk_YFUYMQR2();
18068
+ init_chunk_CLGTGGVN();
18069
18069
  init_chunk_HZ6CADSY();
18070
18070
  init_zod();
18071
18071
  CASE_NOTE_KINDS = ["observation", "next_step", "pending", "contribution"];
@@ -18094,19 +18094,19 @@ var init_chunk_74HGW6HA = __esm({
18094
18094
  }
18095
18095
  });
18096
18096
 
18097
- // ../../packages/core/dist/chunk-LU4T7K5F.js
18097
+ // ../../packages/core/dist/chunk-27IZMIGG.js
18098
18098
  function casePassageLines(text5) {
18099
18099
  const lines2 = text5.replace(/\r\n/g, "\n").split("\n");
18100
18100
  if (lines2.at(-1) === "") lines2.pop();
18101
18101
  return lines2;
18102
18102
  }
18103
18103
  var CASE_COMMENT_TEXT_MAX_LENGTH, CASE_COMMENTS_PAGE_MAX, CASE_COMMENT_LINE_MAX, casePassageLineSchema, lineNumber, addCaseCommentShape, CASE_COMMENT_REVERSED_REASON, addCaseCommentBody, caseCommentsQuery, CASE_COMMENT_OUT_OF_RANGE_REASON, CASE_COMMENT_NOT_TEXT_REASON, CASE_COMMENT_DOCUMENT_TOO_LARGE_REASON;
18104
- var init_chunk_LU4T7K5F = __esm({
18105
- "../../packages/core/dist/chunk-LU4T7K5F.js"() {
18104
+ var init_chunk_27IZMIGG = __esm({
18105
+ "../../packages/core/dist/chunk-27IZMIGG.js"() {
18106
18106
  "use strict";
18107
- init_chunk_74HGW6HA();
18108
- init_chunk_AMKBCOOH();
18109
- init_chunk_TYI6QVPX();
18107
+ init_chunk_6GSDWCB5();
18108
+ init_chunk_MQQRYOE6();
18109
+ init_chunk_CLGTGGVN();
18110
18110
  init_chunk_HZ6CADSY();
18111
18111
  init_zod();
18112
18112
  CASE_COMMENT_TEXT_MAX_LENGTH = CASE_NOTE_TEXT_MAX_LENGTH;
@@ -18143,12 +18143,12 @@ var init_chunk_LU4T7K5F = __esm({
18143
18143
  }
18144
18144
  });
18145
18145
 
18146
- // ../../packages/core/dist/chunk-I6CZPDXO.js
18146
+ // ../../packages/core/dist/chunk-JAR3LH7D.js
18147
18147
  var CASE_VERSION_DECISION_REASON_MAX_LENGTH, CASE_VERSION_DECISIONS, caseVersionDecisionReason, reason, lineNumber2, recordCaseReferenceBody, CASE_PASSAGE_REVERSED_REASON, citeCasePassageBody, decideCaseVersionBody, CASE_PASSAGE_LINK_REQUIRED_REASON, CASE_PASSAGE_LINK_CHANGED_REASON, CASE_PASSAGE_NO_TEXT_REASON, CASE_PASSAGE_TEXT_TOO_LARGE_REASON, CASE_PASSAGE_NOT_TEXT_REASON, CASE_PASSAGE_OUT_OF_RANGE_REASON;
18148
- var init_chunk_I6CZPDXO = __esm({
18149
- "../../packages/core/dist/chunk-I6CZPDXO.js"() {
18148
+ var init_chunk_JAR3LH7D = __esm({
18149
+ "../../packages/core/dist/chunk-JAR3LH7D.js"() {
18150
18150
  "use strict";
18151
- init_chunk_LU4T7K5F();
18151
+ init_chunk_27IZMIGG();
18152
18152
  init_chunk_HZ6CADSY();
18153
18153
  init_zod();
18154
18154
  CASE_VERSION_DECISION_REASON_MAX_LENGTH = 2e3;
@@ -18187,15 +18187,15 @@ var init_chunk_I6CZPDXO = __esm({
18187
18187
  }
18188
18188
  });
18189
18189
 
18190
- // ../../packages/core/dist/chunk-M7BXKCNK.js
18190
+ // ../../packages/core/dist/chunk-N4CTQNZE.js
18191
18191
  var caseInputLinkParam, caseCollectionDocumentOfCaseParam, linkCaseCollectionInputBody, linkCasePreviousOutputInputBody, linkCaseReceivedInputBody, linkCaseInputBody, CASE_LINK_OFFICIAL_VERSION_UNKNOWN_REASON, CASE_LINK_OUTPUT_NOT_PRIOR_REASON, CASE_LINK_RECEIVED_UNKNOWN_REASON, CASE_LINK_DOCUMENT_TYPE_MISMATCH_REASON, CASE_LINK_VERSION_NOT_CURRENT_REASON, CASE_COLLECTION_CASES_PAGE_MAX, caseCollectionCasesQuery, CASE_REFERENCES_PAGE_MAX, caseReferencesQuery;
18192
- var init_chunk_M7BXKCNK = __esm({
18193
- "../../packages/core/dist/chunk-M7BXKCNK.js"() {
18192
+ var init_chunk_N4CTQNZE = __esm({
18193
+ "../../packages/core/dist/chunk-N4CTQNZE.js"() {
18194
18194
  "use strict";
18195
- init_chunk_ZZZ65EIA();
18196
- init_chunk_I6CZPDXO();
18197
- init_chunk_S2LXF4LF();
18198
- init_chunk_TYI6QVPX();
18195
+ init_chunk_7Y3IO67N();
18196
+ init_chunk_JAR3LH7D();
18197
+ init_chunk_YFUYMQR2();
18198
+ init_chunk_CLGTGGVN();
18199
18199
  init_chunk_HZ6CADSY();
18200
18200
  init_zod();
18201
18201
  caseInputLinkParam = caseRecordParam.extend({ input_id: uuidSchema });
@@ -18226,7 +18226,7 @@ var init_chunk_M7BXKCNK = __esm({
18226
18226
  }
18227
18227
  });
18228
18228
 
18229
- // ../../packages/core/dist/chunk-NVZB33EA.js
18229
+ // ../../packages/core/dist/chunk-DFKHVG4Q.js
18230
18230
  function isCaseDueDate(value) {
18231
18231
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
18232
18232
  if (!match) return false;
@@ -18244,10 +18244,10 @@ function setCaseDeadlinesProblem(body) {
18244
18244
  return null;
18245
18245
  }
18246
18246
  var CASE_DUE_DATE_MIN_YEAR, CASE_DUE_DATE_MAX_YEAR, CASE_DEADLINES_PHASES_MAX, CASE_OVERDUE_CASES_MAX, caseDueDateSchema, setCaseDeadlinesShape, setCaseDeadlinesBody, setCaseTaskPlanBody, setCaseOwnerBody, caseOverdueQuery;
18247
- var init_chunk_NVZB33EA = __esm({
18248
- "../../packages/core/dist/chunk-NVZB33EA.js"() {
18247
+ var init_chunk_DFKHVG4Q = __esm({
18248
+ "../../packages/core/dist/chunk-DFKHVG4Q.js"() {
18249
18249
  "use strict";
18250
- init_chunk_TYI6QVPX();
18250
+ init_chunk_CLGTGGVN();
18251
18251
  init_chunk_HZ6CADSY();
18252
18252
  init_zod();
18253
18253
  CASE_DUE_DATE_MIN_YEAR = 2e3;
@@ -18275,12 +18275,12 @@ var init_chunk_NVZB33EA = __esm({
18275
18275
  }
18276
18276
  });
18277
18277
 
18278
- // ../../packages/core/dist/chunk-7QN6QYGN.js
18278
+ // ../../packages/core/dist/chunk-26PIYACX.js
18279
18279
  var CASE_GUEST_EMAIL_MAX, CASE_GUEST_INVITATIONS_PAGE_MAX, CASE_GUEST_INVITE_TOKEN_LENGTH, caseGuestEmailSchema, caseGuestInviteTokenSchema, inviteCaseGuestBody, caseGuestInvitationParam, caseGuestInvitationsQuery, joinCaseSpaceBody, caseJoinSearchParams;
18280
- var init_chunk_7QN6QYGN = __esm({
18281
- "../../packages/core/dist/chunk-7QN6QYGN.js"() {
18280
+ var init_chunk_26PIYACX = __esm({
18281
+ "../../packages/core/dist/chunk-26PIYACX.js"() {
18282
18282
  "use strict";
18283
- init_chunk_TYI6QVPX();
18283
+ init_chunk_CLGTGGVN();
18284
18284
  init_chunk_HZ6CADSY();
18285
18285
  init_zod();
18286
18286
  CASE_GUEST_EMAIL_MAX = 320;
@@ -18298,13 +18298,13 @@ var init_chunk_7QN6QYGN = __esm({
18298
18298
  }
18299
18299
  });
18300
18300
 
18301
- // ../../packages/core/dist/chunk-CUBLS2GW.js
18301
+ // ../../packages/core/dist/chunk-NCOSWD3P.js
18302
18302
  var lines, ordered, citeCaseOfficialVersionPassageBody, citeCaseReceivedPassageBody, citeCaseSourcePassageBody, citeCaseInputPassageBody, caseSourceRefSchema;
18303
- var init_chunk_CUBLS2GW = __esm({
18304
- "../../packages/core/dist/chunk-CUBLS2GW.js"() {
18303
+ var init_chunk_NCOSWD3P = __esm({
18304
+ "../../packages/core/dist/chunk-NCOSWD3P.js"() {
18305
18305
  "use strict";
18306
- init_chunk_I6CZPDXO();
18307
- init_chunk_LU4T7K5F();
18306
+ init_chunk_JAR3LH7D();
18307
+ init_chunk_27IZMIGG();
18308
18308
  init_chunk_HZ6CADSY();
18309
18309
  init_zod();
18310
18310
  lines = { line_start: casePassageLineSchema, line_end: casePassageLineSchema };
@@ -18333,12 +18333,12 @@ var init_chunk_AF2RCYPB = __esm({
18333
18333
  }
18334
18334
  });
18335
18335
 
18336
- // ../../packages/core/dist/chunk-2KOYNTE2.js
18336
+ // ../../packages/core/dist/chunk-6TYCOJ5O.js
18337
18337
  var CASE_ADJUSTMENT_REASON_MAX_LENGTH, CASE_ADJUSTMENT_DISPENSATION_KINDS, reason2, activateCasePhaseBody, dispenseCaseBody, addCaseTaskBody, addCaseInputBody, caseOwnItemSchema, addCaseItemBody;
18338
- var init_chunk_2KOYNTE2 = __esm({
18339
- "../../packages/core/dist/chunk-2KOYNTE2.js"() {
18338
+ var init_chunk_6TYCOJ5O = __esm({
18339
+ "../../packages/core/dist/chunk-6TYCOJ5O.js"() {
18340
18340
  "use strict";
18341
- init_chunk_WLKYA2B2();
18341
+ init_chunk_JFD3FZM6();
18342
18342
  init_chunk_HZ6CADSY();
18343
18343
  init_zod();
18344
18344
  CASE_ADJUSTMENT_REASON_MAX_LENGTH = 2e3;
@@ -18369,14 +18369,14 @@ var init_chunk_2KOYNTE2 = __esm({
18369
18369
  }
18370
18370
  });
18371
18371
 
18372
- // ../../packages/core/dist/chunk-E66NXU3F.js
18372
+ // ../../packages/core/dist/chunk-G5S7KI42.js
18373
18373
  var CASE_AGENDA_VALUE_MAX_LENGTH, CASE_AGENDA_JUSTIFICATION_MAX_LENGTH, CASE_AGENDA_EVIDENCE_MAX_LENGTH, CASE_AGENDA_COMMENT_MAX_LENGTH, CASE_AGENDA_VERDICTS, comment, caseAgendaGroupParam, caseAgendaDecisionParam, caseAgendaQuery, caseApprovedDecisionsQuery, proposeCaseAgendaValueBody, decideCaseAgendaBody, dispenseCaseAgendaBody, addCaseDecisionBody;
18374
- var init_chunk_E66NXU3F = __esm({
18375
- "../../packages/core/dist/chunk-E66NXU3F.js"() {
18374
+ var init_chunk_G5S7KI42 = __esm({
18375
+ "../../packages/core/dist/chunk-G5S7KI42.js"() {
18376
18376
  "use strict";
18377
- init_chunk_S2LXF4LF();
18378
- init_chunk_WLKYA2B2();
18379
- init_chunk_TYI6QVPX();
18377
+ init_chunk_YFUYMQR2();
18378
+ init_chunk_JFD3FZM6();
18379
+ init_chunk_CLGTGGVN();
18380
18380
  init_chunk_M2T55BV6();
18381
18381
  init_chunk_HZ6CADSY();
18382
18382
  init_zod();
@@ -18794,10 +18794,10 @@ var init_chunk_UY32MQHG = __esm({
18794
18794
  }
18795
18795
  });
18796
18796
 
18797
- // ../../packages/core/dist/chunk-OMPT4ZHR.js
18797
+ // ../../packages/core/dist/chunk-AZOWABU5.js
18798
18798
  var billingOrgIdParam, subscriptionItemParams, planKeySchema, billingStatusSchema, paidTierSchema, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, changeTierBody, updateBillingCurrencyBody, invoicesQuery, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema;
18799
- var init_chunk_OMPT4ZHR = __esm({
18800
- "../../packages/core/dist/chunk-OMPT4ZHR.js"() {
18799
+ var init_chunk_AZOWABU5 = __esm({
18800
+ "../../packages/core/dist/chunk-AZOWABU5.js"() {
18801
18801
  "use strict";
18802
18802
  init_zod();
18803
18803
  billingOrgIdParam = external_exports.object({
@@ -18896,7 +18896,7 @@ var init_chunk_OMPT4ZHR = __esm({
18896
18896
  }
18897
18897
  });
18898
18898
 
18899
- // ../../packages/core/dist/chunk-SUDGFYG2.js
18899
+ // ../../packages/core/dist/chunk-KFELNP4O.js
18900
18900
  function refineScopedTarget(data, ctx) {
18901
18901
  if (data.scope === "org") {
18902
18902
  if (!data.org_id) {
@@ -18922,14 +18922,14 @@ function refineScopedTarget(data, ctx) {
18922
18922
  }
18923
18923
  }
18924
18924
  var adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, AUTOMATION_GATE_EVALUATIONS_PER_OPERATION_BOUND, automationGateEvaluationsPerOperation, AUTOMATION_RUN_RETENTION_DAYS_MAX, automationRunRetentionDays, turnDeadlineSeconds, casesLimit, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, adminDryRunByDefaultTargetBody, WAYAI_HOST_TOKEN_TARGET_KINDS, WAYAI_HOST_TOKEN_MAX_TARGETS, adminClearWayaiHostTokensBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCredentialServicesBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, dataExplorerDebugCountsDoType, dataExplorerDebugCountsParam, debugHubConvParam, debugMessageIdQuery;
18925
- var init_chunk_SUDGFYG2 = __esm({
18926
- "../../packages/core/dist/chunk-SUDGFYG2.js"() {
18925
+ var init_chunk_KFELNP4O = __esm({
18926
+ "../../packages/core/dist/chunk-KFELNP4O.js"() {
18927
18927
  "use strict";
18928
18928
  init_chunk_FECLIZTY();
18929
18929
  init_chunk_BFG4ZWR4();
18930
18930
  init_chunk_UY32MQHG();
18931
18931
  init_chunk_25BLQS73();
18932
- init_chunk_OMPT4ZHR();
18932
+ init_chunk_AZOWABU5();
18933
18933
  init_chunk_MIWZOSPI();
18934
18934
  init_chunk_HZ6CADSY();
18935
18935
  init_zod();
@@ -19109,6 +19109,13 @@ var init_chunk_SUDGFYG2 = __esm({
19109
19109
  * already stored keeps working when its org leaves the list. The route stores it as JSON.
19110
19110
  */
19111
19111
  base_credential_org_ids: external_exports.array(uuidSchema).max(200).optional(),
19112
+ /**
19113
+ * The organizations whose case work is metered (wayai#5921 D9): org ids, replacing the whole list; empty, the default,
19114
+ * meters none. A listed org is billed one operation per revision of a case's files and one per render that issued files,
19115
+ * and the operations gate refuses its case tokens' revisions and its renders at quota
19116
+ * (`apps/backend/src/billing/case-operations.ts`). The route stores it as JSON.
19117
+ */
19118
+ cases_metering_org_ids: external_exports.array(uuidSchema).max(200).optional(),
19112
19119
  /**
19113
19120
  * The mobile app version policy (`MOBILE_VERSION_POLICY_COLUMNS`), per platform: an install
19114
19121
  * below the minimum is blocked until it updates from the store; one below the recommended
@@ -19545,28 +19552,28 @@ var init_contracts = __esm({
19545
19552
  init_chunk_5YZ3R7KF();
19546
19553
  init_chunk_2YEGUQR7();
19547
19554
  init_chunk_AHISKXHA();
19548
- init_chunk_AQRCKNQP();
19555
+ init_chunk_NUJ5GZHA();
19549
19556
  init_chunk_K3PD6AOF();
19550
- init_chunk_F4264AMK();
19551
- init_chunk_ZTRVP4OT();
19552
- init_chunk_5WMOQ5NC();
19553
- init_chunk_UPGAWPE2();
19554
- init_chunk_AKG7A2TR();
19555
- init_chunk_VHA3AQE4();
19556
- init_chunk_2S6LIRGD();
19557
- init_chunk_WJJJFHIA();
19558
- init_chunk_M7BXKCNK();
19559
- init_chunk_ZZZ65EIA();
19560
- init_chunk_ATX6AHPZ();
19561
- init_chunk_NKJ2DQCV();
19562
- init_chunk_NVZB33EA();
19563
- init_chunk_7QN6QYGN();
19564
- init_chunk_CUBLS2GW();
19557
+ init_chunk_JNZVVHKO();
19558
+ init_chunk_KY3ZNL3E();
19559
+ init_chunk_4Y76ZGBB();
19560
+ init_chunk_SC6HGQ5X();
19561
+ init_chunk_KIJJEAS2();
19562
+ init_chunk_72TNUJVF();
19563
+ init_chunk_TRK5L5I5();
19564
+ init_chunk_TRBCWOW2();
19565
+ init_chunk_N4CTQNZE();
19566
+ init_chunk_7Y3IO67N();
19567
+ init_chunk_3SZD2H6D();
19568
+ init_chunk_A5TJEV6T();
19569
+ init_chunk_DFKHVG4Q();
19570
+ init_chunk_26PIYACX();
19571
+ init_chunk_NCOSWD3P();
19565
19572
  init_chunk_5PKKFSSF();
19566
19573
  init_chunk_AF2RCYPB();
19567
- init_chunk_2KOYNTE2();
19568
- init_chunk_E66NXU3F();
19569
- init_chunk_I6CZPDXO();
19574
+ init_chunk_6TYCOJ5O();
19575
+ init_chunk_G5S7KI42();
19576
+ init_chunk_JAR3LH7D();
19570
19577
  init_chunk_UEJOG2Q7();
19571
19578
  init_chunk_KEN2DASI();
19572
19579
  init_chunk_JQRL355P();
@@ -19579,7 +19586,7 @@ var init_contracts = __esm({
19579
19586
  init_chunk_LBDH7LCG();
19580
19587
  init_chunk_4LXDRTO4();
19581
19588
  init_chunk_NVKU5PPQ();
19582
- init_chunk_SUDGFYG2();
19589
+ init_chunk_KFELNP4O();
19583
19590
  init_chunk_FECLIZTY();
19584
19591
  init_chunk_BFG4ZWR4();
19585
19592
  init_chunk_UY32MQHG();
@@ -19587,7 +19594,7 @@ var init_contracts = __esm({
19587
19594
  init_chunk_D3EP4TDU();
19588
19595
  init_chunk_ZANBA4K4();
19589
19596
  init_chunk_QT7R3TGR();
19590
- init_chunk_OMPT4ZHR();
19597
+ init_chunk_AZOWABU5();
19591
19598
  init_chunk_2PZIF56U();
19592
19599
  init_chunk_6J742GLA();
19593
19600
  init_chunk_ZRXP6OOJ();
@@ -19612,13 +19619,13 @@ var init_contracts = __esm({
19612
19619
  init_chunk_C2UEA2KW();
19613
19620
  init_chunk_K6O2P77D();
19614
19621
  init_chunk_YR7QALGP();
19615
- init_chunk_LU4T7K5F();
19616
- init_chunk_74HGW6HA();
19617
- init_chunk_AMKBCOOH();
19618
- init_chunk_S2LXF4LF();
19619
- init_chunk_WLKYA2B2();
19622
+ init_chunk_27IZMIGG();
19623
+ init_chunk_6GSDWCB5();
19624
+ init_chunk_MQQRYOE6();
19625
+ init_chunk_YFUYMQR2();
19626
+ init_chunk_JFD3FZM6();
19620
19627
  init_chunk_KWRHZBGU();
19621
- init_chunk_TYI6QVPX();
19628
+ init_chunk_CLGTGGVN();
19622
19629
  init_chunk_M2T55BV6();
19623
19630
  init_chunk_VYINA6YP();
19624
19631
  init_chunk_ZVXO3XL6();
@@ -21064,6 +21071,9 @@ var init_utils = __esm({
21064
21071
  ["admin base-credential-orgs status", { positionals: 0 }],
21065
21072
  ["admin base-credential-orgs add", { positionals: 1 }],
21066
21073
  ["admin base-credential-orgs remove", { positionals: 1 }],
21074
+ ["admin cases-metering-orgs status", { positionals: 0 }],
21075
+ ["admin cases-metering-orgs add", { positionals: 1 }],
21076
+ ["admin cases-metering-orgs remove", { positionals: 1 }],
21067
21077
  ["admin voice-calls enable", { positionals: 0 }],
21068
21078
  ["admin voice-calls disable", { positionals: 0 }],
21069
21079
  ["admin voice-calls status", { positionals: 0 }],
@@ -21421,10 +21431,10 @@ var CASE_TYPE_PACKAGE_REVISIONS_MAX, caseTypeSourceQuery, caseTypePackageParam,
21421
21431
  var init_case_type_drafts = __esm({
21422
21432
  "../../packages/core/dist/contracts/case-type-drafts.js"() {
21423
21433
  "use strict";
21424
- init_chunk_AMKBCOOH();
21425
- init_chunk_WLKYA2B2();
21434
+ init_chunk_MQQRYOE6();
21435
+ init_chunk_JFD3FZM6();
21426
21436
  init_chunk_KWRHZBGU();
21427
- init_chunk_TYI6QVPX();
21437
+ init_chunk_CLGTGGVN();
21428
21438
  init_chunk_M2T55BV6();
21429
21439
  init_chunk_VYINA6YP();
21430
21440
  init_chunk_ZVXO3XL6();
@@ -21497,15 +21507,15 @@ var init_case_type_drafts = __esm({
21497
21507
  var init_case_received_documents = __esm({
21498
21508
  "../../packages/core/dist/contracts/case-received-documents.js"() {
21499
21509
  "use strict";
21500
- init_chunk_WJJJFHIA();
21501
- init_chunk_ZZZ65EIA();
21502
- init_chunk_ATX6AHPZ();
21503
- init_chunk_NKJ2DQCV();
21504
- init_chunk_AMKBCOOH();
21505
- init_chunk_S2LXF4LF();
21506
- init_chunk_WLKYA2B2();
21510
+ init_chunk_TRBCWOW2();
21511
+ init_chunk_7Y3IO67N();
21512
+ init_chunk_3SZD2H6D();
21513
+ init_chunk_A5TJEV6T();
21514
+ init_chunk_MQQRYOE6();
21515
+ init_chunk_YFUYMQR2();
21516
+ init_chunk_JFD3FZM6();
21507
21517
  init_chunk_KWRHZBGU();
21508
- init_chunk_TYI6QVPX();
21518
+ init_chunk_CLGTGGVN();
21509
21519
  init_chunk_M2T55BV6();
21510
21520
  init_chunk_VYINA6YP();
21511
21521
  init_chunk_ZVXO3XL6();
@@ -21522,9 +21532,9 @@ var init_case_received_documents = __esm({
21522
21532
  var init_case_files = __esm({
21523
21533
  "../../packages/core/dist/contracts/case-files.js"() {
21524
21534
  "use strict";
21525
- init_chunk_AMKBCOOH();
21535
+ init_chunk_MQQRYOE6();
21526
21536
  init_chunk_KWRHZBGU();
21527
- init_chunk_TYI6QVPX();
21537
+ init_chunk_CLGTGGVN();
21528
21538
  init_chunk_VYINA6YP();
21529
21539
  init_chunk_ZVXO3XL6();
21530
21540
  init_chunk_FBV7NLKO();
@@ -31872,9 +31882,9 @@ var init_case_type_packages = __esm({
31872
31882
  var init_case_types = __esm({
31873
31883
  "../../packages/core/dist/contracts/case-types.js"() {
31874
31884
  "use strict";
31875
- init_chunk_WLKYA2B2();
31885
+ init_chunk_JFD3FZM6();
31876
31886
  init_chunk_KWRHZBGU();
31877
- init_chunk_TYI6QVPX();
31887
+ init_chunk_CLGTGGVN();
31878
31888
  init_chunk_M2T55BV6();
31879
31889
  init_chunk_VYINA6YP();
31880
31890
  init_chunk_ZVXO3XL6();
@@ -42669,10 +42679,10 @@ var CASE_AGENT_REQUEST_TTL_MS, CASE_AGENT_REQUESTS_PER_PERSON_MAX, CASE_AGENT_MA
42669
42679
  var init_case_agents = __esm({
42670
42680
  "../../packages/core/dist/contracts/case-agents.js"() {
42671
42681
  "use strict";
42672
- init_chunk_S2LXF4LF();
42673
- init_chunk_WLKYA2B2();
42682
+ init_chunk_YFUYMQR2();
42683
+ init_chunk_JFD3FZM6();
42674
42684
  init_chunk_KWRHZBGU();
42675
- init_chunk_TYI6QVPX();
42685
+ init_chunk_CLGTGGVN();
42676
42686
  init_chunk_M2T55BV6();
42677
42687
  init_chunk_VYINA6YP();
42678
42688
  init_chunk_ZVXO3XL6();
@@ -42707,10 +42717,10 @@ var init_case_agents = __esm({
42707
42717
  var init_case_records = __esm({
42708
42718
  "../../packages/core/dist/contracts/case-records.js"() {
42709
42719
  "use strict";
42710
- init_chunk_S2LXF4LF();
42711
- init_chunk_WLKYA2B2();
42720
+ init_chunk_YFUYMQR2();
42721
+ init_chunk_JFD3FZM6();
42712
42722
  init_chunk_KWRHZBGU();
42713
- init_chunk_TYI6QVPX();
42723
+ init_chunk_CLGTGGVN();
42714
42724
  init_chunk_M2T55BV6();
42715
42725
  init_chunk_VYINA6YP();
42716
42726
  init_chunk_ZVXO3XL6();
@@ -42728,10 +42738,10 @@ var CASE_REVIEW_ROUNDS_MAX, CASE_REVIEW_REASON_MAX_LENGTH, CASE_REVIEW_PAIR_UNKN
42728
42738
  var init_case_review = __esm({
42729
42739
  "../../packages/core/dist/contracts/case-review.js"() {
42730
42740
  "use strict";
42731
- init_chunk_AMKBCOOH();
42732
- init_chunk_WLKYA2B2();
42741
+ init_chunk_MQQRYOE6();
42742
+ init_chunk_JFD3FZM6();
42733
42743
  init_chunk_KWRHZBGU();
42734
- init_chunk_TYI6QVPX();
42744
+ init_chunk_CLGTGGVN();
42735
42745
  init_chunk_M2T55BV6();
42736
42746
  init_chunk_VYINA6YP();
42737
42747
  init_chunk_ZVXO3XL6();
@@ -42862,13 +42872,13 @@ var init_case_session = __esm({
42862
42872
  var init_case_comments = __esm({
42863
42873
  "../../packages/core/dist/contracts/case-comments.js"() {
42864
42874
  "use strict";
42865
- init_chunk_LU4T7K5F();
42866
- init_chunk_74HGW6HA();
42867
- init_chunk_AMKBCOOH();
42868
- init_chunk_S2LXF4LF();
42869
- init_chunk_WLKYA2B2();
42875
+ init_chunk_27IZMIGG();
42876
+ init_chunk_6GSDWCB5();
42877
+ init_chunk_MQQRYOE6();
42878
+ init_chunk_YFUYMQR2();
42879
+ init_chunk_JFD3FZM6();
42870
42880
  init_chunk_KWRHZBGU();
42871
- init_chunk_TYI6QVPX();
42881
+ init_chunk_CLGTGGVN();
42872
42882
  init_chunk_M2T55BV6();
42873
42883
  init_chunk_VYINA6YP();
42874
42884
  init_chunk_ZVXO3XL6();
@@ -42885,14 +42895,14 @@ var init_case_comments = __esm({
42885
42895
  var init_case_collection_citations = __esm({
42886
42896
  "../../packages/core/dist/contracts/case-collection-citations.js"() {
42887
42897
  "use strict";
42888
- init_chunk_I6CZPDXO();
42889
- init_chunk_LU4T7K5F();
42890
- init_chunk_74HGW6HA();
42891
- init_chunk_AMKBCOOH();
42892
- init_chunk_S2LXF4LF();
42893
- init_chunk_WLKYA2B2();
42898
+ init_chunk_JAR3LH7D();
42899
+ init_chunk_27IZMIGG();
42900
+ init_chunk_6GSDWCB5();
42901
+ init_chunk_MQQRYOE6();
42902
+ init_chunk_YFUYMQR2();
42903
+ init_chunk_JFD3FZM6();
42894
42904
  init_chunk_KWRHZBGU();
42895
- init_chunk_TYI6QVPX();
42905
+ init_chunk_CLGTGGVN();
42896
42906
  init_chunk_M2T55BV6();
42897
42907
  init_chunk_VYINA6YP();
42898
42908
  init_chunk_ZVXO3XL6();
@@ -42909,18 +42919,18 @@ var init_case_collection_citations = __esm({
42909
42919
  var init_case_collection_links = __esm({
42910
42920
  "../../packages/core/dist/contracts/case-collection-links.js"() {
42911
42921
  "use strict";
42912
- init_chunk_M7BXKCNK();
42913
- init_chunk_ZZZ65EIA();
42914
- init_chunk_ATX6AHPZ();
42915
- init_chunk_NKJ2DQCV();
42916
- init_chunk_I6CZPDXO();
42917
- init_chunk_LU4T7K5F();
42918
- init_chunk_74HGW6HA();
42919
- init_chunk_AMKBCOOH();
42920
- init_chunk_S2LXF4LF();
42921
- init_chunk_WLKYA2B2();
42922
+ init_chunk_N4CTQNZE();
42923
+ init_chunk_7Y3IO67N();
42924
+ init_chunk_3SZD2H6D();
42925
+ init_chunk_A5TJEV6T();
42926
+ init_chunk_JAR3LH7D();
42927
+ init_chunk_27IZMIGG();
42928
+ init_chunk_6GSDWCB5();
42929
+ init_chunk_MQQRYOE6();
42930
+ init_chunk_YFUYMQR2();
42931
+ init_chunk_JFD3FZM6();
42922
42932
  init_chunk_KWRHZBGU();
42923
- init_chunk_TYI6QVPX();
42933
+ init_chunk_CLGTGGVN();
42924
42934
  init_chunk_M2T55BV6();
42925
42935
  init_chunk_VYINA6YP();
42926
42936
  init_chunk_ZVXO3XL6();
@@ -43688,7 +43698,7 @@ exec wayai cases pull --mirror-only --dir "$(dirname "$0")/.."
43688
43698
  }
43689
43699
  });
43690
43700
 
43691
- // ../../packages/core/dist/chunk-CVJWAW7Y.js
43701
+ // ../../packages/core/dist/chunk-KOPPBU54.js
43692
43702
  function firstAtOrAfter(sorted, from) {
43693
43703
  let lo = 0;
43694
43704
  let hi = sorted.length;
@@ -44103,11 +44113,11 @@ function readItems(text5, state) {
44103
44113
  };
44104
44114
  }
44105
44115
  var CASE_COMPOSED_COVER, CASE_ITEM_READER_MAX_CHARS, FENCE_OPEN, BLANK_AFTER, CASE_FRONT_MATTER, FRONT_MATTER_OPENING, withoutBom, FENCE, SETEXT_UNDERLINE, DASHES, COLUMNS, patternBody, CALCULATION_MARKER, DECISION_MARKER, DOCUMENT_MARKER, INPUT_MARKER, isSpace, isTabOrSpace, once, OPENS_FRONT_MATTER;
44106
- var init_chunk_CVJWAW7Y = __esm({
44107
- "../../packages/core/dist/chunk-CVJWAW7Y.js"() {
44116
+ var init_chunk_KOPPBU54 = __esm({
44117
+ "../../packages/core/dist/chunk-KOPPBU54.js"() {
44108
44118
  "use strict";
44109
- init_chunk_LU4T7K5F();
44110
- init_chunk_WLKYA2B2();
44119
+ init_chunk_27IZMIGG();
44120
+ init_chunk_JFD3FZM6();
44111
44121
  CASE_COMPOSED_COVER = "00-cover.md";
44112
44122
  CASE_ITEM_READER_MAX_CHARS = 4 * 1024 * 1024;
44113
44123
  FENCE_OPEN = / {0,3}(`{3,}|~{3,})([^\n]*)(?:\n|$)/y;
@@ -44137,14 +44147,14 @@ var init_chunk_CVJWAW7Y = __esm({
44137
44147
  var init_case_item_reader = __esm({
44138
44148
  "../../packages/core/dist/case-item-reader.js"() {
44139
44149
  "use strict";
44140
- init_chunk_CVJWAW7Y();
44141
- init_chunk_LU4T7K5F();
44142
- init_chunk_74HGW6HA();
44143
- init_chunk_AMKBCOOH();
44144
- init_chunk_S2LXF4LF();
44145
- init_chunk_WLKYA2B2();
44150
+ init_chunk_KOPPBU54();
44151
+ init_chunk_27IZMIGG();
44152
+ init_chunk_6GSDWCB5();
44153
+ init_chunk_MQQRYOE6();
44154
+ init_chunk_YFUYMQR2();
44155
+ init_chunk_JFD3FZM6();
44146
44156
  init_chunk_KWRHZBGU();
44147
- init_chunk_TYI6QVPX();
44157
+ init_chunk_CLGTGGVN();
44148
44158
  init_chunk_M2T55BV6();
44149
44159
  init_chunk_VYINA6YP();
44150
44160
  init_chunk_ZVXO3XL6();
@@ -44455,15 +44465,15 @@ ${line}`).join("");
44455
44465
  var init_case_input_sources = __esm({
44456
44466
  "../../packages/core/dist/contracts/case-input-sources.js"() {
44457
44467
  "use strict";
44458
- init_chunk_CUBLS2GW();
44459
- init_chunk_I6CZPDXO();
44460
- init_chunk_LU4T7K5F();
44461
- init_chunk_74HGW6HA();
44462
- init_chunk_AMKBCOOH();
44463
- init_chunk_S2LXF4LF();
44464
- init_chunk_WLKYA2B2();
44468
+ init_chunk_NCOSWD3P();
44469
+ init_chunk_JAR3LH7D();
44470
+ init_chunk_27IZMIGG();
44471
+ init_chunk_6GSDWCB5();
44472
+ init_chunk_MQQRYOE6();
44473
+ init_chunk_YFUYMQR2();
44474
+ init_chunk_JFD3FZM6();
44465
44475
  init_chunk_KWRHZBGU();
44466
- init_chunk_TYI6QVPX();
44476
+ init_chunk_CLGTGGVN();
44467
44477
  init_chunk_M2T55BV6();
44468
44478
  init_chunk_VYINA6YP();
44469
44479
  init_chunk_ZVXO3XL6();
@@ -44480,11 +44490,11 @@ var init_case_input_sources = __esm({
44480
44490
  var init_case_notes = __esm({
44481
44491
  "../../packages/core/dist/contracts/case-notes.js"() {
44482
44492
  "use strict";
44483
- init_chunk_74HGW6HA();
44484
- init_chunk_S2LXF4LF();
44485
- init_chunk_WLKYA2B2();
44493
+ init_chunk_6GSDWCB5();
44494
+ init_chunk_YFUYMQR2();
44495
+ init_chunk_JFD3FZM6();
44486
44496
  init_chunk_KWRHZBGU();
44487
- init_chunk_TYI6QVPX();
44497
+ init_chunk_CLGTGGVN();
44488
44498
  init_chunk_M2T55BV6();
44489
44499
  init_chunk_VYINA6YP();
44490
44500
  init_chunk_ZVXO3XL6();
@@ -47662,13 +47672,33 @@ async function adminCommand(args2) {
47662
47672
  }
47663
47673
  switch (sub) {
47664
47674
  case "status":
47665
- await runBaseCredentialOrgsStatus(positional, flagArgs);
47675
+ await runOrgListStatus(BASE_CREDENTIAL_ORGS, positional, flagArgs);
47676
+ return;
47677
+ case "add":
47678
+ await runOrgListChange(BASE_CREDENTIAL_ORGS, "add", positional, flagArgs);
47679
+ return;
47680
+ case "remove":
47681
+ await runOrgListChange(BASE_CREDENTIAL_ORGS, "remove", positional, flagArgs);
47682
+ return;
47683
+ default:
47684
+ printHelp2();
47685
+ process.exit(1);
47686
+ }
47687
+ }
47688
+ if (group === "cases-metering-orgs") {
47689
+ if (!sub) {
47690
+ printHelp2();
47691
+ process.exit(1);
47692
+ }
47693
+ switch (sub) {
47694
+ case "status":
47695
+ await runOrgListStatus(CASES_METERING_ORGS, positional, flagArgs);
47666
47696
  return;
47667
47697
  case "add":
47668
- await runBaseCredentialOrgsChange("add", positional, flagArgs);
47698
+ await runOrgListChange(CASES_METERING_ORGS, "add", positional, flagArgs);
47669
47699
  return;
47670
47700
  case "remove":
47671
- await runBaseCredentialOrgsChange("remove", positional, flagArgs);
47701
+ await runOrgListChange(CASES_METERING_ORGS, "remove", positional, flagArgs);
47672
47702
  return;
47673
47703
  default:
47674
47704
  printHelp2();
@@ -49017,22 +49047,22 @@ async function runVaultGateChange(change, positional, flagArgs) {
49017
49047
  console.log(`After: ${describeVaultGateList(after)}`);
49018
49048
  console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
49019
49049
  }
49020
- function readBaseCredentialOrgList(data) {
49021
- return readUuidListColumn(data, "base_credential_org_ids", "org ids");
49050
+ function readOrgList(column, data) {
49051
+ return readUuidListColumn(data, column.key, "org ids");
49022
49052
  }
49023
- function describeBaseCredentialOrgList(ids) {
49024
- return ids.length === 0 ? "(none listed: no org may store a base credential)" : ids.join(", ");
49053
+ function describeOrgList(column, ids) {
49054
+ return ids.length === 0 ? column.none : ids.join(", ");
49025
49055
  }
49026
- async function readBaseCredentialOrgConfig(client) {
49056
+ async function readOrgListConfig(column, client) {
49027
49057
  try {
49028
- return readBaseCredentialOrgList((await client.adminGetConfig()).data);
49058
+ return readOrgList(column, (await client.adminGetConfig()).data);
49029
49059
  } catch (err) {
49030
49060
  exitOnApiError(err);
49031
49061
  throw err;
49032
49062
  }
49033
49063
  }
49034
- async function runBaseCredentialOrgsStatus(positional, flagArgs) {
49035
- const usage4 = "wayai admin base-credential-orgs status [--json]";
49064
+ async function runOrgListStatus(column, positional, flagArgs) {
49065
+ const usage4 = `wayai admin ${column.group} status [--json]`;
49036
49066
  if (positional.length > 0) {
49037
49067
  console.error(usage4);
49038
49068
  process.exit(1);
@@ -49040,15 +49070,15 @@ async function runBaseCredentialOrgsStatus(positional, flagArgs) {
49040
49070
  const { jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--json"]);
49041
49071
  const { config, accessToken } = await requireAuth();
49042
49072
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
49043
- const ids = await readBaseCredentialOrgConfig(client);
49073
+ const ids = await readOrgListConfig(column, client);
49044
49074
  if (jsonOutput) {
49045
- console.log(JSON.stringify({ base_credential_org_ids: ids }, null, 2));
49075
+ console.log(JSON.stringify({ [column.key]: ids }, null, 2));
49046
49076
  return;
49047
49077
  }
49048
- console.log(`base_credential_org_ids (platform): ${describeBaseCredentialOrgList(ids)}`);
49078
+ console.log(`${column.key} (platform): ${describeOrgList(column, ids)}`);
49049
49079
  }
49050
- async function runBaseCredentialOrgsChange(change, positional, flagArgs) {
49051
- const usage4 = `wayai admin base-credential-orgs ${change} <org_id> [--yes] [--json]`;
49080
+ async function runOrgListChange(column, change, positional, flagArgs) {
49081
+ const usage4 = `wayai admin ${column.group} ${change} <org_id> [--yes] [--json]`;
49052
49082
  const { yes, jsonOutput } = parseBooleanFlags(flagArgs, usage4, ["--yes", "--json"]);
49053
49083
  if (positional.length !== 1) {
49054
49084
  console.error("Name one org id.");
@@ -49063,21 +49093,21 @@ async function runBaseCredentialOrgsChange(change, positional, flagArgs) {
49063
49093
  }
49064
49094
  const { config, accessToken } = await requireAuth();
49065
49095
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
49066
- const before = await readBaseCredentialOrgConfig(client);
49096
+ const before = await readOrgListConfig(column, client);
49067
49097
  const listed3 = before.some((id) => id.toLowerCase() === orgId);
49068
49098
  if (listed3 === (change === "add")) {
49069
49099
  if (jsonOutput) {
49070
49100
  console.log(JSON.stringify({ before, after: before, changed: false }, null, 2));
49071
49101
  return;
49072
49102
  }
49073
- console.log(`Before: ${describeBaseCredentialOrgList(before)}`);
49103
+ console.log(`Before: ${describeOrgList(column, before)}`);
49074
49104
  console.log(`${orgId} is ${change === "add" ? "already" : "not"} listed; nothing was written.`);
49075
49105
  return;
49076
49106
  }
49077
49107
  const next = change === "add" ? [...before, orgId] : before.filter((id) => id.toLowerCase() !== orgId);
49078
- if (!jsonOutput) console.log(`Before: ${describeBaseCredentialOrgList(before)}`);
49108
+ if (!jsonOutput) console.log(`Before: ${describeOrgList(column, before)}`);
49079
49109
  if (!yes && !jsonOutput) {
49080
- console.log(change === "add" ? `About to add ${orgId}: its bases may store base credentials in the credentials vault while base credentials' vault gate is open.` : `About to remove ${orgId}: its bases can no longer store or rotate a base credential; the credentials they stored keep working and can be deleted.`);
49110
+ console.log(change === "add" ? column.adding(orgId) : column.removing(orgId));
49081
49111
  const ok = await confirm("Proceed?");
49082
49112
  if (!ok) {
49083
49113
  console.log("Aborted.");
@@ -49086,7 +49116,7 @@ async function runBaseCredentialOrgsChange(change, positional, flagArgs) {
49086
49116
  }
49087
49117
  let after;
49088
49118
  try {
49089
- after = readBaseCredentialOrgList((await client.adminUpdateConfig({ base_credential_org_ids: next })).data);
49119
+ after = readOrgList(column, (await client.adminUpdateConfig({ [column.key]: next })).data);
49090
49120
  } catch (err) {
49091
49121
  exitOnApiError(err);
49092
49122
  throw err;
@@ -49095,7 +49125,7 @@ async function runBaseCredentialOrgsChange(change, positional, flagArgs) {
49095
49125
  if (jsonOutput) {
49096
49126
  console.log(JSON.stringify({ before, after, changed: stored }, null, 2));
49097
49127
  } else {
49098
- console.log(`After: ${describeBaseCredentialOrgList(after)}`);
49128
+ console.log(`After: ${describeOrgList(column, after)}`);
49099
49129
  }
49100
49130
  if (!stored) {
49101
49131
  console.error(`The platform config answered without the change: ${orgId} was not ${change === "add" ? "added" : "removed"}. A deploy may be in progress; run the command again in a few minutes.`);
@@ -49768,6 +49798,12 @@ Usage:
49768
49798
  wayai admin base-credential-orgs remove <org_id> [--yes] [--json]
49769
49799
  Stop admitting it: no new value or rotation; what it stored keeps working and can be deleted
49770
49800
 
49801
+ wayai admin cases-metering-orgs status [--json] Print the orgs whose case work is metered (cases_metering_org_ids)
49802
+ wayai admin cases-metering-orgs add <org_id> [--yes] [--json]
49803
+ Meter an org's case work: one operation per revision and per render that issues files, its case tokens' revisions and its renders refused at quota; prints before and after, confirms unless --yes
49804
+ wayai admin cases-metering-orgs remove <org_id> [--yes] [--json]
49805
+ Stop metering it: its case work bills nothing and is never refused by the operations gate
49806
+
49771
49807
  Sources:
49772
49808
  do Live DO SQLite (existing conversation, hub config, etc.).
49773
49809
  analytics ClickHouse projections (conversation, message, schedule_event).
@@ -49899,6 +49935,13 @@ Sources:
49899
49935
  (vault-gate add base_source) by every create and rotation, on every environment.
49900
49936
  Empty, the default, admits none. An org removed keeps the credentials it stored:
49901
49937
  they still send and can be deleted. Changes land within about 60 s.
49938
+ cases-metering-orgs
49939
+ The orgs whose case work is metered: the PLATFORM-wide cases_metering_org_ids list,
49940
+ read before each revision of a case's files, each submit and each render's settling.
49941
+ A listed org is billed one operation per revision and per render that issues files,
49942
+ and at its operations quota its case tokens' revisions and its renders are refused;
49943
+ a person's own revision never is. Empty, the default, meters none; work done while
49944
+ an org was not listed is never billed later. Changes land within about 60 s.
49902
49945
 
49903
49946
  Types (do): ${VALID_TYPES.join(" | ")}
49904
49947
  Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
@@ -49940,7 +49983,7 @@ Audit + rate limit:
49940
49983
  across all sources. Platform-admin grant required.
49941
49984
  `.trim());
49942
49985
  }
49943
- var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, CASES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VAULT_GATE_BY_ID_ONLY, VALID_NOTICE_SEVERITIES;
49986
+ var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, CASES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VAULT_GATE_CONNECTORS, VAULT_GATE_BY_ID_ONLY, BASE_CREDENTIAL_ORGS, CASES_METERING_ORGS, VALID_NOTICE_SEVERITIES;
49944
49987
  var init_admin = __esm({
49945
49988
  "src/commands/admin.ts"() {
49946
49989
  "use strict";
@@ -50028,6 +50071,20 @@ var init_admin = __esm({
50028
50071
  VAULT_GATE_BY_ID_ONLY = /* @__PURE__ */ new Map([
50029
50072
  ["01e7b19c-bc94-43f4-a780-ad5a22fb7127", "openai"]
50030
50073
  ]);
50074
+ BASE_CREDENTIAL_ORGS = {
50075
+ group: "base-credential-orgs",
50076
+ key: "base_credential_org_ids",
50077
+ none: "(none listed: no org may store a base credential)",
50078
+ adding: (orgId) => `About to add ${orgId}: its bases may store base credentials in the credentials vault while base credentials' vault gate is open.`,
50079
+ removing: (orgId) => `About to remove ${orgId}: its bases can no longer store or rotate a base credential; the credentials they stored keep working and can be deleted.`
50080
+ };
50081
+ CASES_METERING_ORGS = {
50082
+ group: "cases-metering-orgs",
50083
+ key: "cases_metering_org_ids",
50084
+ none: "(none listed: no org's case work is metered)",
50085
+ adding: (orgId) => `About to add ${orgId}: each revision of its cases' files and each render that issues files bills one operation, and at its operations quota its case tokens' revisions and its renders are refused.`,
50086
+ removing: (orgId) => `About to remove ${orgId}: its case work stops billing, and the operations gate stops refusing it.`
50087
+ };
50031
50088
  VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
50032
50089
  }
50033
50090
  });