profoundai 0.35.1 → 0.37.0

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 (67) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/client.d.mts +13 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +13 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +2 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +2 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/logs/raw.d.mts +1 -17
  20. package/resources/logs/raw.d.mts.map +1 -1
  21. package/resources/logs/raw.d.ts +1 -17
  22. package/resources/logs/raw.d.ts.map +1 -1
  23. package/resources/organizations/categories.d.mts +40 -3
  24. package/resources/organizations/categories.d.mts.map +1 -1
  25. package/resources/organizations/categories.d.ts +40 -3
  26. package/resources/organizations/categories.d.ts.map +1 -1
  27. package/resources/organizations/categories.js +4 -3
  28. package/resources/organizations/categories.js.map +1 -1
  29. package/resources/organizations/categories.mjs +4 -3
  30. package/resources/organizations/categories.mjs.map +1 -1
  31. package/resources/prompt-volumes.d.mts +112 -0
  32. package/resources/prompt-volumes.d.mts.map +1 -0
  33. package/resources/prompt-volumes.d.ts +112 -0
  34. package/resources/prompt-volumes.d.ts.map +1 -0
  35. package/resources/prompt-volumes.js +21 -0
  36. package/resources/prompt-volumes.js.map +1 -0
  37. package/resources/prompt-volumes.mjs +17 -0
  38. package/resources/prompt-volumes.mjs.map +1 -0
  39. package/resources/prompts.d.mts +1 -46
  40. package/resources/prompts.d.mts.map +1 -1
  41. package/resources/prompts.d.ts +1 -46
  42. package/resources/prompts.d.ts.map +1 -1
  43. package/resources/reports.d.mts +247 -139
  44. package/resources/reports.d.mts.map +1 -1
  45. package/resources/reports.d.ts +247 -139
  46. package/resources/reports.d.ts.map +1 -1
  47. package/resources/reports.js +68 -0
  48. package/resources/reports.js.map +1 -1
  49. package/resources/reports.mjs +68 -0
  50. package/resources/reports.mjs.map +1 -1
  51. package/resources/shared.d.mts +76 -0
  52. package/resources/shared.d.mts.map +1 -1
  53. package/resources/shared.d.ts +76 -0
  54. package/resources/shared.d.ts.map +1 -1
  55. package/src/client.ts +33 -0
  56. package/src/resources/index.ts +11 -0
  57. package/src/resources/logs/raw.ts +2 -136
  58. package/src/resources/organizations/categories.ts +46 -3
  59. package/src/resources/prompt-volumes.ts +203 -0
  60. package/src/resources/prompts.ts +6 -78
  61. package/src/resources/reports.ts +368 -280
  62. package/src/resources/shared.ts +221 -0
  63. package/src/version.ts +1 -1
  64. package/version.d.mts +1 -1
  65. package/version.d.ts +1 -1
  66. package/version.js +1 -1
  67. package/version.mjs +1 -1
@@ -32,7 +32,8 @@ export class Categories extends APIResource {
32
32
  }
33
33
 
34
34
  /**
35
- * Get Category Prompts
35
+ * Retrieve prompts in a category with optional filtering by type, topic, tag,
36
+ * region, platform, or persona. Supports cursor-based pagination.
36
37
  */
