@credal/sdk 0.0.5 → 0.0.7

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 (56) hide show
  1. package/api/resources/copilots/client/Client.js +3 -3
  2. package/api/resources/copilots/types/MessageReply.d.ts +1 -0
  3. package/api/resources/documentCatalog/client/Client.js +2 -2
  4. package/api/resources/documentCollections/client/Client.js +1 -1
  5. package/api/resources/permissionsService/client/Client.d.ts +3 -4
  6. package/api/resources/permissionsService/client/Client.js +6 -7
  7. package/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +2 -3
  8. package/api/resources/permissionsService/types/AuthorizedResource.d.ts +8 -0
  9. package/api/resources/permissionsService/types/{ResourceListPage.d.ts → AuthorizedResourceListPage.d.ts} +1 -3
  10. package/api/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +2 -1
  11. package/api/resources/permissionsService/types/index.d.ts +2 -1
  12. package/api/resources/permissionsService/types/index.js +2 -1
  13. package/api/resources/search/client/Client.js +1 -1
  14. package/api/resources/users/client/Client.js +1 -1
  15. package/dist/api/resources/copilots/client/Client.js +3 -3
  16. package/dist/api/resources/copilots/types/MessageReply.d.ts +1 -0
  17. package/dist/api/resources/documentCatalog/client/Client.js +2 -2
  18. package/dist/api/resources/documentCollections/client/Client.js +1 -1
  19. package/dist/api/resources/permissionsService/client/Client.d.ts +3 -4
  20. package/dist/api/resources/permissionsService/client/Client.js +6 -7
  21. package/dist/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +2 -3
  22. package/dist/api/resources/permissionsService/types/AuthorizedResource.d.ts +8 -0
  23. package/dist/api/resources/permissionsService/types/AuthorizedResource.js +5 -0
  24. package/dist/api/resources/permissionsService/types/{ResourceListPage.d.ts → AuthorizedResourceListPage.d.ts} +1 -3
  25. package/dist/api/resources/permissionsService/types/AuthorizedResourceListPage.js +5 -0
  26. package/dist/api/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +2 -1
  27. package/dist/api/resources/permissionsService/types/index.d.ts +2 -1
  28. package/dist/api/resources/permissionsService/types/index.js +2 -1
  29. package/dist/api/resources/search/client/Client.js +1 -1
  30. package/dist/api/resources/users/client/Client.js +1 -1
  31. package/dist/serialization/resources/copilots/types/MessageReply.d.ts +1 -0
  32. package/dist/serialization/resources/copilots/types/MessageReply.js +1 -0
  33. package/dist/serialization/resources/permissionsService/types/AuthorizedResource.d.ts +14 -0
  34. package/dist/serialization/resources/permissionsService/types/AuthorizedResource.js +35 -0
  35. package/dist/serialization/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +11 -0
  36. package/dist/serialization/resources/permissionsService/types/{ResourceListPage.js → AuthorizedResourceListPage.js} +3 -5
  37. package/dist/serialization/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +3 -2
  38. package/dist/serialization/resources/permissionsService/types/ResourceAuthorizationResult.js +3 -2
  39. package/dist/serialization/resources/permissionsService/types/index.d.ts +2 -1
  40. package/dist/serialization/resources/permissionsService/types/index.js +2 -1
  41. package/package.json +1 -1
  42. package/reference.md +3 -4
  43. package/serialization/resources/copilots/types/MessageReply.d.ts +1 -0
  44. package/serialization/resources/copilots/types/MessageReply.js +1 -0
  45. package/serialization/resources/permissionsService/types/AuthorizedResource.d.ts +14 -0
  46. package/serialization/resources/permissionsService/types/AuthorizedResource.js +35 -0
  47. package/serialization/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +11 -0
  48. package/serialization/resources/permissionsService/types/{ResourceListPage.js → AuthorizedResourceListPage.js} +3 -5
  49. package/serialization/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +3 -2
  50. package/serialization/resources/permissionsService/types/ResourceAuthorizationResult.js +3 -2
  51. package/serialization/resources/permissionsService/types/index.d.ts +2 -1
  52. package/serialization/resources/permissionsService/types/index.js +2 -1
  53. package/dist/serialization/resources/permissionsService/types/ResourceListPage.d.ts +0 -13
  54. package/serialization/resources/permissionsService/types/ResourceListPage.d.ts +0 -13
  55. /package/api/resources/permissionsService/types/{ResourceListPage.js → AuthorizedResource.js} +0 -0
  56. /package/{dist/api/resources/permissionsService/types/ResourceListPage.js → api/resources/permissionsService/types/AuthorizedResourceListPage.js} +0 -0
