@opengeni/sdk 0.40.0 → 0.42.1

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/src/types.ts CHANGED
@@ -642,6 +642,16 @@ export type OpenGeniSlackBotInstallStart = {
642
642
  };
643
643
 
644
644
  export type GoogleDriveTargetScope = "user" | "workspace" | "organization";
645
+ export type ConnectorDocumentDestinationAuthority = "organization" | "workspace" | "personal";
646
+ export type ConnectorDocumentDestinationSelection = {
647
+ authorityKind: ConnectorDocumentDestinationAuthority;
648
+ collectionId: string | null;
649
+ };
650
+ export type ConnectorDocumentDestination = ConnectorDocumentDestinationSelection & {
651
+ authorityAccountId: string;
652
+ authorityWorkspaceId: string | null;
653
+ authoritySubjectId: string | null;
654
+ };
645
655
  export type GoogleDriveSyncCadence = "manual" | "hourly" | "daily";
646
656
  export type GoogleDriveReadPolicy = "allow" | "ask" | "block";
647
657
  export type GoogleDriveConnectionLifecycleState =
@@ -666,7 +676,9 @@ export type GoogleDriveSelectedSource = {
666
676
  name: string;
667
677
  mimeType: string;
668
678
  driveId: string | null;
669
- targetScope: GoogleDriveTargetScope;
679
+ destination?: ConnectorDocumentDestination | undefined;
680
+ /** @deprecated Missing destinations resolve to the current workspace boundary. */
681
+ targetScope?: GoogleDriveTargetScope | undefined;
670
682
  syncCadence: GoogleDriveSyncCadence;
671
683
  readPolicy: GoogleDriveReadPolicy;
672
684
  selectedAt: string;
@@ -681,6 +693,7 @@ export type GoogleDriveConnectionMetadata = {
681
693
  verifiedAt: string;
682
694
  accessMode: "metadata_readonly" | "readonly";
683
695
  lifecycle?: GoogleDriveConnectionLifecycle | undefined;
696
+ documentDestination?: ConnectorDocumentDestination | undefined;
684
697
  selectedSources?: GoogleDriveSelectedSource[] | undefined;
685
698
  /** @deprecated Read selectedSources; retained while existing connections migrate. */
686
699
  selectedSource?: GoogleDriveSelectedSource | null | undefined;
@@ -728,7 +741,9 @@ export type GoogleDriveBrowseResponse = {
728
741
 
729
742
  export type SaveGoogleDriveSourceRequest = {
730
743
  sources: Array<Pick<GoogleDriveBrowseItem, "id" | "name" | "mimeType" | "driveId">>;
731
- targetScope: GoogleDriveTargetScope;
744
+ destination?: ConnectorDocumentDestinationSelection | undefined;
745
+ /** @deprecated Legacy requests resolve to workspace authority. */
746
+ targetScope?: GoogleDriveTargetScope | undefined;
732
747
  syncCadence: GoogleDriveSyncCadence;
733
748
  readPolicy: GoogleDriveReadPolicy;
734
749
  };
@@ -1,3 +1,5 @@
1
+ export const WORKSPACE_INSTRUCTION_POLICY_CONTENT_MAX_CHARS = 262_144;
2
+
1
3
  export type WorkspaceInstructionPolicyKind = "charter" | "policy";
2
4
  export type WorkspaceInstructionPolicyScope = "global" | "role";
3
5
  export type WorkspaceInstructionPolicyProvenanceSource =
@@ -135,3 +137,63 @@ export type WorkspaceInstructionPolicyOperationReuseResponse = {
135
137
  code: "WORKSPACE_INSTRUCTION_POLICY_OPERATION_REUSED";
136
138
  message: string;
137
139
  };
140
+
141
+ export type WorkspaceInstructionPolicyOnboardingProposalSource = {
142
+ id: string;
143
+ version: string;
144
+ confidenceBps: number;
145
+ };
146
+
147
+ export type CreateWorkspaceInstructionPolicyOnboardingProposalRequest =
148
+ WorkspaceInstructionPolicyTarget & {
149
+ operationId?: string;
150
+ content: string;
151
+ sourceId: string;
152
+ sourceVersion: string;
153
+ confidenceBps: number;
154
+ expectedCurrentRevisionId: string | null;
155
+ expectedActivationVersion: number;
156
+ };
157
+
158
+ export type WorkspaceInstructionPolicyOnboardingProposal = WorkspaceInstructionPolicyTarget & {
159
+ id: string;
160
+ operationId: string;
161
+ accountId: string;
162
+ workspaceId: string;
163
+ source: WorkspaceInstructionPolicyOnboardingProposalSource;
164
+ baseline: WorkspaceInstructionPolicyHead | null;
165
+ draft: WorkspaceInstructionPolicyRevision;
166
+ status: "proposed";
167
+ createdBySubjectId: string;
168
+ createdAt: string;
169
+ };
170
+
171
+ export type WorkspaceInstructionPolicyOnboardingProposalListOptions = {
172
+ limit?: number;
173
+ };
174
+
175
+ export type WorkspaceInstructionPolicyOnboardingProposalListResponse = {
176
+ proposals: WorkspaceInstructionPolicyOnboardingProposal[];
177
+ truncated: boolean;
178
+ };
179
+
180
+ export type WorkspaceInstructionPolicyOnboardingProposalContentErrorResponse = {
181
+ code:
182
+ | "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_EMPTY"
183
+ | "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_OVERSIZED";
184
+ message: string;
185
+ maxChars: number;
186
+ };
187
+
188
+ export type WorkspaceInstructionPolicyOnboardingProposalStaleResponse = {
189
+ code: "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_STALE";
190
+ message: string;
191
+ currentHead: WorkspaceInstructionPolicyHead | null;
192
+ };
193
+
194
+ export type WorkspaceInstructionPolicyOnboardingProposalConflictResponse = {
195
+ code: "WORKSPACE_INSTRUCTION_POLICY_ONBOARDING_PROPOSAL_CONFLICT";
196
+ message: string;
197
+ existingProposalId: string;
198
+ existingDraftRevisionId: string;
199
+ };