getricky 0.1.3 → 0.1.4

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.
@@ -25,6 +25,110 @@ export type Error = {
25
25
  request_id: string;
26
26
  };
27
27
  };
28
+ /**
29
+ * An AI agent that answers conversations alongside the team.
30
+ */
31
+ export type Agent = {
32
+ /**
33
+ * Agent ID.
34
+ */
35
+ id: string;
36
+ /**
37
+ * Name the team sees.
38
+ */
39
+ name: string;
40
+ /**
41
+ * What the agent is for.
42
+ */
43
+ description: string | null;
44
+ /**
45
+ * How the agent answers customers.
46
+ */
47
+ instructions: string | null;
48
+ /**
49
+ * Model that writes its replies; one `id` of `GET /agent-options`.
50
+ */
51
+ model: string | null;
52
+ /**
53
+ * Voice on calls; one of `GET /agent-options`.
54
+ */
55
+ voice: string;
56
+ /**
57
+ * What the agent may do beyond replying, by capability `name`.
58
+ */
59
+ capabilities: Array<string>;
60
+ /**
61
+ * Members who receive the conversation when the agent hands it to a person.
62
+ */
63
+ handoff_user_ids: Array<string>;
64
+ /**
65
+ * When it was created.
66
+ */
67
+ created_at: string;
68
+ /**
69
+ * Last change to its settings.
70
+ */
71
+ updated_at: string;
72
+ /**
73
+ * When it was archived; null while active.
74
+ */
75
+ archived_at: string | null;
76
+ };
77
+ /**
78
+ * What an agent can be configured with.
79
+ */
80
+ export type AgentOptions = {
81
+ /**
82
+ * Models an agent can use.
83
+ */
84
+ models: Array<{
85
+ /**
86
+ * Model ID, the value of `model`.
87
+ */
88
+ id: string;
89
+ /**
90
+ * Display name.
91
+ */
92
+ label: string;
93
+ /**
94
+ * What the model reads.
95
+ */
96
+ input: Array<'text' | 'image'>;
97
+ }>;
98
+ /**
99
+ * Model of an agent created without one.
100
+ */
101
+ default_model: string;
102
+ /**
103
+ * Voices an agent can use.
104
+ */
105
+ voices: Array<string>;
106
+ /**
107
+ * Voice of an agent created without one.
108
+ */
109
+ default_voice: string;
110
+ /**
111
+ * Capabilities an agent can be given.
112
+ */
113
+ capabilities: Array<{
114
+ /**
115
+ * Capability name, the value in `capabilities`.
116
+ */
117
+ name: string;
118
+ /**
119
+ * Display name in Ricky.
120
+ */
121
+ label: string;
122
+ /**
123
+ * What it lets the agent do, as Ricky shows it.
124
+ */
125
+ description: string;
126
+ /**
127
+ * Integration it belongs to; it works only once the organization connects it in Ricky. `human_handoff` needs no connection but requires `handoff_user_ids`.
128
+ */
129
+ family: string;
130
+ }>;
131
+ };
28
132
  /**
29
133
  * A label applied to contacts.
30
134
  */
@@ -2002,6 +2106,275 @@ export type WorkflowExecution = {
2002
2106
  */
2003
2107
  processed_at: string | null;
2004
2108
  };
2109
+ /**
2110
+ * A branch or place the agents can send as a WhatsApp location.
2111
+ */
2112
+ export type KnowledgeLocation = {
2113
+ /**
2114
+ * Location ID.
2115
+ */
2116
+ id: string;
2117
+ /**
2118
+ * Name customers know it by.
2119
+ */
2120
+ name: string;
2121
+ /**
2122
+ * Full address as customers read it.
2123
+ */
2124
+ address: string;
2125
+ /**
2126
+ * Latitude of the map pin.
2127
+ */
2128
+ latitude: number;
2129
+ /**
2130
+ * Longitude of the map pin.
2131
+ */
2132
+ longitude: number;
2133
+ /**
2134
+ * Street.
2135
+ */
2136
+ street: string | null;
2137
+ /**
2138
+ * City.
2139
+ */
2140
+ city: string | null;
2141
+ /**
2142
+ * State, province or region.
2143
+ */
2144
+ state: string | null;
2145
+ /**
2146
+ * Postal code.
2147
+ */
2148
+ postal_code: string | null;
2149
+ /**
2150
+ * Country.
2151
+ */
2152
+ country: string | null;
2153
+ /**
2154
+ * Country code, ISO 3166-1 alpha-2.
2155
+ */
2156
+ country_code: string | null;
2157
+ /**
2158
+ * Phone in E.164.
2159
+ */
2160
+ phone: string | null;
2161
+ /**
2162
+ * Email.
2163
+ */
2164
+ email: string | null;
2165
+ /**
2166
+ * Opening hours, as free text.
2167
+ */
2168
+ hours: string | null;
2169
+ };
2170
+ /**
2171
+ * A contact card in the knowledge directory, which agents can send to customers.
2172
+ */
2173
+ export type KnowledgeContact = {
2174
+ /**
2175
+ * Knowledge contact ID.
2176
+ */
2177
+ id: string;
2178
+ /**
2179
+ * Name shown on the contact card.
2180
+ */
2181
+ display_name: string;
2182
+ /**
2183
+ * First name.
2184
+ */
2185
+ first_name: string | null;
2186
+ /**
2187
+ * Last name.
2188
+ */
2189
+ last_name: string | null;
2190
+ /**
2191
+ * Name prefix, such as `Dr.`.
2192
+ */
2193
+ prefix: string | null;
2194
+ /**
2195
+ * Name suffix.
2196
+ */
2197
+ suffix: string | null;
2198
+ /**
2199
+ * Company.
2200
+ */
2201
+ company: string | null;
2202
+ /**
2203
+ * Department.
2204
+ */
2205
+ department: string | null;
2206
+ /**
2207
+ * Job title.
2208
+ */
2209
+ job_title: string | null;
2210
+ /**
2211
+ * When the agents should share it.
2212
+ */
2213
+ description: string | null;
2214
+ /**
2215
+ * Phone in E.164.
2216
+ */
2217
+ phone: string | null;
2218
+ /**
2219
+ * `CELL`, `WORK` or `HOME`.
2220
+ */
2221
+ phone_type: string | null;
2222
+ /**
2223
+ * Email.
2224
+ */
2225
+ email: string | null;
2226
+ /**
2227
+ * `WORK` or `PERSONAL`.
2228
+ */
2229
+ email_type: string | null;
2230
+ };
2231
+ /**
2232
+ * A document or image the agents can consult or send.
2233
+ */
2234
+ export type KnowledgeFile = {
2235
+ /**
2236
+ * File ID.
2237
+ */
2238
+ id: string;
2239
+ /**
2240
+ * Title the agents see.
2241
+ */
2242
+ title: string;
2243
+ /**
2244
+ * When the agents should use it; may be empty.
2245
+ */
2246
+ description: string;
2247
+ /**
2248
+ * Original file name.
2249
+ */
2250
+ filename: string;
2251
+ /**
2252
+ * File type.
2253
+ */
2254
+ mime_type: 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'image/jpeg' | 'image/png';
2255
+ /**
2256
+ * Size in bytes.
2257
+ */
2258
+ size_bytes: number;
2259
+ /**
2260
+ * `uploading` until `POST /knowledge/files/{file_id}/complete` reads it; then `ready`.
2261
+ */
2262
+ status: 'uploading' | 'ready' | 'failed';
2263
+ /**
2264
+ * Agents may read it to answer.
2265
+ */
2266
+ consult_enabled: boolean;
2267
+ /**
2268
+ * Agents may send the file itself to customers.
2269
+ */
2270
+ send_enabled: boolean;
2271
+ /**
2272
+ * Pages of a PDF; null otherwise.
2273
+ */
2274
+ page_count: number | null;
2275
+ /**
2276
+ * Start of the text Ricky read from it.
2277
+ */
2278
+ preview: string | null;
2279
+ /**
2280
+ * Why Ricky could not read useful content; null when it could.
2281
+ */
2282
+ extraction_error: string | null;
2283
+ /**
2284
+ * Signed download URL, valid for five minutes. Only `GET /knowledge/files/{file_id}` of a `ready` file carries it; null elsewhere.
2285
+ */
2286
+ download_url: string | null;
2287
+ /**
2288
+ * When the upload began.
2289
+ */
2290
+ created_at: string;
2291
+ /**
2292
+ * Last change.
2293
+ */
2294
+ updated_at: string;
2295
+ };
2296
+ /**
2297
+ * A file waiting for its bytes, and where to put them.
2298
+ */
2299
+ export type KnowledgeFileUpload = {
2300
+ file: KnowledgeFile;
2301
+ /**
2302
+ * Signed URL valid for two hours. `PUT` the file bytes to it with `Content-Type` set to `mime_type`, then call `POST /knowledge/files/{file_id}/complete`.
2303
+ */
2304
+ upload_url: string;
2305
+ };
2306
+ /**
2307
+ * Only `name` is required; it does not connect the agent to any channel.
2308
+ */
2309
+ export type CreateAgent = {
2310
+ /**
2311
+ * Name the team sees.
2312
+ */
2313
+ name: string;
2314
+ /**
2315
+ * What the agent is for.
2316
+ */
2317
+ description?: string | null;
2318
+ /**
2319
+ * How the agent answers customers.
2320
+ */
2321
+ instructions?: string | null;
2322
+ /**
2323
+ * A model `id` of `GET /agent-options`. Without one, the default model.
2324
+ */
2325
+ model?: string;
2326
+ /**
2327
+ * A voice of `GET /agent-options`. Without one, the default voice.
2328
+ */
2329
+ voice?: string;
2330
+ /**
2331
+ * The complete set of capability names. Replaces the current ones.
2332
+ */
2333
+ capabilities?: Array<string>;
2334
+ /**
2335
+ * The complete set of members who receive handed-off conversations. Required with `ricky.handoff.request`.
2336
+ */
2337
+ handoff_user_ids?: Array<string>;
2338
+ };
2339
+ /**
2340
+ * Only the fields you send change. Send `null` to clear a text.
2341
+ */
2342
+ export type UpdateAgent = {
2343
+ /**
2344
+ * Name the team sees.
2345
+ */
2346
+ name?: string;
2347
+ /**
2348
+ * What the agent is for.
2349
+ */
2350
+ description?: string | null;
2351
+ /**
2352
+ * How the agent answers customers.
2353
+ */
2354
+ instructions?: string | null;
2355
+ /**
2356
+ * A model `id` of `GET /agent-options`. Without one, the default model.
2357
+ */
2358
+ model?: string;
2359
+ /**
2360
+ * A voice of `GET /agent-options`. Without one, the default voice.
2361
+ */
2362
+ voice?: string;
2363
+ /**
2364
+ * The complete set of capability names. Replaces the current ones.
2365
+ */
2366
+ capabilities?: Array<string>;
2367
+ /**
2368
+ * The complete set of members who receive handed-off conversations. Required with `ricky.handoff.request`.
2369
+ */
2370
+ handoff_user_ids?: Array<string>;
2371
+ };
2372
+ export type AssignConversationAgent = {
2373
+ /**
2374
+ * Agent that answers from now on; null turns the AI off for the conversation.
2375
+ */
2376
+ agent_id: string | null;
2377
+ };
2005
2378
  /**
2006
2379
  * A contact needs at least a name, a phone or an email.
2007
2380
  */
