profoundai 0.31.2 → 0.32.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 (104) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +5 -5
  3. package/client.d.mts +0 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +0 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +0 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +0 -3
  10. package/client.mjs.map +1 -1
  11. package/internal/qs/formats.d.mts +7 -0
  12. package/internal/qs/formats.d.mts.map +1 -0
  13. package/internal/qs/formats.d.ts +7 -0
  14. package/internal/qs/formats.d.ts.map +1 -0
  15. package/internal/qs/formats.js +13 -0
  16. package/internal/qs/formats.js.map +1 -0
  17. package/internal/qs/formats.mjs +9 -0
  18. package/internal/qs/formats.mjs.map +1 -0
  19. package/internal/qs/index.d.mts +10 -0
  20. package/internal/qs/index.d.mts.map +1 -0
  21. package/internal/qs/index.d.ts +10 -0
  22. package/internal/qs/index.d.ts.map +1 -0
  23. package/internal/qs/index.js +14 -0
  24. package/internal/qs/index.js.map +1 -0
  25. package/internal/qs/index.mjs +10 -0
  26. package/internal/qs/index.mjs.map +1 -0
  27. package/internal/qs/stringify.d.mts +3 -0
  28. package/internal/qs/stringify.d.mts.map +1 -0
  29. package/internal/qs/stringify.d.ts +3 -0
  30. package/internal/qs/stringify.d.ts.map +1 -0
  31. package/internal/qs/stringify.js +277 -0
  32. package/internal/qs/stringify.js.map +1 -0
  33. package/internal/qs/stringify.mjs +274 -0
  34. package/internal/qs/stringify.mjs.map +1 -0
  35. package/internal/qs/types.d.mts +57 -0
  36. package/internal/qs/types.d.mts.map +1 -0
  37. package/internal/qs/types.d.ts +57 -0
  38. package/internal/qs/types.d.ts.map +1 -0
  39. package/internal/qs/types.js +3 -0
  40. package/internal/qs/types.js.map +1 -0
  41. package/internal/qs/types.mjs +2 -0
  42. package/internal/qs/types.mjs.map +1 -0
  43. package/internal/qs/utils.d.mts +15 -0
  44. package/internal/qs/utils.d.mts.map +1 -0
  45. package/internal/qs/utils.d.ts +15 -0
  46. package/internal/qs/utils.d.ts.map +1 -0
  47. package/internal/qs/utils.js +230 -0
  48. package/internal/qs/utils.js.map +1 -0
  49. package/internal/qs/utils.mjs +217 -0
  50. package/internal/qs/utils.mjs.map +1 -0
  51. package/internal/utils/query.d.mts +0 -3
  52. package/internal/utils/query.d.mts.map +1 -1
  53. package/internal/utils/query.d.ts +0 -3
  54. package/internal/utils/query.d.ts.map +1 -1
  55. package/internal/utils/query.js +3 -16
  56. package/internal/utils/query.js.map +1 -1
  57. package/internal/utils/query.mjs +2 -16
  58. package/internal/utils/query.mjs.map +1 -1
  59. package/package.json +1 -1
  60. package/resources/organizations/categories.d.mts +74 -12
  61. package/resources/organizations/categories.d.mts.map +1 -1
  62. package/resources/organizations/categories.d.ts +74 -12
  63. package/resources/organizations/categories.d.ts.map +1 -1
  64. package/resources/organizations/categories.js +2 -2
  65. package/resources/organizations/categories.js.map +1 -1
  66. package/resources/organizations/categories.mjs +2 -2
  67. package/resources/organizations/categories.mjs.map +1 -1
  68. package/resources/organizations/index.d.mts +1 -1
  69. package/resources/organizations/index.d.mts.map +1 -1
  70. package/resources/organizations/index.d.ts +1 -1
  71. package/resources/organizations/index.d.ts.map +1 -1
  72. package/resources/organizations/organizations.d.mts +46 -6
  73. package/resources/organizations/organizations.d.mts.map +1 -1
  74. package/resources/organizations/organizations.d.ts +46 -6
  75. package/resources/organizations/organizations.d.ts.map +1 -1
  76. package/resources/organizations/organizations.js.map +1 -1
  77. package/resources/organizations/organizations.mjs.map +1 -1
  78. package/resources/prompts.d.mts +2 -2
  79. package/resources/prompts.d.mts.map +1 -1
  80. package/resources/prompts.d.ts +2 -2
  81. package/resources/prompts.d.ts.map +1 -1
  82. package/resources/reports.d.mts +2 -2
  83. package/resources/reports.d.mts.map +1 -1
  84. package/resources/reports.d.ts +2 -2
  85. package/resources/reports.d.ts.map +1 -1
  86. package/src/client.ts +0 -3
  87. package/src/internal/qs/LICENSE.md +13 -0
  88. package/src/internal/qs/README.md +3 -0
  89. package/src/internal/qs/formats.ts +10 -0
  90. package/src/internal/qs/index.ts +13 -0
  91. package/src/internal/qs/stringify.ts +385 -0
  92. package/src/internal/qs/types.ts +71 -0
  93. package/src/internal/qs/utils.ts +265 -0
  94. package/src/internal/utils/query.ts +2 -18
  95. package/src/resources/organizations/categories.ts +102 -14
  96. package/src/resources/organizations/index.ts +1 -1
  97. package/src/resources/organizations/organizations.ts +54 -6
  98. package/src/resources/prompts.ts +2 -2
  99. package/src/resources/reports.ts +2 -2
  100. package/src/version.ts +1 -1
  101. package/version.d.mts +1 -1
  102. package/version.d.ts +1 -1
  103. package/version.js +1 -1
  104. package/version.mjs +1 -1
