@credal/sdk 0.0.8 → 0.0.9

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 (42) hide show
  1. package/api/resources/copilots/client/Client.d.ts +3 -0
  2. package/api/resources/copilots/client/Client.js +6 -3
  3. package/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +6 -0
  4. package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +6 -0
  5. package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +6 -0
  6. package/api/resources/documentCatalog/client/Client.js +2 -2
  7. package/api/resources/documentCollections/client/Client.js +1 -1
  8. package/api/resources/permissionsService/client/Client.js +3 -3
  9. package/api/resources/search/client/Client.d.ts +1 -1
  10. package/api/resources/search/client/Client.js +2 -2
  11. package/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +2 -2
  12. package/api/resources/users/client/Client.js +1 -1
  13. package/dist/api/resources/copilots/client/Client.d.ts +3 -0
  14. package/dist/api/resources/copilots/client/Client.js +6 -3
  15. package/dist/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +6 -0
  16. package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +6 -0
  17. package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +6 -0
  18. package/dist/api/resources/documentCatalog/client/Client.js +2 -2
  19. package/dist/api/resources/documentCollections/client/Client.js +1 -1
  20. package/dist/api/resources/permissionsService/client/Client.js +3 -3
  21. package/dist/api/resources/search/client/Client.d.ts +1 -1
  22. package/dist/api/resources/search/client/Client.js +2 -2
  23. package/dist/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +2 -2
  24. package/dist/api/resources/users/client/Client.js +1 -1
  25. package/dist/serialization/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -0
  26. package/dist/serialization/resources/copilots/client/requests/CreateConversationRequest.js +1 -0
  27. package/dist/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -0
  28. package/dist/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +1 -0
  29. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -0
  30. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +1 -0
  31. package/dist/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
  32. package/dist/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.js +1 -1
  33. package/package.json +1 -1
  34. package/reference.md +4 -1
  35. package/serialization/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -0
  36. package/serialization/resources/copilots/client/requests/CreateConversationRequest.js +1 -0
  37. package/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -0
  38. package/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +1 -0
  39. package/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -0
  40. package/serialization/resources/copilots/client/requests/SendMessageRequest.js +1 -0
  41. package/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
  42. package/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.js +1 -1