@@ -2793,38 +3166,313 @@ export type UpdateWorkflow = {
2793
3166
  };
2794
3167
  };
2795
3168
  /**
2796
- * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
3169
+ * A location needs a name, an address and its coordinates.
2797
3170
  */
2798
- export type IdempotencyKey = string;
2799
- export type ListContactsData = {
2800
- body?: never;
2801
- path?: never;
2802
- query?: {
2803
- /**
2804
- * Items per page.
2805
- */
2806
- page_size?: number;
2807
- /**
2808
- * `next_cursor` from the previous page. Use it unchanged.
2809
- */
2810
- cursor?: string;
2811
- /**
2812
- * Text contained in the name, phone, email or company.
2813
- */
2814
- query?: string;
2815
- /**
2816
- * Only contacts with this tag.
2817
- */
2818
- tag_id?: string;
2819
- /**
2820
- * Only contacts this member owns.
2821
- */
2822
- owner_user_id?: string;
2823
- /**
2824
- * Only contacts at this stage.
2825
- */
2826
- lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
2827
- /**
3171
+ export type CreateKnowledgeLocation = {
3172
+ /**
3173
+ * Name customers know it by.
3174
+ */
3175
+ name: string;
3176
+ /**
3177
+ * Full address as customers read it.
3178
+ */
3179
+ address: string;
3180
+ /**
3181
+ * Latitude of the map pin, confirmed, not estimated.
3182
+ */
3183
+ latitude: number;
3184
+ /**
3185
+ * Longitude of the map pin, confirmed, not estimated.
3186
+ */
3187
+ longitude: number;
3188
+ /**
3189
+ * Street.
3190
+ */
3191
+ street?: string | null;
3192
+ /**
3193
+ * City.
3194
+ */
3195
+ city?: string | null;
3196
+ /**
3197
+ * State, province or region.
3198
+ */
3199
+ state?: string | null;
3200
+ /**
3201
+ * Postal code.
3202
+ */
3203
+ postal_code?: string | null;
3204
+ /**
3205
+ * Country.
3206
+ */
3207
+ country?: string | null;
3208
+ /**
3209
+ * Country code, ISO 3166-1 alpha-2.
3210
+ */
3211
+ country_code?: string | null;
3212
+ /**
3213
+ * Phone with country code, for example `+507 6000-1234`.
3214
+ */
3215
+ phone?: string | null;
3216
+ /**
3217
+ * Email.
3218
+ */
3219
+ email?: string | null;
3220
+ /**
3221
+ * Opening hours, as free text.
3222
+ */
3223
+ hours?: string | null;
3224
+ };
3225
+ /**
3226
+ * Only the fields you send change. Send `null` to clear an optional one.
3227
+ */
3228
+ export type UpdateKnowledgeLocation = {
3229
+ /**
3230
+ * Name customers know it by.
3231
+ */
3232
+ name?: string;
3233
+ /**
3234
+ * Full address as customers read it.
3235
+ */
3236
+ address?: string;
3237
+ /**
3238
+ * Latitude of the map pin, confirmed, not estimated.
3239
+ */
3240
+ latitude?: number;
3241
+ /**
3242
+ * Longitude of the map pin, confirmed, not estimated.
3243
+ */
3244
+ longitude?: number;
3245
+ /**
3246
+ * Street.
3247
+ */
3248
+ street?: string | null;
3249
+ /**
3250
+ * City.
3251
+ */
3252
+ city?: string | null;
3253
+ /**
3254
+ * State, province or region.
3255
+ */
3256
+ state?: string | null;
3257
+ /**
3258
+ * Postal code.
3259
+ */
3260
+ postal_code?: string | null;
3261
+ /**
3262
+ * Country.
3263
+ */
3264
+ country?: string | null;
3265
+ /**
3266
+ * Country code, ISO 3166-1 alpha-2.
3267
+ */
3268
+ country_code?: string | null;
3269
+ /**
3270
+ * Phone with country code, for example `+507 6000-1234`.
3271
+ */
3272
+ phone?: string | null;
3273
+ /**
3274
+ * Email.
3275
+ */
3276
+ email?: string | null;
3277
+ /**
3278
+ * Opening hours, as free text.
3279
+ */
3280
+ hours?: string | null;
3281
+ };
3282
+ /**
3283
+ * A contact card needs a display name and a phone or an email.
3284
+ */
3285
+ export type CreateKnowledgeContact = {
3286
+ /**
3287
+ * Name shown on the contact card.
3288
+ */
3289
+ display_name: string;
3290
+ /**
3291
+ * First name.
3292
+ */
3293
+ first_name?: string | null;
3294
+ /**
3295
+ * Last name.
3296
+ */
3297
+ last_name?: string | null;
3298
+ /**
3299
+ * Name prefix, such as `Dr.`.
3300
+ */
3301
+ prefix?: string | null;
3302
+ /**
3303
+ * Name suffix.
3304
+ */
3305
+ suffix?: string | null;
3306
+ /**
3307
+ * Company.
3308
+ */
3309
+ company?: string | null;
3310
+ /**
3311
+ * Department.
3312
+ */
3313
+ department?: string | null;
3314
+ /**
3315
+ * Job title.
3316
+ */
3317
+ job_title?: string | null;
3318
+ /**
3319
+ * When the agents should share it.
3320
+ */
3321
+ description?: string | null;
3322
+ /**
3323
+ * Phone with country code, for example `+507 6000-1234`.
3324
+ */
3325
+ phone?: string | null;
3326
+ phone_type?: 'CELL' | 'WORK' | 'HOME' | null;
3327
+ /**
3328
+ * Email.
3329
+ */
3330
+ email?: string | null;
3331
+ email_type?: 'WORK' | 'PERSONAL' | null;
3332
+ };
3333
+ /**
3334
+ * Only the fields you send change. Send `null` to clear an optional one; the card keeps a phone or an email.
3335
+ */
3336
+ export type UpdateKnowledgeContact = {
3337
+ /**
3338
+ * Name shown on the contact card.
3339
+ */
3340
+ display_name?: string;
3341
+ /**
3342
+ * First name.
3343
+ */
3344
+ first_name?: string | null;
3345
+ /**
3346
+ * Last name.
3347
+ */
3348
+ last_name?: string | null;
3349
+ /**
3350
+ * Name prefix, such as `Dr.`.
3351
+ */
3352
+ prefix?: string | null;
3353
+ /**
3354
+ * Name suffix.
3355
+ */
3356
+ suffix?: string | null;
3357
+ /**
3358
+ * Company.
3359
+ */
3360
+ company?: string | null;
3361
+ /**
3362
+ * Department.
3363
+ */
3364
+ department?: string | null;
3365
+ /**
3366
+ * Job title.
3367
+ */
3368
+ job_title?: string | null;
3369
+ /**
3370
+ * When the agents should share it.
3371
+ */
3372
+ description?: string | null;
3373
+ /**
3374
+ * Phone with country code, for example `+507 6000-1234`.
3375
+ */
3376
+ phone?: string | null;
3377
+ phone_type?: 'CELL' | 'WORK' | 'HOME' | null;
3378
+ /**
3379
+ * Email.
3380
+ */
3381
+ email?: string | null;
3382
+ email_type?: 'WORK' | 'PERSONAL' | null;
3383
+ };
3384
+ /**
3385
+ * Begins an upload. Ricky answers where to `PUT` the bytes.
3386
+ */
3387
+ export type CreateKnowledgeFile = {
3388
+ /**
3389
+ * Title the agents see.
3390
+ */
3391
+ title: string;
3392
+ /**
3393
+ * When the agents should use it.
3394
+ */
3395
+ description?: string;
3396
+ /**
3397
+ * File name, with its extension.
3398
+ */
3399
+ filename: string;
3400
+ /**
3401
+ * File type: PDF, Word or Excel up to 100 MB; JPEG or PNG up to 5 MB.
3402
+ */
3403
+ mime_type: 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'image/jpeg' | 'image/png';
3404
+ /**
3405
+ * Exact size of the file you will upload.
3406
+ */
3407
+ size_bytes: number;
3408
+ };
3409
+ /**
3410
+ * The body is optional.
3411
+ */
3412
+ export type CompleteKnowledgeFile = {
3413
+ /**
3414
+ * Agents may read it to answer. Ignored when Ricky reads no useful content.
3415
+ */
3416
+ consult_enabled?: boolean;
3417
+ /**
3418
+ * Agents may send the file itself.
3419
+ */
3420
+ send_enabled?: boolean;
3421
+ };
3422
+ /**
3423
+ * Only the fields you send change. The file must be `ready`.
3424
+ */
3425
+ export type UpdateKnowledgeFile = {
3426
+ /**
3427
+ * Title the agents see.
3428
+ */
3429
+ title?: string;
3430
+ /**
3431
+ * When the agents should use it.
3432
+ */
3433
+ description?: string;
3434
+ /**
3435
+ * Agents may read it to answer.
3436
+ */
3437
+ consult_enabled?: boolean;
3438
+ /**
3439
+ * Agents may send the file itself.
3440
+ */
3441
+ send_enabled?: boolean;
3442
+ };
3443
+ /**
3444
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
3445
+ */
3446
+ export type IdempotencyKey = string;
3447
+ export type ListContactsData = {
3448
+ body?: never;
3449
+ path?: never;
3450
+ query?: {
3451
+ /**
3452
+ * Items per page.
3453
+ */
3454
+ page_size?: number;
3455
+ /**
3456
+ * `next_cursor` from the previous page. Use it unchanged.
3457
+ */
3458
+ cursor?: string;
3459
+ /**
3460
+ * Text contained in the name, phone, email or company.
3461
+ */
3462
+ query?: string;
3463
+ /**
3464
+ * Only contacts with this tag.
3465
+ */
3466
+ tag_id?: string;
3467
+ /**
3468
+ * Only contacts this member owns.
3469
+ */
3470
+ owner_user_id?: string;
3471
+ /**
3472
+ * Only contacts at this stage.
3473
+ */
3474
+ lifecycle_stage?: 'subscriber' | 'lead' | 'marketing_qualified' | 'sales_qualified' | 'opportunity' | 'customer' | 'evangelist' | 'other';
3475
+ /**
2828
3476
  * Only contacts reachable on this channel.
2829
3477
  */
2830
3478
  channel?: 'whatsapp' | 'instagram' | 'messenger';
@@ -5140,6 +5788,1242 @@ export type GetAdsReportResponses = {
5140
5788
  };
5141
5789
  };
5142
5790
  export type GetAdsReportResponse = GetAdsReportResponses[keyof GetAdsReportResponses];
5791
+ export type ListAgentsData = {
5792
+ body?: never;
5793
+ path?: never;
5794
+ query?: never;
5795
+ url: '/agents';
5796
+ };
5797
+ export type ListAgentsErrors = {
5798
+ /**
5799
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
5800
+ */
5801
+ 401: Error;
5802
+ /**
5803
+ * `insufficient_scope`: The key lacks the scope this operation requires.
5804
+ */
5805
+ 403: Error;
5806
+ /**
5807
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
5808
+ */
5809
+ 429: Error;
5810
+ /**
5811
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
5812
+ */
5813
+ 500: Error;
5814
+ };
5815
+ export type ListAgentsError = ListAgentsErrors[keyof ListAgentsErrors];
5816
+ export type ListAgentsResponses = {
5817
+ /**
5818
+ * Success.
5819
+ */
5820
+ 200: {
5821
+ data: Array<Agent>;
5822
+ /**
5823
+ * Pass as `cursor` for the next page; null on the last page.
5824
+ */
5825
+ next_cursor: string | null;
5826
+ };
5827
+ };
5828
+ export type ListAgentsResponse = ListAgentsResponses[keyof ListAgentsResponses];
5829
+ export type CreateAgentData = {
5830
+ body: CreateAgent;
5831
+ headers?: {
5832
+ /**
5833
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
5834
+ */
5835
+ 'Idempotency-Key'?: string;
5836
+ };
5837
+ path?: never;
5838
+ query?: never;
5839
+ url: '/agents';
5840
+ };
5841
+ export type CreateAgentErrors = {
5842
+ /**
5843
+ * `invalid_json`: The body is not valid JSON.
5844
+ *
5845
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
5846
+ */
5847
+ 400: Error;
5848
+ /**
5849
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
5850
+ */
5851
+ 401: Error;
5852
+ /**
5853
+ * `insufficient_scope`: The key lacks the scope this operation requires.
5854
+ */
5855
+ 403: Error;
5856
+ /**
5857
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
5858
+ *
5859
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
5860
+ */
5861
+ 409: Error;
5862
+ /**
5863
+ * `body_too_large`: The JSON body exceeds 64 KiB.
5864
+ */
5865
+ 413: Error;
5866
+ /**
5867
+ * `unsupported_media_type`: The body must be `application/json`.
5868
+ */
5869
+ 415: Error;
5870
+ /**
5871
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
5872
+ */
5873
+ 429: Error;
5874
+ /**
5875
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
5876
+ */
5877
+ 500: Error;
5878
+ };
5879
+ export type CreateAgentError = CreateAgentErrors[keyof CreateAgentErrors];
5880
+ export type CreateAgentResponses = {
5881
+ /**
5882
+ * Success.
5883
+ */
5884
+ 201: {
5885
+ data: Agent;
5886
+ };
5887
+ };
5888
+ export type CreateAgentResponse = CreateAgentResponses[keyof CreateAgentResponses];
5889
+ export type ArchiveAgentData = {
5890
+ body?: never;
5891
+ path: {
5892
+ /**
5893
+ * Agent ID.
5894
+ */
5895
+ agent_id: string;
5896
+ };
5897
+ query?: never;
5898
+ url: '/agents/{agent_id}';
5899
+ };
5900
+ export type ArchiveAgentErrors = {
5901
+ /**
5902
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
5903
+ */
5904
+ 400: Error;
5905
+ /**
5906
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
5907
+ */
5908
+ 401: Error;
5909
+ /**
5910
+ * `insufficient_scope`: The key lacks the scope this operation requires.
5911
+ */
5912
+ 403: Error;
5913
+ /**
5914
+ * `not_found`: The resource does not exist in this organization.
5915
+ */
5916
+ 404: Error;
5917
+ /**
5918
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
5919
+ */
5920
+ 429: Error;
5921
+ /**
5922
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
5923
+ */
5924
+ 500: Error;
5925
+ };
5926
+ export type ArchiveAgentError = ArchiveAgentErrors[keyof ArchiveAgentErrors];
5927
+ export type ArchiveAgentResponses = {
5928
+ /**
5929
+ * Success.
5930
+ */
5931
+ 200: {
5932
+ data: Agent;
5933
+ };
5934
+ };
5935
+ export type ArchiveAgentResponse = ArchiveAgentResponses[keyof ArchiveAgentResponses];
5936
+ export type GetAgentData = {
5937
+ body?: never;
5938
+ path: {
5939
+ /**
5940
+ * Agent ID.
5941
+ */
5942
+ agent_id: string;
5943
+ };
5944
+ query?: never;
5945
+ url: '/agents/{agent_id}';
5946
+ };
5947
+ export type GetAgentErrors = {
5948
+ /**
5949
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
5950
+ */
5951
+ 400: Error;
5952
+ /**
5953
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
5954
+ */
5955
+ 401: Error;
5956
+ /**
5957
+ * `insufficient_scope`: The key lacks the scope this operation requires.
5958
+ */
5959
+ 403: Error;
5960
+ /**
5961
+ * `not_found`: The resource does not exist in this organization.
5962
+ */
5963
+ 404: Error;
5964
+ /**
5965
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
5966
+ */
5967
+ 429: Error;
5968
+ /**
5969
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
5970
+ */
5971
+ 500: Error;
5972
+ };
5973
+ export type GetAgentError = GetAgentErrors[keyof GetAgentErrors];
5974
+ export type GetAgentResponses = {
5975
+ /**
5976
+ * Success.
5977
+ */
5978
+ 200: {
5979
+ data: Agent;
5980
+ };
5981
+ };
5982
+ export type GetAgentResponse = GetAgentResponses[keyof GetAgentResponses];
5983
+ export type UpdateAgentData = {
5984
+ body: UpdateAgent;
5985
+ headers?: {
5986
+ /**
5987
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
5988
+ */
5989
+ 'Idempotency-Key'?: string;
5990
+ };
5991
+ path: {
5992
+ /**
5993
+ * Agent ID.
5994
+ */
5995
+ agent_id: string;
5996
+ };
5997
+ query?: never;
5998
+ url: '/agents/{agent_id}';
5999
+ };
6000
+ export type UpdateAgentErrors = {
6001
+ /**
6002
+ * `invalid_json`: The body is not valid JSON.
6003
+ *
6004
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6005
+ */
6006
+ 400: Error;
6007
+ /**
6008
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6009
+ */
6010
+ 401: Error;
6011
+ /**
6012
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6013
+ */
6014
+ 403: Error;
6015
+ /**
6016
+ * `not_found`: The resource does not exist in this organization.
6017
+ */
6018
+ 404: Error;
6019
+ /**
6020
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6021
+ *
6022
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6023
+ */
6024
+ 409: Error;
6025
+ /**
6026
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6027
+ */
6028
+ 413: Error;
6029
+ /**
6030
+ * `unsupported_media_type`: The body must be `application/json`.
6031
+ */
6032
+ 415: Error;
6033
+ /**
6034
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6035
+ */
6036
+ 429: Error;
6037
+ /**
6038
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6039
+ */
6040
+ 500: Error;
6041
+ };
6042
+ export type UpdateAgentError = UpdateAgentErrors[keyof UpdateAgentErrors];
6043
+ export type UpdateAgentResponses = {
6044
+ /**
6045
+ * Success.
6046
+ */
6047
+ 200: {
6048
+ data: Agent;
6049
+ };
6050
+ };
6051
+ export type UpdateAgentResponse = UpdateAgentResponses[keyof UpdateAgentResponses];
6052
+ export type GetAgentOptionsData = {
6053
+ body?: never;
6054
+ path?: never;
6055
+ query?: never;
6056
+ url: '/agent-options';
6057
+ };
6058
+ export type GetAgentOptionsErrors = {
6059
+ /**
6060
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6061
+ */
6062
+ 401: Error;
6063
+ /**
6064
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6065
+ */
6066
+ 403: Error;
6067
+ /**
6068
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6069
+ */
6070
+ 429: Error;
6071
+ /**
6072
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6073
+ */
6074
+ 500: Error;
6075
+ };
6076
+ export type GetAgentOptionsError = GetAgentOptionsErrors[keyof GetAgentOptionsErrors];
6077
+ export type GetAgentOptionsResponses = {
6078
+ /**
6079
+ * Success.
6080
+ */
6081
+ 200: {
6082
+ data: AgentOptions;
6083
+ };
6084
+ };
6085
+ export type GetAgentOptionsResponse = GetAgentOptionsResponses[keyof GetAgentOptionsResponses];
6086
+ export type AssignConversationAgentData = {
6087
+ body: AssignConversationAgent;
6088
+ headers?: {
6089
+ /**
6090
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6091
+ */
6092
+ 'Idempotency-Key'?: string;
6093
+ };
6094
+ path: {
6095
+ /**
6096
+ * Conversation ID.
6097
+ */
6098
+ conversation_id: string;
6099
+ };
6100
+ query?: never;
6101
+ url: '/conversations/{conversation_id}/agent';
6102
+ };
6103
+ export type AssignConversationAgentErrors = {
6104
+ /**
6105
+ * `invalid_json`: The body is not valid JSON.
6106
+ *
6107
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6108
+ */
6109
+ 400: Error;
6110
+ /**
6111
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6112
+ */
6113
+ 401: Error;
6114
+ /**
6115
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6116
+ */
6117
+ 403: Error;
6118
+ /**
6119
+ * `not_found`: The resource does not exist in this organization.
6120
+ */
6121
+ 404: Error;
6122
+ /**
6123
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6124
+ *
6125
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6126
+ */
6127
+ 409: Error;
6128
+ /**
6129
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6130
+ */
6131
+ 413: Error;
6132
+ /**
6133
+ * `unsupported_media_type`: The body must be `application/json`.
6134
+ */
6135
+ 415: Error;
6136
+ /**
6137
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6138
+ */
6139
+ 429: Error;
6140
+ /**
6141
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6142
+ */
6143
+ 500: Error;
6144
+ };
6145
+ export type AssignConversationAgentError = AssignConversationAgentErrors[keyof AssignConversationAgentErrors];
6146
+ export type AssignConversationAgentResponses = {
6147
+ /**
6148
+ * Success.
6149
+ */
6150
+ 200: {
6151
+ data: Conversation;
6152
+ };
6153
+ };
6154
+ export type AssignConversationAgentResponse = AssignConversationAgentResponses[keyof AssignConversationAgentResponses];
6155
+ export type ListKnowledgeLocationsData = {
6156
+ body?: never;
6157
+ path?: never;
6158
+ query?: never;
6159
+ url: '/knowledge/locations';
6160
+ };
6161
+ export type ListKnowledgeLocationsErrors = {
6162
+ /**
6163
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6164
+ */
6165
+ 401: Error;
6166
+ /**
6167
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6168
+ */
6169
+ 403: Error;
6170
+ /**
6171
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6172
+ */
6173
+ 429: Error;
6174
+ /**
6175
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6176
+ */
6177
+ 500: Error;
6178
+ };
6179
+ export type ListKnowledgeLocationsError = ListKnowledgeLocationsErrors[keyof ListKnowledgeLocationsErrors];
6180
+ export type ListKnowledgeLocationsResponses = {
6181
+ /**
6182
+ * Success.
6183
+ */
6184
+ 200: {
6185
+ data: Array<KnowledgeLocation>;
6186
+ /**
6187
+ * Pass as `cursor` for the next page; null on the last page.
6188
+ */
6189
+ next_cursor: string | null;
6190
+ };
6191
+ };
6192
+ export type ListKnowledgeLocationsResponse = ListKnowledgeLocationsResponses[keyof ListKnowledgeLocationsResponses];
6193
+ export type CreateKnowledgeLocationData = {
6194
+ body: CreateKnowledgeLocation;
6195
+ headers?: {
6196
+ /**
6197
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6198
+ */
6199
+ 'Idempotency-Key'?: string;
6200
+ };
6201
+ path?: never;
6202
+ query?: never;
6203
+ url: '/knowledge/locations';
6204
+ };
6205
+ export type CreateKnowledgeLocationErrors = {
6206
+ /**
6207
+ * `invalid_json`: The body is not valid JSON.
6208
+ *
6209
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6210
+ */
6211
+ 400: Error;
6212
+ /**
6213
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6214
+ */
6215
+ 401: Error;
6216
+ /**
6217
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6218
+ */
6219
+ 403: Error;
6220
+ /**
6221
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6222
+ *
6223
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6224
+ */
6225
+ 409: Error;
6226
+ /**
6227
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6228
+ */
6229
+ 413: Error;
6230
+ /**
6231
+ * `unsupported_media_type`: The body must be `application/json`.
6232
+ */
6233
+ 415: Error;
6234
+ /**
6235
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6236
+ */
6237
+ 429: Error;
6238
+ /**
6239
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6240
+ */
6241
+ 500: Error;
6242
+ };
6243
+ export type CreateKnowledgeLocationError = CreateKnowledgeLocationErrors[keyof CreateKnowledgeLocationErrors];
6244
+ export type CreateKnowledgeLocationResponses = {
6245
+ /**
6246
+ * Success.
6247
+ */
6248
+ 201: {
6249
+ data: KnowledgeLocation;
6250
+ };
6251
+ };
6252
+ export type CreateKnowledgeLocationResponse = CreateKnowledgeLocationResponses[keyof CreateKnowledgeLocationResponses];
6253
+ export type DeleteKnowledgeLocationData = {
6254
+ body?: never;
6255
+ path: {
6256
+ /**
6257
+ * Location ID.
6258
+ */
6259
+ location_id: string;
6260
+ };
6261
+ query?: never;
6262
+ url: '/knowledge/locations/{location_id}';
6263
+ };
6264
+ export type DeleteKnowledgeLocationErrors = {
6265
+ /**
6266
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6267
+ */
6268
+ 400: Error;
6269
+ /**
6270
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6271
+ */
6272
+ 401: Error;
6273
+ /**
6274
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6275
+ */
6276
+ 403: Error;
6277
+ /**
6278
+ * `not_found`: The resource does not exist in this organization.
6279
+ */
6280
+ 404: Error;
6281
+ /**
6282
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6283
+ */
6284
+ 429: Error;
6285
+ /**
6286
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6287
+ */
6288
+ 500: Error;
6289
+ };
6290
+ export type DeleteKnowledgeLocationError = DeleteKnowledgeLocationErrors[keyof DeleteKnowledgeLocationErrors];
6291
+ export type DeleteKnowledgeLocationResponses = {
6292
+ /**
6293
+ * Success.
6294
+ */
6295
+ 200: {
6296
+ data: KnowledgeLocation;
6297
+ };
6298
+ };
6299
+ export type DeleteKnowledgeLocationResponse = DeleteKnowledgeLocationResponses[keyof DeleteKnowledgeLocationResponses];
6300
+ export type GetKnowledgeLocationData = {
6301
+ body?: never;
6302
+ path: {
6303
+ /**
6304
+ * Location ID.
6305
+ */
6306
+ location_id: string;
6307
+ };
6308
+ query?: never;
6309
+ url: '/knowledge/locations/{location_id}';
6310
+ };
6311
+ export type GetKnowledgeLocationErrors = {
6312
+ /**
6313
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6314
+ */
6315
+ 400: Error;
6316
+ /**
6317
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6318
+ */
6319
+ 401: Error;
6320
+ /**
6321
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6322
+ */
6323
+ 403: Error;
6324
+ /**
6325
+ * `not_found`: The resource does not exist in this organization.
6326
+ */
6327
+ 404: Error;
6328
+ /**
6329
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6330
+ */
6331
+ 429: Error;
6332
+ /**
6333
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6334
+ */
6335
+ 500: Error;
6336
+ };
6337
+ export type GetKnowledgeLocationError = GetKnowledgeLocationErrors[keyof GetKnowledgeLocationErrors];
6338
+ export type GetKnowledgeLocationResponses = {
6339
+ /**
6340
+ * Success.
6341
+ */
6342
+ 200: {
6343
+ data: KnowledgeLocation;
6344
+ };
6345
+ };
6346
+ export type GetKnowledgeLocationResponse = GetKnowledgeLocationResponses[keyof GetKnowledgeLocationResponses];
6347
+ export type UpdateKnowledgeLocationData = {
6348
+ body: UpdateKnowledgeLocation;
6349
+ headers?: {
6350
+ /**
6351
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6352
+ */
6353
+ 'Idempotency-Key'?: string;
6354
+ };
6355
+ path: {
6356
+ /**
6357
+ * Location ID.
6358
+ */
6359
+ location_id: string;
6360
+ };
6361
+ query?: never;
6362
+ url: '/knowledge/locations/{location_id}';
6363
+ };
6364
+ export type UpdateKnowledgeLocationErrors = {
6365
+ /**
6366
+ * `invalid_json`: The body is not valid JSON.
6367
+ *
6368
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6369
+ */
6370
+ 400: Error;
6371
+ /**
6372
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6373
+ */
6374
+ 401: Error;
6375
+ /**
6376
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6377
+ */
6378
+ 403: Error;
6379
+ /**
6380
+ * `not_found`: The resource does not exist in this organization.
6381
+ */
6382
+ 404: Error;
6383
+ /**
6384
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6385
+ *
6386
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6387
+ */
6388
+ 409: Error;
6389
+ /**
6390
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6391
+ */
6392
+ 413: Error;
6393
+ /**
6394
+ * `unsupported_media_type`: The body must be `application/json`.
6395
+ */
6396
+ 415: Error;
6397
+ /**
6398
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6399
+ */
6400
+ 429: Error;
6401
+ /**
6402
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6403
+ */
6404
+ 500: Error;
6405
+ };
6406
+ export type UpdateKnowledgeLocationError = UpdateKnowledgeLocationErrors[keyof UpdateKnowledgeLocationErrors];
6407
+ export type UpdateKnowledgeLocationResponses = {
6408
+ /**
6409
+ * Success.
6410
+ */
6411
+ 200: {
6412
+ data: KnowledgeLocation;
6413
+ };
6414
+ };
6415
+ export type UpdateKnowledgeLocationResponse = UpdateKnowledgeLocationResponses[keyof UpdateKnowledgeLocationResponses];
6416
+ export type ListKnowledgeContactsData = {
6417
+ body?: never;
6418
+ path?: never;
6419
+ query?: never;
6420
+ url: '/knowledge/contacts';
6421
+ };
6422
+ export type ListKnowledgeContactsErrors = {
6423
+ /**
6424
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6425
+ */
6426
+ 401: Error;
6427
+ /**
6428
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6429
+ */
6430
+ 403: Error;
6431
+ /**
6432
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6433
+ */
6434
+ 429: Error;
6435
+ /**
6436
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6437
+ */
6438
+ 500: Error;
6439
+ };
6440
+ export type ListKnowledgeContactsError = ListKnowledgeContactsErrors[keyof ListKnowledgeContactsErrors];
6441
+ export type ListKnowledgeContactsResponses = {
6442
+ /**
6443
+ * Success.
6444
+ */
6445
+ 200: {
6446
+ data: Array<KnowledgeContact>;
6447
+ /**
6448
+ * Pass as `cursor` for the next page; null on the last page.
6449
+ */
6450
+ next_cursor: string | null;
6451
+ };
6452
+ };
6453
+ export type ListKnowledgeContactsResponse = ListKnowledgeContactsResponses[keyof ListKnowledgeContactsResponses];
6454
+ export type CreateKnowledgeContactData = {
6455
+ body: CreateKnowledgeContact;
6456
+ headers?: {
6457
+ /**
6458
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6459
+ */
6460
+ 'Idempotency-Key'?: string;
6461
+ };
6462
+ path?: never;
6463
+ query?: never;
6464
+ url: '/knowledge/contacts';
6465
+ };
6466
+ export type CreateKnowledgeContactErrors = {
6467
+ /**
6468
+ * `invalid_json`: The body is not valid JSON.
6469
+ *
6470
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6471
+ */
6472
+ 400: Error;
6473
+ /**
6474
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6475
+ */
6476
+ 401: Error;
6477
+ /**
6478
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6479
+ */
6480
+ 403: Error;
6481
+ /**
6482
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6483
+ *
6484
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6485
+ */
6486
+ 409: Error;
6487
+ /**
6488
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6489
+ */
6490
+ 413: Error;
6491
+ /**
6492
+ * `unsupported_media_type`: The body must be `application/json`.
6493
+ */
6494
+ 415: Error;
6495
+ /**
6496
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6497
+ */
6498
+ 429: Error;
6499
+ /**
6500
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6501
+ */
6502
+ 500: Error;
6503
+ };
6504
+ export type CreateKnowledgeContactError = CreateKnowledgeContactErrors[keyof CreateKnowledgeContactErrors];
6505
+ export type CreateKnowledgeContactResponses = {
6506
+ /**
6507
+ * Success.
6508
+ */
6509
+ 201: {
6510
+ data: KnowledgeContact;
6511
+ };
6512
+ };
6513
+ export type CreateKnowledgeContactResponse = CreateKnowledgeContactResponses[keyof CreateKnowledgeContactResponses];
6514
+ export type DeleteKnowledgeContactData = {
6515
+ body?: never;
6516
+ path: {
6517
+ /**
6518
+ * Knowledge contact ID.
6519
+ */
6520
+ knowledge_contact_id: string;
6521
+ };
6522
+ query?: never;
6523
+ url: '/knowledge/contacts/{knowledge_contact_id}';
6524
+ };
6525
+ export type DeleteKnowledgeContactErrors = {
6526
+ /**
6527
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6528
+ */
6529
+ 400: Error;
6530
+ /**
6531
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6532
+ */
6533
+ 401: Error;
6534
+ /**
6535
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6536
+ */
6537
+ 403: Error;
6538
+ /**
6539
+ * `not_found`: The resource does not exist in this organization.
6540
+ */
6541
+ 404: Error;
6542
+ /**
6543
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6544
+ */
6545
+ 429: Error;
6546
+ /**
6547
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6548
+ */
6549
+ 500: Error;
6550
+ };
6551
+ export type DeleteKnowledgeContactError = DeleteKnowledgeContactErrors[keyof DeleteKnowledgeContactErrors];
6552
+ export type DeleteKnowledgeContactResponses = {
6553
+ /**
6554
+ * Success.
6555
+ */
6556
+ 200: {
6557
+ data: KnowledgeContact;
6558
+ };
6559
+ };
6560
+ export type DeleteKnowledgeContactResponse = DeleteKnowledgeContactResponses[keyof DeleteKnowledgeContactResponses];
6561
+ export type GetKnowledgeContactData = {
6562
+ body?: never;
6563
+ path: {
6564
+ /**
6565
+ * Knowledge contact ID.
6566
+ */
6567
+ knowledge_contact_id: string;
6568
+ };
6569
+ query?: never;
6570
+ url: '/knowledge/contacts/{knowledge_contact_id}';
6571
+ };
6572
+ export type GetKnowledgeContactErrors = {
6573
+ /**
6574
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6575
+ */
6576
+ 400: Error;
6577
+ /**
6578
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6579
+ */
6580
+ 401: Error;
6581
+ /**
6582
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6583
+ */
6584
+ 403: Error;
6585
+ /**
6586
+ * `not_found`: The resource does not exist in this organization.
6587
+ */
6588
+ 404: Error;
6589
+ /**
6590
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6591
+ */
6592
+ 429: Error;
6593
+ /**
6594
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6595
+ */
6596
+ 500: Error;
6597
+ };
6598
+ export type GetKnowledgeContactError = GetKnowledgeContactErrors[keyof GetKnowledgeContactErrors];
6599
+ export type GetKnowledgeContactResponses = {
6600
+ /**
6601
+ * Success.
6602
+ */
6603
+ 200: {
6604
+ data: KnowledgeContact;
6605
+ };
6606
+ };
6607
+ export type GetKnowledgeContactResponse = GetKnowledgeContactResponses[keyof GetKnowledgeContactResponses];
6608
+ export type UpdateKnowledgeContactData = {
6609
+ body: UpdateKnowledgeContact;
6610
+ headers?: {
6611
+ /**
6612
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6613
+ */
6614
+ 'Idempotency-Key'?: string;
6615
+ };
6616
+ path: {
6617
+ /**
6618
+ * Knowledge contact ID.
6619
+ */
6620
+ knowledge_contact_id: string;
6621
+ };
6622
+ query?: never;
6623
+ url: '/knowledge/contacts/{knowledge_contact_id}';
6624
+ };
6625
+ export type UpdateKnowledgeContactErrors = {
6626
+ /**
6627
+ * `invalid_json`: The body is not valid JSON.
6628
+ *
6629
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6630
+ */
6631
+ 400: Error;
6632
+ /**
6633
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6634
+ */
6635
+ 401: Error;
6636
+ /**
6637
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6638
+ */
6639
+ 403: Error;
6640
+ /**
6641
+ * `not_found`: The resource does not exist in this organization.
6642
+ */
6643
+ 404: Error;
6644
+ /**
6645
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6646
+ *
6647
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6648
+ */
6649
+ 409: Error;
6650
+ /**
6651
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6652
+ */
6653
+ 413: Error;
6654
+ /**
6655
+ * `unsupported_media_type`: The body must be `application/json`.
6656
+ */
6657
+ 415: Error;
6658
+ /**
6659
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6660
+ */
6661
+ 429: Error;
6662
+ /**
6663
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6664
+ */
6665
+ 500: Error;
6666
+ };
6667
+ export type UpdateKnowledgeContactError = UpdateKnowledgeContactErrors[keyof UpdateKnowledgeContactErrors];
6668
+ export type UpdateKnowledgeContactResponses = {
6669
+ /**
6670
+ * Success.
6671
+ */
6672
+ 200: {
6673
+ data: KnowledgeContact;
6674
+ };
6675
+ };
6676
+ export type UpdateKnowledgeContactResponse = UpdateKnowledgeContactResponses[keyof UpdateKnowledgeContactResponses];
6677
+ export type ListKnowledgeFilesData = {
6678
+ body?: never;
6679
+ path?: never;
6680
+ query?: never;
6681
+ url: '/knowledge/files';
6682
+ };
6683
+ export type ListKnowledgeFilesErrors = {
6684
+ /**
6685
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6686
+ */
6687
+ 401: Error;
6688
+ /**
6689
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6690
+ */
6691
+ 403: Error;
6692
+ /**
6693
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6694
+ */
6695
+ 429: Error;
6696
+ /**
6697
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6698
+ */
6699
+ 500: Error;
6700
+ };
6701
+ export type ListKnowledgeFilesError = ListKnowledgeFilesErrors[keyof ListKnowledgeFilesErrors];
6702
+ export type ListKnowledgeFilesResponses = {
6703
+ /**
6704
+ * Success.
6705
+ */
6706
+ 200: {
6707
+ data: Array<KnowledgeFile>;
6708
+ /**
6709
+ * Pass as `cursor` for the next page; null on the last page.
6710
+ */
6711
+ next_cursor: string | null;
6712
+ };
6713
+ };
6714
+ export type ListKnowledgeFilesResponse = ListKnowledgeFilesResponses[keyof ListKnowledgeFilesResponses];
6715
+ export type CreateKnowledgeFileData = {
6716
+ body: CreateKnowledgeFile;
6717
+ headers?: {
6718
+ /**
6719
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6720
+ */
6721
+ 'Idempotency-Key'?: string;
6722
+ };
6723
+ path?: never;
6724
+ query?: never;
6725
+ url: '/knowledge/files';
6726
+ };
6727
+ export type CreateKnowledgeFileErrors = {
6728
+ /**
6729
+ * `invalid_json`: The body is not valid JSON.
6730
+ *
6731
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6732
+ */
6733
+ 400: Error;
6734
+ /**
6735
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6736
+ */
6737
+ 401: Error;
6738
+ /**
6739
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6740
+ */
6741
+ 403: Error;
6742
+ /**
6743
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6744
+ *
6745
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6746
+ */
6747
+ 409: Error;
6748
+ /**
6749
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6750
+ */
6751
+ 413: Error;
6752
+ /**
6753
+ * `unsupported_media_type`: The body must be `application/json`.
6754
+ */
6755
+ 415: Error;
6756
+ /**
6757
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6758
+ */
6759
+ 429: Error;
6760
+ /**
6761
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6762
+ */
6763
+ 500: Error;
6764
+ /**
6765
+ * `upstream_error`: The messaging provider failed. Retry later.
6766
+ */
6767
+ 502: Error;
6768
+ };
6769
+ export type CreateKnowledgeFileError = CreateKnowledgeFileErrors[keyof CreateKnowledgeFileErrors];
6770
+ export type CreateKnowledgeFileResponses = {
6771
+ /**
6772
+ * Success.
6773
+ */
6774
+ 201: {
6775
+ data: KnowledgeFileUpload;
6776
+ };
6777
+ };
6778
+ export type CreateKnowledgeFileResponse = CreateKnowledgeFileResponses[keyof CreateKnowledgeFileResponses];
6779
+ export type CompleteKnowledgeFileData = {
6780
+ body: CompleteKnowledgeFile;
6781
+ headers?: {
6782
+ /**
6783
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6784
+ */
6785
+ 'Idempotency-Key'?: string;
6786
+ };
6787
+ path: {
6788
+ /**
6789
+ * File ID.
6790
+ */
6791
+ file_id: string;
6792
+ };
6793
+ query?: never;
6794
+ url: '/knowledge/files/{file_id}/complete';
6795
+ };
6796
+ export type CompleteKnowledgeFileErrors = {
6797
+ /**
6798
+ * `invalid_json`: The body is not valid JSON.
6799
+ *
6800
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6801
+ */
6802
+ 400: Error;
6803
+ /**
6804
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6805
+ */
6806
+ 401: Error;
6807
+ /**
6808
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6809
+ */
6810
+ 403: Error;
6811
+ /**
6812
+ * `not_found`: The resource does not exist in this organization.
6813
+ */
6814
+ 404: Error;
6815
+ /**
6816
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6817
+ *
6818
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6819
+ *
6820
+ * `conflict`: The resource changed in a way that prevents the operation.
6821
+ */
6822
+ 409: Error;
6823
+ /**
6824
+ * `body_too_large`: The JSON body exceeds 64 KiB.
6825
+ */
6826
+ 413: Error;
6827
+ /**
6828
+ * `unsupported_media_type`: The body must be `application/json`.
6829
+ */
6830
+ 415: Error;
6831
+ /**
6832
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6833
+ */
6834
+ 429: Error;
6835
+ /**
6836
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6837
+ */
6838
+ 500: Error;
6839
+ /**
6840
+ * `upstream_error`: The messaging provider failed. Retry later.
6841
+ */
6842
+ 502: Error;
6843
+ };
6844
+ export type CompleteKnowledgeFileError = CompleteKnowledgeFileErrors[keyof CompleteKnowledgeFileErrors];
6845
+ export type CompleteKnowledgeFileResponses = {
6846
+ /**
6847
+ * Success.
6848
+ */
6849
+ 200: {
6850
+ data: KnowledgeFile;
6851
+ };
6852
+ };
6853
+ export type CompleteKnowledgeFileResponse = CompleteKnowledgeFileResponses[keyof CompleteKnowledgeFileResponses];
6854
+ export type DeleteKnowledgeFileData = {
6855
+ body?: never;
6856
+ path: {
6857
+ /**
6858
+ * File ID.
6859
+ */
6860
+ file_id: string;
6861
+ };
6862
+ query?: never;
6863
+ url: '/knowledge/files/{file_id}';
6864
+ };
6865
+ export type DeleteKnowledgeFileErrors = {
6866
+ /**
6867
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6868
+ */
6869
+ 400: Error;
6870
+ /**
6871
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6872
+ */
6873
+ 401: Error;
6874
+ /**
6875
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6876
+ */
6877
+ 403: Error;
6878
+ /**
6879
+ * `not_found`: The resource does not exist in this organization.
6880
+ */
6881
+ 404: Error;
6882
+ /**
6883
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6884
+ */
6885
+ 429: Error;
6886
+ /**
6887
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6888
+ */
6889
+ 500: Error;
6890
+ /**
6891
+ * `upstream_error`: The messaging provider failed. Retry later.
6892
+ */
6893
+ 502: Error;
6894
+ };
6895
+ export type DeleteKnowledgeFileError = DeleteKnowledgeFileErrors[keyof DeleteKnowledgeFileErrors];
6896
+ export type DeleteKnowledgeFileResponses = {
6897
+ /**
6898
+ * Success.
6899
+ */
6900
+ 200: {
6901
+ data: KnowledgeFile;
6902
+ };
6903
+ };
6904
+ export type DeleteKnowledgeFileResponse = DeleteKnowledgeFileResponses[keyof DeleteKnowledgeFileResponses];
6905
+ export type GetKnowledgeFileData = {
6906
+ body?: never;
6907
+ path: {
6908
+ /**
6909
+ * File ID.
6910
+ */
6911
+ file_id: string;
6912
+ };
6913
+ query?: never;
6914
+ url: '/knowledge/files/{file_id}';
6915
+ };
6916
+ export type GetKnowledgeFileErrors = {
6917
+ /**
6918
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6919
+ */
6920
+ 400: Error;
6921
+ /**
6922
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6923
+ */
6924
+ 401: Error;
6925
+ /**
6926
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6927
+ */
6928
+ 403: Error;
6929
+ /**
6930
+ * `not_found`: The resource does not exist in this organization.
6931
+ */
6932
+ 404: Error;
6933
+ /**
6934
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
6935
+ */
6936
+ 429: Error;
6937
+ /**
6938
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
6939
+ */
6940
+ 500: Error;
6941
+ /**
6942
+ * `upstream_error`: The messaging provider failed. Retry later.
6943
+ */
6944
+ 502: Error;
6945
+ };
6946
+ export type GetKnowledgeFileError = GetKnowledgeFileErrors[keyof GetKnowledgeFileErrors];
6947
+ export type GetKnowledgeFileResponses = {
6948
+ /**
6949
+ * Success.
6950
+ */
6951
+ 200: {
6952
+ data: KnowledgeFile;
6953
+ };
6954
+ };
6955
+ export type GetKnowledgeFileResponse = GetKnowledgeFileResponses[keyof GetKnowledgeFileResponses];
6956
+ export type UpdateKnowledgeFileData = {
6957
+ body: UpdateKnowledgeFile;
6958
+ headers?: {
6959
+ /**
6960
+ * Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as `order-10482-ready`. Retrying with the same key and body replays the first response instead of repeating the write.
6961
+ */
6962
+ 'Idempotency-Key'?: string;
6963
+ };
6964
+ path: {
6965
+ /**
6966
+ * File ID.
6967
+ */
6968
+ file_id: string;
6969
+ };
6970
+ query?: never;
6971
+ url: '/knowledge/files/{file_id}';
6972
+ };
6973
+ export type UpdateKnowledgeFileErrors = {
6974
+ /**
6975
+ * `invalid_json`: The body is not valid JSON.
6976
+ *
6977
+ * `invalid_input`: A parameter or body field is invalid; `param` names it when known.
6978
+ */
6979
+ 400: Error;
6980
+ /**
6981
+ * `unauthorized`: The `Authorization` header is missing, malformed, expired or revoked.
6982
+ */
6983
+ 401: Error;
6984
+ /**
6985
+ * `insufficient_scope`: The key lacks the scope this operation requires.
6986
+ */
6987
+ 403: Error;
6988
+ /**
6989
+ * `not_found`: The resource does not exist in this organization.
6990
+ */
6991
+ 404: Error;
6992
+ /**
6993
+ * `idempotency_conflict`: The `Idempotency-Key` was used for a different request.
6994
+ *
6995
+ * `request_processing`: A request with this `Idempotency-Key` is still processing or ended in an unknown state.
6996
+ *
6997
+ * `conflict`: The resource changed in a way that prevents the operation.
6998
+ */
6999
+ 409: Error;
7000
+ /**
7001
+ * `body_too_large`: The JSON body exceeds 64 KiB.
7002
+ */
7003
+ 413: Error;
7004
+ /**
7005
+ * `unsupported_media_type`: The body must be `application/json`.
7006
+ */
7007
+ 415: Error;
7008
+ /**
7009
+ * `rate_limited`: More than 120 requests this minute with this key; see `Retry-After`.
7010
+ */
7011
+ 429: Error;
7012
+ /**
7013
+ * `internal_error`: Ricky failed. Retry a read. Before retrying a write, read the resource: the same `Idempotency-Key` answers `request_processing`.
7014
+ */
7015
+ 500: Error;
7016
+ };
7017
+ export type UpdateKnowledgeFileError = UpdateKnowledgeFileErrors[keyof UpdateKnowledgeFileErrors];
7018
+ export type UpdateKnowledgeFileResponses = {
7019
+ /**
7020
+ * Success.
7021
+ */
7022
+ 200: {
7023
+ data: KnowledgeFile;
7024
+ };
7025
+ };
7026
+ export type UpdateKnowledgeFileResponse = UpdateKnowledgeFileResponses[keyof UpdateKnowledgeFileResponses];
5143
7027
  export type WebhookMessageReceivedWebhookPayload = WebhookEvent;
5144
7028
  export type WebhookMessageReceivedWebhookRequest = {
5145
7029
  body: WebhookMessageReceivedWebhookPayload;