@@ -0,0 +1,71 @@
1
+ export type Format = 'RFC1738' | 'RFC3986';
2
+
3
+ export type DefaultEncoder = (str: any, defaultEncoder?: any, charset?: string) => string;
4
+ export type DefaultDecoder = (str: string, decoder?: any, charset?: string) => string;
5
+
6
+ export type BooleanOptional = boolean | undefined;
7
+
8
+ export type StringifyBaseOptions = {
9
+ delimiter?: string;
10
+ allowDots?: boolean;
11
+ encodeDotInKeys?: boolean;
12
+ strictNullHandling?: boolean;
13
+ skipNulls?: boolean;
14
+ encode?: boolean;
15
+ encoder?: (
16
+ str: any,
17
+ defaultEncoder: DefaultEncoder,
18
+ charset: string,
19
+ type: 'key' | 'value',
20
+ format?: Format,
21
+ ) => string;
22
+ filter?: Array<PropertyKey> | ((prefix: PropertyKey, value: any) => any);
23
+ arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma';
24
+ indices?: boolean;
25
+ sort?: ((a: PropertyKey, b: PropertyKey) => number) | null;
26
+ serializeDate?: (d: Date) => string;
27
+ format?: 'RFC1738' | 'RFC3986';
28
+ formatter?: (str: PropertyKey) => string;
29
+ encodeValuesOnly?: boolean;
30
+ addQueryPrefix?: boolean;
31
+ charset?: 'utf-8' | 'iso-8859-1';
32
+ charsetSentinel?: boolean;
33
+ allowEmptyArrays?: boolean;
34
+ commaRoundTrip?: boolean;
35
+ };
36
+
37
+ export type StringifyOptions = StringifyBaseOptions;
38
+
39
+ export type ParseBaseOptions = {
40
+ comma?: boolean;
41
+ delimiter?: string | RegExp;
42
+ depth?: number | false;
43
+ decoder?: (str: string, defaultDecoder: DefaultDecoder, charset: string, type: 'key' | 'value') => any;
44
+ arrayLimit?: number;
45
+ parseArrays?: boolean;
46
+ plainObjects?: boolean;
47
+ allowPrototypes?: boolean;
48
+ allowSparse?: boolean;
49
+ parameterLimit?: number;
50
+ strictDepth?: boolean;
51
+ strictNullHandling?: boolean;
52
+ ignoreQueryPrefix?: boolean;
53
+ charset?: 'utf-8' | 'iso-8859-1';
54
+ charsetSentinel?: boolean;
55
+ interpretNumericEntities?: boolean;
56
+ allowEmptyArrays?: boolean;
57
+ duplicates?: 'combine' | 'first' | 'last';
58
+ allowDots?: boolean;
59
+ decodeDotInKeys?: boolean;
60
+ };
61
+
62
+ export type ParseOptions = ParseBaseOptions;
63
+
64
+ export type ParsedQs = {
65
+ [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];
66
+ };
67
+
68
+ // Type to remove null or undefined union from each property
69
+ export type NonNullableProperties<T> = {
70
+ [K in keyof T]-?: Exclude<T[K], undefined | null>;
71
+ };
@@ -0,0 +1,265 @@
1
+ import { RFC1738 } from './formats';
2
+ import type { DefaultEncoder, Format } from './types';
3
+ import { isArray } from '../utils/values';
4
+
5
+ export let has = (obj: object, key: PropertyKey): boolean => (
6
+ (has = (Object as any).hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty)),
7
+ has(obj, key)
8
+ );
9
+
10
+ const hex_table = /* @__PURE__ */ (() => {
11
+ const array = [];
12
+ for (let i = 0; i < 256; ++i) {
13
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
14
+ }
15
+
16
+ return array;
17
+ })();
18
+
19
+ function compact_queue<T extends Record<string, any>>(queue: Array<{ obj: T; prop: string }>) {
20
+ while (queue.length > 1) {
21
+ const item = queue.pop();
22
+ if (!item) continue;
23
+
24
+ const obj = item.obj[item.prop];
25
+
26
+ if (isArray(obj)) {
27
+ const compacted: unknown[] = [];
28
+
29
+ for (let j = 0; j < obj.length; ++j) {
30
+ if (typeof obj[j] !== 'undefined') {
31
+ compacted.push(obj[j]);
32
+ }
33
+ }
34
+
35
+ // @ts-ignore
36
+ item.obj[item.prop] = compacted;
37
+ }
38
+ }
39
+ }
40
+
41
+ function array_to_object(source: any[], options: { plainObjects: boolean }) {
42
+ const obj = options && options.plainObjects ? Object.create(null) : {};
43
+ for (let i = 0; i < source.length; ++i) {
44
+ if (typeof source[i] !== 'undefined') {
45
+ obj[i] = source[i];
46
+ }
47
+ }
48
+
49
+ return obj;
50
+ }
51
+
52
+ export function merge(
53
+ target: any,
54
+ source: any,
55
+ options: { plainObjects?: boolean; allowPrototypes?: boolean } = {},
56
+ ) {
57
+ if (!source) {
58
+ return target;
59
+ }
60
+
61
+ if (typeof source !== 'object') {
62
+ if (isArray(target)) {
63
+ target.push(source);
64
+ } else if (target && typeof target === 'object') {
65
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) {
66
+ target[source] = true;
67
+ }
68
+ } else {
69
+ return [target, source];
70
+ }
71
+
72
+ return target;
73
+ }
74
+
75
+ if (!target || typeof target !== 'object') {
76
+ return [target].concat(source);
77
+ }
78
+
79
+ let mergeTarget = target;
80
+ if (isArray(target) && !isArray(source)) {
81
+ // @ts-ignore
82
+ mergeTarget = array_to_object(target, options);
83
+ }
84
+
85
+ if (isArray(target) && isArray(source)) {
86
+ source.forEach(function (item, i) {
87
+ if (has(target, i)) {
88
+ const targetItem = target[i];
89
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
90
+ target[i] = merge(targetItem, item, options);
91
+ } else {
92
+ target.push(item);
93
+ }
94
+ } else {
95
+ target[i] = item;
96
+ }
97
+ });
98
+ return target;
99
+ }
100
+
101
+ return Object.keys(source).reduce(function (acc, key) {
102
+ const value = source[key];
103
+
104
+ if (has(acc, key)) {
105
+ acc[key] = merge(acc[key], value, options);
106
+ } else {
107
+ acc[key] = value;
108
+ }
109
+ return acc;
110
+ }, mergeTarget);
111
+ }
112
+
113
+ export function assign_single_source(target: any, source: any) {
114
+ return Object.keys(source).reduce(function (acc, key) {
115
+ acc[key] = source[key];
116
+ return acc;
117
+ }, target);
118
+ }
119
+
120
+ export function decode(str: string, _: any, charset: string) {
121
+ const strWithoutPlus = str.replace(/\+/g, ' ');
122
+ if (charset === 'iso-8859-1') {
123
+ // unescape never throws, no try...catch needed:
124
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
125
+ }
126
+ // utf-8
127
+ try {
128
+ return decodeURIComponent(strWithoutPlus);
129
+ } catch (e) {
130
+ return strWithoutPlus;
131
+ }
132
+ }
133
+
134
+ const limit = 1024;
135
+
136
+ export const encode: (
137
+ str: any,
138
+ defaultEncoder: DefaultEncoder,
139
+ charset: string,
140
+ type: 'key' | 'value',
141
+ format: Format,
142
+ ) => string = (str, _defaultEncoder, charset, _kind, format: Format) => {
143
+ // This code was originally written by Brian White for the io.js core querystring library.
144
+ // It has been adapted here for stricter adherence to RFC 3986
145
+ if (str.length === 0) {
146
+ return str;
147
+ }
148
+
149
+ let string = str;
150
+ if (typeof str === 'symbol') {
151
+ string = Symbol.prototype.toString.call(str);
152
+ } else if (typeof str !== 'string') {
153
+ string = String(str);
154
+ }
155
+
156
+ if (charset === 'iso-8859-1') {
157
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
158
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
159
+ });
160
+ }
161
+
162
+ let out = '';
163
+ for (let j = 0; j < string.length; j += limit) {
164
+ const segment = string.length >= limit ? string.slice(j, j + limit) : string;
165
+ const arr = [];
166
+
167
+ for (let i = 0; i < segment.length; ++i) {
168
+ let c = segment.charCodeAt(i);
169
+ if (
170
+ c === 0x2d || // -
171
+ c === 0x2e || // .
172
+ c === 0x5f || // _
173
+ c === 0x7e || // ~
174
+ (c >= 0x30 && c <= 0x39) || // 0-9
175
+ (c >= 0x41 && c <= 0x5a) || // a-z
176
+ (c >= 0x61 && c <= 0x7a) || // A-Z
177
+ (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )
178
+ ) {
179
+ arr[arr.length] = segment.charAt(i);
180
+ continue;
181
+ }
182
+
183
+ if (c < 0x80) {
184
+ arr[arr.length] = hex_table[c];
185
+ continue;
186
+ }
187
+
188
+ if (c < 0x800) {
189
+ arr[arr.length] = hex_table[0xc0 | (c >> 6)]! + hex_table[0x80 | (c & 0x3f)];
190
+ continue;
191
+ }
192
+
193
+ if (c < 0xd800 || c >= 0xe000) {
194
+ arr[arr.length] =
195
+ hex_table[0xe0 | (c >> 12)]! + hex_table[0x80 | ((c >> 6) & 0x3f)] + hex_table[0x80 | (c & 0x3f)];
196
+ continue;
197
+ }
198
+
199
+ i += 1;
200
+ c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
201
+
202
+ arr[arr.length] =
203
+ hex_table[0xf0 | (c >> 18)]! +
204
+ hex_table[0x80 | ((c >> 12) & 0x3f)] +
205
+ hex_table[0x80 | ((c >> 6) & 0x3f)] +
206
+ hex_table[0x80 | (c & 0x3f)];
207
+ }
208
+
209
+ out += arr.join('');
210
+ }
211
+
212
+ return out;
213
+ };
214
+
215
+ export function compact(value: any) {
216
+ const queue = [{ obj: { o: value }, prop: 'o' }];
217
+ const refs = [];
218
+
219
+ for (let i = 0; i < queue.length; ++i) {
220
+ const item = queue[i];
221
+ // @ts-ignore
222
+ const obj = item.obj[item.prop];
223
+
224
+ const keys = Object.keys(obj);
225
+ for (let j = 0; j < keys.length; ++j) {
226
+ const key = keys[j]!;
227
+ const val = obj[key];
228
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
229
+ queue.push({ obj: obj, prop: key });
230
+ refs.push(val);
231
+ }
232
+ }
233
+ }
234
+
235
+ compact_queue(queue);
236
+
237
+ return value;
238
+ }
239
+
240
+ export function is_regexp(obj: any) {
241
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
242
+ }
243
+
244
+ export function is_buffer(obj: any) {
245
+ if (!obj || typeof obj !== 'object') {
246
+ return false;
247
+ }
248
+
249
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
250
+ }
251
+
252
+ export function combine(a: any, b: any) {
253
+ return [].concat(a, b);
254
+ }
255
+
256
+ export function maybe_map<T>(val: T[], fn: (v: T) => T) {
257
+ if (isArray(val)) {
258
+ const mapped = [];
259
+ for (let i = 0; i < val.length; i += 1) {
260
+ mapped.push(fn(val[i]!));
261
+ }
262
+ return mapped;
263
+ }
264
+ return fn(val);
265
+ }
@@ -1,23 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { ProfoundError } from '../../core/error';
3
+ import * as qs from '../qs/stringify';
4
4
 
