@credal/sdk 0.1.2 → 0.1.5

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.
Files changed (121) hide show
  1. package/dist/cjs/Client.d.ts +0 -3
  2. package/dist/cjs/Client.js +6 -11
  3. package/dist/cjs/api/resources/{permissionsService/types/Group.d.ts → common/types/CustomMetadataValue.d.ts} +1 -4
  4. package/dist/cjs/api/resources/common/types/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/common/types/index.js +1 -0
  6. package/dist/cjs/api/resources/copilots/client/Client.js +36 -27
  7. package/dist/cjs/api/resources/documentCatalog/client/Client.js +12 -9
  8. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +5 -2
  9. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
  10. package/dist/cjs/api/resources/documentCollections/client/Client.js +28 -21
  11. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +1 -3
  12. package/dist/cjs/api/resources/index.d.ts +0 -3
  13. package/dist/cjs/api/resources/index.js +1 -4
  14. package/dist/cjs/api/resources/search/client/Client.js +4 -3
  15. package/dist/cjs/api/resources/users/client/Client.js +4 -3
  16. package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +1 -1
  17. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  18. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  19. package/dist/cjs/{api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.js → core/auth/AuthRequest.js} +0 -3
  20. package/dist/cjs/core/auth/index.d.ts +2 -0
  21. package/dist/cjs/core/fetcher/Fetcher.js +2 -2
  22. package/dist/cjs/core/fetcher/index.d.ts +5 -5
  23. package/dist/cjs/core/fetcher/index.js +5 -5
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/Client.d.mts +0 -3
  27. package/dist/esm/Client.mjs +2 -7
  28. package/dist/esm/api/resources/{permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.mjs → common/types/CustomMetadataValue.d.mts} +1 -1
  29. package/dist/esm/api/resources/common/types/index.d.mts +1 -0
  30. package/dist/esm/api/resources/common/types/index.mjs +1 -0
  31. package/dist/esm/api/resources/copilots/client/Client.mjs +36 -27
  32. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +12 -9
  33. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +5 -2
  34. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
  35. package/dist/esm/api/resources/documentCollections/client/Client.mjs +28 -21
  36. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +1 -3
  37. package/dist/esm/api/resources/index.d.mts +0 -3
  38. package/dist/esm/api/resources/index.mjs +0 -3
  39. package/dist/esm/api/resources/search/client/Client.mjs +4 -3
  40. package/dist/esm/api/resources/users/client/Client.mjs +4 -3
  41. package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +1 -1
  42. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  43. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  44. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  45. package/dist/esm/core/auth/index.d.mts +2 -0
  46. package/dist/esm/core/fetcher/Fetcher.mjs +2 -2
  47. package/dist/esm/core/fetcher/index.d.mts +5 -5
  48. package/dist/esm/core/fetcher/index.mjs +2 -2
  49. package/dist/esm/version.d.mts +1 -1
  50. package/dist/esm/version.mjs +1 -1
  51. package/package.json +1 -1
  52. package/reference.md +0 -213
  53. package/dist/cjs/api/resources/permissionsService/client/Client.d.ts +0 -86
  54. package/dist/cjs/api/resources/permissionsService/client/Client.js +0 -257
  55. package/dist/cjs/api/resources/permissionsService/client/index.d.ts +0 -2
  56. package/dist/cjs/api/resources/permissionsService/client/index.js +0 -17
  57. package/dist/cjs/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +0 -26
  58. package/dist/cjs/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +0 -23
  59. package/dist/cjs/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.ts +0 -20
  60. package/dist/cjs/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.js +0 -5
  61. package/dist/cjs/api/resources/permissionsService/client/requests/index.d.ts +0 -3
  62. package/dist/cjs/api/resources/permissionsService/index.d.ts +0 -2
  63. package/dist/cjs/api/resources/permissionsService/index.js +0 -18
  64. package/dist/cjs/api/resources/permissionsService/types/Action.d.ts +0 -7
  65. package/dist/cjs/api/resources/permissionsService/types/Action.js +0 -9
  66. package/dist/cjs/api/resources/permissionsService/types/AuthorizedResource.d.ts +0 -8
  67. package/dist/cjs/api/resources/permissionsService/types/AuthorizedResource.js +0 -5
  68. package/dist/cjs/api/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +0 -5
  69. package/dist/cjs/api/resources/permissionsService/types/AuthorizedResourceListPage.js +0 -5
  70. package/dist/cjs/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.ts +0 -5
  71. package/dist/cjs/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.js +0 -5
  72. package/dist/cjs/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.d.ts +0 -6
  73. package/dist/cjs/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.js +0 -5
  74. package/dist/cjs/api/resources/permissionsService/types/Group.js +0 -5
  75. package/dist/cjs/api/resources/permissionsService/types/Principal.d.ts +0 -13
  76. package/dist/cjs/api/resources/permissionsService/types/Principal.js +0 -5
  77. package/dist/cjs/api/resources/permissionsService/types/PrincipalListPage.d.ts +0 -8
  78. package/dist/cjs/api/resources/permissionsService/types/PrincipalListPage.js +0 -5
  79. package/dist/cjs/api/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +0 -9
  80. package/dist/cjs/api/resources/permissionsService/types/ResourceAuthorizationResult.js +0 -5
  81. package/dist/cjs/api/resources/permissionsService/types/User.d.ts +0 -8
  82. package/dist/cjs/api/resources/permissionsService/types/User.js +0 -5
  83. package/dist/cjs/api/resources/permissionsService/types/index.d.ts +0 -10
  84. package/dist/cjs/api/resources/permissionsService/types/index.js +0 -26
  85. package/dist/esm/api/resources/permissionsService/client/Client.d.mts +0 -86
  86. package/dist/esm/api/resources/permissionsService/client/Client.mjs +0 -220
  87. package/dist/esm/api/resources/permissionsService/client/index.d.mts +0 -2
  88. package/dist/esm/api/resources/permissionsService/client/index.mjs +0 -1
  89. package/dist/esm/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.mts +0 -26
  90. package/dist/esm/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.mts +0 -23
  91. package/dist/esm/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.mts +0 -20
  92. package/dist/esm/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.mjs +0 -4
  93. package/dist/esm/api/resources/permissionsService/client/requests/index.d.mts +0 -3
  94. package/dist/esm/api/resources/permissionsService/index.d.mts +0 -2
  95. package/dist/esm/api/resources/permissionsService/index.mjs +0 -2
  96. package/dist/esm/api/resources/permissionsService/types/Action.d.mts +0 -7
  97. package/dist/esm/api/resources/permissionsService/types/Action.mjs +0 -6
  98. package/dist/esm/api/resources/permissionsService/types/AuthorizedResource.d.mts +0 -8
  99. package/dist/esm/api/resources/permissionsService/types/AuthorizedResource.mjs +0 -4
  100. package/dist/esm/api/resources/permissionsService/types/AuthorizedResourceListPage.d.mts +0 -5
  101. package/dist/esm/api/resources/permissionsService/types/AuthorizedResourceListPage.mjs +0 -4
  102. package/dist/esm/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.mts +0 -5
  103. package/dist/esm/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.mjs +0 -4
  104. package/dist/esm/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.d.mts +0 -6
  105. package/dist/esm/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.mjs +0 -4
  106. package/dist/esm/api/resources/permissionsService/types/Group.d.mts +0 -7
  107. package/dist/esm/api/resources/permissionsService/types/Group.mjs +0 -4
  108. package/dist/esm/api/resources/permissionsService/types/Principal.d.mts +0 -13
  109. package/dist/esm/api/resources/permissionsService/types/Principal.mjs +0 -4
  110. package/dist/esm/api/resources/permissionsService/types/PrincipalListPage.d.mts +0 -8
  111. package/dist/esm/api/resources/permissionsService/types/PrincipalListPage.mjs +0 -4
  112. package/dist/esm/api/resources/permissionsService/types/ResourceAuthorizationResult.d.mts +0 -9
  113. package/dist/esm/api/resources/permissionsService/types/ResourceAuthorizationResult.mjs +0 -4
  114. package/dist/esm/api/resources/permissionsService/types/User.d.mts +0 -8
  115. package/dist/esm/api/resources/permissionsService/types/User.mjs +0 -4
  116. package/dist/esm/api/resources/permissionsService/types/index.d.mts +0 -10
  117. package/dist/esm/api/resources/permissionsService/types/index.mjs +0 -10
  118. /package/dist/cjs/api/resources/{permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.js → common/types/CustomMetadataValue.js} +0 -0
  119. /package/dist/cjs/{api/resources/permissionsService/client/requests/index.js → core/auth/AuthProvider.js} +0 -0
  120. /package/dist/esm/api/resources/{permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.mjs → common/types/CustomMetadataValue.mjs} +0 -0
  121. /package/dist/esm/{api/resources/permissionsService/client/requests/index.mjs → core/auth/AuthProvider.mjs} +0 -0