@@ -69,7 +69,7 @@ class Copilots {
69
69
  Authorization: yield this._getAuthorizationHeader(),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "@credal/sdk",
72
- "X-Fern-SDK-Version": "0.0.5",
72
+ "X-Fern-SDK-Version": "0.0.7",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
@@ -132,7 +132,7 @@ class Copilots {
132
132
  Authorization: yield this._getAuthorizationHeader(),
133
133
  "X-Fern-Language": "JavaScript",
134
134
  "X-Fern-SDK-Name": "@credal/sdk",
135
- "X-Fern-SDK-Version": "0.0.5",
135
+ "X-Fern-SDK-Version": "0.0.7",
136
136
  "X-Fern-Runtime": core.RUNTIME.type,
137
137
  "X-Fern-Runtime-Version": core.RUNTIME.version,
138
138
  },
@@ -188,7 +188,7 @@ class Copilots {
188
188
  Authorization: yield this._getAuthorizationHeader(),
189
189
  "X-Fern-Language": "JavaScript",
190
190
  "X-Fern-SDK-Name": "@credal/sdk",
191
- "X-Fern-SDK-Version": "0.0.5",
191
+ "X-Fern-SDK-Version": "0.0.7",
192
192
  "X-Fern-Runtime": core.RUNTIME.type,
193
193
  "X-Fern-Runtime-Version": core.RUNTIME.version,
194
194
  },
@@ -10,5 +10,6 @@ export interface MessageReply {
10
10
  activitySourceIdsForAudit: string[];
11
11
  insertedAuditLog: Credal.InsertedAuditLog;
12
12
  referencedSources: Credal.ReferencedSource[];
13
+ sourcesInDataContext: Credal.ReferencedSource[];
13
14
  messageId: string;
14
15
  }
@@ -71,7 +71,7 @@ class DocumentCatalog {
71
71
  Authorization: yield this._getAuthorizationHeader(),
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "@credal/sdk",
74
- "X-Fern-SDK-Version": "0.0.5",
74
+ "X-Fern-SDK-Version": "0.0.7",
75
75
  "X-Fern-Runtime": core.RUNTIME.type,
76
76
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
77
  },
@@ -154,7 +154,7 @@ class DocumentCatalog {
154
154
  Authorization: yield this._getAuthorizationHeader(),
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "@credal/sdk",
157
- "X-Fern-SDK-Version": "0.0.5",
157
+ "X-Fern-SDK-Version": "0.0.7",
158
158
  "X-Fern-Runtime": core.RUNTIME.type,
159
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
160
  },
@@ -78,7 +78,7 @@ class DocumentCollections {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@credal/sdk",
81
- "X-Fern-SDK-Version": "0.0.5",
81
+ "X-Fern-SDK-Version": "0.0.7",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -45,9 +45,8 @@ export declare class PermissionsService {
45
45
  * @example
46
46
  * await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
47
47
  * resourceIdentifiers: [{
48
- * type: "external-resource-id",
49
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
50
- * resourceType: Credal.ResourceType.GoogleDriveItem
48
+ * type: "url",
49
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
51
50
  * }, {
52
51
  * type: "external-resource-id",
53
52
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -68,6 +67,6 @@ export declare class PermissionsService {
68
67
  * userEmail: "john.smith@foo.com"
69
68
  * })
70
69
  */
71
- listCachedAuthorizedResourcesForUser(request: Credal.ListCachedAuthorizedResourcesForUserRequest, requestOptions?: PermissionsService.RequestOptions): Promise<Credal.ResourceListPage>;
70
+ listCachedAuthorizedResourcesForUser(request: Credal.ListCachedAuthorizedResourcesForUserRequest, requestOptions?: PermissionsService.RequestOptions): Promise<Credal.AuthorizedResourceListPage>;
72
71
  protected _getAuthorizationHeader(): Promise<string>;
73
72
  }
@@ -74,7 +74,7 @@ class PermissionsService {
74
74
  Authorization: yield this._getAuthorizationHeader(),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "@credal/sdk",
77
- "X-Fern-SDK-Version": "0.0.5",
77
+ "X-Fern-SDK-Version": "0.0.7",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -124,9 +124,8 @@ class PermissionsService {
124
124
  * @example
125
125
  * await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
126
126
  * resourceIdentifiers: [{
127
- * type: "external-resource-id",
128
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
129
- * resourceType: Credal.ResourceType.GoogleDriveItem
127
+ * type: "url",
128
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
130
129
  * }, {
131
130
  * type: "external-resource-id",
132
131
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -145,7 +144,7 @@ class PermissionsService {
145
144
  Authorization: yield this._getAuthorizationHeader(),
146
145
  "X-Fern-Language": "JavaScript",
147
146
  "X-Fern-SDK-Name": "@credal/sdk",
148
- "X-Fern-SDK-Version": "0.0.5",
147
+ "X-Fern-SDK-Version": "0.0.7",
149
148
  "X-Fern-Runtime": core.RUNTIME.type,
150
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
150
  },
@@ -207,7 +206,7 @@ class PermissionsService {
207
206
  Authorization: yield this._getAuthorizationHeader(),
208
207
  "X-Fern-Language": "JavaScript",
209
208
  "X-Fern-SDK-Name": "@credal/sdk",
210
- "X-Fern-SDK-Version": "0.0.5",
209
+ "X-Fern-SDK-Version": "0.0.7",
211
210
  "X-Fern-Runtime": core.RUNTIME.type,
212
211
  "X-Fern-Runtime-Version": core.RUNTIME.version,
213
212
  },
@@ -220,7 +219,7 @@ class PermissionsService {
220
219
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
221
220
  });
222
221
  if (_response.ok) {
223
- return yield serializers.ResourceListPage.parseOrThrow(_response.body, {
222
+ return yield serializers.AuthorizedResourceListPage.parseOrThrow(_response.body, {
224
223
  unrecognizedObjectKeys: "passthrough",
225
224
  allowUnrecognizedUnionMembers: true,
226
225
  allowUnrecognizedEnumValues: true,
@@ -6,9 +6,8 @@ import * as Credal from "../../../../index";
6
6
  * @example
7
7
  * {
8
8
  * resourceIdentifiers: [{
9
- * type: "external-resource-id",
10
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
11
- * resourceType: Credal.ResourceType.GoogleDriveItem
9
+ * type: "url",
10
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
12
11
  * }, {
13
12
  * type: "external-resource-id",
14
13
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface AuthorizedResource {
6
+ credalId: string;
7
+ externalId: Credal.ExternalResourceId;
8
+ }
@@ -2,6 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Credal from "../../../index";
5
- export interface ResourceListPage {
6
- resources: Credal.ResourceIdentifier[];
7
- }
5
+ export declare type AuthorizedResourceListPage = Credal.AuthorizedResource[];
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Credal from "../../../index";
5
5
  export interface ResourceAuthorizationResult {
6
- resourceIdentifier: Credal.ResourceIdentifier;
6
+ externalResourceId: Credal.ExternalResourceId;
7
+ inputUrl?: string;
7
8
  authorized: boolean;
8
9
  }
@@ -1,7 +1,8 @@
1
1
  export * from "./Group";
2
2
  export * from "./User";
3
3
  export * from "./Principal";
4
- export * from "./ResourceListPage";
4
+ export * from "./AuthorizedResource";
5
+ export * from "./AuthorizedResourceListPage";
5
6
  export * from "./PrincipalListPage";
6
7
  export * from "./CheckResourceAuthorizationResponse";
7
8
  export * from "./ResourceAuthorizationResult";
@@ -17,7 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Group"), exports);
18
18
  __exportStar(require("./User"), exports);
19
19
  __exportStar(require("./Principal"), exports);
20
- __exportStar(require("./ResourceListPage"), exports);
20
+ __exportStar(require("./AuthorizedResource"), exports);
21
+ __exportStar(require("./AuthorizedResourceListPage"), exports);
21
22
  __exportStar(require("./PrincipalListPage"), exports);
22
23
  __exportStar(require("./CheckResourceAuthorizationResponse"), exports);
23
24
  __exportStar(require("./ResourceAuthorizationResult"), exports);
@@ -84,7 +84,7 @@ class Search {
84
84
  Authorization: yield this._getAuthorizationHeader(),
85
85
  "X-Fern-Language": "JavaScript",
86
86
  "X-Fern-SDK-Name": "@credal/sdk",
87
- "X-Fern-SDK-Version": "0.0.5",
87
+ "X-Fern-SDK-Version": "0.0.7",
88
88
  "X-Fern-Runtime": core.RUNTIME.type,
89
89
  "X-Fern-Runtime-Version": core.RUNTIME.version,
90
90
  },
@@ -79,7 +79,7 @@ class Users {
79
79
  Authorization: yield this._getAuthorizationHeader(),
80
80
  "X-Fern-Language": "JavaScript",
81
81
  "X-Fern-SDK-Name": "@credal/sdk",
82
- "X-Fern-SDK-Version": "0.0.5",
82
+ "X-Fern-SDK-Version": "0.0.7",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -69,7 +69,7 @@ class Copilots {
69
69
  Authorization: yield this._getAuthorizationHeader(),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "@credal/sdk",
72
- "X-Fern-SDK-Version": "0.0.5",
72
+ "X-Fern-SDK-Version": "0.0.7",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
@@ -132,7 +132,7 @@ class Copilots {
132
132
  Authorization: yield this._getAuthorizationHeader(),
133
133
  "X-Fern-Language": "JavaScript",
134
134
  "X-Fern-SDK-Name": "@credal/sdk",
135
- "X-Fern-SDK-Version": "0.0.5",
135
+ "X-Fern-SDK-Version": "0.0.7",
136
136
  "X-Fern-Runtime": core.RUNTIME.type,
137
137
  "X-Fern-Runtime-Version": core.RUNTIME.version,
138
138
  },
@@ -188,7 +188,7 @@ class Copilots {
188
188
  Authorization: yield this._getAuthorizationHeader(),
189
189
  "X-Fern-Language": "JavaScript",
190
190
  "X-Fern-SDK-Name": "@credal/sdk",
191
- "X-Fern-SDK-Version": "0.0.5",
191
+ "X-Fern-SDK-Version": "0.0.7",
192
192
  "X-Fern-Runtime": core.RUNTIME.type,
193
193
  "X-Fern-Runtime-Version": core.RUNTIME.version,
194
194
  },
@@ -10,5 +10,6 @@ export interface MessageReply {
10
10
  activitySourceIdsForAudit: string[];
11
11
  insertedAuditLog: Credal.InsertedAuditLog;
12
12
  referencedSources: Credal.ReferencedSource[];
13
+ sourcesInDataContext: Credal.ReferencedSource[];
13
14
  messageId: string;
14
15
  }
@@ -71,7 +71,7 @@ class DocumentCatalog {
71
71
  Authorization: yield this._getAuthorizationHeader(),
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "@credal/sdk",
74
- "X-Fern-SDK-Version": "0.0.5",
74
+ "X-Fern-SDK-Version": "0.0.7",
75
75
  "X-Fern-Runtime": core.RUNTIME.type,
76
76
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
77
  },
@@ -154,7 +154,7 @@ class DocumentCatalog {
154
154
  Authorization: yield this._getAuthorizationHeader(),
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "@credal/sdk",
157
- "X-Fern-SDK-Version": "0.0.5",
157
+ "X-Fern-SDK-Version": "0.0.7",
158
158
  "X-Fern-Runtime": core.RUNTIME.type,
159
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
160
  },
@@ -78,7 +78,7 @@ class DocumentCollections {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@credal/sdk",
81
- "X-Fern-SDK-Version": "0.0.5",
81
+ "X-Fern-SDK-Version": "0.0.7",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -45,9 +45,8 @@ export declare class PermissionsService {
45
45
  * @example
46
46
  * await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
47
47
  * resourceIdentifiers: [{
48
- * type: "external-resource-id",
49
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
50
- * resourceType: Credal.ResourceType.GoogleDriveItem
48
+ * type: "url",
49
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
51
50
  * }, {
52
51
  * type: "external-resource-id",
53
52
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -68,6 +67,6 @@ export declare class PermissionsService {
68
67
  * userEmail: "john.smith@foo.com"
69
68
  * })
70
69
  */
71
- listCachedAuthorizedResourcesForUser(request: Credal.ListCachedAuthorizedResourcesForUserRequest, requestOptions?: PermissionsService.RequestOptions): Promise<Credal.ResourceListPage>;
70
+ listCachedAuthorizedResourcesForUser(request: Credal.ListCachedAuthorizedResourcesForUserRequest, requestOptions?: PermissionsService.RequestOptions): Promise<Credal.AuthorizedResourceListPage>;
72
71
  protected _getAuthorizationHeader(): Promise<string>;
73
72
  }
@@ -74,7 +74,7 @@ class PermissionsService {
74
74
  Authorization: yield this._getAuthorizationHeader(),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "@credal/sdk",
77
- "X-Fern-SDK-Version": "0.0.5",
77
+ "X-Fern-SDK-Version": "0.0.7",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -124,9 +124,8 @@ class PermissionsService {
124
124
  * @example
125
125
  * await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
126
126
  * resourceIdentifiers: [{
127
- * type: "external-resource-id",
128
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
129
- * resourceType: Credal.ResourceType.GoogleDriveItem
127
+ * type: "url",
128
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
130
129
  * }, {
131
130
  * type: "external-resource-id",
132
131
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -145,7 +144,7 @@ class PermissionsService {
145
144
  Authorization: yield this._getAuthorizationHeader(),
146
145
  "X-Fern-Language": "JavaScript",
147
146
  "X-Fern-SDK-Name": "@credal/sdk",
148
- "X-Fern-SDK-Version": "0.0.5",
147
+ "X-Fern-SDK-Version": "0.0.7",
149
148
  "X-Fern-Runtime": core.RUNTIME.type,
150
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
150
  },
@@ -207,7 +206,7 @@ class PermissionsService {
207
206
  Authorization: yield this._getAuthorizationHeader(),
208
207
  "X-Fern-Language": "JavaScript",
209
208
  "X-Fern-SDK-Name": "@credal/sdk",
210
- "X-Fern-SDK-Version": "0.0.5",
209
+ "X-Fern-SDK-Version": "0.0.7",
211
210
  "X-Fern-Runtime": core.RUNTIME.type,
212
211
  "X-Fern-Runtime-Version": core.RUNTIME.version,
213
212
  },
@@ -220,7 +219,7 @@ class PermissionsService {
220
219
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
221
220
  });
222
221
  if (_response.ok) {
223
- return yield serializers.ResourceListPage.parseOrThrow(_response.body, {
222
+ return yield serializers.AuthorizedResourceListPage.parseOrThrow(_response.body, {
224
223
  unrecognizedObjectKeys: "passthrough",
225
224
  allowUnrecognizedUnionMembers: true,
226
225
  allowUnrecognizedEnumValues: true,
@@ -6,9 +6,8 @@ import * as Credal from "../../../../index";
6
6
  * @example
7
7
  * {
8
8
  * resourceIdentifiers: [{
9
- * type: "external-resource-id",
10
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
11
- * resourceType: Credal.ResourceType.GoogleDriveItem
9
+ * type: "url",
10
+ * url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
12
11
  * }, {
13
12
  * type: "external-resource-id",
14
13
  * externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface AuthorizedResource {
6
+ credalId: string;
7
+ externalId: Credal.ExternalResourceId;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Credal from "../../../index";
5
- export interface ResourceListPage {
6
- resources: Credal.ResourceIdentifier[];
7
- }
5
+ export declare type AuthorizedResourceListPage = Credal.AuthorizedResource[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Credal from "../../../index";
5
5
  export interface ResourceAuthorizationResult {
6
- resourceIdentifier: Credal.ResourceIdentifier;
6
+ externalResourceId: Credal.ExternalResourceId;
7
+ inputUrl?: string;
7
8
  authorized: boolean;
8
9
  }
@@ -1,7 +1,8 @@
1
1
  export * from "./Group";
2
2
  export * from "./User";
3
3
  export * from "./Principal";
4
- export * from "./ResourceListPage";
4
+ export * from "./AuthorizedResource";
5
+ export * from "./AuthorizedResourceListPage";
5
6
  export * from "./PrincipalListPage";
6
7
  export * from "./CheckResourceAuthorizationResponse";
7
8
  export * from "./ResourceAuthorizationResult";
@@ -17,7 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Group"), exports);
18
18
  __exportStar(require("./User"), exports);
19
19
  __exportStar(require("./Principal"), exports);
20
- __exportStar(require("./ResourceListPage"), exports);
20
+ __exportStar(require("./AuthorizedResource"), exports);
21
+ __exportStar(require("./AuthorizedResourceListPage"), exports);
21
22
  __exportStar(require("./PrincipalListPage"), exports);
22
23
  __exportStar(require("./CheckResourceAuthorizationResponse"), exports);
23
24
  __exportStar(require("./ResourceAuthorizationResult"), exports);
@@ -84,7 +84,7 @@ class Search {
84
84
  Authorization: yield this._getAuthorizationHeader(),
85
85
  "X-Fern-Language": "JavaScript",
86
86
  "X-Fern-SDK-Name": "@credal/sdk",
87
- "X-Fern-SDK-Version": "0.0.5",
87
+ "X-Fern-SDK-Version": "0.0.7",
88
88
  "X-Fern-Runtime": core.RUNTIME.type,
89
89
  "X-Fern-Runtime-Version": core.RUNTIME.version,
90
90
  },
@@ -79,7 +79,7 @@ class Users {
79
79
  Authorization: yield this._getAuthorizationHeader(),
80
80
  "X-Fern-Language": "JavaScript",
81
81
  "X-Fern-SDK-Name": "@credal/sdk",
82
- "X-Fern-SDK-Version": "0.0.5",
82
+ "X-Fern-SDK-Version": "0.0.7",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -18,6 +18,7 @@ export declare namespace MessageReply {
18
18
  activitySourceIdsForAudit: string[];
19
19
  inserted_audit_log: InsertedAuditLog.Raw;
20
20
  referencedSources: ReferencedSource.Raw[];
21
+ sourcesInDataContext: ReferencedSource.Raw[];
21
22
  messageId: string;
22
23
  }
23
24
  }
@@ -40,5 +40,6 @@ exports.MessageReply = core.serialization.object({
40
40
  activitySourceIdsForAudit: core.serialization.list(core.serialization.string()),
41
41
  insertedAuditLog: core.serialization.property("inserted_audit_log", InsertedAuditLog_1.InsertedAuditLog),
42
42
  referencedSources: core.serialization.list(ReferencedSource_1.ReferencedSource),
43
+ sourcesInDataContext: core.serialization.list(ReferencedSource_1.ReferencedSource),
43
44
  messageId: core.serialization.string(),
44
45
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { ExternalResourceId } from "../../common/types/ExternalResourceId";
8
+ export declare const AuthorizedResource: core.serialization.ObjectSchema<serializers.AuthorizedResource.Raw, Credal.AuthorizedResource>;
9
+ export declare namespace AuthorizedResource {
10
+ interface Raw {
11
+ credalId: string;
12
+ externalId: ExternalResourceId.Raw;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AuthorizedResource = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const ExternalResourceId_1 = require("../../common/types/ExternalResourceId");
32
+ exports.AuthorizedResource = core.serialization.object({
33
+ credalId: core.serialization.string(),
34
+ externalId: ExternalResourceId_1.ExternalResourceId,
35
+ });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { AuthorizedResource } from "./AuthorizedResource";
8
+ export declare const AuthorizedResourceListPage: core.serialization.Schema<serializers.AuthorizedResourceListPage.Raw, Credal.AuthorizedResourceListPage>;
9
+ export declare namespace AuthorizedResourceListPage {
10
+ type Raw = AuthorizedResource.Raw[];
11
+ }
@@ -26,9 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ResourceListPage = void 0;
29
+ exports.AuthorizedResourceListPage = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- const ResourceIdentifier_1 = require("../../common/types/ResourceIdentifier");
32
- exports.ResourceListPage = core.serialization.object({
33
- resources: core.serialization.list(ResourceIdentifier_1.ResourceIdentifier),
34
- });
31
+ const AuthorizedResource_1 = require("./AuthorizedResource");
32
+ exports.AuthorizedResourceListPage = core.serialization.list(AuthorizedResource_1.AuthorizedResource);
@@ -4,11 +4,12 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as Credal from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { ResourceIdentifier } from "../../common/types/ResourceIdentifier";
7
+ import { ExternalResourceId } from "../../common/types/ExternalResourceId";
8
8
  export declare const ResourceAuthorizationResult: core.serialization.ObjectSchema<serializers.ResourceAuthorizationResult.Raw, Credal.ResourceAuthorizationResult>;
9
9
  export declare namespace ResourceAuthorizationResult {
10
10
  interface Raw {
11
- resourceIdentifier: ResourceIdentifier.Raw;
11
+ externalResourceId: ExternalResourceId.Raw;
12
+ inputUrl?: string | null;
12
13
  authorized: boolean;
13
14
  }
14
15
  }
@@ -28,8 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ResourceAuthorizationResult = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- const ResourceIdentifier_1 = require("../../common/types/ResourceIdentifier");
31
+ const ExternalResourceId_1 = require("../../common/types/ExternalResourceId");
32
32
  exports.ResourceAuthorizationResult = core.serialization.object({
33
- resourceIdentifier: ResourceIdentifier_1.ResourceIdentifier,
33
+ externalResourceId: ExternalResourceId_1.ExternalResourceId,
34
+ inputUrl: core.serialization.string().optional(),
34
35
  authorized: core.serialization.boolean(),
35
36
  });
@@ -1,7 +1,8 @@
1
1
  export * from "./Group";
2
2
  export * from "./User";
3
3
  export * from "./Principal";
4
- export * from "./ResourceListPage";
4
+ export * from "./AuthorizedResource";
5
+ export * from "./AuthorizedResourceListPage";
5
6
  export * from "./PrincipalListPage";
6
7
  export * from "./CheckResourceAuthorizationResponse";
7
8
  export * from "./ResourceAuthorizationResult";
@@ -17,7 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Group"), exports);
18
18
  __exportStar(require("./User"), exports);
19
19
  __exportStar(require("./Principal"), exports);
20
- __exportStar(require("./ResourceListPage"), exports);
20
+ __exportStar(require("./AuthorizedResource"), exports);
21
+ __exportStar(require("./AuthorizedResourceListPage"), exports);
21
22
  __exportStar(require("./PrincipalListPage"), exports);
22
23
  __exportStar(require("./CheckResourceAuthorizationResponse"), exports);
23
24
  __exportStar(require("./ResourceAuthorizationResult"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "repository": "https://github.com/credal-ai/credal-typescript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -633,9 +633,8 @@ Admin endpoint to check whether the specified user is authorized to read the spe
633
633
  await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
634
634
  resourceIdentifiers: [
635
635
  {
636
- type: "external-resource-id",
637
- externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
638
- resourceType: Credal.ResourceType.GoogleDriveItem,
636
+ type: "url",
637
+ url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit",
639
638
  },
640
639
  {
641
640
  type: "external-resource-id",
@@ -690,7 +689,7 @@ await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
690
689
  </dl>
691
690
  </details>
692
691
 
693
- <details><summary> <code>credal.permissionsService.<a href="./src/api/resources/permissionsService/client/Client.ts">listCachedAuthorizedResourcesForUser</a>({ ...params }) -> Credal.ResourceListPage</code> </summary>
692
+ <details><summary> <code>credal.permissionsService.<a href="./src/api/resources/permissionsService/client/Client.ts">listCachedAuthorizedResourcesForUser</a>({ ...params }) -> Credal.AuthorizedResourceListPage</code> </summary>
694
693
 
695
694
  <dl>
696
695
 
@@ -18,6 +18,7 @@ export declare namespace MessageReply {
18
18
  activitySourceIdsForAudit: string[];
19
19
  inserted_audit_log: InsertedAuditLog.Raw;
20
20
  referencedSources: ReferencedSource.Raw[];
21
+ sourcesInDataContext: ReferencedSource.Raw[];
21
22
  messageId: string;
22
23
  }
23
24
  }
@@ -40,5 +40,6 @@ exports.MessageReply = core.serialization.object({
40
40
  activitySourceIdsForAudit: core.serialization.list(core.serialization.string()),
41
41
  insertedAuditLog: core.serialization.property("inserted_audit_log", InsertedAuditLog_1.InsertedAuditLog),
42
42
  referencedSources: core.serialization.list(ReferencedSource_1.ReferencedSource),
43
+ sourcesInDataContext: core.serialization.list(ReferencedSource_1.ReferencedSource),
43
44
  messageId: core.serialization.string(),
44
45
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { ExternalResourceId } from "../../common/types/ExternalResourceId";
8
+ export declare const AuthorizedResource: core.serialization.ObjectSchema<serializers.AuthorizedResource.Raw, Credal.AuthorizedResource>;
9
+ export declare namespace AuthorizedResource {
10
+ interface Raw {
11
+ credalId: string;
12
+ externalId: ExternalResourceId.Raw;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AuthorizedResource = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const ExternalResourceId_1 = require("../../common/types/ExternalResourceId");
32
+ exports.AuthorizedResource = core.serialization.object({
33
+ credalId: core.serialization.string(),
34
+ externalId: ExternalResourceId_1.ExternalResourceId,
35
+ });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Credal from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { AuthorizedResource } from "./AuthorizedResource";
8
+ export declare const AuthorizedResourceListPage: core.serialization.Schema<serializers.AuthorizedResourceListPage.Raw, Credal.AuthorizedResourceListPage>;
9
+ export declare namespace AuthorizedResourceListPage {
10
+ type Raw = AuthorizedResource.Raw[];
11
+ }
@@ -26,9 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ResourceListPage = void 0;
29
+ exports.AuthorizedResourceListPage = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- const ResourceIdentifier_1 = require("../../common/types/ResourceIdentifier");
32
- exports.ResourceListPage = core.serialization.object({
33
- resources: core.serialization.list(ResourceIdentifier_1.ResourceIdentifier),
34
- });
31
+ const AuthorizedResource_1 = require("./AuthorizedResource");
32
+ exports.AuthorizedResourceListPage = core.serialization.list(AuthorizedResource_1.AuthorizedResource);
@@ -4,11 +4,12 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as Credal from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { ResourceIdentifier } from "../../common/types/ResourceIdentifier";
7
+ import { ExternalResourceId } from "../../common/types/ExternalResourceId";
8
8
  export declare const ResourceAuthorizationResult: core.serialization.ObjectSchema<serializers.ResourceAuthorizationResult.Raw, Credal.ResourceAuthorizationResult>;
9
9
  export declare namespace ResourceAuthorizationResult {
10
10
  interface Raw {
11
- resourceIdentifier: ResourceIdentifier.Raw;
11
+ externalResourceId: ExternalResourceId.Raw;
12
+ inputUrl?: string | null;
12
13
  authorized: boolean;
13
14
  }
14
15
  }
@@ -28,8 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ResourceAuthorizationResult = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- const ResourceIdentifier_1 = require("../../common/types/ResourceIdentifier");
31
+ const ExternalResourceId_1 = require("../../common/types/ExternalResourceId");
32
32
  exports.ResourceAuthorizationResult = core.serialization.object({
33
- resourceIdentifier: ResourceIdentifier_1.ResourceIdentifier,
33
+ externalResourceId: ExternalResourceId_1.ExternalResourceId,
34
+ inputUrl: core.serialization.string().optional(),
34
35
  authorized: core.serialization.boolean(),
35
36
  });
@@ -1,7 +1,8 @@
1
1
  export * from "./Group";
2
2
  export * from "./User";
3
3
  export * from "./Principal";
4
- export * from "./ResourceListPage";
4
+ export * from "./AuthorizedResource";
5
+ export * from "./AuthorizedResourceListPage";
5
6
  export * from "./PrincipalListPage";
6
7
  export * from "./CheckResourceAuthorizationResponse";
7
8
  export * from "./ResourceAuthorizationResult";
@@ -17,7 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Group"), exports);
18
18
  __exportStar(require("./User"), exports);
19
19
  __exportStar(require("./Principal"), exports);
20
- __exportStar(require("./ResourceListPage"), exports);
20
+ __exportStar(require("./AuthorizedResource"), exports);
21
+ __exportStar(require("./AuthorizedResourceListPage"), exports);
21
22
  __exportStar(require("./PrincipalListPage"), exports);
22
23
  __exportStar(require("./CheckResourceAuthorizationResponse"), exports);
23
24
  __exportStar(require("./ResourceAuthorizationResult"), exports);
@@ -1,13 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as serializers from "../../../index";
5
- import * as Credal from "../../../../api/index";
6
- import * as core from "../../../../core";
7
- import { ResourceIdentifier } from "../../common/types/ResourceIdentifier";
8
- export declare const ResourceListPage: core.serialization.ObjectSchema<serializers.ResourceListPage.Raw, Credal.ResourceListPage>;
9
- export declare namespace ResourceListPage {
10
- interface Raw {
11
- resources: ResourceIdentifier.Raw[];
12
- }
13
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as serializers from "../../../index";
5
- import * as Credal from "../../../../api/index";
6
- import * as core from "../../../../core";
7
- import { ResourceIdentifier } from "../../common/types/ResourceIdentifier";
8
- export declare const ResourceListPage: core.serialization.ObjectSchema<serializers.ResourceListPage.Raw, Credal.ResourceListPage>;
9
- export declare namespace ResourceListPage {
10
- interface Raw {
11
- resources: ResourceIdentifier.Raw[];
12
- }
13
- }