@sippulse/niva-sdk 0.1.0-rc.7 → 0.1.0-rc.8
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.
- package/dts/src/generated/client.d.ts +3 -3
- package/dts/src/generated/meta.d.ts +1 -1
- package/dts/src/generated/operations.d.ts +119 -11
- package/index.bun.js +3 -3
- package/index.default.js +3 -3
- package/index.deno.js +3 -3
- package/index.node.js +3 -3
- package/package.json +1 -1
|
@@ -333,13 +333,13 @@ export interface NivaClient {
|
|
|
333
333
|
/**
|
|
334
334
|
* channels.getById operation.
|
|
335
335
|
*
|
|
336
|
-
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
336
|
+
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Includes `calls_7d`, `last_call_at` (both null without the call_record:read permission), `visual_plan_published_version` and `visual_plan_has_unpublished_changes`. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
337
337
|
*/
|
|
338
338
|
getById(input: ChannelsGetByIdInput, options?: NivaRequestOptions): NivaCall<ChannelsGetByIdOutput, ChannelsGetByIdErrorCode>;
|
|
339
339
|
/**
|
|
340
340
|
* channels.list operation.
|
|
341
341
|
*
|
|
342
|
-
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type` and `
|
|
342
|
+
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type`, `is_active` and `alert` (`true` returns only channels with an alert: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync). `search` also matches the linked plan name. Every item carries `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission), `last_call_at` (same permission rule), `visual_plan_published_version` (null while never published or unlinked) and `visual_plan_has_unpublished_changes`. The response adds `counts` (`all` plus one entry per channel type with rows, under the current search, ignoring the type/status/alert filters), `active_count` and `alert_count` (same search rule). `sort_by` accepts `calls_7d` (busiest first on desc) and `last_call_at` (most recent first on desc, quiet channels last) whenever calls are visible, otherwise both fall back to `updated_at`. When the omnichannel module is disabled the result is restricted to SIP channels, and requesting a non-SIP `channel_type` returns 403 MODULE_DISABLED.
|
|
343
343
|
*/
|
|
344
344
|
list(input?: ChannelsListInput, options?: NivaRequestOptions): NivaCall<ChannelsListOutput, ChannelsListErrorCode>;
|
|
345
345
|
/**
|
|
@@ -969,7 +969,7 @@ export interface NivaClient {
|
|
|
969
969
|
/**
|
|
970
970
|
* visualPlans.list operation.
|
|
971
971
|
*
|
|
972
|
-
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it.
|
|
972
|
+
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it. Pass `status` (`published` or `draft`) to return only plans with or without a published version; the `total` counts the same filtered set. Every item also carries `published_version` (null while never published), `has_unpublished_changes` (draft vs published by the editor's own rules), `last_edited_by` (null for a never-edited plan), `used_by_plans` (live plans using it as a sub-plan) and `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission). The response adds `counts` (`all`/`published`/`draft` under the current search, ignoring `status`) and `calls_7d_total` (same permission rule). `search` also matches assigned channel identifiers; `sort_by` accepts `calls_7d` (busiest first on desc) whenever calls are visible.
|
|
973
973
|
*/
|
|
974
974
|
list(input?: VisualPlansListInput, options?: NivaRequestOptions): NivaCall<VisualPlansListOutput, VisualPlansListErrorCode>;
|
|
975
975
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (NIVA-258). Source: GET /api/v1/spec.json via generateOpenApiSpec().
|
|
4
4
|
*/
|
|
5
5
|
/** SDK package version (from packages/sdk/package.json). */
|
|
6
|
-
export declare const SDK_VERSION = "0.1.0-rc.
|
|
6
|
+
export declare const SDK_VERSION = "0.1.0-rc.8";
|
|
7
7
|
/** Lowest NIVA product version this SDK operates against. */
|
|
8
8
|
export declare const SUPPORTED_NIVA: {
|
|
9
9
|
min: string;
|
|
@@ -3081,6 +3081,13 @@ export interface ChannelsCreateInput {
|
|
|
3081
3081
|
* Creates a channel of the given type. For WhatsApp and Telegram channels the supplied credentials are validated against the provider and webhook/SIP registration is performed as a side effect. A duplicate identifier returns 409 DUPLICATE_CHANNEL and invalid credentials return 422. Non-SIP channel types require the omnichannel module.
|
|
3082
3082
|
*/
|
|
3083
3083
|
export interface ChannelsCreateOutput {
|
|
3084
|
+
calls_7d: {
|
|
3085
|
+
daily: number[];
|
|
3086
|
+
/**
|
|
3087
|
+
* Calls and conversations in the last 7 days.
|
|
3088
|
+
*/
|
|
3089
|
+
total: number;
|
|
3090
|
+
} | null;
|
|
3084
3091
|
channel_type: string;
|
|
3085
3092
|
config?: NivaJsonValue;
|
|
3086
3093
|
created_at: string;
|
|
@@ -3088,12 +3095,18 @@ export interface ChannelsCreateOutput {
|
|
|
3088
3095
|
id: ChannelId;
|
|
3089
3096
|
identifier: string | null;
|
|
3090
3097
|
is_active: boolean;
|
|
3098
|
+
last_call_at: string | null;
|
|
3091
3099
|
name: string;
|
|
3092
3100
|
schedule_id: ScheduleId | null;
|
|
3093
3101
|
schedule_name: string | null;
|
|
3094
3102
|
updated_at: string;
|
|
3103
|
+
/**
|
|
3104
|
+
* True when the linked plan's working draft differs from its published version by the editor's own rules. False when never published.
|
|
3105
|
+
*/
|
|
3106
|
+
visual_plan_has_unpublished_changes: boolean;
|
|
3095
3107
|
visual_plan_id: VisualPlanId | null;
|
|
3096
3108
|
visual_plan_name: string | null;
|
|
3109
|
+
visual_plan_published_version: number | null;
|
|
3097
3110
|
webhook_url: string | null;
|
|
3098
3111
|
}
|
|
3099
3112
|
/**
|
|
@@ -3130,7 +3143,7 @@ export type ChannelsDeleteErrorCode = "CHANNEL_ALREADY_ASSIGNED" | "CHANNEL_INVA
|
|
|
3130
3143
|
/**
|
|
3131
3144
|
* channels.getById input.
|
|
3132
3145
|
*
|
|
3133
|
-
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3146
|
+
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Includes `calls_7d`, `last_call_at` (both null without the call_record:read permission), `visual_plan_published_version` and `visual_plan_has_unpublished_changes`. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3134
3147
|
*/
|
|
3135
3148
|
export interface ChannelsGetByIdInput {
|
|
3136
3149
|
/**
|
|
@@ -3141,9 +3154,16 @@ export interface ChannelsGetByIdInput {
|
|
|
3141
3154
|
/**
|
|
3142
3155
|
* channels.getById output.
|
|
3143
3156
|
*
|
|
3144
|
-
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3157
|
+
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Includes `calls_7d`, `last_call_at` (both null without the call_record:read permission), `visual_plan_published_version` and `visual_plan_has_unpublished_changes`. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3145
3158
|
*/
|
|
3146
3159
|
export type ChannelsGetByIdOutput = {
|
|
3160
|
+
calls_7d: {
|
|
3161
|
+
daily: number[];
|
|
3162
|
+
/**
|
|
3163
|
+
* Calls and conversations in the last 7 days.
|
|
3164
|
+
*/
|
|
3165
|
+
total: number;
|
|
3166
|
+
} | null;
|
|
3147
3167
|
channel_type: string;
|
|
3148
3168
|
config?: NivaJsonValue;
|
|
3149
3169
|
created_at: string;
|
|
@@ -3151,24 +3171,30 @@ export type ChannelsGetByIdOutput = {
|
|
|
3151
3171
|
id: ChannelId;
|
|
3152
3172
|
identifier: string | null;
|
|
3153
3173
|
is_active: boolean;
|
|
3174
|
+
last_call_at: string | null;
|
|
3154
3175
|
name: string;
|
|
3155
3176
|
schedule_id: ScheduleId | null;
|
|
3156
3177
|
schedule_name: string | null;
|
|
3157
3178
|
updated_at: string;
|
|
3179
|
+
/**
|
|
3180
|
+
* True when the linked plan's working draft differs from its published version by the editor's own rules. False when never published.
|
|
3181
|
+
*/
|
|
3182
|
+
visual_plan_has_unpublished_changes: boolean;
|
|
3158
3183
|
visual_plan_id: VisualPlanId | null;
|
|
3159
3184
|
visual_plan_name: string | null;
|
|
3185
|
+
visual_plan_published_version: number | null;
|
|
3160
3186
|
webhook_url: string | null;
|
|
3161
3187
|
} | null;
|
|
3162
3188
|
/**
|
|
3163
3189
|
* channels.getById error codes.
|
|
3164
3190
|
*
|
|
3165
|
-
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3191
|
+
* Returns the channel, or `null` (HTTP 200) when it does not exist or belongs to another organization. Includes `calls_7d`, `last_call_at` (both null without the call_record:read permission), `visual_plan_published_version` and `visual_plan_has_unpublished_changes`. Accessing a non-SIP channel while the omnichannel module is disabled returns 403 MODULE_DISABLED.
|
|
3166
3192
|
*/
|
|
3167
3193
|
export type ChannelsGetByIdErrorCode = "CHANNEL_ALREADY_ASSIGNED" | "CHANNEL_INVALID_CREDENTIALS" | "CHANNEL_NOT_FOUND" | "CHANNEL_WHATSAPP_ACCESS_TOKEN_INVALID" | "CHANNEL_WHATSAPP_PHONE_NUMBER_NOT_FOUND" | "CHANNEL_WHATSAPP_SYNC_CONFIRMATION_REQUIRED" | "CHANNEL_WHATSAPP_WABA_INVALID" | "CHANNEL_WHATSAPP_WEBHOOK_SYNC_FAILED" | "DUPLICATE_CHANNEL" | "FORBIDDEN" | "INSUFFICIENT_PERMISSIONS" | "INSUFFICIENT_SCOPE" | "MEMBER_SUSPENDED" | "MODULE_DISABLED" | "UNAUTHORIZED" | "WHATSAPP_NOT_CONFIGURED";
|
|
3168
3194
|
/**
|
|
3169
3195
|
* channels.list input.
|
|
3170
3196
|
*
|
|
3171
|
-
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type` and `
|
|
3197
|
+
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type`, `is_active` and `alert` (`true` returns only channels with an alert: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync). `search` also matches the linked plan name. Every item carries `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission), `last_call_at` (same permission rule), `visual_plan_published_version` (null while never published or unlinked) and `visual_plan_has_unpublished_changes`. The response adds `counts` (`all` plus one entry per channel type with rows, under the current search, ignoring the type/status/alert filters), `active_count` and `alert_count` (same search rule). `sort_by` accepts `calls_7d` (busiest first on desc) and `last_call_at` (most recent first on desc, quiet channels last) whenever calls are visible, otherwise both fall back to `updated_at`. When the omnichannel module is disabled the result is restricted to SIP channels, and requesting a non-SIP `channel_type` returns 403 MODULE_DISABLED.
|
|
3172
3198
|
*/
|
|
3173
3199
|
export interface ChannelsListInput {
|
|
3174
3200
|
/**
|
|
@@ -3206,14 +3232,37 @@ export interface ChannelsListInput {
|
|
|
3206
3232
|
* Filter by activation state; `true` returns only active channels.
|
|
3207
3233
|
*/
|
|
3208
3234
|
is_active?: boolean;
|
|
3235
|
+
/**
|
|
3236
|
+
* When `true`, returns only channels with an alert: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync.
|
|
3237
|
+
*/
|
|
3238
|
+
alert?: boolean;
|
|
3209
3239
|
}
|
|
3210
3240
|
/**
|
|
3211
3241
|
* channels.list output.
|
|
3212
3242
|
*
|
|
3213
|
-
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type` and `
|
|
3243
|
+
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type`, `is_active` and `alert` (`true` returns only channels with an alert: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync). `search` also matches the linked plan name. Every item carries `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission), `last_call_at` (same permission rule), `visual_plan_published_version` (null while never published or unlinked) and `visual_plan_has_unpublished_changes`. The response adds `counts` (`all` plus one entry per channel type with rows, under the current search, ignoring the type/status/alert filters), `active_count` and `alert_count` (same search rule). `sort_by` accepts `calls_7d` (busiest first on desc) and `last_call_at` (most recent first on desc, quiet channels last) whenever calls are visible, otherwise both fall back to `updated_at`. When the omnichannel module is disabled the result is restricted to SIP channels, and requesting a non-SIP `channel_type` returns 403 MODULE_DISABLED.
|
|
3214
3244
|
*/
|
|
3215
3245
|
export interface ChannelsListOutput {
|
|
3246
|
+
/**
|
|
3247
|
+
* Active channels under the current search, ignoring the other filters.
|
|
3248
|
+
*/
|
|
3249
|
+
active_count: number;
|
|
3250
|
+
/**
|
|
3251
|
+
* Channels with an alert under the current search, ignoring the other filters: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync.
|
|
3252
|
+
*/
|
|
3253
|
+
alert_count: number;
|
|
3254
|
+
/**
|
|
3255
|
+
* Channel counts by `channel_type` (`all` plus one entry per type with rows) under the current search, ignoring the type/status/alert filters.
|
|
3256
|
+
*/
|
|
3257
|
+
counts: Record<string, number>;
|
|
3216
3258
|
items: {
|
|
3259
|
+
calls_7d: {
|
|
3260
|
+
daily: number[];
|
|
3261
|
+
/**
|
|
3262
|
+
* Calls and conversations in the last 7 days.
|
|
3263
|
+
*/
|
|
3264
|
+
total: number;
|
|
3265
|
+
} | null;
|
|
3217
3266
|
channel_type: string;
|
|
3218
3267
|
config?: NivaJsonValue;
|
|
3219
3268
|
created_at: string;
|
|
@@ -3221,12 +3270,18 @@ export interface ChannelsListOutput {
|
|
|
3221
3270
|
id: ChannelId;
|
|
3222
3271
|
identifier: string | null;
|
|
3223
3272
|
is_active: boolean;
|
|
3273
|
+
last_call_at: string | null;
|
|
3224
3274
|
name: string;
|
|
3225
3275
|
schedule_id: ScheduleId | null;
|
|
3226
3276
|
schedule_name: string | null;
|
|
3227
3277
|
updated_at: string;
|
|
3278
|
+
/**
|
|
3279
|
+
* True when the linked plan's working draft differs from its published version by the editor's own rules. False when never published.
|
|
3280
|
+
*/
|
|
3281
|
+
visual_plan_has_unpublished_changes: boolean;
|
|
3228
3282
|
visual_plan_id: VisualPlanId | null;
|
|
3229
3283
|
visual_plan_name: string | null;
|
|
3284
|
+
visual_plan_published_version: number | null;
|
|
3230
3285
|
webhook_url: string | null;
|
|
3231
3286
|
}[];
|
|
3232
3287
|
/**
|
|
@@ -3249,7 +3304,7 @@ export interface ChannelsListOutput {
|
|
|
3249
3304
|
/**
|
|
3250
3305
|
* channels.list error codes.
|
|
3251
3306
|
*
|
|
3252
|
-
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type` and `
|
|
3307
|
+
* Returns a paginated list of the organization's channels, optionally filtered by `channel_type`, `is_active` and `alert` (`true` returns only channels with an alert: active channels with no plan, a never-published plan, or a failed WhatsApp webhook sync). `search` also matches the linked plan name. Every item carries `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission), `last_call_at` (same permission rule), `visual_plan_published_version` (null while never published or unlinked) and `visual_plan_has_unpublished_changes`. The response adds `counts` (`all` plus one entry per channel type with rows, under the current search, ignoring the type/status/alert filters), `active_count` and `alert_count` (same search rule). `sort_by` accepts `calls_7d` (busiest first on desc) and `last_call_at` (most recent first on desc, quiet channels last) whenever calls are visible, otherwise both fall back to `updated_at`. When the omnichannel module is disabled the result is restricted to SIP channels, and requesting a non-SIP `channel_type` returns 403 MODULE_DISABLED.
|
|
3253
3308
|
*/
|
|
3254
3309
|
export type ChannelsListErrorCode = "CHANNEL_ALREADY_ASSIGNED" | "CHANNEL_INVALID_CREDENTIALS" | "CHANNEL_NOT_FOUND" | "CHANNEL_WHATSAPP_ACCESS_TOKEN_INVALID" | "CHANNEL_WHATSAPP_PHONE_NUMBER_NOT_FOUND" | "CHANNEL_WHATSAPP_SYNC_CONFIRMATION_REQUIRED" | "CHANNEL_WHATSAPP_WABA_INVALID" | "CHANNEL_WHATSAPP_WEBHOOK_SYNC_FAILED" | "DUPLICATE_CHANNEL" | "FORBIDDEN" | "INSUFFICIENT_PERMISSIONS" | "INSUFFICIENT_SCOPE" | "MEMBER_SUSPENDED" | "MODULE_DISABLED" | "UNAUTHORIZED" | "WHATSAPP_NOT_CONFIGURED";
|
|
3255
3310
|
/**
|
|
@@ -3359,6 +3414,13 @@ export interface ChannelsUpdateInput {
|
|
|
3359
3414
|
* Partially updates a channel. Moving a channel that is already attached to a different plan returns 409 CHANNEL_ALREADY_ASSIGNED unless `reassign` is `true`. Changing WhatsApp integration fields re-validates the configuration against Meta and re-triggers webhook synchronization.
|
|
3360
3415
|
*/
|
|
3361
3416
|
export interface ChannelsUpdateOutput {
|
|
3417
|
+
calls_7d: {
|
|
3418
|
+
daily: number[];
|
|
3419
|
+
/**
|
|
3420
|
+
* Calls and conversations in the last 7 days.
|
|
3421
|
+
*/
|
|
3422
|
+
total: number;
|
|
3423
|
+
} | null;
|
|
3362
3424
|
channel_type: string;
|
|
3363
3425
|
config?: NivaJsonValue;
|
|
3364
3426
|
created_at: string;
|
|
@@ -3366,12 +3428,18 @@ export interface ChannelsUpdateOutput {
|
|
|
3366
3428
|
id: ChannelId;
|
|
3367
3429
|
identifier: string | null;
|
|
3368
3430
|
is_active: boolean;
|
|
3431
|
+
last_call_at: string | null;
|
|
3369
3432
|
name: string;
|
|
3370
3433
|
schedule_id: ScheduleId | null;
|
|
3371
3434
|
schedule_name: string | null;
|
|
3372
3435
|
updated_at: string;
|
|
3436
|
+
/**
|
|
3437
|
+
* True when the linked plan's working draft differs from its published version by the editor's own rules. False when never published.
|
|
3438
|
+
*/
|
|
3439
|
+
visual_plan_has_unpublished_changes: boolean;
|
|
3373
3440
|
visual_plan_id: VisualPlanId | null;
|
|
3374
3441
|
visual_plan_name: string | null;
|
|
3442
|
+
visual_plan_published_version: number | null;
|
|
3375
3443
|
webhook_url: string | null;
|
|
3376
3444
|
}
|
|
3377
3445
|
/**
|
|
@@ -9408,6 +9476,9 @@ export interface VisualPlansImportDraftInput {
|
|
|
9408
9476
|
};
|
|
9409
9477
|
id: string;
|
|
9410
9478
|
label: string;
|
|
9479
|
+
origin?: {
|
|
9480
|
+
preset_id: string;
|
|
9481
|
+
};
|
|
9411
9482
|
position: {
|
|
9412
9483
|
x: number;
|
|
9413
9484
|
y: number;
|
|
@@ -9469,7 +9540,7 @@ export type VisualPlansImportDraftErrorCode = "FORBIDDEN" | "INSUFFICIENT_PERMIS
|
|
|
9469
9540
|
/**
|
|
9470
9541
|
* visualPlans.list input.
|
|
9471
9542
|
*
|
|
9472
|
-
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it.
|
|
9543
|
+
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it. Pass `status` (`published` or `draft`) to return only plans with or without a published version; the `total` counts the same filtered set. Every item also carries `published_version` (null while never published), `has_unpublished_changes` (draft vs published by the editor's own rules), `last_edited_by` (null for a never-edited plan), `used_by_plans` (live plans using it as a sub-plan) and `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission). The response adds `counts` (`all`/`published`/`draft` under the current search, ignoring `status`) and `calls_7d_total` (same permission rule). `search` also matches assigned channel identifiers; `sort_by` accepts `calls_7d` (busiest first on desc) whenever calls are visible.
|
|
9473
9544
|
*/
|
|
9474
9545
|
export interface VisualPlansListInput {
|
|
9475
9546
|
/**
|
|
@@ -9499,13 +9570,26 @@ export interface VisualPlansListInput {
|
|
|
9499
9570
|
* @default "desc"
|
|
9500
9571
|
*/
|
|
9501
9572
|
sort_order?: "asc" | "desc";
|
|
9573
|
+
/**
|
|
9574
|
+
* Filter by publication state; `published` returns only plans with a published version, `draft` only plans without one. Absent returns everything.
|
|
9575
|
+
*/
|
|
9576
|
+
status?: "published" | "draft";
|
|
9502
9577
|
}
|
|
9503
9578
|
/**
|
|
9504
9579
|
* visualPlans.list output.
|
|
9505
9580
|
*
|
|
9506
|
-
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it.
|
|
9581
|
+
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it. Pass `status` (`published` or `draft`) to return only plans with or without a published version; the `total` counts the same filtered set. Every item also carries `published_version` (null while never published), `has_unpublished_changes` (draft vs published by the editor's own rules), `last_edited_by` (null for a never-edited plan), `used_by_plans` (live plans using it as a sub-plan) and `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission). The response adds `counts` (`all`/`published`/`draft` under the current search, ignoring `status`) and `calls_7d_total` (same permission rule). `search` also matches assigned channel identifiers; `sort_by` accepts `calls_7d` (busiest first on desc) whenever calls are visible.
|
|
9507
9582
|
*/
|
|
9508
9583
|
export interface VisualPlansListOutput {
|
|
9584
|
+
calls_7d_total: number | null;
|
|
9585
|
+
/**
|
|
9586
|
+
* Plan counts for the organization under the current search, ignoring the status filter.
|
|
9587
|
+
*/
|
|
9588
|
+
counts: {
|
|
9589
|
+
all: number;
|
|
9590
|
+
draft: number;
|
|
9591
|
+
published: number;
|
|
9592
|
+
};
|
|
9509
9593
|
items: {
|
|
9510
9594
|
anonymize_enabled: boolean;
|
|
9511
9595
|
assigned_channels: {
|
|
@@ -9516,18 +9600,35 @@ export interface VisualPlansListOutput {
|
|
|
9516
9600
|
auto_analysis_enabled: boolean;
|
|
9517
9601
|
auto_analysis_ids: string[];
|
|
9518
9602
|
auto_analysis_inherit_org: boolean;
|
|
9603
|
+
calls_7d: {
|
|
9604
|
+
daily: number[];
|
|
9605
|
+
/**
|
|
9606
|
+
* Calls and conversations in the last 7 days.
|
|
9607
|
+
*/
|
|
9608
|
+
total: number;
|
|
9609
|
+
} | null;
|
|
9519
9610
|
created_at: string;
|
|
9520
9611
|
description: string | null;
|
|
9612
|
+
/**
|
|
9613
|
+
* True when the working draft differs from the published version by the editor's own rules (labels, config and connections; positions never count). False when never published.
|
|
9614
|
+
*/
|
|
9615
|
+
has_unpublished_changes: boolean;
|
|
9521
9616
|
id: VisualPlanId;
|
|
9522
9617
|
intent_detection_intents: string[];
|
|
9523
9618
|
/**
|
|
9524
9619
|
* maxLength: 10
|
|
9525
9620
|
*/
|
|
9526
9621
|
language: string | null;
|
|
9622
|
+
last_edited_by: {
|
|
9623
|
+
avatar_url: string | null;
|
|
9624
|
+
id: UserId;
|
|
9625
|
+
name: string;
|
|
9626
|
+
} | null;
|
|
9527
9627
|
/**
|
|
9528
9628
|
* maxLength: 255
|
|
9529
9629
|
*/
|
|
9530
9630
|
name: string;
|
|
9631
|
+
published_version: number | null;
|
|
9531
9632
|
published_version_id: VisualPlanVersionId | null;
|
|
9532
9633
|
recording_enabled: boolean;
|
|
9533
9634
|
sampling_percentage: number;
|
|
@@ -9565,6 +9666,10 @@ export interface VisualPlansListOutput {
|
|
|
9565
9666
|
*/
|
|
9566
9667
|
transcription_type: "post_call" | "live";
|
|
9567
9668
|
updated_at: string;
|
|
9669
|
+
/**
|
|
9670
|
+
* How many other live plans of the organization use this plan as a sub-plan.
|
|
9671
|
+
*/
|
|
9672
|
+
used_by_plans: number;
|
|
9568
9673
|
}[];
|
|
9569
9674
|
/**
|
|
9570
9675
|
* Items per page used for this response.
|
|
@@ -9586,7 +9691,7 @@ export interface VisualPlansListOutput {
|
|
|
9586
9691
|
/**
|
|
9587
9692
|
* visualPlans.list error codes.
|
|
9588
9693
|
*
|
|
9589
|
-
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it.
|
|
9694
|
+
* Returns a paginated list of visual plans, each including its recording/transcription/speech-analytics settings and the channels currently assigned to it. Pass `status` (`published` or `draft`) to return only plans with or without a published version; the `total` counts the same filtered set. Every item also carries `published_version` (null while never published), `has_unpublished_changes` (draft vs published by the editor's own rules), `last_edited_by` (null for a never-edited plan), `used_by_plans` (live plans using it as a sub-plan) and `calls_7d` (14 daily buckets plus the 7-day total, null without the call_record:read permission). The response adds `counts` (`all`/`published`/`draft` under the current search, ignoring `status`) and `calls_7d_total` (same permission rule). `search` also matches assigned channel identifiers; `sort_by` accepts `calls_7d` (busiest first on desc) whenever calls are visible.
|
|
9590
9695
|
*/
|
|
9591
9696
|
export type VisualPlansListErrorCode = "FORBIDDEN" | "INSUFFICIENT_PERMISSIONS" | "INSUFFICIENT_SCOPE" | "MEMBER_SUSPENDED" | "UNAUTHORIZED";
|
|
9592
9697
|
/**
|
|
@@ -9670,6 +9775,9 @@ export interface VisualPlansPublishInput {
|
|
|
9670
9775
|
};
|
|
9671
9776
|
id: string;
|
|
9672
9777
|
label: string;
|
|
9778
|
+
origin?: {
|
|
9779
|
+
preset_id: string;
|
|
9780
|
+
};
|
|
9673
9781
|
position: {
|
|
9674
9782
|
x: number;
|
|
9675
9783
|
y: number;
|
|
@@ -11180,7 +11288,7 @@ export declare const OPERATIONS: {
|
|
|
11180
11288
|
readonly method: "GET";
|
|
11181
11289
|
readonly path: "/channels";
|
|
11182
11290
|
readonly pathParams: readonly [];
|
|
11183
|
-
readonly queryParams: readonly ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active"];
|
|
11291
|
+
readonly queryParams: readonly ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active", "alert"];
|
|
11184
11292
|
readonly bodyKind: "none";
|
|
11185
11293
|
readonly responseKind: "json";
|
|
11186
11294
|
readonly codes: 50;
|
|
@@ -12062,7 +12170,7 @@ export declare const OPERATIONS: {
|
|
|
12062
12170
|
readonly method: "GET";
|
|
12063
12171
|
readonly path: "/visual-plans";
|
|
12064
12172
|
readonly pathParams: readonly [];
|
|
12065
|
-
readonly queryParams: readonly ["search", "page", "limit", "sort_by", "sort_order"];
|
|
12173
|
+
readonly queryParams: readonly ["search", "page", "limit", "sort_by", "sort_order", "status"];
|
|
12066
12174
|
readonly bodyKind: "none";
|
|
12067
12175
|
readonly responseKind: "json";
|
|
12068
12176
|
readonly codes: 1;
|
package/index.bun.js
CHANGED
|
@@ -535,7 +535,7 @@ function buildNivaClient(call) {
|
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// src/generated/meta.ts
|
|
538
|
-
var SDK_VERSION = "0.1.0-rc.
|
|
538
|
+
var SDK_VERSION = "0.1.0-rc.8";
|
|
539
539
|
var SUPPORTED_NIVA = { min: "2.0.0", max: null };
|
|
540
540
|
var PROTOCOL_VERSION = 1;
|
|
541
541
|
var COMPAT_TABLE = [
|
|
@@ -1293,7 +1293,7 @@ var OPERATIONS = {
|
|
|
1293
1293
|
method: "GET",
|
|
1294
1294
|
path: "/channels",
|
|
1295
1295
|
pathParams: [],
|
|
1296
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active"],
|
|
1296
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active", "alert"],
|
|
1297
1297
|
bodyKind: "none",
|
|
1298
1298
|
responseKind: "json",
|
|
1299
1299
|
codes: 50
|
|
@@ -2175,7 +2175,7 @@ var OPERATIONS = {
|
|
|
2175
2175
|
method: "GET",
|
|
2176
2176
|
path: "/visual-plans",
|
|
2177
2177
|
pathParams: [],
|
|
2178
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order"],
|
|
2178
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "status"],
|
|
2179
2179
|
bodyKind: "none",
|
|
2180
2180
|
responseKind: "json",
|
|
2181
2181
|
codes: 1
|
package/index.default.js
CHANGED
|
@@ -535,7 +535,7 @@ function buildNivaClient(call) {
|
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// src/generated/meta.ts
|
|
538
|
-
var SDK_VERSION = "0.1.0-rc.
|
|
538
|
+
var SDK_VERSION = "0.1.0-rc.8";
|
|
539
539
|
var SUPPORTED_NIVA = { min: "2.0.0", max: null };
|
|
540
540
|
var PROTOCOL_VERSION = 1;
|
|
541
541
|
var COMPAT_TABLE = [
|
|
@@ -1293,7 +1293,7 @@ var OPERATIONS = {
|
|
|
1293
1293
|
method: "GET",
|
|
1294
1294
|
path: "/channels",
|
|
1295
1295
|
pathParams: [],
|
|
1296
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active"],
|
|
1296
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active", "alert"],
|
|
1297
1297
|
bodyKind: "none",
|
|
1298
1298
|
responseKind: "json",
|
|
1299
1299
|
codes: 50
|
|
@@ -2175,7 +2175,7 @@ var OPERATIONS = {
|
|
|
2175
2175
|
method: "GET",
|
|
2176
2176
|
path: "/visual-plans",
|
|
2177
2177
|
pathParams: [],
|
|
2178
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order"],
|
|
2178
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "status"],
|
|
2179
2179
|
bodyKind: "none",
|
|
2180
2180
|
responseKind: "json",
|
|
2181
2181
|
codes: 1
|
package/index.deno.js
CHANGED
|
@@ -535,7 +535,7 @@ function buildNivaClient(call) {
|
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// src/generated/meta.ts
|
|
538
|
-
var SDK_VERSION = "0.1.0-rc.
|
|
538
|
+
var SDK_VERSION = "0.1.0-rc.8";
|
|
539
539
|
var SUPPORTED_NIVA = { min: "2.0.0", max: null };
|
|
540
540
|
var PROTOCOL_VERSION = 1;
|
|
541
541
|
var COMPAT_TABLE = [
|
|
@@ -1293,7 +1293,7 @@ var OPERATIONS = {
|
|
|
1293
1293
|
method: "GET",
|
|
1294
1294
|
path: "/channels",
|
|
1295
1295
|
pathParams: [],
|
|
1296
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active"],
|
|
1296
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active", "alert"],
|
|
1297
1297
|
bodyKind: "none",
|
|
1298
1298
|
responseKind: "json",
|
|
1299
1299
|
codes: 50
|
|
@@ -2175,7 +2175,7 @@ var OPERATIONS = {
|
|
|
2175
2175
|
method: "GET",
|
|
2176
2176
|
path: "/visual-plans",
|
|
2177
2177
|
pathParams: [],
|
|
2178
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order"],
|
|
2178
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "status"],
|
|
2179
2179
|
bodyKind: "none",
|
|
2180
2180
|
responseKind: "json",
|
|
2181
2181
|
codes: 1
|
package/index.node.js
CHANGED
|
@@ -535,7 +535,7 @@ function buildNivaClient(call) {
|
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// src/generated/meta.ts
|
|
538
|
-
var SDK_VERSION = "0.1.0-rc.
|
|
538
|
+
var SDK_VERSION = "0.1.0-rc.8";
|
|
539
539
|
var SUPPORTED_NIVA = { min: "2.0.0", max: null };
|
|
540
540
|
var PROTOCOL_VERSION = 1;
|
|
541
541
|
var COMPAT_TABLE = [
|
|
@@ -1293,7 +1293,7 @@ var OPERATIONS = {
|
|
|
1293
1293
|
method: "GET",
|
|
1294
1294
|
path: "/channels",
|
|
1295
1295
|
pathParams: [],
|
|
1296
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active"],
|
|
1296
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "channel_type", "is_active", "alert"],
|
|
1297
1297
|
bodyKind: "none",
|
|
1298
1298
|
responseKind: "json",
|
|
1299
1299
|
codes: 50
|
|
@@ -2175,7 +2175,7 @@ var OPERATIONS = {
|
|
|
2175
2175
|
method: "GET",
|
|
2176
2176
|
path: "/visual-plans",
|
|
2177
2177
|
pathParams: [],
|
|
2178
|
-
queryParams: ["search", "page", "limit", "sort_by", "sort_order"],
|
|
2178
|
+
queryParams: ["search", "page", "limit", "sort_by", "sort_order", "status"],
|
|
2179
2179
|
bodyKind: "none",
|
|
2180
2180
|
responseKind: "json",
|
|
2181
2181
|
codes: 1
|
package/package.json
CHANGED