@@ -1,23 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../../index.mjs";
5
- /**
6
- * @example
7
- * {
8
- * resourceIdentifier: {
9
- * type: "external-resource-id",
10
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
11
- * resourceType: "GOOGLE_DRIVE_ITEM"
12
- * },
13
- * userEmail: "john.smith@foo.com"
14
- * }
15
- */
16
- export interface CheckResourceAuthorizationForUserRequest {
17
- /** The resource identifier for which you want to check authorization. */
18
- resourceIdentifier: Credal.ResourceIdentifier;
19
- /** The user email to check authorization for. */
20
- userEmail: string;
21
- /** If specified, Credal will bypass the permissions cache and check current permissions for this resource */
22
- disableCache?: boolean;
23
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../../index.mjs";
5
- /**
6
- * @example
7
- * {
8
- * userEmail: "john.smith@foo.com"
9
- * }
10
- */
11
- export interface ListCachedAuthorizedResourcesForUserRequest {
12
- /** The user email to list authorized resources for. */
13
- userEmail: string;
14
- /** The type of resource you want to list. If not specified, all resource types will be listed. */
15
- resourceType?: Credal.ResourceType;
16
- /** The maximum number of resources to return. Defaults to 100. */
17
- limit?: number;
18
- /** The offset to use for pagination. If not specified, the first page of results will be returned. */
19
- offset?: number;
20
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,3 +0,0 @@
1
- export { type CheckResourceAuthorizationForUserRequest } from "./CheckResourceAuthorizationForUserRequest.mjs";
2
- export { type CheckBulkResourcesAuthorizationForUserRequest } from "./CheckBulkResourcesAuthorizationForUserRequest.mjs";
3
- export { type ListCachedAuthorizedResourcesForUserRequest } from "./ListCachedAuthorizedResourcesForUserRequest.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./types/index.mjs";
2
- export * from "./client/index.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./types/index.mjs";
2
- export * from "./client/index.mjs";
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export type Action = "READ";
5
- export declare const Action: {
6
- readonly Read: "READ";
7
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export const Action = {
5
- Read: "READ",
6
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export interface AuthorizedResource {
6
- credalId: string;
7
- externalId: Credal.ExternalResourceId;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export type AuthorizedResourceListPage = Credal.AuthorizedResource[];
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export type CheckBulkResourcesAuthorizationResponse = Credal.ResourceAuthorizationResult[];
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface CheckResourceAuthorizationResponse {
5
- authorized: boolean;
6
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface Group {
5
- name: string;
6
- id?: string;
7
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,13 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export type Principal = Credal.Principal.Group | Credal.Principal.User;
6
- export declare namespace Principal {
7
- interface Group extends Credal.Group {
8
- type: "group";
9
- }
10
- interface User extends Credal.User {
11
- type: "user";
12
- }
13
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export interface PrincipalListPage {
6
- principals: Credal.Principal[];
7
- nextPageToken?: string;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../index.mjs";
5
- export interface ResourceAuthorizationResult {
6
- externalResourceId: Credal.ExternalResourceId;
7
- inputUrl?: string;
8
- authorized: boolean;
9
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface User {
5
- email: string;
6
- name?: string;
7
- id?: string;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,10 +0,0 @@
1
- export * from "./Group.mjs";
2
- export * from "./User.mjs";
3
- export * from "./Principal.mjs";
4
- export * from "./AuthorizedResource.mjs";
5
- export * from "./AuthorizedResourceListPage.mjs";
6
- export * from "./PrincipalListPage.mjs";
7
- export * from "./CheckResourceAuthorizationResponse.mjs";
8
- export * from "./ResourceAuthorizationResult.mjs";
9
- export * from "./CheckBulkResourcesAuthorizationResponse.mjs";
10
- export * from "./Action.mjs";
@@ -1,10 +0,0 @@
1
- export * from "./Group.mjs";
2
- export * from "./User.mjs";
3
- export * from "./Principal.mjs";
4
- export * from "./AuthorizedResource.mjs";
5
- export * from "./AuthorizedResourceListPage.mjs";
6
- export * from "./PrincipalListPage.mjs";
7
- export * from "./CheckResourceAuthorizationResponse.mjs";
8
- export * from "./ResourceAuthorizationResult.mjs";
9
- export * from "./CheckBulkResourcesAuthorizationResponse.mjs";
10
- export * from "./Action.mjs";