Skip to content

Commit

Permalink
Regenerate foundry platform SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantpark04 committed Jul 23, 2024
1 parent 69cdca3 commit b6941db
Show file tree
Hide file tree
Showing 44 changed files with 2,095 additions and 866 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { client } from "./client.js";
import { logger } from "./logger.js";

export async function runFoundryPlatformApiTest() {
const myUser = await Foundry.Security.Users.getCurrentUser(
const myUser = await Foundry.Admin.Users.getCurrentUser(
client,
{ preview: true },
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@osdk/foundry.security",
"version": "1.1.0-beta.2",
"name": "@osdk/foundry.admin",
"version": "0.0.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,6 +30,11 @@
"@osdk/shared.client": "workspace:~",
"@osdk/shared.net.platformapi": "workspace:~"
},
"peerDependencies": {
"@osdk/api": "workspace:~",
"@osdk/client": "workspace:~",
"@osdk/shared.net": "workspace:~"
},
"devDependencies": {
"@osdk/monorepo.api-extractor": "workspace:~",
"@osdk/monorepo.tsconfig": "workspace:~",
Expand All @@ -48,13 +53,12 @@
"templates",
"*.d.ts"
],
"main": "./build/js/index.cjs",
"module": "./build/esm/index.js",
"types": "./build/esm/index.d.ts",
"sls": {
"dependencies": {
"com.palantir.foundry.api:api-gateway": {
"minVersion": "1.866.0",
"minVersion": "1.891.0",
"maxVersion": "1.x.x"
}
}
Expand Down
239 changes: 239 additions & 0 deletions packages/foundry.admin/src/_components.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
/*
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type {
OrganizationRid,
PageSize,
PageToken,
PrincipalId,
PrincipalType,
Realm,
} from "@osdk/foundry.core";

export type LooselyBrandedString<T extends string> = string & {
__LOOSE_BRAND?: T;
};

/**
* Log Safety: SAFE
*/
export interface AddGroupMembersRequest {
principalIds: Array<PrincipalId>;
expiration?: GroupMembershipExpiration;
}

/**
* Log Safety: UNSAFE
*/
export type AttributeName = LooselyBrandedString<"AttributeName">;

/**
* Log Safety: UNSAFE
*/
export type AttributeValue = LooselyBrandedString<"AttributeValue">;

/**
* Log Safety: UNSAFE
*/
export type AttributeValues = Array<AttributeValue>;

/**
* Log Safety: UNSAFE
*/
export interface CreateGroupRequest {
name: GroupName;
organizations: Array<OrganizationRid>;
description?: string;
attributes: Record<AttributeName, AttributeValues>;
}

/**
* Log Safety: SAFE
*/
export interface GetGroupsBatchRequestElement {
groupId: PrincipalId;
}

/**
* Log Safety: UNSAFE
*/
export interface GetGroupsBatchResponse {
data: Record<PrincipalId, Group>;
}

/**
* Log Safety: SAFE
*/
export interface GetUsersBatchRequestElement {
userId: PrincipalId;
}

/**
* Log Safety: UNSAFE
*/
export interface GetUsersBatchResponse {
data: Record<PrincipalId, User>;
}

/**
* Log Safety: UNSAFE
*/
export interface Group {
id: PrincipalId;
name: GroupName;
description?: string;
realm: Realm;
organizations: Array<OrganizationRid>;
attributes: Record<AttributeName, AttributeValues>;
}

/**
* Log Safety: SAFE
*/
export interface GroupMember {
principalType: PrincipalType;
principalId: PrincipalId;
}

/**
* Log Safety: SAFE
*/
export interface GroupMembership {
groupId: PrincipalId;
}

/**
* Log Safety: SAFE
*/
export type GroupMembershipExpiration = string;

/**
* Log Safety: UNSAFE
*/
export type GroupName = LooselyBrandedString<"GroupName">;

/**
* Log Safety: UNSAFE
*/
export interface GroupSearchFilter {
type: PrincipalFilterType;
value: string;
}

/**
* Log Safety: UNSAFE
*/
export interface ListGroupMembersResponse {
data: Array<GroupMember>;
nextPageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface ListGroupMembershipsResponse {
data: Array<GroupMembership>;
nextPageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface ListGroupsResponse {
data: Array<Group>;
nextPageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface ListUsersResponse {
data: Array<User>;
nextPageToken?: PageToken;
}

/**
* Log Safety: SAFE
*/
export type PrincipalFilterType = "queryString";

/**
* Log Safety: SAFE
*/
export interface RemoveGroupMembersRequest {
principalIds: Array<PrincipalId>;
}

/**
* Log Safety: UNSAFE
*/
export interface SearchGroupsRequest {
where: GroupSearchFilter;
pageSize?: PageSize;
pageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface SearchGroupsResponse {
data: Array<Group>;
nextPageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface SearchUsersRequest {
where: UserSearchFilter;
pageSize?: PageSize;
pageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface SearchUsersResponse {
data: Array<User>;
nextPageToken?: PageToken;
}

/**
* Log Safety: UNSAFE
*/
export interface User {
id: PrincipalId;
username: UserUsername;
givenName?: string;
familyName?: string;
email?: string;
realm: Realm;
organization?: OrganizationRid;
attributes: Record<AttributeName, AttributeValues>;
}

/**
* Log Safety: UNSAFE
*/
export interface UserSearchFilter {
type: PrincipalFilterType;
value: string;
}

/**
* Log Safety: UNSAFE
*/
export type UserUsername = LooselyBrandedString<"UserUsername">;
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,33 @@

export type {
AddGroupMembersRequest,
AttributeName,
AttributeValue,
AttributeValues,
CreateGroupRequest,
GetGroupsBatchRequestElement,
GetGroupsBatchResponse,
GetUsersBatchRequestElement,
GetUsersBatchResponse,
Group,
GroupMember,
GroupMembership,
GroupMembershipExpiration,
GroupName,
GroupSearchFilter,
ListGroupMembershipsResponse,
ListGroupMembersResponse,
ListGroupsResponse,
ListUsersResponse,
PrincipalFilterType,
RemoveGroupMembersRequest,
SearchGroupsRequest,
SearchGroupsResponse,
SearchUsersRequest,
SearchUsersResponse,
User,
UserSearchFilter,
UserUsername,
} from "./_components.js";
export * as Groups from "./public/Group.js";
export * as GroupMembers from "./public/GroupMember.js";
Expand Down
Loading

0 comments on commit b6941db

Please sign in to comment.