@opengeni/contracts 0.38.1 → 0.38.2

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,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-XRNQOQ2K.js";
3
+ } from "./chunk-Y7UWTT3T.js";
4
4
  import {
5
5
  ConnectorDocumentDestination,
6
6
  ConnectorDocumentDestinationSelection
package/dist/index.d.ts CHANGED
@@ -2473,6 +2473,10 @@ export declare const McpPersonalConnectionDelegation: z.ZodObject<{
2473
2473
  delegated: "delegated";
2474
2474
  oauth2: "oauth2";
2475
2475
  }>>;
2476
+ connectionType: z.ZodOptional<z.ZodEnum<{
2477
+ mcp: "mcp";
2478
+ social: "social";
2479
+ }>>;
2476
2480
  }, z.core.$strict>;
2477
2481
  export type McpPersonalConnectionDelegation = z.infer<typeof McpPersonalConnectionDelegation>;
2478
2482
  /**
@@ -2491,6 +2495,10 @@ export declare const McpPersonalConnectionDelegations: z.ZodArray<z.ZodObject<{
2491
2495
  delegated: "delegated";
2492
2496
  oauth2: "oauth2";
2493
2497
  }>>;
2498
+ connectionType: z.ZodOptional<z.ZodEnum<{
2499
+ mcp: "mcp";
2500
+ social: "social";
2501
+ }>>;
2494
2502
  }, z.core.$strict>>;
2495
2503
  export declare const McpPersonalConnectionSummary: z.ZodObject<{
2496
2504
  serverId: z.ZodString;
@@ -7240,6 +7248,11 @@ export declare const SocialConnectionStatus: z.ZodEnum<{
7240
7248
  needs_reauth: "needs_reauth";
7241
7249
  }>;
7242
7250
  export type SocialConnectionStatus = z.infer<typeof SocialConnectionStatus>;
7251
+ export declare const ConnectionOwnership: z.ZodEnum<{
7252
+ personal: "personal";
7253
+ workspace: "workspace";
7254
+ }>;
7255
+ export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
7243
7256
  export declare const SocialConnection: z.ZodObject<{
7244
7257
  id: z.ZodString;
7245
7258
  accountId: z.ZodString;
@@ -7257,6 +7270,10 @@ export declare const SocialConnection: z.ZodObject<{
7257
7270
  accountHandle: z.ZodString;
7258
7271
  accountName: z.ZodNullable<z.ZodString>;
7259
7272
  externalAccountId: z.ZodNullable<z.ZodString>;
7273
+ ownership: z.ZodEnum<{
7274
+ personal: "personal";
7275
+ workspace: "workspace";
7276
+ }>;
7260
7277
  status: z.ZodEnum<{
7261
7278
  connected: "connected";
7262
7279
  disabled: "disabled";
@@ -7341,6 +7358,10 @@ export declare const SocialOAuthStartRequest: z.ZodObject<{
7341
7358
  reddit: "reddit";
7342
7359
  x: "x";
7343
7360
  }>;
7361
+ ownership: z.ZodDefault<z.ZodEnum<{
7362
+ personal: "personal";
7363
+ workspace: "workspace";
7364
+ }>>;
7344
7365
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
7345
7366
  returnPath: z.ZodOptional<z.ZodString>;
7346
7367
  }, z.core.$strip>;
@@ -7418,11 +7439,6 @@ export declare function comparePersonalSlackCanonicalConnections(left: PersonalS
7418
7439
  export declare function selectCanonicalPersonalSlackConnection<T extends PersonalSlackCanonicalConnection>(connections: readonly T[]): T | null;
7419
7440
  export declare const ConnectionCredentialBundle: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7420
7441
  export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
7421
- export declare const ConnectionOwnership: z.ZodEnum<{
7422
- personal: "personal";
7423
- workspace: "workspace";
7424
- }>;
7425
- export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
7426
7442
  export declare const CreateConnectionRequest: z.ZodObject<{
7427
7443
  providerDomain: z.ZodString;
7428
7444
  kind: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -765,7 +765,7 @@ import {
765
765
  verifyStreamToken,
766
766
  workspaceControlUtf8Bytes,
767
767
  workspaceSlackReactionChannelAllowed
768
- } from "./chunk-XRNQOQ2K.js";
768
+ } from "./chunk-Y7UWTT3T.js";
769
769
  import {
770
770
  ConnectorDocumentDestination,
771
771
  ConnectorDocumentDestinationAuthority,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.38.1",
3
+ "version": "0.38.2",
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
@@ -2650,6 +2650,7 @@ export const McpPersonalConnectionDelegation = z
2650
2650
  ownerSubjectId: z.string().min(1).max(512),
2651
2651
  providerDomain: z.string().min(1).max(2048),
2652
2652
  kind: z.enum(["oauth2", "api_key", "app_install", "delegated"]).optional(),
2653
+ connectionType: z.enum(["mcp", "social"]).optional(),
2653
2654
  })
2654
2655
  .strict();
2655
2656
  export type McpPersonalConnectionDelegation = z.infer<typeof McpPersonalConnectionDelegation>;
@@ -5687,6 +5688,9 @@ export type SocialProvider = z.infer<typeof SocialProvider>;
5687
5688
  export const SocialConnectionStatus = z.enum(["connected", "needs_reauth", "disabled"]);
5688
5689
  export type SocialConnectionStatus = z.infer<typeof SocialConnectionStatus>;
5689
5690
 
5691
+ export const ConnectionOwnership = z.enum(["workspace", "personal"]);
5692
+ export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
5693
+
5690
5694
  export const SocialConnection = z.object({
5691
5695
  id: z.string().uuid(),
5692
5696
  accountId: z.string().uuid(),
@@ -5695,6 +5699,7 @@ export const SocialConnection = z.object({
5695
5699
  accountHandle: z.string().min(1),
5696
5700
  accountName: z.string().nullable(),
5697
5701
  externalAccountId: z.string().nullable(),
5702
+ ownership: ConnectionOwnership,
5698
5703
  status: SocialConnectionStatus,
5699
5704
  scopes: z.array(z.string()),
5700
5705
  credentialRef: z.string().nullable(),
@@ -5755,6 +5760,7 @@ export type SocialOAuthProviderId = z.infer<typeof SocialOAuthProviderId>;
5755
5760
 
5756
5761
  export const SocialOAuthStartRequest = z.object({
5757
5762
  provider: SocialOAuthProviderId,
5763
+ ownership: ConnectionOwnership.default("workspace"),
5758
5764
  scopes: z.array(z.string().min(1)).optional(),
5759
5765
  returnPath: z.string().optional(),
5760
5766
  });
@@ -5876,9 +5882,6 @@ function compareDescending(left: number | string, right: number | string): numbe
5876
5882
  export const ConnectionCredentialBundle = z.record(z.string(), z.unknown());
5877
5883
  export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
5878
5884
 
5879
- export const ConnectionOwnership = z.enum(["workspace", "personal"]);
5880
- export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
5881
-
5882
5885
  export const CreateConnectionRequest = z.object({
5883
5886
  providerDomain: z.string().min(1),
5884
5887
  kind: ConnectionKind,