@opengeni/contracts 2.2.0-canary.0 → 2.3.0-canary.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.
@@ -4,7 +4,7 @@ import {
4
4
  SessionTenancyVisibility,
5
5
  UserResourceAuthorityGrant,
6
6
  UserResourceDelegation
7
- } from "./chunk-7ZZ3R27P.js";
7
+ } from "./chunk-XW2RKNEU.js";
8
8
  import "./chunk-MRWYRAS5.js";
9
9
  import "./chunk-JUFK3T4Q.js";
10
10
  import "./chunk-WYBDERIY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-7ZZ3R27P.js";
3
+ } from "./chunk-XW2RKNEU.js";
4
4
  import "./chunk-MRWYRAS5.js";
5
5
  import "./chunk-JUFK3T4Q.js";
6
6
  import {
package/dist/index.d.ts CHANGED
@@ -1685,6 +1685,40 @@ export declare const SlackReactionChannelListResponse: z.ZodObject<{
1685
1685
  nextCursor: z.ZodNullable<z.ZodString>;
1686
1686
  }, z.core.$strip>;
1687
1687
  export type SlackReactionChannelListResponse = z.infer<typeof SlackReactionChannelListResponse>;
1688
+ /** Where one Slack channel starts work. */
1689
+ export declare const SlackChannelRoute: z.ZodObject<{
1690
+ slackChannelId: z.ZodString;
1691
+ targetWorkspaceId: z.ZodString;
1692
+ targetWorkspaceName: z.ZodNullable<z.ZodString>;
1693
+ source: z.ZodEnum<{
1694
+ admin: "admin";
1695
+ picker: "picker";
1696
+ }>;
1697
+ updatedAt: z.ZodString;
1698
+ }, z.core.$strip>;
1699
+ export type SlackChannelRoute = z.infer<typeof SlackChannelRoute>;
1700
+ export declare const SlackChannelRouteListResponse: z.ZodObject<{
1701
+ routes: z.ZodArray<z.ZodObject<{
1702
+ slackChannelId: z.ZodString;
1703
+ targetWorkspaceId: z.ZodString;
1704
+ targetWorkspaceName: z.ZodNullable<z.ZodString>;
1705
+ source: z.ZodEnum<{
1706
+ admin: "admin";
1707
+ picker: "picker";
1708
+ }>;
1709
+ updatedAt: z.ZodString;
1710
+ }, z.core.$strip>>;
1711
+ routingEnabled: z.ZodBoolean;
1712
+ }, z.core.$strip>;
1713
+ export type SlackChannelRouteListResponse = z.infer<typeof SlackChannelRouteListResponse>;
1714
+ export declare const UpdateSlackChannelRoutesRequest: z.ZodObject<{
1715
+ connectionId: z.ZodString;
1716
+ routes: z.ZodArray<z.ZodObject<{
1717
+ slackChannelId: z.ZodString;
1718
+ targetWorkspaceId: z.ZodNullable<z.ZodString>;
1719
+ }, z.core.$strip>>;
1720
+ }, z.core.$strip>;
1721
+ export type UpdateSlackChannelRoutesRequest = z.infer<typeof UpdateSlackChannelRoutesRequest>;
1688
1722
  export declare const DEFAULT_WORKSPACE_SLACK_REACTION_SUMMON_SETTINGS: {
1689
1723
  readonly enabled: false;
1690
1724
  readonly emoji: "genie";
@@ -5612,6 +5646,189 @@ export declare const DocumentDefaultCollectionBackfill: z.ZodObject<{
5612
5646
  completedAt: z.ZodNullable<z.ZodString>;
5613
5647
  }, z.core.$strip>;
5614
5648
  export type DocumentDefaultCollectionBackfill = z.infer<typeof DocumentDefaultCollectionBackfill>;
5649
+ export declare const DocumentDefaultCollectionBackfillRunAudit: z.ZodObject<{
5650
+ runId: z.ZodString;
5651
+ status: z.ZodEnum<{
5652
+ completed: "completed";
5653
+ running: "running";
5654
+ }>;
5655
+ lastWorkspaceId: z.ZodNullable<z.ZodString>;
5656
+ processedCount: z.ZodNumber;
5657
+ createdCount: z.ZodNumber;
5658
+ adoptedCount: z.ZodNumber;
5659
+ completedAt: z.ZodNullable<z.ZodString>;
5660
+ actorSubjectId: z.ZodString;
5661
+ startedAt: z.ZodString;
5662
+ updatedAt: z.ZodString;
5663
+ }, z.core.$strip>;
5664
+ export type DocumentDefaultCollectionBackfillRunAudit = z.infer<typeof DocumentDefaultCollectionBackfillRunAudit>;
5665
+ export declare const DocumentDefaultCollectionBackfillOperationAudit: z.ZodObject<{
5666
+ operationId: z.ZodString;
5667
+ result: z.ZodObject<{
5668
+ runId: z.ZodString;
5669
+ operationId: z.ZodString;
5670
+ status: z.ZodEnum<{
5671
+ completed: "completed";
5672
+ running: "running";
5673
+ }>;
5674
+ lastWorkspaceId: z.ZodNullable<z.ZodString>;
5675
+ processedCount: z.ZodNumber;
5676
+ createdCount: z.ZodNumber;
5677
+ adoptedCount: z.ZodNumber;
5678
+ completedAt: z.ZodNullable<z.ZodString>;
5679
+ }, z.core.$strip>;
5680
+ createdAt: z.ZodString;
5681
+ }, z.core.$strip>;
5682
+ export type DocumentDefaultCollectionBackfillOperationAudit = z.infer<typeof DocumentDefaultCollectionBackfillOperationAudit>;
5683
+ export declare const DocumentDefaultCollectionBackfillReceiptAudit: z.ZodObject<{
5684
+ workspaceId: z.ZodString;
5685
+ baseId: z.ZodString;
5686
+ outcome: z.ZodEnum<{
5687
+ adopted: "adopted";
5688
+ created: "created";
5689
+ }>;
5690
+ createdAt: z.ZodString;
5691
+ }, z.core.$strip>;
5692
+ export type DocumentDefaultCollectionBackfillReceiptAudit = z.infer<typeof DocumentDefaultCollectionBackfillReceiptAudit>;
5693
+ export declare const ListDocumentMigrationAuditQuery: z.ZodObject<{
5694
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5695
+ cursor: z.ZodOptional<z.ZodString>;
5696
+ }, z.core.$strip>;
5697
+ export type ListDocumentMigrationAuditQuery = z.infer<typeof ListDocumentMigrationAuditQuery>;
5698
+ export declare const ListDocumentDefaultCollectionBackfillRunsResponse: z.ZodObject<{
5699
+ runs: z.ZodArray<z.ZodObject<{
5700
+ runId: z.ZodString;
5701
+ status: z.ZodEnum<{
5702
+ completed: "completed";
5703
+ running: "running";
5704
+ }>;
5705
+ lastWorkspaceId: z.ZodNullable<z.ZodString>;
5706
+ processedCount: z.ZodNumber;
5707
+ createdCount: z.ZodNumber;
5708
+ adoptedCount: z.ZodNumber;
5709
+ completedAt: z.ZodNullable<z.ZodString>;
5710
+ actorSubjectId: z.ZodString;
5711
+ startedAt: z.ZodString;
5712
+ updatedAt: z.ZodString;
5713
+ }, z.core.$strip>>;
5714
+ hasMore: z.ZodBoolean;
5715
+ nextCursor: z.ZodNullable<z.ZodString>;
5716
+ }, z.core.$strip>;
5717
+ export type ListDocumentDefaultCollectionBackfillRunsResponse = z.infer<typeof ListDocumentDefaultCollectionBackfillRunsResponse>;
5718
+ export declare const GetDocumentDefaultCollectionBackfillAuditQuery: z.ZodObject<{
5719
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5720
+ operationCursor: z.ZodOptional<z.ZodString>;
5721
+ receiptCursor: z.ZodOptional<z.ZodString>;
5722
+ }, z.core.$strip>;
5723
+ export type GetDocumentDefaultCollectionBackfillAuditQuery = z.infer<typeof GetDocumentDefaultCollectionBackfillAuditQuery>;
5724
+ export declare const DocumentDefaultCollectionBackfillAudit: z.ZodObject<{
5725
+ run: z.ZodObject<{
5726
+ runId: z.ZodString;
5727
+ status: z.ZodEnum<{
5728
+ completed: "completed";
5729
+ running: "running";
5730
+ }>;
5731
+ lastWorkspaceId: z.ZodNullable<z.ZodString>;
5732
+ processedCount: z.ZodNumber;
5733
+ createdCount: z.ZodNumber;
5734
+ adoptedCount: z.ZodNumber;
5735
+ completedAt: z.ZodNullable<z.ZodString>;
5736
+ actorSubjectId: z.ZodString;
5737
+ startedAt: z.ZodString;
5738
+ updatedAt: z.ZodString;
5739
+ }, z.core.$strip>;
5740
+ operations: z.ZodArray<z.ZodObject<{
5741
+ operationId: z.ZodString;
5742
+ result: z.ZodObject<{
5743
+ runId: z.ZodString;
5744
+ operationId: z.ZodString;
5745
+ status: z.ZodEnum<{
5746
+ completed: "completed";
5747
+ running: "running";
5748
+ }>;
5749
+ lastWorkspaceId: z.ZodNullable<z.ZodString>;
5750
+ processedCount: z.ZodNumber;
5751
+ createdCount: z.ZodNumber;
5752
+ adoptedCount: z.ZodNumber;
5753
+ completedAt: z.ZodNullable<z.ZodString>;
5754
+ }, z.core.$strip>;
5755
+ createdAt: z.ZodString;
5756
+ }, z.core.$strip>>;
5757
+ receipts: z.ZodArray<z.ZodObject<{
5758
+ workspaceId: z.ZodString;
5759
+ baseId: z.ZodString;
5760
+ outcome: z.ZodEnum<{
5761
+ adopted: "adopted";
5762
+ created: "created";
5763
+ }>;
5764
+ createdAt: z.ZodString;
5765
+ }, z.core.$strip>>;
5766
+ operationsHasMore: z.ZodBoolean;
5767
+ operationsNextCursor: z.ZodNullable<z.ZodString>;
5768
+ receiptsHasMore: z.ZodBoolean;
5769
+ receiptsNextCursor: z.ZodNullable<z.ZodString>;
5770
+ }, z.core.$strip>;
5771
+ export type DocumentDefaultCollectionBackfillAudit = z.infer<typeof DocumentDefaultCollectionBackfillAudit>;
5772
+ export declare const OrganizationDocumentAuthorityReclassification: z.ZodObject<{
5773
+ operationId: z.ZodString;
5774
+ documentId: z.ZodString;
5775
+ previousAuthority: z.ZodObject<{
5776
+ kind: z.ZodEnum<{
5777
+ organization: "organization";
5778
+ personal: "personal";
5779
+ workspace: "workspace";
5780
+ }>;
5781
+ workspaceId: z.ZodNullable<z.ZodString>;
5782
+ subjectId: z.ZodNullable<z.ZodString>;
5783
+ authorityId: z.ZodNullable<z.ZodString>;
5784
+ }, z.core.$strip>;
5785
+ authority: z.ZodObject<{
5786
+ kind: z.ZodEnum<{
5787
+ organization: "organization";
5788
+ personal: "personal";
5789
+ workspace: "workspace";
5790
+ }>;
5791
+ workspaceId: z.ZodNullable<z.ZodString>;
5792
+ subjectId: z.ZodNullable<z.ZodString>;
5793
+ authorityId: z.ZodNullable<z.ZodString>;
5794
+ }, z.core.$strip>;
5795
+ createdAt: z.ZodString;
5796
+ actorSubjectId: z.ZodString;
5797
+ requestWorkspaceId: z.ZodString;
5798
+ }, z.core.$strip>;
5799
+ export type OrganizationDocumentAuthorityReclassification = z.infer<typeof OrganizationDocumentAuthorityReclassification>;
5800
+ export declare const ListOrganizationDocumentAuthorityReclassificationsResponse: z.ZodObject<{
5801
+ receipts: z.ZodArray<z.ZodObject<{
5802
+ operationId: z.ZodString;
5803
+ documentId: z.ZodString;
5804
+ previousAuthority: z.ZodObject<{
5805
+ kind: z.ZodEnum<{
5806
+ organization: "organization";
5807
+ personal: "personal";
5808
+ workspace: "workspace";
5809
+ }>;
5810
+ workspaceId: z.ZodNullable<z.ZodString>;
5811
+ subjectId: z.ZodNullable<z.ZodString>;
5812
+ authorityId: z.ZodNullable<z.ZodString>;
5813
+ }, z.core.$strip>;
5814
+ authority: z.ZodObject<{
5815
+ kind: z.ZodEnum<{
5816
+ organization: "organization";
5817
+ personal: "personal";
5818
+ workspace: "workspace";
5819
+ }>;
5820
+ workspaceId: z.ZodNullable<z.ZodString>;
5821
+ subjectId: z.ZodNullable<z.ZodString>;
5822
+ authorityId: z.ZodNullable<z.ZodString>;
5823
+ }, z.core.$strip>;
5824
+ createdAt: z.ZodString;
5825
+ actorSubjectId: z.ZodString;
5826
+ requestWorkspaceId: z.ZodString;
5827
+ }, z.core.$strip>>;
5828
+ hasMore: z.ZodBoolean;
5829
+ nextCursor: z.ZodNullable<z.ZodString>;
5830
+ }, z.core.$strip>;
5831
+ export type ListOrganizationDocumentAuthorityReclassificationsResponse = z.infer<typeof ListOrganizationDocumentAuthorityReclassificationsResponse>;
5615
5832
  export declare const DocumentSearchRequest: z.ZodObject<{
5616
5833
  query: z.ZodString;
5617
5834
  baseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/dist/index.js CHANGED
@@ -431,6 +431,10 @@ import {
431
431
  DocumentCuration,
432
432
  DocumentCurationStatus,
433
433
  DocumentDefaultCollectionBackfill,
434
+ DocumentDefaultCollectionBackfillAudit,
435
+ DocumentDefaultCollectionBackfillOperationAudit,
436
+ DocumentDefaultCollectionBackfillReceiptAudit,
437
+ DocumentDefaultCollectionBackfillRunAudit,
434
438
  DocumentSearchMode,
435
439
  DocumentSearchRequest,
436
440
  DocumentSearchResponse,
@@ -513,6 +517,7 @@ import {
513
517
  GatewayRealtimeInitialItem,
514
518
  GenerateImageToolInput,
515
519
  GeneratedImageReceiptSchema,
520
+ GetDocumentDefaultCollectionBackfillAuditQuery,
516
521
  GetWorkspaceCaptureFileResponse,
517
522
  GetWorkspaceCaptureResponse,
518
523
  GitChangedPayload,
@@ -723,6 +728,8 @@ import {
723
728
  ListConnectionsResponse,
724
729
  ListDocumentAuthorityReclassificationsQuery,
725
730
  ListDocumentAuthorityReclassificationsResponse,
731
+ ListDocumentDefaultCollectionBackfillRunsResponse,
732
+ ListDocumentMigrationAuditQuery,
726
733
  ListEnrollmentsResponse,
727
734
  ListIndexedDocumentsRequest,
728
735
  ListIndexedDocumentsResponse,
@@ -730,6 +737,7 @@ import {
730
737
  ListInstalledSkillsResponse,
731
738
  ListIntegrationDefinitionsResponse,
732
739
  ListManagedOrganizationMembershipsResponse,
740
+ ListOrganizationDocumentAuthorityReclassificationsResponse,
733
741
  ListOrganizationInvitationsPageQuery,
734
742
  ListOrganizationInvitationsPageResponse,
735
743
  ListOrganizationInvitationsResponse,
@@ -837,6 +845,7 @@ import {
837
845
  OpenGeniSlackBotInstallRequest,
838
846
  OpenGeniSlackBotInstallStart,
839
847
  OrganizationAdministrationOverview,
848
+ OrganizationDocumentAuthorityReclassification,
840
849
  OrganizationInvitation,
841
850
  OrganizationInvitationStatus,
842
851
  OrganizationMember,
@@ -1178,6 +1187,8 @@ import {
1178
1187
  SkillImportSource,
1179
1188
  SkillInstallationSource,
1180
1189
  SkillUninstallPreview,
1190
+ SlackChannelRoute,
1191
+ SlackChannelRouteListResponse,
1181
1192
  SlackInstallationBinding,
1182
1193
  SlackInstallationBindingState,
1183
1194
  SlackPublicationChannel,
@@ -1336,6 +1347,7 @@ import {
1336
1347
  UpdateSessionVisibilityRequest,
1337
1348
  UpdateSessionVisibilityResponse,
1338
1349
  UpdateSiteAuthConnectionRequest,
1350
+ UpdateSlackChannelRoutesRequest,
1339
1351
  UpdateSlackTaskPolicyRequest,
1340
1352
  UpdateVariableSetRequest,
1341
1353
  UpdateWorkspaceEnvironmentRequest,
@@ -1643,7 +1655,7 @@ import {
1643
1655
  workspaceLearningPolicyRouterContext,
1644
1656
  workspaceLearningSourceKey,
1645
1657
  workspaceSlackReactionChannelAllowed
1646
- } from "./chunk-7ZZ3R27P.js";
1658
+ } from "./chunk-XW2RKNEU.js";
1647
1659
  import {
1648
1660
  OPENGENI_MANAGED_PUBLIC_BASE_URL,
1649
1661
  OPENGENI_SLACK_BOT_EVENTS,
@@ -2398,6 +2410,10 @@ export {
2398
2410
  DocumentCuration,
2399
2411
  DocumentCurationStatus,
2400
2412
  DocumentDefaultCollectionBackfill,
2413
+ DocumentDefaultCollectionBackfillAudit,
2414
+ DocumentDefaultCollectionBackfillOperationAudit,
2415
+ DocumentDefaultCollectionBackfillReceiptAudit,
2416
+ DocumentDefaultCollectionBackfillRunAudit,
2401
2417
  DocumentSearchMode,
2402
2418
  DocumentSearchRequest,
2403
2419
  DocumentSearchResponse,
@@ -2501,6 +2517,7 @@ export {
2501
2517
  GeneratedImageReceiptSchema,
2502
2518
  GeneratedVideoFacts,
2503
2519
  GeneratedVideoReceipt,
2520
+ GetDocumentDefaultCollectionBackfillAuditQuery,
2504
2521
  GetVideoGenerationCapabilitiesToolInput,
2505
2522
  GetWorkspaceCaptureFileResponse,
2506
2523
  GetWorkspaceCaptureResponse,
@@ -2713,6 +2730,8 @@ export {
2713
2730
  ListConnectionsResponse,
2714
2731
  ListDocumentAuthorityReclassificationsQuery,
2715
2732
  ListDocumentAuthorityReclassificationsResponse,
2733
+ ListDocumentDefaultCollectionBackfillRunsResponse,
2734
+ ListDocumentMigrationAuditQuery,
2716
2735
  ListEnrollmentsResponse,
2717
2736
  ListIndexedDocumentsRequest,
2718
2737
  ListIndexedDocumentsResponse,
@@ -2720,6 +2739,7 @@ export {
2720
2739
  ListInstalledSkillsResponse,
2721
2740
  ListIntegrationDefinitionsResponse,
2722
2741
  ListManagedOrganizationMembershipsResponse,
2742
+ ListOrganizationDocumentAuthorityReclassificationsResponse,
2723
2743
  ListOrganizationInvitationsPageQuery,
2724
2744
  ListOrganizationInvitationsPageResponse,
2725
2745
  ListOrganizationInvitationsResponse,
@@ -2841,6 +2861,7 @@ export {
2841
2861
  OpenGeniSlackBotInstallRequest,
2842
2862
  OpenGeniSlackBotInstallStart,
2843
2863
  OrganizationAdministrationOverview,
2864
+ OrganizationDocumentAuthorityReclassification,
2844
2865
  OrganizationInvitation,
2845
2866
  OrganizationInvitationStatus,
2846
2867
  OrganizationMember,
@@ -3232,6 +3253,8 @@ export {
3232
3253
  SkillImportSource,
3233
3254
  SkillInstallationSource,
3234
3255
  SkillUninstallPreview,
3256
+ SlackChannelRoute,
3257
+ SlackChannelRouteListResponse,
3235
3258
  SlackInstallationBinding,
3236
3259
  SlackInstallationBindingState,
3237
3260
  SlackPublicationChannel,
@@ -3390,6 +3413,7 @@ export {
3390
3413
  UpdateSessionVisibilityRequest,
3391
3414
  UpdateSessionVisibilityResponse,
3392
3415
  UpdateSiteAuthConnectionRequest,
3416
+ UpdateSlackChannelRoutesRequest,
3393
3417
  UpdateSlackTaskPolicyRequest,
3394
3418
  UpdateVariableSetRequest,
3395
3419
  UpdateVideoGenerationPolicyRequest,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-7ZZ3R27P.js";
3
+ } from "./chunk-XW2RKNEU.js";
4
4
  import "./chunk-MRWYRAS5.js";
5
5
  import "./chunk-JUFK3T4Q.js";
6
6
  import "./chunk-WYBDERIY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "2.2.0-canary.0",
3
+ "version": "2.3.0-canary.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -1998,6 +1998,43 @@ export const SlackReactionChannelListResponse = z.object({
1998
1998
  });
1999
1999
  export type SlackReactionChannelListResponse = z.infer<typeof SlackReactionChannelListResponse>;
2000
2000
 
2001
+ /** Where one Slack channel starts work. */
2002
+ export const SlackChannelRoute = z.object({
2003
+ slackChannelId: z.string().min(1).max(64),
2004
+ targetWorkspaceId: z.string().uuid(),
2005
+ // Unbounded like `Workspace.name` itself: a cap here would reject a row the
2006
+ // database happily holds.
2007
+ targetWorkspaceName: z.string().min(1).nullable(),
2008
+ source: z.enum(["picker", "admin"]),
2009
+ updatedAt: z.string(),
2010
+ });
2011
+ export type SlackChannelRoute = z.infer<typeof SlackChannelRoute>;
2012
+
2013
+ export const SlackChannelRouteListResponse = z.object({
2014
+ /** Every stored route. Bounded in practice by the channels the bot is in. */
2015
+ routes: z.array(SlackChannelRoute),
2016
+ /**
2017
+ * Whether routing is switched on for this deployment. With it off the stored
2018
+ * routes are inert, so the surface says so instead of implying they apply.
2019
+ */
2020
+ routingEnabled: z.boolean(),
2021
+ });
2022
+ export type SlackChannelRouteListResponse = z.infer<typeof SlackChannelRouteListResponse>;
2023
+
2024
+ export const UpdateSlackChannelRoutesRequest = z.object({
2025
+ connectionId: z.string().uuid(),
2026
+ routes: z
2027
+ .array(
2028
+ z.object({
2029
+ slackChannelId: z.string().min(1).max(64),
2030
+ /** Null clears the route, so the channel asks once again. */
2031
+ targetWorkspaceId: z.string().uuid().nullable(),
2032
+ }),
2033
+ )
2034
+ .max(200),
2035
+ });
2036
+ export type UpdateSlackChannelRoutesRequest = z.infer<typeof UpdateSlackChannelRoutesRequest>;
2037
+
2001
2038
  export const DEFAULT_WORKSPACE_SLACK_REACTION_SUMMON_SETTINGS = {
2002
2039
  enabled: false,
2003
2040
  emoji: "genie",
@@ -4914,6 +4951,107 @@ export const DocumentDefaultCollectionBackfill = z.object({
4914
4951
  });
4915
4952
  export type DocumentDefaultCollectionBackfill = z.infer<typeof DocumentDefaultCollectionBackfill>;
4916
4953
 
4954
+ export const DocumentDefaultCollectionBackfillRunAudit = DocumentDefaultCollectionBackfill.omit({
4955
+ operationId: true,
4956
+ }).extend({
4957
+ actorSubjectId: z.string().min(1),
4958
+ startedAt: z.string().datetime({ offset: true }),
4959
+ updatedAt: z.string().datetime({ offset: true }),
4960
+ });
4961
+ export type DocumentDefaultCollectionBackfillRunAudit = z.infer<
4962
+ typeof DocumentDefaultCollectionBackfillRunAudit
4963
+ >;
4964
+
4965
+ export const DocumentDefaultCollectionBackfillOperationAudit = z.object({
4966
+ operationId: z.string().uuid(),
4967
+ result: DocumentDefaultCollectionBackfill,
4968
+ createdAt: z.string().datetime({ offset: true }),
4969
+ });
4970
+ export type DocumentDefaultCollectionBackfillOperationAudit = z.infer<
4971
+ typeof DocumentDefaultCollectionBackfillOperationAudit
4972
+ >;
4973
+
4974
+ export const DocumentDefaultCollectionBackfillReceiptAudit = z.object({
4975
+ workspaceId: z.string().uuid(),
4976
+ baseId: z.string().uuid(),
4977
+ outcome: z.enum(["created", "adopted"]),
4978
+ createdAt: z.string().datetime({ offset: true }),
4979
+ });
4980
+ export type DocumentDefaultCollectionBackfillReceiptAudit = z.infer<
4981
+ typeof DocumentDefaultCollectionBackfillReceiptAudit
4982
+ >;
4983
+
4984
+ export const ListDocumentMigrationAuditQuery = ListDocumentAuthorityReclassificationsQuery;
4985
+ export type ListDocumentMigrationAuditQuery = z.infer<typeof ListDocumentMigrationAuditQuery>;
4986
+
4987
+ export const ListDocumentDefaultCollectionBackfillRunsResponse = z.object({
4988
+ runs: z.array(DocumentDefaultCollectionBackfillRunAudit),
4989
+ hasMore: z.boolean(),
4990
+ nextCursor: z.string().max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS).nullable(),
4991
+ });
4992
+ export type ListDocumentDefaultCollectionBackfillRunsResponse = z.infer<
4993
+ typeof ListDocumentDefaultCollectionBackfillRunsResponse
4994
+ >;
4995
+
4996
+ export const GetDocumentDefaultCollectionBackfillAuditQuery = z.object({
4997
+ limit: z.coerce
4998
+ .number()
4999
+ .int()
5000
+ .positive()
5001
+ .max(DOCUMENT_AUTHORITY_RECLASSIFICATION_LIST_MAX_LIMIT)
5002
+ .default(DOCUMENT_AUTHORITY_RECLASSIFICATION_LIST_DEFAULT_LIMIT),
5003
+ operationCursor: z
5004
+ .string()
5005
+ .min(1)
5006
+ .max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS)
5007
+ .optional(),
5008
+ receiptCursor: z
5009
+ .string()
5010
+ .min(1)
5011
+ .max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS)
5012
+ .optional(),
5013
+ });
5014
+ export type GetDocumentDefaultCollectionBackfillAuditQuery = z.infer<
5015
+ typeof GetDocumentDefaultCollectionBackfillAuditQuery
5016
+ >;
5017
+
5018
+ export const DocumentDefaultCollectionBackfillAudit = z.object({
5019
+ run: DocumentDefaultCollectionBackfillRunAudit,
5020
+ operations: z.array(DocumentDefaultCollectionBackfillOperationAudit),
5021
+ receipts: z.array(DocumentDefaultCollectionBackfillReceiptAudit),
5022
+ operationsHasMore: z.boolean(),
5023
+ operationsNextCursor: z
5024
+ .string()
5025
+ .max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS)
5026
+ .nullable(),
5027
+ receiptsHasMore: z.boolean(),
5028
+ receiptsNextCursor: z
5029
+ .string()
5030
+ .max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS)
5031
+ .nullable(),
5032
+ });
5033
+ export type DocumentDefaultCollectionBackfillAudit = z.infer<
5034
+ typeof DocumentDefaultCollectionBackfillAudit
5035
+ >;
5036
+
5037
+ export const OrganizationDocumentAuthorityReclassification =
5038
+ DocumentAuthorityReclassification.extend({
5039
+ actorSubjectId: z.string().min(1),
5040
+ requestWorkspaceId: z.string().uuid(),
5041
+ });
5042
+ export type OrganizationDocumentAuthorityReclassification = z.infer<
5043
+ typeof OrganizationDocumentAuthorityReclassification
5044
+ >;
5045
+
5046
+ export const ListOrganizationDocumentAuthorityReclassificationsResponse = z.object({
5047
+ receipts: z.array(OrganizationDocumentAuthorityReclassification),
5048
+ hasMore: z.boolean(),
5049
+ nextCursor: z.string().max(DOCUMENT_AUTHORITY_RECLASSIFICATION_CURSOR_MAX_CHARS).nullable(),
5050
+ });
5051
+ export type ListOrganizationDocumentAuthorityReclassificationsResponse = z.infer<
5052
+ typeof ListOrganizationDocumentAuthorityReclassificationsResponse
5053
+ >;
5054
+
4917
5055
  export const DocumentSearchRequest = z.object({
4918
5056
  query: z.string().min(1),
4919
5057
  baseIds: z.array(z.string().uuid()).optional(),