From 412b33742c6087ff5e5638fcfddea51a1c23016d Mon Sep 17 00:00:00 2001 From: sam-codaio <102985674+sam-codaio@users.noreply.github.com> Date: Thu, 23 May 2024 11:00:33 -0400 Subject: [PATCH] Add Domain Principal (#2962) --- dist/bundle.d.ts | 15 +++++++++++++-- dist/schema.d.ts | 15 +++++++++++++-- dist/schema.js | 1 + package.json | 2 +- schema.ts | 14 +++++++++++++- 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/dist/bundle.d.ts b/dist/bundle.d.ts index d813e5e824..19dcd1bfc0 100644 --- a/dist/bundle.d.ts +++ b/dist/bundle.d.ts @@ -1941,7 +1941,8 @@ export interface ObjectSchemaDefinition exte declare enum PrincipalType { User = "user", Group = "group", - Anyone = "anyone" + Anyone = "anyone", + Domain = "domain" } /** * This represents a principal that is a single user. @@ -1963,6 +1964,16 @@ export interface GroupPrincipal { type: PrincipalType.Group; groupId: string | number; } +/** + * This represents a principal that is anyone in that domain + * + * TODO(sam): Unhide this + * @hidden + */ +export interface DomainPrincipal { + type: PrincipalType.Domain; + domain: string; +} /** * This represents a principal corresponding to anyone * @@ -1980,7 +1991,7 @@ export interface AnyonePrincipal { * TODO(sam): Unhide this * @hidden */ -export type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal; +export type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal | DomainPrincipal; /** * This represents the definition of a permission in the external system. * diff --git a/dist/schema.d.ts b/dist/schema.d.ts index 6c65bf5e59..8773d893e6 100644 --- a/dist/schema.d.ts +++ b/dist/schema.d.ts @@ -1105,7 +1105,8 @@ export interface ObjectSchemaDefinition exte export declare enum PrincipalType { User = "user", Group = "group", - Anyone = "anyone" + Anyone = "anyone", + Domain = "domain" } /** * This represents a principal that is a single user. @@ -1127,6 +1128,16 @@ export interface GroupPrincipal { type: PrincipalType.Group; groupId: string | number; } +/** + * This represents a principal that is anyone in that domain + * + * TODO(sam): Unhide this + * @hidden + */ +export interface DomainPrincipal { + type: PrincipalType.Domain; + domain: string; +} /** * This represents a principal corresponding to anyone * @@ -1144,7 +1155,7 @@ export interface AnyonePrincipal { * TODO(sam): Unhide this * @hidden */ -type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal; +type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal | DomainPrincipal; /** * This represents the definition of a permission in the external system. * diff --git a/dist/schema.js b/dist/schema.js index 227add9c4a..6334887736 100644 --- a/dist/schema.js +++ b/dist/schema.js @@ -387,6 +387,7 @@ var PrincipalType; PrincipalType["User"] = "user"; PrincipalType["Group"] = "group"; PrincipalType["Anyone"] = "anyone"; + PrincipalType["Domain"] = "domain"; })(PrincipalType || (exports.PrincipalType = PrincipalType = {})); /** * The type of content in this attribution node. diff --git a/package.json b/package.json index 920daea59d..44cb4d57b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codahq/packs-sdk", - "version": "1.7.7", + "version": "1.7.7-prerelease.1", "license": "MIT", "workspaces": [ "dev/eslint" diff --git a/schema.ts b/schema.ts index 85c50372d2..5bc4be2ae4 100644 --- a/schema.ts +++ b/schema.ts @@ -1269,6 +1269,7 @@ export enum PrincipalType { User = 'user', Group = 'group', Anyone = 'anyone', + Domain = 'domain', } /** @@ -1293,6 +1294,17 @@ export interface GroupPrincipal { groupId: string | number; } +/** + * This represents a principal that is anyone in that domain + * + * TODO(sam): Unhide this + * @hidden + */ +export interface DomainPrincipal { + type: PrincipalType.Domain; + domain: string; +} + /** * This represents a principal corresponding to anyone * @@ -1311,7 +1323,7 @@ export interface AnyonePrincipal { * TODO(sam): Unhide this * @hidden */ -type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal; +type Principal = UserPrincipal | GroupPrincipal | AnyonePrincipal | DomainPrincipal; /** * This represents the definition of a permission in the external system.