@@ -27,6 +27,7 @@ export declare class Copilots {
27
27
  *
28
28
  * @example
29
29
  * await credal.copilots.createConversation({
30
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
30
31
  * userEmail: "ravin@credal.ai"
31
32
  * })
32
33
  */
@@ -39,6 +40,7 @@ export declare class Copilots {
39
40
  * await credal.copilots.provideMessageFeedback({
40
41
  * userEmail: "ravin@credal.ai",
41
42
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
43
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
42
44
  * messageFeedback: {
43
45
  * feedback: Credal.FeedbackEnum.Negative,
44
46
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -52,6 +54,7 @@ export declare class Copilots {
52
54
  *
53
55
  * @example
54
56
  * await credal.copilots.sendMessage({
57
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
55
58
  * message: "Is Credal SOC 2 compliant?",
56
59
  * userEmail: "ravin@credal.ai"
57
60
  * })
@@ -56,6 +56,7 @@ class Copilots {
56
56
  *
57
57
  * @example
58
58
  * await credal.copilots.createConversation({
59
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
59
60
  * userEmail: "ravin@credal.ai"
60
61
  * })
61
62
  */
@@ -69,7 +70,7 @@ class Copilots {
69
70
  Authorization: yield this._getAuthorizationHeader(),
70
71
  "X-Fern-Language": "JavaScript",
71
72
  "X-Fern-SDK-Name": "@credal/sdk",
72
- "X-Fern-SDK-Version": "0.0.8",
73
+ "X-Fern-SDK-Version": "0.0.9",
73
74
  "X-Fern-Runtime": core.RUNTIME.type,
74
75
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
76
  },
@@ -116,6 +117,7 @@ class Copilots {
116
117
  * await credal.copilots.provideMessageFeedback({
117
118
  * userEmail: "ravin@credal.ai",
118
119
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
120
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
119
121
  * messageFeedback: {
120
122
  * feedback: Credal.FeedbackEnum.Negative,
121
123
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -132,7 +134,7 @@ class Copilots {
132
134
  Authorization: yield this._getAuthorizationHeader(),
133
135
  "X-Fern-Language": "JavaScript",
134
136
  "X-Fern-SDK-Name": "@credal/sdk",
135
- "X-Fern-SDK-Version": "0.0.8",
137
+ "X-Fern-SDK-Version": "0.0.9",
136
138
  "X-Fern-Runtime": core.RUNTIME.type,
137
139
  "X-Fern-Runtime-Version": core.RUNTIME.version,
138
140
  },
@@ -174,6 +176,7 @@ class Copilots {
174
176
  *
175
177
  * @example
176
178
  * await credal.copilots.sendMessage({
179
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
177
180
  * message: "Is Credal SOC 2 compliant?",
178
181
  * userEmail: "ravin@credal.ai"
179
182
  * })
@@ -188,7 +191,7 @@ class Copilots {
188
191
  Authorization: yield this._getAuthorizationHeader(),
189
192
  "X-Fern-Language": "JavaScript",
190
193
  "X-Fern-SDK-Name": "@credal/sdk",
191
- "X-Fern-SDK-Version": "0.0.8",
194
+ "X-Fern-SDK-Version": "0.0.9",
192
195
  "X-Fern-Runtime": core.RUNTIME.type,
193
196
  "X-Fern-Runtime-Version": core.RUNTIME.version,
194
197
  },
@@ -4,10 +4,16 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
7
8
  * userEmail: "ravin@credal.ai"
8
9
  * }
9
10
  */
10
11
  export interface CreateConversationRequest {
12
+ /**
13
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
14
+ *
15
+ */
16
+ agentId?: string;
11
17
  /**
12
18
  * End-user for the conversation.
13
19
  *
@@ -7,6 +7,7 @@ import * as Credal from "../../../../index";
7
7
  * {
8
8
  * userEmail: "ravin@credal.ai",
9
9
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
10
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
10
11
  * messageFeedback: {
11
12
  * feedback: Credal.FeedbackEnum.Negative,
12
13
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -14,6 +15,11 @@ import * as Credal from "../../../../index";
14
15
  * }
15
16
  */
16
17
  export interface ProvideMessageFeedbackRequest {
18
+ /**
19
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
20
+ *
21
+ */
22
+ agentId?: string;
17
23
  /**
18
24
  * The user profile you want to use when providing feedback.
19
25
  *
@@ -4,11 +4,17 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
7
8
  * message: "Is Credal SOC 2 compliant?",
8
9
  * userEmail: "ravin@credal.ai"
9
10
  * }
10
11
  */
11
12
  export interface SendMessageRequest {
13
+ /**
14
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
15
+ *
16
+ */
17
+ agentId?: string;
12
18
  /**
13
19
  * The message you want to send to your copilot.
14
20
  *
@@ -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.8",
74
+ "X-Fern-SDK-Version": "0.0.9",
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.8",
157
+ "X-Fern-SDK-Version": "0.0.9",
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.8",
81
+ "X-Fern-SDK-Version": "0.0.9",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -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.8",
77
+ "X-Fern-SDK-Version": "0.0.9",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -144,7 +144,7 @@ class PermissionsService {
144
144
  Authorization: yield this._getAuthorizationHeader(),
145
145
  "X-Fern-Language": "JavaScript",
146
146
  "X-Fern-SDK-Name": "@credal/sdk",
147
- "X-Fern-SDK-Version": "0.0.8",
147
+ "X-Fern-SDK-Version": "0.0.9",
148
148
  "X-Fern-Runtime": core.RUNTIME.type,
149
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
150
  },
@@ -206,7 +206,7 @@ class PermissionsService {
206
206
  Authorization: yield this._getAuthorizationHeader(),
207
207
  "X-Fern-Language": "JavaScript",
208
208
  "X-Fern-SDK-Name": "@credal/sdk",
209
- "X-Fern-SDK-Version": "0.0.8",
209
+ "X-Fern-SDK-Version": "0.0.9",
210
210
  "X-Fern-Runtime": core.RUNTIME.type,
211
211
  "X-Fern-Runtime-Version": core.RUNTIME.version,
212
212
  },
@@ -27,7 +27,7 @@ export declare class Search {
27
27
  *
28
28
  * @example
29
29
  * await credal.search.searchDocumentCollection({
30
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
30
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
31
31
  * searchQuery: "ABC Corp",
32
32
  * structuredQueryFilters: [{
33
33
  * field: "status",
@@ -56,7 +56,7 @@ class Search {
56
56
  *
57
57
  * @example
58
58
  * await credal.search.searchDocumentCollection({
59
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
59
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
60
60
  * searchQuery: "ABC Corp",
61
61
  * structuredQueryFilters: [{
62
62
  * field: "status",
@@ -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.8",
87
+ "X-Fern-SDK-Version": "0.0.9",
88
88
  "X-Fern-Runtime": core.RUNTIME.type,
89
89
  "X-Fern-Runtime-Version": core.RUNTIME.version,
90
90
  },
@@ -5,7 +5,7 @@ import * as Credal from "../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
8
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
9
9
  * searchQuery: "ABC Corp",
10
10
  * structuredQueryFilters: [{
11
11
  * field: "status",
@@ -24,7 +24,7 @@ import * as Credal from "../../../../index";
24
24
  * }
25
25
  */
26
26
  export interface SearchDocumentCollectionRequest {
27
- documentCollectionId: string;
27
+ collectionId?: string;
28
28
  searchQuery: string;
29
29
  /**
30
30
  * The email of the user making the search request for permissions reduction.
@@ -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.8",
82
+ "X-Fern-SDK-Version": "0.0.9",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -27,6 +27,7 @@ export declare class Copilots {
27
27
  *
28
28
  * @example
29
29
  * await credal.copilots.createConversation({
30
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
30
31
  * userEmail: "ravin@credal.ai"
31
32
  * })
32
33
  */
@@ -39,6 +40,7 @@ export declare class Copilots {
39
40
  * await credal.copilots.provideMessageFeedback({
40
41
  * userEmail: "ravin@credal.ai",
41
42
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
43
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
42
44
  * messageFeedback: {
43
45
  * feedback: Credal.FeedbackEnum.Negative,
44
46
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -52,6 +54,7 @@ export declare class Copilots {
52
54
  *
53
55
  * @example
54
56
  * await credal.copilots.sendMessage({
57
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
55
58
  * message: "Is Credal SOC 2 compliant?",
56
59
  * userEmail: "ravin@credal.ai"
57
60
  * })
@@ -56,6 +56,7 @@ class Copilots {
56
56
  *
57
57
  * @example
58
58
  * await credal.copilots.createConversation({
59
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
59
60
  * userEmail: "ravin@credal.ai"
60
61
  * })
61
62
  */
@@ -69,7 +70,7 @@ class Copilots {
69
70
  Authorization: yield this._getAuthorizationHeader(),
70
71
  "X-Fern-Language": "JavaScript",
71
72
  "X-Fern-SDK-Name": "@credal/sdk",
72
- "X-Fern-SDK-Version": "0.0.8",
73
+ "X-Fern-SDK-Version": "0.0.9",
73
74
  "X-Fern-Runtime": core.RUNTIME.type,
74
75
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
76
  },
@@ -116,6 +117,7 @@ class Copilots {
116
117
  * await credal.copilots.provideMessageFeedback({
117
118
  * userEmail: "ravin@credal.ai",
118
119
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
120
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
119
121
  * messageFeedback: {
120
122
  * feedback: Credal.FeedbackEnum.Negative,
121
123
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -132,7 +134,7 @@ class Copilots {
132
134
  Authorization: yield this._getAuthorizationHeader(),
133
135
  "X-Fern-Language": "JavaScript",
134
136
  "X-Fern-SDK-Name": "@credal/sdk",
135
- "X-Fern-SDK-Version": "0.0.8",
137
+ "X-Fern-SDK-Version": "0.0.9",
136
138
  "X-Fern-Runtime": core.RUNTIME.type,
137
139
  "X-Fern-Runtime-Version": core.RUNTIME.version,
138
140
  },
@@ -174,6 +176,7 @@ class Copilots {
174
176
  *
175
177
  * @example
176
178
  * await credal.copilots.sendMessage({
179
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
177
180
  * message: "Is Credal SOC 2 compliant?",
178
181
  * userEmail: "ravin@credal.ai"
179
182
  * })
@@ -188,7 +191,7 @@ class Copilots {
188
191
  Authorization: yield this._getAuthorizationHeader(),
189
192
  "X-Fern-Language": "JavaScript",
190
193
  "X-Fern-SDK-Name": "@credal/sdk",
191
- "X-Fern-SDK-Version": "0.0.8",
194
+ "X-Fern-SDK-Version": "0.0.9",
192
195
  "X-Fern-Runtime": core.RUNTIME.type,
193
196
  "X-Fern-Runtime-Version": core.RUNTIME.version,
194
197
  },
@@ -4,10 +4,16 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
7
8
  * userEmail: "ravin@credal.ai"
8
9
  * }
9
10
  */
10
11
  export interface CreateConversationRequest {
12
+ /**
13
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
14
+ *
15
+ */
16
+ agentId?: string;
11
17
  /**
12
18
  * End-user for the conversation.
13
19
  *
@@ -7,6 +7,7 @@ import * as Credal from "../../../../index";
7
7
  * {
8
8
  * userEmail: "ravin@credal.ai",
9
9
  * messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
10
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
10
11
  * messageFeedback: {
11
12
  * feedback: Credal.FeedbackEnum.Negative,
12
13
  * suggestedAnswer: "Yes, Credal is SOC 2 compliant."
@@ -14,6 +15,11 @@ import * as Credal from "../../../../index";
14
15
  * }
15
16
  */
16
17
  export interface ProvideMessageFeedbackRequest {
18
+ /**
19
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
20
+ *
21
+ */
22
+ agentId?: string;
17
23
  /**
18
24
  * The user profile you want to use when providing feedback.
19
25
  *
@@ -4,11 +4,17 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
+ * agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
7
8
  * message: "Is Credal SOC 2 compliant?",
8
9
  * userEmail: "ravin@credal.ai"
9
10
  * }
10
11
  */
11
12
  export interface SendMessageRequest {
13
+ /**
14
+ * Credal-generated agent ID to specify which agent to route the request to. This is required for all new API keys going forward.
15
+ *
16
+ */
17
+ agentId?: string;
12
18
  /**
13
19
  * The message you want to send to your copilot.
14
20
  *
@@ -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.8",
74
+ "X-Fern-SDK-Version": "0.0.9",
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.8",
157
+ "X-Fern-SDK-Version": "0.0.9",
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.8",
81
+ "X-Fern-SDK-Version": "0.0.9",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -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.8",
77
+ "X-Fern-SDK-Version": "0.0.9",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -144,7 +144,7 @@ class PermissionsService {
144
144
  Authorization: yield this._getAuthorizationHeader(),
145
145
  "X-Fern-Language": "JavaScript",
146
146
  "X-Fern-SDK-Name": "@credal/sdk",
147
- "X-Fern-SDK-Version": "0.0.8",
147
+ "X-Fern-SDK-Version": "0.0.9",
148
148
  "X-Fern-Runtime": core.RUNTIME.type,
149
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
150
  },
@@ -206,7 +206,7 @@ class PermissionsService {
206
206
  Authorization: yield this._getAuthorizationHeader(),
207
207
  "X-Fern-Language": "JavaScript",
208
208
  "X-Fern-SDK-Name": "@credal/sdk",
209
- "X-Fern-SDK-Version": "0.0.8",
209
+ "X-Fern-SDK-Version": "0.0.9",
210
210
  "X-Fern-Runtime": core.RUNTIME.type,
211
211
  "X-Fern-Runtime-Version": core.RUNTIME.version,
212
212
  },
@@ -27,7 +27,7 @@ export declare class Search {
27
27
  *
28
28
  * @example
29
29
  * await credal.search.searchDocumentCollection({
30
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
30
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
31
31
  * searchQuery: "ABC Corp",
32
32
  * structuredQueryFilters: [{
33
33
  * field: "status",
@@ -56,7 +56,7 @@ class Search {
56
56
  *
57
57
  * @example
58
58
  * await credal.search.searchDocumentCollection({
59
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
59
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
60
60
  * searchQuery: "ABC Corp",
61
61
  * structuredQueryFilters: [{
62
62
  * field: "status",
@@ -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.8",
87
+ "X-Fern-SDK-Version": "0.0.9",
88
88
  "X-Fern-Runtime": core.RUNTIME.type,
89
89
  "X-Fern-Runtime-Version": core.RUNTIME.version,
90
90
  },
@@ -5,7 +5,7 @@ import * as Credal from "../../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
8
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
9
9
  * searchQuery: "ABC Corp",
10
10
  * structuredQueryFilters: [{
11
11
  * field: "status",
@@ -24,7 +24,7 @@ import * as Credal from "../../../../index";
24
24
  * }
25
25
  */
26
26
  export interface SearchDocumentCollectionRequest {
27
- documentCollectionId: string;
27
+ collectionId?: string;
28
28
  searchQuery: string;
29
29
  /**
30
30
  * The email of the user making the search request for permissions reduction.
@@ -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.8",
82
+ "X-Fern-SDK-Version": "0.0.9",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -7,6 +7,7 @@ import * as core from "../../../../../core";
7
7
  export declare const CreateConversationRequest: core.serialization.Schema<serializers.CreateConversationRequest.Raw, Credal.CreateConversationRequest>;
8
8
  export declare namespace CreateConversationRequest {
9
9
  interface Raw {
10
+ agentId?: string | null;
10
11
  userEmail: string;
11
12
  }
12
13
  }
@@ -29,5 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.CreateConversationRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  exports.CreateConversationRequest = core.serialization.object({
32
+ agentId: core.serialization.string().optional(),
32
33
  userEmail: core.serialization.string(),
33
34
  });
@@ -8,6 +8,7 @@ import { MessageFeedback } from "../../types/MessageFeedback";
8
8
  export declare const ProvideMessageFeedbackRequest: core.serialization.Schema<serializers.ProvideMessageFeedbackRequest.Raw, Credal.ProvideMessageFeedbackRequest>;
9
9
  export declare namespace ProvideMessageFeedbackRequest {
10
10
  interface Raw {
11
+ agentId?: string | null;
11
12
  userEmail: string;
12
13
  messageId: string;
13
14
  messageFeedback: MessageFeedback.Raw;
@@ -30,6 +30,7 @@ exports.ProvideMessageFeedbackRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  const MessageFeedback_1 = require("../../types/MessageFeedback");
32
32
  exports.ProvideMessageFeedbackRequest = core.serialization.object({
33
+ agentId: core.serialization.string().optional(),
33
34
  userEmail: core.serialization.string(),
34
35
  messageId: core.serialization.string(),
35
36
  messageFeedback: MessageFeedback_1.MessageFeedback,
@@ -7,6 +7,7 @@ import * as core from "../../../../../core";
7
7
  export declare const SendMessageRequest: core.serialization.Schema<serializers.SendMessageRequest.Raw, Credal.SendMessageRequest>;
8
8
  export declare namespace SendMessageRequest {
9
9
  interface Raw {
10
+ agentId?: string | null;
10
11
  message: string;
11
12
  userEmail: string;
12
13
  conversationId?: string | null;
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SendMessageRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  exports.SendMessageRequest = core.serialization.object({
32
+ agentId: core.serialization.string().optional(),
32
33
  message: core.serialization.string(),
33
34
  userEmail: core.serialization.string(),
34
35
  conversationId: core.serialization.string().optional(),
@@ -9,7 +9,7 @@ import { DocumentCollectionSearchOptions } from "../../types/DocumentCollectionS
9
9
  export declare const SearchDocumentCollectionRequest: core.serialization.Schema<serializers.SearchDocumentCollectionRequest.Raw, Credal.SearchDocumentCollectionRequest>;
10
10
  export declare namespace SearchDocumentCollectionRequest {
11
11
  interface Raw {
12
- documentCollectionId: string;
12
+ collectionId?: string | null;
13
13
  searchQuery: string;
14
14
  userEmail: string;
15
15
  structuredQueryFilters?: SingleFieldFilter.Raw[] | null;
@@ -31,7 +31,7 @@ const core = __importStar(require("../../../../../core"));
31
31
  const SingleFieldFilter_1 = require("../../types/SingleFieldFilter");
32
32
  const DocumentCollectionSearchOptions_1 = require("../../types/DocumentCollectionSearchOptions");
33
33
  exports.SearchDocumentCollectionRequest = core.serialization.object({
34
- documentCollectionId: core.serialization.string(),
34
+ collectionId: core.serialization.string().optional(),
35
35
  searchQuery: core.serialization.string(),
36
36
  userEmail: core.serialization.string(),
37
37
  structuredQueryFilters: core.serialization.list(SingleFieldFilter_1.SingleFieldFilter).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/sdk",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "repository": "https://github.com/credal-ai/credal-typescript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -38,6 +38,7 @@ OPTIONAL. Create a new conversation with the Copilot. The conversation ID can be
38
38
 
39
39
  ```ts
40
40
  await credal.copilots.createConversation({
41
+ agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
41
42
  userEmail: "ravin@credal.ai",
42
43
  });
43
44
  ```
@@ -105,6 +106,7 @@ await credal.copilots.createConversation({
105
106
  await credal.copilots.provideMessageFeedback({
106
107
  userEmail: "ravin@credal.ai",
107
108
  messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
109
+ agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
108
110
  messageFeedback: {
109
111
  feedback: Credal.FeedbackEnum.Negative,
110
112
  suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
@@ -173,6 +175,7 @@ await credal.copilots.provideMessageFeedback({
173
175
 
174
176
  ```ts
175
177
  await credal.copilots.sendMessage({
178
+ agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
176
179
  message: "Is Credal SOC 2 compliant?",
177
180
  userEmail: "ravin@credal.ai",
178
181
  });
@@ -814,7 +817,7 @@ Search across all documents in a document collection using the document metadata
814
817
 
815
818
  ```ts
816
819
  await credal.search.searchDocumentCollection({
817
- documentCollectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
820
+ collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
818
821
  searchQuery: "ABC Corp",
819
822
  structuredQueryFilters: [
820
823
  {
@@ -7,6 +7,7 @@ import * as core from "../../../../../core";
7
7
  export declare const CreateConversationRequest: core.serialization.Schema<serializers.CreateConversationRequest.Raw, Credal.CreateConversationRequest>;
8
8
  export declare namespace CreateConversationRequest {
9
9
  interface Raw {
10
+ agentId?: string | null;
10
11
  userEmail: string;
11
12
  }
12
13
  }
@@ -29,5 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.CreateConversationRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  exports.CreateConversationRequest = core.serialization.object({
32
+ agentId: core.serialization.string().optional(),
32
33
  userEmail: core.serialization.string(),
33
34
  });
@@ -8,6 +8,7 @@ import { MessageFeedback } from "../../types/MessageFeedback";
8
8
  export declare const ProvideMessageFeedbackRequest: core.serialization.Schema<serializers.ProvideMessageFeedbackRequest.Raw, Credal.ProvideMessageFeedbackRequest>;
9
9
  export declare namespace ProvideMessageFeedbackRequest {
10
10
  interface Raw {
11
+ agentId?: string | null;
11
12
  userEmail: string;
12
13
  messageId: string;
13
14
  messageFeedback: MessageFeedback.Raw;
@@ -30,6 +30,7 @@ exports.ProvideMessageFeedbackRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  const MessageFeedback_1 = require("../../types/MessageFeedback");
32
32
  exports.ProvideMessageFeedbackRequest = core.serialization.object({
33
+ agentId: core.serialization.string().optional(),
33
34
  userEmail: core.serialization.string(),
34
35
  messageId: core.serialization.string(),
35
36
  messageFeedback: MessageFeedback_1.MessageFeedback,
@@ -7,6 +7,7 @@ import * as core from "../../../../../core";
7
7
  export declare const SendMessageRequest: core.serialization.Schema<serializers.SendMessageRequest.Raw, Credal.SendMessageRequest>;
8
8
  export declare namespace SendMessageRequest {
9
9
  interface Raw {
10
+ agentId?: string | null;
10
11
  message: string;
11
12
  userEmail: string;
12
13
  conversationId?: string | null;
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SendMessageRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  exports.SendMessageRequest = core.serialization.object({
32
+ agentId: core.serialization.string().optional(),
32
33
  message: core.serialization.string(),
33
34
  userEmail: core.serialization.string(),
34
35
  conversationId: core.serialization.string().optional(),
@@ -9,7 +9,7 @@ import { DocumentCollectionSearchOptions } from "../../types/DocumentCollectionS
9
9
  export declare const SearchDocumentCollectionRequest: core.serialization.Schema<serializers.SearchDocumentCollectionRequest.Raw, Credal.SearchDocumentCollectionRequest>;
10
10
  export declare namespace SearchDocumentCollectionRequest {
11
11
  interface Raw {
12
- documentCollectionId: string;
12
+ collectionId?: string | null;
13
13
  searchQuery: string;
14
14
  userEmail: string;
15
15
  structuredQueryFilters?: SingleFieldFilter.Raw[] | null;
@@ -31,7 +31,7 @@ const core = __importStar(require("../../../../../core"));
31
31
  const SingleFieldFilter_1 = require("../../types/SingleFieldFilter");
32
32
  const DocumentCollectionSearchOptions_1 = require("../../types/DocumentCollectionSearchOptions");
33
33
  exports.SearchDocumentCollectionRequest = core.serialization.object({
34
- documentCollectionId: core.serialization.string(),
34
+ collectionId: core.serialization.string().optional(),
35
35
  searchQuery: core.serialization.string(),
36
36
  userEmail: core.serialization.string(),
37
37
  structuredQueryFilters: core.serialization.list(SingleFieldFilter_1.SingleFieldFilter).optional(),