5
- /**
6
- * Basic re-implementation of `qs.stringify` for primitive types.
7
- */
8
5
  export function stringifyQuery(query: object | Record<string, unknown>) {
9
- return Object.entries(query)
10
- .filter(([_, value]) => typeof value !== 'undefined')
11
- .map(([key, value]) => {
12
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
13
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
14
- }
15
- if (value === null) {
16
- return `${encodeURIComponent(key)}=`;
17
- }
18
- throw new ProfoundError(
19
- `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
20
- );
21
- })
22
- .join('&');
6
+ return qs.stringify(query, { arrayFormat: 'comma' });
23
7
  }
@@ -1,7 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as CategoriesAPI from './categories';
5
4
  import { APIPromise } from '../../core/api-promise';
6
5
  import { RequestOptions } from '../../internal/request-options';
7
6
  import { path } from '../../internal/utils/path';
@@ -34,8 +33,12 @@ export class Categories extends APIResource {
34
33
  /**
35
34
  * Get Category Prompts
36
35
  */
37
- prompts(categoryID: string, options?: RequestOptions): APIPromise<CategoryPromptsResponse> {
38
- return this._client.get(path`/v1/org/categories/${categoryID}/prompts`, options);
36
+ prompts(
37
+ categoryID: string,
38
+ query: CategoryPromptsParams | null | undefined = {},
39
+ options?: RequestOptions,
40
+ ): APIPromise<CategoryPromptsResponse> {
41
+ return this._client.get(path`/v1/org/categories/${categoryID}/prompts`, { query, ...options });
39
42
  }
40
43
 
41
44
  /**
@@ -53,13 +56,18 @@ export class Categories extends APIResource {
53
56
  }
54
57
  }
55
58
 
56
- export interface OrgItem {
57
- id: string;
59
+ export type CategoryListResponse = Array<CategoryListResponse.CategoryListResponseItem>;
58
60
 
59
- name: string;
60
- }
61
+ export namespace CategoryListResponse {
62
+ /**
63
+ * Generic id+name reference used across domain boundaries.
64
+ */
65
+ export interface CategoryListResponseItem {
66
+ id: string;
61
67
 
62
- export type CategoryListResponse = Array<OrgItem>;
68
+ name: string;
69
+ }
70
+ }
63
71
 
64
72
  export type CategoryAssetsResponse = Array<CategoryAssetsResponse.CategoryAssetsResponseItem>;
65
73
 
@@ -129,6 +137,8 @@ export namespace CategoryGetCategoryPersonasResponse {
129
137
 
130
138
  export interface CategoryPromptsResponse {
131
139
  data: Array<CategoryPromptsResponse.Data>;
140
+
141
+ info: CategoryPromptsResponse.Info;
132
142
  }
133
143
 
134
144
  export namespace CategoryPromptsResponse {
@@ -137,21 +147,81 @@ export namespace CategoryPromptsResponse {
137
147
 
138
148
  created_at: string;
139
149
 
140
- platforms: Array<CategoriesAPI.OrgItem>;
150
+ platforms: Array<Data.Platform>;
141
151
 
142
152
  prompt: string;
143
153
 
144
154
  prompt_type: string;
145
155
 
146
- regions: Array<CategoriesAPI.OrgItem>;
156
+ regions: Array<Data.Region>;
147
157
 
148
- topic: CategoriesAPI.OrgItem;
158
+ /**
159
+ * Generic id+name reference used across domain boundaries.
160
+ */
161
+ topic: Data.Topic;
149
162
 
150
- tags?: Array<CategoriesAPI.OrgItem>;
163
+ tags?: Array<Data.Tag>;
164
+ }
165
+
166
+ export namespace Data {
167
+ /**
168
+ * Generic id+name reference used across domain boundaries.
169
+ */
170
+ export interface Platform {
171
+ id: string;
172
+
173
+ name: string;
174
+ }
175
+
176
+ /**
177
+ * Generic id+name reference used across domain boundaries.
178
+ */
179
+ export interface Region {
180
+ id: string;
181
+
182
+ name: string;
183
+ }
184
+
185
+ /**
186
+ * Generic id+name reference used across domain boundaries.
187
+ */
188
+ export interface Topic {
189
+ id: string;
190
+
191
+ name: string;
192
+ }
193
+
194
+ /**
195
+ * Generic id+name reference used across domain boundaries.
196
+ */
197
+ export interface Tag {
198
+ id: string;
199
+
200
+ name: string;
201
+ }
202
+ }
203
+
204
+ export interface Info {
205
+ limit: number;
206
+
207
+ next_cursor: string | null;
208
+
209
+ total_rows: number;
151
210
  }
152
211
  }
153
212
 
154
- export type CategoryTagsResponse = Array<OrgItem>;
213
+ export type CategoryTagsResponse = Array<CategoryTagsResponse.CategoryTagsResponseItem>;
214
+
215
+ export namespace CategoryTagsResponse {
216
+ /**
217
+ * Generic id+name reference used across domain boundaries.
218
+ */
219
+ export interface CategoryTagsResponseItem {
220
+ id: string;
221
+
222
+ name: string;
223
+ }
224
+ }
155
225
 
156
226
  export type CategoryTopicsResponse = Array<CategoryTopicsResponse.CategoryTopicsResponseItem>;
157
227
 
@@ -163,14 +233,32 @@ export namespace CategoryTopicsResponse {
163
233
  }
164
234
  }
165
235
 
236
+ export interface CategoryPromptsParams {
237
+ cursor?: string | null;
238
+
239
+ limit?: number;
240
+
241
+ order_dir?: 'asc' | 'desc';
242
+
243
+ platform_id?: Array<string>;
244
+
245
+ prompt_type?: Array<'visibility' | 'sentiment'>;
246
+
247
+ region_id?: Array<string>;
248
+
249
+ tag_id?: Array<string>;
250
+
251
+ topic_id?: Array<string>;
252
+ }
253
+
166
254
  export declare namespace Categories {
167
255
  export {
168
- type OrgItem as OrgItem,
169
256
  type CategoryListResponse as CategoryListResponse,
170
257
  type CategoryAssetsResponse as CategoryAssetsResponse,
171
258
  type CategoryGetCategoryPersonasResponse as CategoryGetCategoryPersonasResponse,
172
259
  type CategoryPromptsResponse as CategoryPromptsResponse,
173
260
  type CategoryTagsResponse as CategoryTagsResponse,
174
261
  type CategoryTopicsResponse as CategoryTopicsResponse,
262
+ type CategoryPromptsParams as CategoryPromptsParams,
175
263
  };
176
264
  }
@@ -2,13 +2,13 @@
2
2
 
3
3
  export {
4
4
  Categories,
5
- type OrgItem,
6
5
  type CategoryListResponse,
7
6
  type CategoryAssetsResponse,
8
7
  type CategoryGetCategoryPersonasResponse,
9
8
  type CategoryPromptsResponse,
10
9
  type CategoryTagsResponse,
11
10
  type CategoryTopicsResponse,
11
+ type CategoryPromptsParams,
12
12
  } from './categories';
13
13
  export {
14
14
  Organizations,
@@ -7,10 +7,10 @@ import {
7
7
  CategoryAssetsResponse,
8
8
  CategoryGetCategoryPersonasResponse,
9
9
  CategoryListResponse,
10
+ CategoryPromptsParams,
10
11
  CategoryPromptsResponse,
11
12
  CategoryTagsResponse,
12
13
  CategoryTopicsResponse,
13
- OrgItem,
14
14
  } from './categories';
15
15
  import { APIPromise } from '../../core/api-promise';
16
16
  import { RequestOptions } from '../../internal/request-options';
@@ -74,7 +74,10 @@ export namespace OrganizationGetPersonasResponse {
74
74
  export interface Data {
75
75
  id: string;
76
76
 
77
- category: CategoriesAPI.OrgItem;
77
+ /**
78
+ * Generic id+name reference used across domain boundaries.
79
+ */
80
+ category: Data.Category;
78
81
 
79
82
  name: string;
80
83
 
@@ -82,6 +85,15 @@ export namespace OrganizationGetPersonasResponse {
82
85
  }
83
86
 
84
87
  export namespace Data {
88
+ /**
89
+ * Generic id+name reference used across domain boundaries.
90
+ */
91
+ export interface Category {
92
+ id: string;
93
+
94
+ name: string;
95
+ }
96
+
85
97
  export interface Persona {
86
98
  behavior: Persona.Behavior;
87
99
 
@@ -122,7 +134,10 @@ export namespace OrganizationListAssetsResponse {
122
134
  export interface Data {
123
135
  id: string;
124
136
 
125
- category: CategoriesAPI.OrgItem;
137
+ /**
138
+ * Generic id+name reference used across domain boundaries.
139
+ */
140
+ category: Data.Category;
126
141
 
127
142
  created_at: string;
128
143
 
@@ -136,11 +151,44 @@ export namespace OrganizationListAssetsResponse {
136
151
 
137
152
  alternate_domains?: Array<string> | null;
138
153
  }
154
+
155
+ export namespace Data {
156
+ /**
157
+ * Generic id+name reference used across domain boundaries.
158
+ */
159
+ export interface Category {
160
+ id: string;
161
+
162
+ name: string;
163
+ }
164
+ }
165
+ }
166
+
167
+ export type OrganizationModelsResponse = Array<OrganizationModelsResponse.OrganizationModelsResponseItem>;
168
+
169
+ export namespace OrganizationModelsResponse {
170
+ /**
171
+ * Generic id+name reference used across domain boundaries.
172
+ */
173
+ export interface OrganizationModelsResponseItem {
174
+ id: string;
175
+
176
+ name: string;
177
+ }
139
178
  }
140
179
 
141
- export type OrganizationModelsResponse = Array<CategoriesAPI.OrgItem>;
180
+ export type OrganizationRegionsResponse = Array<OrganizationRegionsResponse.OrganizationRegionsResponseItem>;
181
+
182
+ export namespace OrganizationRegionsResponse {
183
+ /**
184
+ * Generic id+name reference used across domain boundaries.
185
+ */
186
+ export interface OrganizationRegionsResponseItem {
187
+ id: string;
142
188
 
143
- export type OrganizationRegionsResponse = Array<CategoriesAPI.OrgItem>;
189
+ name: string;
190
+ }
191
+ }
144
192
 
145
193
  Organizations.Categories = Categories;
146
194
 
@@ -155,12 +203,12 @@ export declare namespace Organizations {
155
203
 
156
204
  export {
157
205
  Categories as Categories,
158
- type OrgItem as OrgItem,
159
206
  type CategoryListResponse as CategoryListResponse,
160
207
  type CategoryAssetsResponse as CategoryAssetsResponse,
161
208
  type CategoryGetCategoryPersonasResponse as CategoryGetCategoryPersonasResponse,
162
209
  type CategoryPromptsResponse as CategoryPromptsResponse,
163
210
  type CategoryTagsResponse as CategoryTagsResponse,
164
211
  type CategoryTopicsResponse as CategoryTopicsResponse,
212
+ type CategoryPromptsParams as CategoryPromptsParams,
165
213
  };
166
214
  }
@@ -96,7 +96,7 @@ export interface PromptAnswersParams {
96
96
  | Shared.RegionIDFilter
97
97
  | Shared.ModelIDFilter
98
98
  | Shared.TagIDFilter
99
- | PromptAnswersParams.PromptTypeFilter
99
+ | PromptAnswersParams.ProfoundAnswerEngineInsightsFiltersPromptTypeFilter
100
100
  | Shared.PromptFilter
101
101
  | Shared.PersonaIDFilter
102
102
  | Shared.TopicIDFilter
@@ -116,7 +116,7 @@ export namespace PromptAnswersParams {
116
116
  /**
117
117
  * Filter by prompt type (visibility or sentiment)
118
118
  */
119
- export interface PromptTypeFilter {
119
+ export interface ProfoundAnswerEngineInsightsFiltersPromptTypeFilter {
120
120
  field: 'prompt_type';
121
121
 
122
122
  operator:
@@ -224,7 +224,7 @@ export interface ReportCitationsParams {
224
224
  | Shared.TagIDFilter
225
225
  | ReportCitationsParams.URLFilter
226
226
  | ReportCitationsParams.RootDomainFilter
227
- | ReportCitationsParams.PromptTypeFilter
227
+ | ReportCitationsParams.ProfoundAnswerEngineInsightsFiltersPromptTypeFilter
228
228
  | Shared.PersonaIDFilter
229
229
  | ReportCitationsParams.CitationCategoryFilter
230
230
  | Shared.PromptFilter
@@ -312,7 +312,7 @@ export namespace ReportCitationsParams {
312
312
  /**
313
313
  * Filter by prompt type (visibility or sentiment)
314
314
  */
315
- export interface PromptTypeFilter {
315
+ export interface ProfoundAnswerEngineInsightsFiltersPromptTypeFilter {
316
316
  field: 'prompt_type';
317
317
 
318
318
  operator:
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.31.2'; // x-release-please-version
1
+ export const VERSION = '0.32.0'; // x-release-please-version