37
38
  prompts(
38
39
  categoryID: string,
@@ -43,14 +44,14 @@ export class Categories extends APIResource {
43
44
  }
44
45
 
45
46
  /**
46
- * Get the organization tags for a specific category.
47
+ * Get the tags for a specific category.
47
48
  */
48
49
  tags(categoryID: string, options?: RequestOptions): APIPromise<CategoryTagsResponse> {
49
50
  return this._client.get(path`/v1/org/categories/${categoryID}/tags`, options);
50
51
  }
51
52
 
52
53
  /**
53
- * Get the organization categories.
54
+ * Get the topics for a specific category.
54
55
  */
55
56
  topics(categoryID: string, options?: RequestOptions): APIPromise<CategoryTopicsResponse> {
56
57
  return this._client.get(path`/v1/org/categories/${categoryID}/topics`, options);
@@ -105,6 +106,8 @@ export namespace CategoryPromptsResponse {
105
106
 
106
107
  created_at: string;
107
108
 
109
+ language: string;
110
+
108
111
  platforms: Array<OrganizationsAPI.NamedResource>;
109
112
 
110
113
  prompt: string;
@@ -113,11 +116,15 @@ export namespace CategoryPromptsResponse {
113
116
 
114
117
  regions: Array<OrganizationsAPI.NamedResource>;
115
118
 
119
+ status: 'active' | 'disabled';
120
+
116
121
  /**
117
122
  * Generic id+name reference used across domain boundaries.
118
123
  */
119
124
  topic: OrganizationsAPI.NamedResource;
120
125
 
126
+ personas?: Array<OrganizationsAPI.NamedResource>;
127
+
121
128
  tags?: Array<OrganizationsAPI.NamedResource>;
122
129
  }
123
130
 
@@ -139,24 +146,60 @@ export namespace CategoryTopicsResponse {
139
146
  id: string;
140
147
 
141
148
  name: string;
149
+
150
+ status: 'active' | 'disabled';
142
151
  }
143
152
  }
144
153
 
145
154
  export interface CategoryPromptsParams {
155
+ /**
156
+ * Pagination cursor from a previous response.
157
+ */
146
158
  cursor?: string | null;
147
159
 
160
+ /**
161
+ * Maximum number of prompts to return.
162
+ */
148
163
  limit?: number;
149
164
 
165
+ /**
166
+ * Sort direction by creation date.
167
+ */
150
168
  order_dir?: 'asc' | 'desc';
151
169
 
170
+ /**
171
+ * Filter by persona IDs.
172
+ */
173
+ persona_id?: Array<string>;
174
+
175
+ /**
176
+ * Filter by platform IDs.
177
+ */
152
178
  platform_id?: Array<string>;
153
179
 
180
+ /**
181
+ * Filter by prompt type.
182
+ */
154
183
  prompt_type?: Array<'visibility' | 'sentiment'>;
155
184
 
185
+ /**
186
+ * Filter by region IDs.
187
+ */
156
188
  region_id?: Array<string>;
157
189
 
190
+ /**
191
+ * Filter by prompt status.
192
+ */
193
+ status?: Array<'active' | 'disabled'>;
194
+
195
+ /**
196
+ * Filter by tag IDs.
197
+ */
158
198
  tag_id?: Array<string>;
159
199
 
200
+ /**
201
+ * Filter by topic IDs.
202
+ */
160
203
  topic_id?: Array<string>;
161
204
  }
162
205
 
@@ -0,0 +1,203 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as Shared from './shared';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { RequestOptions } from '../internal/request-options';
7
+
8
+ export class PromptVolumes extends APIResource {
9
+ /**
10
+ * Get Volume
11
+ */
12
+ createVolume(body: PromptVolumeCreateVolumeParams, options?: RequestOptions): APIPromise<unknown> {
13
+ return this._client.post('/v1/prompt-volumes/volume', { body, ...options });
14
+ }
15
+
16
+ /**
17
+ * Get Citation Prompts
18
+ */
19
+ listCitationPrompts(
20
+ query: PromptVolumeListCitationPromptsParams,
21
+ options?: RequestOptions,
22
+ ): APIPromise<unknown> {
23
+ return this._client.get('/v1/prompt-volumes/citation-prompts', { query, ...options });
24
+ }
25
+ }
26
+
27
+ export type PromptVolumeCreateVolumeResponse = unknown;
28
+
29
+ export type PromptVolumeListCitationPromptsResponse = unknown;
30
+
31
+ export interface PromptVolumeCreateVolumeParams {
32
+ /**
33
+ * End date for the query. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
34
+ * ISO timestamp.
35
+ */
36
+ end_date: string;
37
+
38
+ metrics: Array<'volume' | 'change'>;
39
+
40
+ /**
41
+ * Start date for the query. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
42
+ * ISO timestamp.
43
+ */
44
+ start_date: string;
45
+
46
+ /**
47
+ * Date interval for the report. (only used with date dimension)
48
+ */
49
+ date_interval?: 'hour' | 'day' | 'week' | 'month' | 'year' | 'relative_week';
50
+
51
+ /**
52
+ * Dimensions to group the report by.
53
+ */
54
+ dimensions?: Array<'keyword' | 'date' | 'platform' | 'country_code' | 'matching_type' | 'frequency'>;
55
+
56
+ /**
57
+ * Filters to apply to the query
58
+ */
59
+ filters?: Array<
60
+ | PromptVolumeCreateVolumeParams.CountryCodeFilter
61
+ | PromptVolumeCreateVolumeParams.FrequencyFilter
62
+ | PromptVolumeCreateVolumeParams.KeywordFilter
63
+ | PromptVolumeCreateVolumeParams.MatchingTypeFilter
64
+ | PromptVolumeCreateVolumeParams.PlatformFilter
65
+ >;
66
+
67
+ /**
68
+ * Custom ordering of the report results.
69
+ *
70
+ * The order is a record of key-value pairs where:
71
+ *
72
+ * - key is the field to order by, which can be a metric or dimension
73
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
74
+ * descending.
75
+ *
76
+ * When not specified, the default order is the first metric in the query
77
+ * descending.
78
+ */
79
+ order_by?: { [key: string]: 'asc' | 'desc' };
80
+
81
+ /**
82
+ * Pagination settings for the report results.
83
+ */
84
+ pagination?: Shared.Pagination;
85
+ }
86
+
87
+ export namespace PromptVolumeCreateVolumeParams {
88
+ /**
89
+ * Filter by country code
90
+ */
91
+ export interface CountryCodeFilter {
92
+ field: 'country_code';
93
+
94
+ operator:
95
+ | 'is'
96
+ | 'not_is'
97
+ | 'in'
98
+ | 'not_in'
99
+ | 'contains'
100
+ | 'not_contains'
101
+ | 'matches'
102
+ | 'contains_case_insensitive'
103
+ | 'not_contains_case_insensitive';
104
+
105
+ value: string | Array<string>;
106
+ }
107
+
108
+ /**
109
+ * Filter by frequency
110
+ */
111
+ export interface FrequencyFilter {
112
+ field: 'frequency';
113
+
114
+ operator:
115
+ | 'is'
116
+ | 'not_is'
117
+ | 'in'
118
+ | 'not_in'
119
+ | 'contains'
120
+ | 'not_contains'
121
+ | 'matches'
122
+ | 'contains_case_insensitive'
123
+ | 'not_contains_case_insensitive';
124
+
125
+ value: string | Array<string>;
126
+ }
127
+
128
+ /**
129
+ * Filter by keyword
130
+ */
131
+ export interface KeywordFilter {
132
+ field: 'keyword';
133
+
134
+ operator:
135
+ | 'is'
136
+ | 'not_is'
137
+ | 'in'
138
+ | 'not_in'
139
+ | 'contains'
140
+ | 'not_contains'
141
+ | 'matches'
142
+ | 'contains_case_insensitive'
143
+ | 'not_contains_case_insensitive';
144
+
145
+ value: string | Array<string>;
146
+ }
147
+
148
+ /**
149
+ * Filter by matching type
150
+ */
151
+ export interface MatchingTypeFilter {
152
+ field: 'matching_type';
153
+
154
+ operator:
155
+ | 'is'
156
+ | 'not_is'
157
+ | 'in'
158
+ | 'not_in'
159
+ | 'contains'
160
+ | 'not_contains'
161
+ | 'matches'
162
+ | 'contains_case_insensitive'
163
+ | 'not_contains_case_insensitive';
164
+
165
+ value: string | Array<string>;
166
+ }
167
+
168
+ /**
169
+ * Filter by platform
170
+ */
171
+ export interface PlatformFilter {
172
+ field: 'platform';
173
+
174
+ operator:
175
+ | 'is'
176
+ | 'not_is'
177
+ | 'in'
178
+ | 'not_in'
179
+ | 'contains'
180
+ | 'not_contains'
181
+ | 'matches'
182
+ | 'contains_case_insensitive'
183
+ | 'not_contains_case_insensitive';
184
+
185
+ value: string | Array<string>;
186
+ }
187
+ }
188
+
189
+ export interface PromptVolumeListCitationPromptsParams {
190
+ /**
191
+ * Domain to look up (e.g. ramp.com)
192
+ */
193
+ input_domain: string;
194
+ }
195
+
196
+ export declare namespace PromptVolumes {
197
+ export {
198
+ type PromptVolumeCreateVolumeResponse as PromptVolumeCreateVolumeResponse,
199
+ type PromptVolumeListCitationPromptsResponse as PromptVolumeListCitationPromptsResponse,
200
+ type PromptVolumeCreateVolumeParams as PromptVolumeCreateVolumeParams,
201
+ type PromptVolumeListCitationPromptsParams as PromptVolumeListCitationPromptsParams,
202
+ };
203
+ }
@@ -93,13 +93,13 @@ export interface PromptAnswersParams {
93
93
  * List of filters to apply to the answers report.
94
94
  */
95
95
  filters?: Array<
96
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersRegionIDFilter
97
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersModelIDFilter
98
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersTagIDFilter
99
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersPromptTypeFilter
96
+ | Shared.RegionIDFilter
97
+ | Shared.ModelIDFilter
98
+ | Shared.TagIDFilter
99
+ | Shared.PromptTypeFilter
100
100
  | Shared.PromptFilter
101
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersPersonaIDFilter
102
- | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersTopicIDFilter
101
+ | Shared.PersonaIDFilter
102
+ | Shared.TopicIDFilter
103
103
  | PromptAnswersParams.AssetIDFilter
104
104
  | Shared.AssetNameFilter
105
105
  >;
@@ -113,78 +113,6 @@ export interface PromptAnswersParams {
113
113
  }
114
114
 
115
115
  export namespace PromptAnswersParams {
116
- export interface ProfoundAnswerEngineInsightsFiltersRegionIDFilter {
117
- /**
118
- * - `region` - Deprecated
119
- */
120
- field: 'region_id' | 'region';
121
-
122
- operator: 'is' | 'not_is' | 'in' | 'not_in';
123
-
124
- value: string | Array<string>;
125
- }
126
-
127
- export interface ProfoundAnswerEngineInsightsFiltersModelIDFilter {
128
- /**
129
- * - `model` - Deprecated
130
- */
131
- field: 'model_id' | 'model';
132
-
133
- operator: 'is' | 'not_is' | 'in' | 'not_in';
134
-
135
- value: string | Array<string>;
136
- }
137
-
138
- export interface ProfoundAnswerEngineInsightsFiltersTagIDFilter {
139
- /**
140
- * - `tag` - Deprecated
141
- */
142
- field: 'tag_id' | 'tag';
143
-
144
- operator: 'is' | 'not_is' | 'in' | 'not_in';
145
-
146
- value: string | Array<string>;
147
- }
148
-
149
- /**
150
- * Filter by prompt type (visibility or sentiment)
151
- */
152
- export interface ProfoundAnswerEngineInsightsFiltersPromptTypeFilter {
153
- field: 'prompt_type';
154
-
155
- operator:
156
- | 'is'
157
- | 'not_is'
158
- | 'in'
159
- | 'not_in'
160
- | 'contains'
161
- | 'not_contains'
162
- | 'matches'
163
- | 'contains_case_insensitive'
164
- | 'not_contains_case_insensitive';
165
-
166
- value: 'visibility' | 'sentiment' | Array<'visibility' | 'sentiment'>;
167
- }
168
-
169
- export interface ProfoundAnswerEngineInsightsFiltersPersonaIDFilter {
170
- field: 'persona_id';
171
-
172
- operator: 'is' | 'not_is' | 'in' | 'not_in';
173
-
174
- value: string | Array<string>;
175
- }
176
-
177
- export interface ProfoundAnswerEngineInsightsFiltersTopicIDFilter {
178
- /**
179
- * - `topic` - Deprecated
180
- */
181
- field: 'topic_id' | 'topic';
182
-
183
- operator: 'is' | 'not_is' | 'in' | 'not_in';
184
-
185
- value: string | Array<string>;
186
- }
187
-
188
116
  export interface AssetIDFilter {
189
117
  field: 'asset_id';
190
118