django-cfg 1.4.58__py3-none-any.whl → 1.4.60__py3-none-any.whl

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.

Potentially problematic release.


This version of django-cfg might be problematic. Click here for more details.

Files changed (59) hide show
  1. django_cfg/__init__.py +1 -1
  2. django_cfg/apps/ipc/RPC_LOGGING.md +321 -0
  3. django_cfg/apps/ipc/TESTING.md +539 -0
  4. django_cfg/apps/ipc/__init__.py +12 -3
  5. django_cfg/apps/ipc/admin.py +212 -0
  6. django_cfg/apps/ipc/migrations/0001_initial.py +137 -0
  7. django_cfg/apps/ipc/migrations/__init__.py +0 -0
  8. django_cfg/apps/ipc/models.py +221 -0
  9. django_cfg/apps/ipc/serializers/__init__.py +10 -0
  10. django_cfg/apps/ipc/serializers/serializers.py +114 -0
  11. django_cfg/apps/ipc/services/client/client.py +83 -4
  12. django_cfg/apps/ipc/services/logging.py +239 -0
  13. django_cfg/apps/ipc/services/monitor.py +5 -3
  14. django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/main.mjs +269 -0
  15. django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/overview.mjs +259 -0
  16. django_cfg/apps/ipc/static/django_cfg_ipc/js/dashboard/testing.mjs +375 -0
  17. django_cfg/apps/ipc/templates/django_cfg_ipc/components/methods_content.html +22 -0
  18. django_cfg/apps/ipc/templates/django_cfg_ipc/components/notifications_content.html +9 -0
  19. django_cfg/apps/ipc/templates/django_cfg_ipc/components/overview_content.html +9 -0
  20. django_cfg/apps/ipc/templates/django_cfg_ipc/components/requests_content.html +23 -0
  21. django_cfg/apps/ipc/templates/django_cfg_ipc/components/stat_cards.html +50 -0
  22. django_cfg/apps/ipc/templates/django_cfg_ipc/components/system_status.html +47 -0
  23. django_cfg/apps/ipc/templates/django_cfg_ipc/components/tab_navigation.html +29 -0
  24. django_cfg/apps/ipc/templates/django_cfg_ipc/components/testing_tools.html +184 -0
  25. django_cfg/apps/ipc/templates/django_cfg_ipc/pages/dashboard.html +56 -0
  26. django_cfg/apps/ipc/urls.py +4 -2
  27. django_cfg/apps/ipc/views/__init__.py +7 -2
  28. django_cfg/apps/ipc/views/dashboard.py +1 -1
  29. django_cfg/apps/ipc/views/{viewsets.py → monitoring.py} +17 -11
  30. django_cfg/apps/ipc/views/testing.py +285 -0
  31. django_cfg/core/backends/__init__.py +1 -0
  32. django_cfg/core/backends/smtp.py +69 -0
  33. django_cfg/middleware/authentication.py +157 -0
  34. django_cfg/models/api/drf/config.py +2 -2
  35. django_cfg/models/services/email.py +11 -1
  36. django_cfg/modules/django_client/system/generate_mjs_clients.py +1 -1
  37. django_cfg/modules/django_dashboard/sections/widgets.py +209 -0
  38. django_cfg/modules/django_unfold/callbacks/main.py +43 -18
  39. django_cfg/modules/django_unfold/dashboard.py +41 -4
  40. django_cfg/pyproject.toml +1 -1
  41. django_cfg/static/js/api/index.mjs +8 -3
  42. django_cfg/static/js/api/ipc/client.mjs +40 -0
  43. django_cfg/static/js/api/knowbase/client.mjs +309 -0
  44. django_cfg/static/js/api/knowbase/index.mjs +13 -0
  45. django_cfg/static/js/api/payments/client.mjs +46 -1215
  46. django_cfg/static/js/api/types.mjs +164 -337
  47. django_cfg/templates/admin/index.html +8 -0
  48. django_cfg/templates/admin/layouts/dashboard_with_tabs.html +13 -1
  49. django_cfg/templates/admin/sections/widgets_section.html +129 -0
  50. django_cfg/templates/admin/snippets/tabs/widgets_tab.html +38 -0
  51. django_cfg/utils/smart_defaults.py +1 -1
  52. {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/METADATA +1 -1
  53. {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/RECORD +58 -31
  54. django_cfg/apps/ipc/templates/django_cfg_ipc/dashboard.html +0 -202
  55. /django_cfg/apps/ipc/static/django_cfg_ipc/js/{dashboard.mjs → dashboard.mjs.old} +0 -0
  56. /django_cfg/apps/ipc/templates/django_cfg_ipc/{base.html → layout/base.html} +0 -0
  57. {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/WHEEL +0 -0
  58. {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/entry_points.txt +0 -0
  59. {django_cfg-1.4.58.dist-info → django_cfg-1.4.60.dist-info}/licenses/LICENSE +0 -0
@@ -8,133 +8,184 @@
8
8
  // These types can be used for better IDE support and documentation
9
9
 
10
10
  /**
11
- * @typedef {Object} APIKeyCreate * @description API key creation serializer with service integration.
11
+ * @typedef {Object} APIResponse * @description Standard API response serializer. * @property {boolean} success - Operation success status * @property {string} [message] - Success message * @property {string} [error] - Error message * @property {Record<string, any>} [data] - Response data */
12
12
 
13
- Creates new API keys and returns the full key value (only once). * @property {string} name - Descriptive name for the API key * @property {number} [expires_in_days] - Expiration in days (optional, null for no expiration) */
13
+ /**
14
+ * @typedef {Object} APIResponseRequest * @description Standard API response serializer. * @property {boolean} success - Operation success status * @property {string} [message] - Success message * @property {string} [error] - Error message * @property {Record<string, any>} [data] - Response data */
14
15
 
15
16
  /**
16
- * @typedef {Object} APIKeyCreateRequest * @description API key creation serializer with service integration.
17
+ * @typedef {Object} ArchiveItem * @description Archive item serializer. * @property {string} id * @property {string} relative_path - Path within archive * @property {string} item_name - Item name * @property {string} item_type - MIME type * @property {"document" | "code" | "image" | "data" | "archive" | "unknown"} content_type - Content classification
17
18
 
18
- Creates new API keys and returns the full key value (only once). * @property {string} name - Descriptive name for the API key * @property {number} [expires_in_days] - Expiration in days (optional, null for no expiration) */
19
+ * `document` - Document
20
+ * `code` - Code
21
+ * `image` - Image
22
+ * `data` - Data
23
+ * `archive` - Archive
24
+ * `unknown` - Unknown * @property {number} [file_size] - Item size in bytes * @property {boolean} is_processable - Whether item can be processed for chunks * @property {string} language - Programming language or document language * @property {string} encoding - Character encoding * @property {number} chunks_count - Number of chunks created * @property {number} total_tokens - Total tokens in all chunks * @property {number} processing_cost - Processing cost for this item * @property {string} created_at * @property {string} updated_at */
19
25
 
20
26
  /**
21
- * @typedef {Object} APIKeyDetail * @description Complete API key serializer with full details.
27
+ * @typedef {Object} ArchiveItemChunk * @description Archive item chunk serializer. * @property {string} id * @property {string} content - Chunk text content * @property {number} chunk_index - Sequential chunk number within item * @property {"text" | "code" | "heading" | "metadata" | "table" | "list"} [chunk_type] - Type of content in chunk
22
28
 
23
- Used for API key detail views (no key value for security). * @property {string} id - Unique identifier for this record * @property {string} user * @property {string} name - Human-readable name for this API key * @property {string} key_preview * @property {boolean} is_active - Whether this API key is active * @property {boolean} is_expired * @property {boolean} is_valid * @property {number} days_until_expiry * @property {number} total_requests - Total number of requests made with this key * @property {string} last_used_at - When this API key was last used * @property {string} expires_at - When this API key expires (null = never expires) * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
29
+ * `text` - Text
30
+ * `code` - Code
31
+ * `heading` - Heading
32
+ * `metadata` - Metadata
33
+ * `table` - Table
34
+ * `list` - List * @property {number} token_count - Number of tokens in chunk * @property {number} character_count - Number of characters in chunk * @property {string} embedding_model - Model used for embedding generation * @property {number} embedding_cost - Cost in USD for embedding generation * @property {Record<string, any>} context_summary - Get context summary for display. * @property {string} created_at */
24
35
 
25
36
  /**
26
- * @typedef {Object} APIKeyList * @description Lightweight API key serializer for lists.
37
+ * @typedef {Object} ArchiveItemChunkDetail * @description Detailed chunk serializer with full context. * @property {string} id * @property {string} content - Chunk text content * @property {number} chunk_index - Sequential chunk number within item * @property {"text" | "code" | "heading" | "metadata" | "table" | "list"} [chunk_type] - Type of content in chunk
27
38
 
28
- Optimized for API key lists with minimal data (no key value). * @property {string} id - Unique identifier for this record * @property {string} user * @property {string} name - Human-readable name for this API key * @property {boolean} is_active - Whether this API key is active * @property {boolean} is_expired * @property {boolean} is_valid * @property {number} total_requests - Total number of requests made with this key * @property {string} last_used_at - When this API key was last used * @property {string} expires_at - When this API key expires (null = never expires) * @property {string} created_at - When this record was created */
39
+ * `text` - Text
40
+ * `code` - Code
41
+ * `heading` - Heading
42
+ * `metadata` - Metadata
43
+ * `table` - Table
44
+ * `list` - List * @property {number} token_count - Number of tokens in chunk * @property {number} character_count - Number of characters in chunk * @property {string} embedding_model - Model used for embedding generation * @property {number} embedding_cost - Cost in USD for embedding generation * @property {Record<string, any>} context_summary - Get context summary for display. * @property {string} created_at * @property {any} context_metadata */
29
45
 
30
46
  /**
31
- * @typedef {Object} APIKeyUpdate * @description API key update serializer for modifying API key properties.
47
+ * @typedef {Object} ArchiveItemChunkRequest * @description Archive item chunk serializer. * @property {string} content - Chunk text content * @property {number} chunk_index - Sequential chunk number within item * @property {"text" | "code" | "heading" | "metadata" | "table" | "list"} [chunk_type] - Type of content in chunk
32
48
 
33
- Allows updating name and active status only. * @property {string} name - Human-readable name for this API key * @property {boolean} [is_active] - Whether this API key is active */
49
+ * `text` - Text
50
+ * `code` - Code
51
+ * `heading` - Heading
52
+ * `metadata` - Metadata
53
+ * `table` - Table
54
+ * `list` - List */
34
55
 
35
56
  /**
36
- * @typedef {Object} APIKeyUpdateRequest * @description API key update serializer for modifying API key properties.
57
+ * @typedef {Object} ArchiveItemDetail * @description Detailed archive item serializer with content. * @property {string} id * @property {string} relative_path - Path within archive * @property {string} item_name - Item name * @property {string} item_type - MIME type * @property {"document" | "code" | "image" | "data" | "archive" | "unknown"} content_type - Content classification
37
58
 
38
- Allows updating name and active status only. * @property {string} name - Human-readable name for this API key * @property {boolean} [is_active] - Whether this API key is active */
59
+ * `document` - Document
60
+ * `code` - Code
61
+ * `image` - Image
62
+ * `data` - Data
63
+ * `archive` - Archive
64
+ * `unknown` - Unknown * @property {number} [file_size] - Item size in bytes * @property {boolean} is_processable - Whether item can be processed for chunks * @property {string} language - Programming language or document language * @property {string} encoding - Character encoding * @property {number} chunks_count - Number of chunks created * @property {number} total_tokens - Total tokens in all chunks * @property {number} processing_cost - Processing cost for this item * @property {string} created_at * @property {string} updated_at * @property {string} raw_content * @property {any} metadata */
39
65
 
40
66
  /**
41
- * @typedef {Object} APIKeyValidationRequest * @description API key validation serializer.
67
+ * @typedef {Object} ArchiveItemRequest * @description Archive item serializer. * @property {string} relative_path - Path within archive * @property {string} item_name - Item name * @property {string} item_type - MIME type * @property {number} [file_size] - Item size in bytes */
42
68
 
43
- Validates API key and returns key information. * @property {string} key - API key to validate */
69
+ /**
70
+ * @typedef {Object} ArchiveProcessingResult * @description Archive processing result serializer. * @property {string} archive_id * @property {string} status * @property {number} processing_time_ms * @property {number} items_processed * @property {number} chunks_created * @property {number} vectorized_chunks * @property {number} total_cost_usd * @property {string} error_message */
44
71
 
45
72
  /**
46
- * @typedef {Object} APIKeyValidationResponse * @description API key validation response serializer.
73
+ * @typedef {Object} ArchiveSearchRequestRequest * @description Archive search request serializer. * @property {string} query - Search query * @property {"document" | "code" | "image" | "data" | "archive" | "unknown"[]} [content_types] - Filter by content types * @property {string[]} [languages] - Filter by programming languages * @property {"text" | "code" | "heading" | "metadata" | "table" | "list"[]} [chunk_types] - Filter by chunk types * @property {string[]} [archive_ids] - Search within specific archives * @property {number} [limit] - Maximum number of results * @property {number} [similarity_threshold] - Minimum similarity threshold */
47
74
 
48
- Defines the structure of API key validation response for OpenAPI schema. * @property {boolean} success - Whether the validation was successful * @property {boolean} valid - Whether the API key is valid * @property {any} api_key - API key details if valid * @property {string} message - Validation message * @property {string} [error] - Error message if validation failed * @property {string} [error_code] - Error code if validation failed */
75
+ /**
76
+ * @typedef {Object} ArchiveSearchResult * @description Archive search result serializer. * @property {any} chunk * @property {number} similarity_score * @property {Record<string, any>} context_summary * @property {Record<string, any>} archive_info * @property {Record<string, any>} item_info */
49
77
 
50
78
  /**
51
- * @typedef {Object} APIKeysOverview * @description API keys overview metrics * @property {number} total_keys - Total number of API keys * @property {number} active_keys - Number of active API keys * @property {number} expired_keys - Number of expired API keys * @property {number} total_requests - Total requests across all keys * @property {string} last_used_at - When any key was last used * @property {string} most_used_key_name - Name of most used API key * @property {number} most_used_key_requests - Requests count for most used key * @property {number} expiring_soon_count - Number of keys expiring within 7 days */
79
+ * @typedef {Object} ArchiveStatistics * @description Archive statistics serializer. * @property {number} total_archives * @property {number} processed_archives * @property {number} failed_archives * @property {number} total_items * @property {number} total_chunks * @property {number} total_tokens * @property {number} total_cost * @property {number} avg_processing_time * @property {number} avg_items_per_archive * @property {number} avg_chunks_per_archive */
52
80
 
53
81
  /**
54
- * @typedef {Object} APIResponse * @description Standard API response serializer. * @property {boolean} success - Operation success status * @property {string} [message] - Success message * @property {string} [error] - Error message * @property {Record<string, any>} [data] - Response data */
82
+ * @typedef {Object} Balance * @description User balance serializer. * @property {string} balance_usd - Current balance in USD * @property {string} balance_display * @property {string} total_deposited - Total amount deposited (lifetime) * @property {string} total_withdrawn - Total amount withdrawn (lifetime) * @property {string} last_transaction_at - When the last transaction occurred */
55
83
 
56
84
  /**
57
- * @typedef {Object} APIResponseRequest * @description Standard API response serializer. * @property {boolean} success - Operation success status * @property {string} [message] - Success message * @property {string} [error] - Error message * @property {Record<string, any>} [data] - Response data */
85
+ * @typedef {Object} BulkEmailRequest * @description Simple serializer for bulk email. * @property {string[]} recipients * @property {string} subject * @property {string} email_title * @property {string} main_text * @property {string} [main_html_content] * @property {string} [button_text] * @property {string} [button_url] * @property {string} [secondary_text] */
58
86
 
59
87
  /**
60
- * @typedef {Object} AdminPaymentCreate * @description Serializer for creating payments in admin interface.
61
- Uses UniversalPayment only for data creation. * @property {number} user * @property {number} amount_usd * @property {string} provider * @property {string} [description] * @property {string} [callback_url] * @property {string} [cancel_url] */
88
+ * @typedef {Object} BulkEmailResponse * @description Response for bulk email sending. * @property {boolean} success * @property {number} sent_count * @property {number} failed_count * @property {number} total_recipients * @property {string} [error] */
62
89
 
63
90
  /**
64
- * @typedef {Object} AdminPaymentCreateRequest * @description Serializer for creating payments in admin interface.
65
- Uses UniversalPayment only for data creation. * @property {number} user * @property {number} amount_usd * @property {string} currency_code - Provider currency code (e.g., BTC, ZROERC20) * @property {string} provider * @property {string} [description] * @property {string} [callback_url] * @property {string} [cancel_url] */
91
+ * @typedef {Object} ChatHistory * @description Chat history response serializer. * @property {string} session_id * @property {ChatMessage[]} messages * @property {number} total_messages */
66
92
 
67
93
  /**
68
- * @typedef {Object} AdminPaymentDetail * @description Detailed serializer for individual payment in admin interface.
69
- Uses UniversalPayment only for data extraction. * @property {string} id * @property {any} user * @property {string} internal_payment_id * @property {number} amount_usd * @property {number} actual_amount_usd * @property {number} fee_amount_usd * @property {string} currency_code * @property {string} currency_name * @property {string} provider * @property {string} provider_display * @property {string} status * @property {string} status_display * @property {string} pay_amount * @property {string} pay_address * @property {string} payment_url * @property {string} transaction_hash * @property {number} confirmations_count * @property {string} security_nonce * @property {string} expires_at * @property {string} completed_at * @property {string} status_changed_at * @property {string} description * @property {string} callback_url * @property {string} cancel_url * @property {any} provider_data * @property {any} webhook_data * @property {string} created_at * @property {string} updated_at * @property {string} age */
94
+ * @typedef {Object} ChatMessage * @description Chat message response serializer. * @property {string} id * @property {"user" | "assistant" | "system"} role - Message sender role
95
+
96
+ * `user` - User
97
+ * `assistant` - Assistant
98
+ * `system` - System * @property {string} content - Message content * @property {number} [tokens_used] - Tokens used for this message * @property {number} cost_usd * @property {number} [processing_time_ms] - Processing time in milliseconds * @property {string} created_at * @property {any} [context_chunks] - IDs of chunks used for context */
70
99
 
71
100
  /**
72
- * @typedef {Object} AdminPaymentList * @description Serializer for payment list in admin interface.
73
- Uses UniversalPayment only for data extraction. * @property {string} id * @property {string} internal_payment_id * @property {any} user * @property {number} amount_usd * @property {string} currency_code * @property {string} currency_name * @property {string} provider * @property {string} provider_display * @property {string} status * @property {string} status_display * @property {string} pay_amount * @property {string} pay_address * @property {string} transaction_hash * @property {string} created_at * @property {string} updated_at * @property {string} description * @property {string} age */
101
+ * @typedef {Object} ChatQueryRequest * @description Chat query request serializer. * @property {string} [session_id] - Chat session ID (creates new if not provided) * @property {string} query - User query * @property {number} [max_tokens] - Maximum response tokens * @property {boolean} [include_sources] - Include source documents in response */
74
102
 
75
103
  /**
76
- * @typedef {Object} AdminPaymentStats * @description Serializer for payment statistics in admin interface. * @property {number} total_payments * @property {number} total_amount_usd * @property {number} successful_payments * @property {number} failed_payments * @property {number} pending_payments * @property {number} success_rate * @property {Record<string, Record<string, any>>} by_provider - Statistics by provider * @property {Record<string, Record<string, any>>} by_currency - Statistics by currency * @property {Record<string, number>} last_24h - Payments in last 24 hours * @property {Record<string, number>} last_7d - Payments in last 7 days * @property {Record<string, number>} last_30d - Payments in last 30 days */
104
+ * @typedef {Object} ChatResponse * @description Chat response serializer. * @property {string} message_id * @property {string} content * @property {number} tokens_used * @property {number} cost_usd * @property {number} processing_time_ms * @property {string} model_used * @property {ChatSource[]} [sources] */
77
105
 
78
106
  /**
79
- * @typedef {Object} AdminPaymentUpdate * @description Serializer for updating payments in admin interface. * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
107
+ * @typedef {Object} ChatResponseRequest * @description Chat response serializer. * @property {string} message_id * @property {string} content * @property {number} tokens_used * @property {number} cost_usd * @property {number} processing_time_ms * @property {string} model_used * @property {ChatSourceRequest[]} [sources] */
80
108
 
81
- * `pending` - Pending
82
- * `confirming` - Confirming
83
- * `confirmed` - Confirmed
84
- * `completed` - Completed
85
- * `failed` - Failed
86
- * `expired` - Expired
87
- * `cancelled` - Cancelled
88
- * `refunded` - Refunded * @property {string} [description] - Payment description * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {any} [provider_data] - Provider-specific data (validated by Pydantic) * @property {any} [webhook_data] - Webhook data (validated by Pydantic) */
109
+ /**
110
+ * @typedef {Object} ChatSession * @description Chat session response serializer. * @property {string} id * @property {string} [title] - Session title (auto-generated if empty) * @property {boolean} [is_active] - Whether session accepts new messages * @property {number} [messages_count] * @property {number} [total_tokens_used] * @property {number} total_cost_usd * @property {string} [model_name] - LLM model used for this session * @property {number} [temperature] - Temperature setting for LLM * @property {number} [max_context_chunks] - Maximum chunks to include in context * @property {string} created_at * @property {string} updated_at */
89
111
 
90
112
  /**
91
- * @typedef {Object} AdminPaymentUpdateRequest * @description Serializer for updating payments in admin interface. * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
113
+ * @typedef {Object} ChatSessionCreateRequest * @description Chat session creation request serializer. * @property {string} [title] - Session title * @property {string} [model_name] - LLM model to use * @property {number} [temperature] - Response creativity * @property {number} [max_context_chunks] - Maximum context chunks */
92
114
 
93
- * `pending` - Pending
94
- * `confirming` - Confirming
95
- * `confirmed` - Confirmed
96
- * `completed` - Completed
97
- * `failed` - Failed
98
- * `expired` - Expired
99
- * `cancelled` - Cancelled
100
- * `refunded` - Refunded * @property {string} [description] - Payment description * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {any} [provider_data] - Provider-specific data (validated by Pydantic) * @property {any} [webhook_data] - Webhook data (validated by Pydantic) */
115
+ /**
116
+ * @typedef {Object} ChatSessionRequest * @description Chat session response serializer. * @property {string} [title] - Session title (auto-generated if empty) * @property {boolean} [is_active] - Whether session accepts new messages * @property {number} [messages_count] * @property {number} [total_tokens_used] * @property {string} [model_name] - LLM model used for this session * @property {number} [temperature] - Temperature setting for LLM * @property {number} [max_context_chunks] - Maximum chunks to include in context */
101
117
 
102
118
  /**
103
- * @typedef {Object} AdminUser * @description Simplified user serializer for admin interface. * @property {number} id * @property {string} username - Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. * @property {string} email * @property {string} first_name * @property {string} last_name * @property {boolean} is_active - Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */
119
+ * @typedef {Object} ChatSource * @description Chat source document information serializer. * @property {string} document_title * @property {string} chunk_content * @property {number} similarity */
104
120
 
105
121
  /**
106
- * @typedef {Object} BalanceOverview * @description User balance overview metrics * @property {number} current_balance - Current balance in USD * @property {string} balance_display - Formatted balance display * @property {number} total_deposited - Total amount deposited (lifetime) * @property {number} total_spent - Total amount spent (lifetime) * @property {string} last_transaction_at - Last transaction timestamp * @property {boolean} has_transactions - Whether user has any transactions * @property {boolean} is_empty - Whether balance is zero */
122
+ * @typedef {Object} ChatSourceRequest * @description Chat source document information serializer. * @property {string} document_title * @property {string} chunk_content * @property {number} similarity */
107
123
 
108
124
  /**
109
- * @typedef {Object} BulkEmailRequest * @description Simple serializer for bulk email. * @property {string[]} recipients * @property {string} subject * @property {string} email_title * @property {string} main_text * @property {string} [main_html_content] * @property {string} [button_text] * @property {string} [button_url] * @property {string} [secondary_text] */
125
+ * @typedef {Object} ChunkRevectorizationRequestRequest * @description Chunk re-vectorization request serializer. * @property {string[]} chunk_ids - List of chunk IDs to re-vectorize * @property {boolean} [force] - Force re-vectorization even if already vectorized */
110
126
 
111
127
  /**
112
- * @typedef {Object} BulkEmailResponse * @description Response for bulk email sending. * @property {boolean} success * @property {number} sent_count * @property {number} failed_count * @property {number} total_recipients * @property {string} [error] */
128
+ * @typedef {Object} Currency * @description Currency list serializer. * @property {string} code - Currency code from provider (e.g., USDTTRC20, BTC, ETH) * @property {string} name - Full currency name (e.g., USDT (TRC20), Bitcoin) * @property {string} token - Token symbol (e.g., USDT, BTC, ETH) * @property {string} network - Network name (e.g., TRC20, ERC20, Bitcoin) * @property {string} display_name * @property {string} symbol - Currency symbol (e.g., ₮, ₿, Ξ) * @property {number} decimal_places - Number of decimal places for this currency * @property {boolean} is_active - Whether this currency is available for payments * @property {string} min_amount_usd - Minimum payment amount in USD * @property {number} sort_order - Sort order for currency list (lower = higher priority) */
113
129
 
114
130
  /**
115
- * @typedef {Object} ChartDataPoint * @description Chart data point for payments analytics * @property {string} x - X-axis value (date) * @property {number} y - Y-axis value (amount or count) */
131
+ * @typedef {Object} Document * @description Document response serializer. * @property {string} id * @property {string} title - Document title * @property {string} [file_type] - MIME type of original file * @property {number} [file_size] - Original file size in bytes * @property {string} processing_status * @property {number} chunks_count * @property {number} total_tokens * @property {number} total_cost_usd * @property {string} created_at * @property {string} updated_at * @property {string} processing_started_at * @property {string} processing_completed_at * @property {string} processing_error * @property {any} [metadata] - Additional document metadata */
116
132
 
117
133
  /**
118
- * @typedef {Object} ChartSeries * @description Chart series data for payments visualization * @property {string} name - Series name * @property {ChartDataPoint[]} data - Data points * @property {string} color - Series color */
134
+ * @typedef {Object} DocumentArchive * @description Document archive serializer. * @property {string} id * @property {string} title - Archive title * @property {string} [description] - Archive description * @property {DocumentCategory[]} categories * @property {boolean} [is_public] - Whether this archive is publicly accessible * @property {string} archive_file - Uploaded archive file * @property {string} original_filename - Original uploaded filename * @property {number} file_size - Archive size in bytes * @property {"zip" | "tar" | "tar.gz" | "tar.bz2"} archive_type - Archive format
135
+
136
+ * `zip` - ZIP
137
+ * `tar` - TAR
138
+ * `tar.gz` - TAR GZ
139
+ * `tar.bz2` - TAR BZ2 * @property {"pending" | "processing" | "completed" | "failed" | "cancelled"} processing_status - * `pending` - Pending
140
+ * `processing` - Processing
141
+ * `completed` - Completed
142
+ * `failed` - Failed
143
+ * `cancelled` - Cancelled * @property {string} processed_at - When processing completed * @property {number} processing_duration_ms - Processing time in milliseconds * @property {string} processing_error - Error message if processing failed * @property {number} total_items - Total items in archive * @property {number} processed_items - Successfully processed items * @property {number} total_chunks - Total chunks created * @property {number} vectorized_chunks - Chunks with embeddings * @property {number} total_tokens - Total tokens across all chunks * @property {number} total_cost_usd - Total processing cost in USD * @property {number} processing_progress - Calculate processing progress as percentage. * @property {number} vectorization_progress - Calculate vectorization progress as percentage. * @property {boolean} is_processed - Check if archive processing is completed. * @property {string} created_at * @property {string} updated_at */
119
144
 
120
145
  /**
121
- * @typedef {Object} Currency * @description Complete currency serializer with full details.
146
+ * @typedef {Object} DocumentArchiveDetail * @description Detailed archive serializer with items. * @property {string} id * @property {string} title - Archive title * @property {string} [description] - Archive description * @property {DocumentCategory[]} categories * @property {boolean} [is_public] - Whether this archive is publicly accessible * @property {string} archive_file - Uploaded archive file * @property {string} original_filename - Original uploaded filename * @property {number} file_size - Archive size in bytes * @property {"zip" | "tar" | "tar.gz" | "tar.bz2"} archive_type - Archive format
147
+
148
+ * `zip` - ZIP
149
+ * `tar` - TAR
150
+ * `tar.gz` - TAR GZ
151
+ * `tar.bz2` - TAR BZ2 * @property {"pending" | "processing" | "completed" | "failed" | "cancelled"} processing_status - * `pending` - Pending
152
+ * `processing` - Processing
153
+ * `completed` - Completed
154
+ * `failed` - Failed
155
+ * `cancelled` - Cancelled * @property {string} processed_at - When processing completed * @property {number} processing_duration_ms - Processing time in milliseconds * @property {string} processing_error - Error message if processing failed * @property {number} total_items - Total items in archive * @property {number} processed_items - Successfully processed items * @property {number} total_chunks - Total chunks created * @property {number} vectorized_chunks - Chunks with embeddings * @property {number} total_tokens - Total tokens across all chunks * @property {number} total_cost_usd - Total processing cost in USD * @property {number} processing_progress - Calculate processing progress as percentage. * @property {number} vectorization_progress - Calculate vectorization progress as percentage. * @property {boolean} is_processed - Check if archive processing is completed. * @property {string} created_at * @property {string} updated_at * @property {ArchiveItem[]} items * @property {Record<string, any>} file_tree - Get hierarchical file tree. * @property {any} [metadata] - Additional archive metadata */
122
156
 
123
- Used for currency information and management. * @property {number} id * @property {string} code - Currency code (e.g., BTC, USD, ETH) * @property {string} name - Full currency name (e.g., Bitcoin, US Dollar) * @property {string} symbol - Currency symbol (e.g., $, ₿, Ξ) * @property {"fiat" | "crypto"} currency_type - Type of currency
157
+ /**
158
+ * @typedef {Object} DocumentArchiveList * @description Simplified archive serializer for list views. * @property {string} id * @property {string} title - Archive title * @property {string} description - Archive description * @property {DocumentCategory[]} categories * @property {boolean} is_public - Whether this archive is publicly accessible * @property {string} original_filename - Original uploaded filename * @property {number} file_size - Archive size in bytes * @property {"zip" | "tar" | "tar.gz" | "tar.bz2"} archive_type - Archive format
124
159
 
125
- * `fiat` - Fiat Currency
126
- * `crypto` - Cryptocurrency * @property {string} type_display * @property {number} decimal_places - Number of decimal places for this currency * @property {boolean} is_active - Whether this currency is available for payments * @property {boolean} is_crypto - Check if this is a cryptocurrency. * @property {boolean} is_fiat - Check if this is a fiat currency. * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
160
+ * `zip` - ZIP
161
+ * `tar` - TAR
162
+ * `tar.gz` - TAR GZ
163
+ * `tar.bz2` - TAR BZ2 * @property {"pending" | "processing" | "completed" | "failed" | "cancelled"} processing_status - * `pending` - Pending
164
+ * `processing` - Processing
165
+ * `completed` - Completed
166
+ * `failed` - Failed
167
+ * `cancelled` - Cancelled * @property {string} processed_at - When processing completed * @property {number} total_items - Total items in archive * @property {number} total_chunks - Total chunks created * @property {number} total_cost_usd - Total processing cost in USD * @property {number} processing_progress - Calculate processing progress as percentage. * @property {string} created_at */
127
168
 
128
169
  /**
129
- * @typedef {Object} CurrencyAnalyticsItem * @description Analytics data for a single currency * @property {string} currency_code - Currency code (e.g., BTC) * @property {string} currency_name - Currency name (e.g., Bitcoin) * @property {number} total_payments - Total number of payments * @property {number} total_amount - Total amount in USD * @property {number} completed_payments - Number of completed payments * @property {number} average_amount - Average payment amount in USD * @property {number} success_rate - Success rate percentage */
170
+ * @typedef {Object} DocumentArchiveRequest * @description Document archive serializer. * @property {string} title - Archive title * @property {string} [description] - Archive description * @property {boolean} [is_public] - Whether this archive is publicly accessible */
130
171
 
131
172
  /**
132
- * @typedef {Object} CurrencyList * @description Lightweight currency serializer for lists.
173
+ * @typedef {Object} DocumentCategory * @description Document category serializer. * @property {string} id * @property {string} name - Category name * @property {string} [description] - Category description * @property {boolean} [is_public] - Whether documents in this category are publicly accessible * @property {string} created_at */
133
174
 
134
- Optimized for currency selection and lists. * @property {number} id * @property {string} code - Currency code (e.g., BTC, USD, ETH) * @property {string} name - Full currency name (e.g., Bitcoin, US Dollar) * @property {string} symbol - Currency symbol (e.g., $, ₿, Ξ) * @property {"fiat" | "crypto"} currency_type - Type of currency
175
+ /**
176
+ * @typedef {Object} DocumentCategoryRequest * @description Document category serializer. * @property {string} name - Category name * @property {string} [description] - Category description * @property {boolean} [is_public] - Whether documents in this category are publicly accessible */
135
177
 
136
- * `fiat` - Fiat Currency
137
- * `crypto` - Cryptocurrency * @property {string} type_display * @property {boolean} is_active - Whether this currency is available for payments */
178
+ /**
179
+ * @typedef {Object} DocumentCreateRequest * @description Document creation request serializer. * @property {string} title - Document title * @property {string} content - Document content * @property {string} [file_type] - MIME type * @property {any} [metadata] - Additional metadata */
180
+
181
+ /**
182
+ * @typedef {Object} DocumentProcessingStatus * @description Document processing status serializer. * @property {string} id * @property {string} status * @property {any} progress * @property {string} [error] * @property {number} [processing_time_seconds] */
183
+
184
+ /**
185
+ * @typedef {Object} DocumentRequest * @description Document response serializer. * @property {string} title - Document title * @property {string} [file_type] - MIME type of original file * @property {number} [file_size] - Original file size in bytes * @property {any} [metadata] - Additional document metadata */
186
+
187
+ /**
188
+ * @typedef {Object} DocumentStats * @description Document processing statistics serializer. * @property {number} total_documents * @property {number} completed_documents * @property {number} processing_success_rate * @property {number} total_chunks * @property {number} total_tokens * @property {number} total_cost_usd * @property {number} avg_processing_time_seconds */
138
189
 
139
190
  /**
140
191
  * @typedef {Object} EmailLog * @description Serializer for EmailLog model. * @property {string} id * @property {number} user * @property {string} user_email * @property {number} newsletter * @property {string} newsletter_title * @property {string} recipient - Comma-separated email addresses * @property {string} subject * @property {string} body * @property {"pending" | "sent" | "failed"} status - * `pending` - Pending
@@ -144,11 +195,6 @@ Optimized for currency selection and lists. * @property {number} id * @property
144
195
  /**
145
196
  * @typedef {Object} Endpoint * @description Serializer for single endpoint status. * @property {string} url - Resolved URL (for parametrized URLs) or URL pattern * @property {string} [url_pattern] - Original URL pattern (for parametrized URLs) * @property {string} [url_name] - Django URL name (if available) * @property {string} [namespace] - URL namespace * @property {string} group - URL group (up to 3 depth) * @property {string} [view] - View function/class name * @property {string} status - Status: healthy, unhealthy, warning, error, skipped, pending * @property {number} [status_code] - HTTP status code * @property {number} [response_time_ms] - Response time in milliseconds * @property {boolean} [is_healthy] - Whether endpoint is healthy * @property {string} [error] - Error message if check failed * @property {string} [error_type] - Error type: database, general, etc. * @property {string} [reason] - Reason for warning/skip * @property {string} [last_checked] - Timestamp of last check * @property {boolean} [has_parameters] - Whether URL has parameters that were resolved with test values * @property {boolean} [required_auth] - Whether endpoint required JWT authentication * @property {boolean} [rate_limited] - Whether endpoint returned 429 (rate limited) */
146
197
 
147
- /**
148
- * @typedef {Object} EndpointGroup * @description Endpoint group serializer for API access management.
149
-
150
- Used for subscription endpoint group configuration. * @property {number} id * @property {string} name - Endpoint group name (e.g., 'Payment API', 'Balance API') * @property {string} description - Description of what this endpoint group provides * @property {boolean} is_enabled - Whether this endpoint group is available * @property {string} created_at * @property {string} updated_at */
151
-
152
198
  /**
153
199
  * @typedef {Object} EndpointsStatus * @description Serializer for overall endpoints status response. * @property {string} status - Overall status: healthy, degraded, or unhealthy * @property {string} timestamp - Timestamp of the check * @property {number} total_endpoints - Total number of endpoints checked * @property {number} healthy - Number of healthy endpoints * @property {number} unhealthy - Number of unhealthy endpoints * @property {number} warnings - Number of endpoints with warnings * @property {number} errors - Number of endpoints with errors * @property {number} skipped - Number of skipped endpoints * @property {Endpoint[]} endpoints - List of all endpoints with their status */
154
200
 
@@ -178,6 +224,15 @@ Used for subscription endpoint group configuration. * @property {number} id * @p
178
224
  /**
179
225
  * @typedef {Object} LeadSubmissionResponse * @description Response serializer for successful lead submission. * @property {boolean} success * @property {string} message * @property {number} lead_id */
180
226
 
227
+ /**
228
+ * @typedef {Object} LoadTestRequestRequest * @description Serializer for load test request input. * @property {string} method - RPC method to test * @property {number} total_requests - Total number of requests to send * @property {number} concurrency - Number of concurrent requests * @property {any} [params] - Parameters template for RPC calls */
229
+
230
+ /**
231
+ * @typedef {Object} LoadTestResponse * @description Serializer for load test response. * @property {string} test_id - Unique test ID * @property {boolean} started - Whether test was started successfully * @property {string} message - Status message */
232
+
233
+ /**
234
+ * @typedef {Object} LoadTestStatus * @description Serializer for load test status. * @property {string} test_id - Unique test ID * @property {boolean} running - Whether test is currently running * @property {number} progress - Number of completed requests * @property {number} total - Total number of requests * @property {number} success_count - Number of successful requests * @property {number} failed_count - Number of failed requests * @property {number} avg_duration_ms - Average duration in milliseconds * @property {number} elapsed_time - Total elapsed time in seconds * @property {number} rps - Requests per second */
235
+
181
236
  /**
182
237
  * @typedef {Object} Message * @property {string} uuid * @property {string} ticket * @property {any} sender * @property {boolean} is_from_author - Check if this message is from the ticket author. * @property {string} text * @property {string} created_at */
183
238
 
@@ -196,11 +251,6 @@ Used for subscription endpoint group configuration. * @property {number} id * @p
196
251
  /**
197
252
  * @typedef {Object} MethodStats * @description Serializer for method statistics response. * @property {MethodStat[]} methods - List of method statistics * @property {number} count - Total number of methods * @property {number} total_calls - Total calls across all methods */
198
253
 
199
- /**
200
- * @typedef {Object} Network * @description Network serializer for blockchain networks.
201
-
202
- Used for network information and selection. * @property {number} id * @property {any} currency * @property {string} name - Network name (e.g., Ethereum, Bitcoin, Polygon) * @property {string} code - Network code (e.g., ETH, BTC, MATIC) * @property {boolean} is_active - Whether this network is available for payments * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
203
-
204
254
  /**
205
255
  * @typedef {Object} Newsletter * @description Serializer for Newsletter model. * @property {number} id * @property {string} title * @property {string} [description] * @property {boolean} [is_active] * @property {boolean} [auto_subscribe] - Automatically subscribe new users to this newsletter * @property {string} created_at * @property {string} updated_at * @property {number} subscribers_count */
206
256
 
@@ -244,34 +294,34 @@ Used for network information and selection. * @property {number} id * @property
244
294
  * @typedef {Object} OverviewStats * @description Serializer for overview statistics. * @property {boolean} [redis_connected] - Whether Redis is connected * @property {number} total_requests_today - Total requests processed today * @property {number} [total_requests_hour] - Total requests in the last hour * @property {string[]} active_methods - List of active RPC methods * @property {string} top_method - Most frequently called method * @property {Record<string, any>} [method_counts] - Count of requests per method * @property {number} avg_response_time_ms - Average response time in milliseconds * @property {number} success_rate - Success rate percentage * @property {number} [error_rate] - Error rate percentage * @property {string} [timestamp] - ISO timestamp of the stats * @property {string} [error] - Error message if any */
245
295
 
246
296
  /**
247
- * @typedef {Object} PaginatedAPIKeyListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {APIKeyList[]} results - Array of items for current page */
297
+ * @typedef {Object} PaginatedArchiveItemChunkList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ArchiveItemChunk[]} results - Array of items for current page */
248
298
 
249
299
  /**
250
- * @typedef {Object} PaginatedAdminPaymentListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {AdminPaymentList[]} results - Array of items for current page */
300
+ * @typedef {Object} PaginatedArchiveItemList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ArchiveItem[]} results - Array of items for current page */
251
301
 
252
302
  /**
253
- * @typedef {Object} PaginatedAdminPaymentStatsList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {AdminPaymentStats[]} results - Array of items for current page */
303
+ * @typedef {Object} PaginatedArchiveSearchResultList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ArchiveSearchResult[]} results - Array of items for current page */
254
304
 
255
305
  /**
256
- * @typedef {Object} PaginatedAdminUserList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {AdminUser[]} results - Array of items for current page */
306
+ * @typedef {Object} PaginatedChatResponseList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ChatResponse[]} results - Array of items for current page */
257
307
 
258
308
  /**
259
- * @typedef {Object} PaginatedCurrencyListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {CurrencyList[]} results - Array of items for current page */
309
+ * @typedef {Object} PaginatedChatSessionList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ChatSession[]} results - Array of items for current page */
260
310
 
261
311
  /**
262
- * @typedef {Object} PaginatedEmailLogList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {EmailLog[]} results - Array of items for current page */
312
+ * @typedef {Object} PaginatedDocumentArchiveListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {DocumentArchiveList[]} results - Array of items for current page */
263
313
 
264
314
  /**
265
- * @typedef {Object} PaginatedEndpointGroupList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {EndpointGroup[]} results - Array of items for current page */
315
+ * @typedef {Object} PaginatedDocumentList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Document[]} results - Array of items for current page */
266
316
 
267
317
  /**
268
- * @typedef {Object} PaginatedLeadSubmissionList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {LeadSubmission[]} results - Array of items for current page */
318
+ * @typedef {Object} PaginatedEmailLogList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {EmailLog[]} results - Array of items for current page */
269
319
 
270
320
  /**
271
- * @typedef {Object} PaginatedMessageList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Message[]} results - Array of items for current page */
321
+ * @typedef {Object} PaginatedLeadSubmissionList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {LeadSubmission[]} results - Array of items for current page */
272
322
 
273
323
  /**
274
- * @typedef {Object} PaginatedNetworkList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Network[]} results - Array of items for current page */
324
+ * @typedef {Object} PaginatedMessageList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Message[]} results - Array of items for current page */
275
325
 
276
326
  /**
277
327
  * @typedef {Object} PaginatedNewsletterCampaignList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {NewsletterCampaign[]} results - Array of items for current page */
@@ -286,51 +336,38 @@ Used for network information and selection. * @property {number} id * @property
286
336
  * @typedef {Object} PaginatedPaymentListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {PaymentList[]} results - Array of items for current page */
287
337
 
288
338
  /**
289
- * @typedef {Object} PaginatedProviderCurrencyList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {ProviderCurrency[]} results - Array of items for current page */
290
-
291
- /**
292
- * @typedef {Object} PaginatedRecentPaymentList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {RecentPayment[]} results - Array of items for current page */
293
-
294
- /**
295
- * @typedef {Object} PaginatedRecentTransactionList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {RecentTransaction[]} results - Array of items for current page */
339
+ * @typedef {Object} PaginatedPublicCategoryList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {PublicCategory[]} results - Array of items for current page */
296
340
 
297
341
  /**
298
- * @typedef {Object} PaginatedSubscriptionListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {SubscriptionList[]} results - Array of items for current page */
299
-
300
- /**
301
- * @typedef {Object} PaginatedTariffList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Tariff[]} results - Array of items for current page */
342
+ * @typedef {Object} PaginatedPublicDocumentListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {PublicDocumentList[]} results - Array of items for current page */
302
343
 
303
344
  /**
304
345
  * @typedef {Object} PaginatedTicketList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Ticket[]} results - Array of items for current page */
305
346
 
306
347
  /**
307
- * @typedef {Object} PaginatedTransactionList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {Transaction[]} results - Array of items for current page */
348
+ * @typedef {Object} PatchedArchiveItemChunkRequest * @description Archive item chunk serializer. * @property {string} [content] - Chunk text content * @property {number} [chunk_index] - Sequential chunk number within item * @property {"text" | "code" | "heading" | "metadata" | "table" | "list"} [chunk_type] - Type of content in chunk
308
349
 
309
- /**
310
- * @typedef {Object} PaginatedUserBalanceList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {UserBalance[]} results - Array of items for current page */
350
+ * `text` - Text
351
+ * `code` - Code
352
+ * `heading` - Heading
353
+ * `metadata` - Metadata
354
+ * `table` - Table
355
+ * `list` - List */
311
356
 
312
357
  /**
313
- * @typedef {Object} PaginatedWebhookEventListList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {WebhookEventList[]} results - Array of items for current page */
358
+ * @typedef {Object} PatchedArchiveItemRequest * @description Archive item serializer. * @property {string} [relative_path] - Path within archive * @property {string} [item_name] - Item name * @property {string} [item_type] - MIME type * @property {number} [file_size] - Item size in bytes */
314
359
 
315
360
  /**
316
- * @typedef {Object} PaginatedWebhookStatsList * @property {number} count - Total number of items across all pages * @property {number} page - Current page number (1-based) * @property {number} pages - Total number of pages * @property {number} page_size - Number of items per page * @property {boolean} has_next - Whether there is a next page * @property {boolean} has_previous - Whether there is a previous page * @property {number} [next_page] - Next page number (null if no next page) * @property {number} [previous_page] - Previous page number (null if no previous page) * @property {WebhookStats[]} results - Array of items for current page */
361
+ * @typedef {Object} PatchedChatResponseRequest * @description Chat response serializer. * @property {string} [message_id] * @property {string} [content] * @property {number} [tokens_used] * @property {number} [cost_usd] * @property {number} [processing_time_ms] * @property {string} [model_used] * @property {ChatSourceRequest[]} [sources] */
317
362
 
318
363
  /**
319
- * @typedef {Object} PatchedAPIKeyUpdateRequest * @description API key update serializer for modifying API key properties.
320
-
321
- Allows updating name and active status only. * @property {string} [name] - Human-readable name for this API key * @property {boolean} [is_active] - Whether this API key is active */
364
+ * @typedef {Object} PatchedChatSessionRequest * @description Chat session response serializer. * @property {string} [title] - Session title (auto-generated if empty) * @property {boolean} [is_active] - Whether session accepts new messages * @property {number} [messages_count] * @property {number} [total_tokens_used] * @property {string} [model_name] - LLM model used for this session * @property {number} [temperature] - Temperature setting for LLM * @property {number} [max_context_chunks] - Maximum chunks to include in context */
322
365
 
323
366
  /**
324
- * @typedef {Object} PatchedAdminPaymentUpdateRequest * @description Serializer for updating payments in admin interface. * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
367
+ * @typedef {Object} PatchedDocumentArchiveRequest * @description Document archive serializer. * @property {string} [title] - Archive title * @property {string} [description] - Archive description * @property {boolean} [is_public] - Whether this archive is publicly accessible */
325
368
 
326
- * `pending` - Pending
327
- * `confirming` - Confirming
328
- * `confirmed` - Confirmed
329
- * `completed` - Completed
330
- * `failed` - Failed
331
- * `expired` - Expired
332
- * `cancelled` - Cancelled
333
- * `refunded` - Refunded * @property {string} [description] - Payment description * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {any} [provider_data] - Provider-specific data (validated by Pydantic) * @property {any} [webhook_data] - Webhook data (validated by Pydantic) */
369
+ /**
370
+ * @typedef {Object} PatchedDocumentRequest * @description Document response serializer. * @property {string} [title] - Document title * @property {string} [file_type] - MIME type of original file * @property {number} [file_size] - Original file size in bytes * @property {any} [metadata] - Additional document metadata */
334
371
 
335
372
  /**
336
373
  * @typedef {Object} PatchedLeadSubmissionRequest * @description Serializer for lead form submission from frontend. * @property {string} [name] * @property {string} [email] * @property {string} [company] * @property {string} [company_site] * @property {"email" | "whatsapp" | "telegram" | "phone" | "other"} [contact_type] - * `email` - Email
@@ -345,38 +382,6 @@ Allows updating name and active status only. * @property {string} [name] - Human
345
382
  /**
346
383
  * @typedef {Object} PatchedNewsletterCampaignRequest * @description Serializer for NewsletterCampaign model. * @property {number} [newsletter] * @property {string} [subject] * @property {string} [email_title] * @property {string} [main_text] * @property {string} [main_html_content] * @property {string} [button_text] * @property {string} [button_url] * @property {string} [secondary_text] */
347
384
 
348
- /**
349
- * @typedef {Object} PatchedPaymentRequest * @description Complete payment serializer with full details.
350
-
351
- Used for detail views and updates. * @property {number} [amount_usd] - Payment amount in USD (float for performance) * @property {number} [currency] - Payment currency * @property {number} [network] - Blockchain network (for crypto payments) * @property {"nowpayments"} [provider] - Payment provider
352
-
353
- * `nowpayments` - NowPayments * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
354
-
355
- * `pending` - Pending
356
- * `confirming` - Confirming
357
- * `confirmed` - Confirmed
358
- * `completed` - Completed
359
- * `failed` - Failed
360
- * `expired` - Expired
361
- * `cancelled` - Cancelled
362
- * `refunded` - Refunded * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {string} [description] - Payment description * @property {string} [expires_at] - When this payment expires */
363
-
364
- /**
365
- * @typedef {Object} PatchedSubscriptionRequest * @description Complete subscription serializer with full details.
366
-
367
- Used for subscription detail views and updates. * @property {"active" | "inactive" | "suspended" | "cancelled" | "expired"} [status] - Subscription status
368
-
369
- * `active` - Active
370
- * `inactive` - Inactive
371
- * `suspended` - Suspended
372
- * `cancelled` - Cancelled
373
- * `expired` - Expired * @property {"free" | "basic" | "pro" | "enterprise"} [tier] - Subscription tier
374
-
375
- * `free` - Free Tier
376
- * `basic` - Basic Tier
377
- * `pro` - Pro Tier
378
- * `enterprise` - Enterprise Tier * @property {string} [expires_at] - When this subscription expires */
379
-
380
385
  /**
381
386
  * @typedef {Object} PatchedTicketRequest * @property {number} [user] * @property {string} [subject] * @property {"open" | "waiting_for_user" | "waiting_for_admin" | "resolved" | "closed"} [status] - * `open` - Open
382
387
  * `waiting_for_user` - Waiting for User
@@ -391,107 +396,37 @@ Used for subscription detail views and updates. * @property {"active" | "inactiv
391
396
  * @typedef {Object} PatchedUserProfileUpdateRequest * @description Serializer for updating user profile. * @property {string} [first_name] * @property {string} [last_name] * @property {string} [company] * @property {string} [phone] * @property {string} [position] */
392
397
 
393
398
  /**
394
- * @typedef {Object} Payment * @description Complete payment serializer with full details.
395
-
396
- Used for detail views and updates. * @property {string} id - Unique identifier for this record * @property {string} user * @property {number} amount_usd - Payment amount in USD (float for performance) * @property {number} currency - Payment currency * @property {number} [network] - Blockchain network (for crypto payments) * @property {"nowpayments"} [provider] - Payment provider
397
-
398
- * `nowpayments` - NowPayments * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
399
-
400
- * `pending` - Pending
401
- * `confirming` - Confirming
402
- * `confirmed` - Confirmed
403
- * `completed` - Completed
404
- * `failed` - Failed
405
- * `expired` - Expired
406
- * `cancelled` - Cancelled
407
- * `refunded` - Refunded * @property {string} status_display * @property {string} amount_display - Get formatted amount display. * @property {string} provider_payment_id - Provider's payment ID * @property {string} payment_url - Payment page URL * @property {string} pay_address - Cryptocurrency payment address * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {string} [description] - Payment description * @property {string} transaction_hash - Blockchain transaction hash * @property {number} confirmations_count - Number of blockchain confirmations * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated * @property {string} [expires_at] - When this payment expires * @property {string} completed_at - When this payment was completed * @property {boolean} is_pending - Check if payment is pending. * @property {boolean} is_completed - Check if payment is completed. * @property {boolean} is_failed - Check if payment is failed. * @property {boolean} is_expired - Check if payment is expired. */
408
-
409
- /**
410
- * @typedef {Object} PaymentAnalyticsResponse * @description Payment analytics response with currency and provider breakdown * @property {CurrencyAnalyticsItem[]} currency_analytics - Analytics by currency * @property {ProviderAnalyticsItem[]} provider_analytics - Analytics by provider */
411
-
412
- /**
413
- * @typedef {Object} PaymentCreate * @description Payment creation serializer with Pydantic integration.
414
-
415
- Validates input and delegates to PaymentService. * @property {number} amount_usd - Amount in USD (1.00 - 50,000.00) * @property {"BTC" | "ETH" | "LTC" | "XMR" | "USDT" | "USDC" | "ADA" | "DOT"} currency_code - Cryptocurrency to receive
416
-
417
- * `BTC` - Bitcoin
418
- * `ETH` - Ethereum
419
- * `LTC` - Litecoin
420
- * `XMR` - Monero
421
- * `USDT` - Tether
422
- * `USDC` - USD Coin
423
- * `ADA` - Cardano
424
- * `DOT` - Polkadot * @property {"nowpayments"} [provider] - Payment provider
425
-
426
- * `nowpayments` - NowPayments * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {string} [description] - Payment description * @property {any} [metadata] - Additional metadata */
427
-
428
- /**
429
- * @typedef {Object} PaymentCreateRequest * @description Payment creation serializer with Pydantic integration.
430
-
431
- Validates input and delegates to PaymentService. * @property {number} amount_usd - Amount in USD (1.00 - 50,000.00) * @property {"BTC" | "ETH" | "LTC" | "XMR" | "USDT" | "USDC" | "ADA" | "DOT"} currency_code - Cryptocurrency to receive
432
-
433
- * `BTC` - Bitcoin
434
- * `ETH` - Ethereum
435
- * `LTC` - Litecoin
436
- * `XMR` - Monero
437
- * `USDT` - Tether
438
- * `USDC` - USD Coin
439
- * `ADA` - Cardano
440
- * `DOT` - Polkadot * @property {"nowpayments"} [provider] - Payment provider
441
-
442
- * `nowpayments` - NowPayments * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {string} [description] - Payment description * @property {any} [metadata] - Additional metadata */
443
-
444
- /**
445
- * @typedef {Object} PaymentList * @description Lightweight serializer for payment lists.
446
-
447
- Optimized for list views with minimal data. * @property {string} id - Unique identifier for this record * @property {number} amount_usd - Payment amount in USD (float for performance) * @property {number} currency - Payment currency * @property {"nowpayments"} provider - Payment provider
448
-
449
- * `nowpayments` - NowPayments * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} status - Current payment status
399
+ * @typedef {Object} PaymentDetail * @description Detailed payment information. * @property {string} id - Unique identifier for this record * @property {string} internal_payment_id - Internal payment identifier (PAY_YYYYMMDDHHMMSS_UUID) * @property {string} amount_usd - Payment amount in USD * @property {string} currency_code * @property {string} currency_name * @property {string} currency_token * @property {string} currency_network * @property {string} pay_amount - Amount to pay in cryptocurrency * @property {string} actual_amount - Actual amount received in cryptocurrency * @property {string} actual_amount_usd - Actual amount received in USD * @property {"pending" | "confirming" | "confirmed" | "completed" | "partially_paid" | "failed" | "expired" | "cancelled"} status - Current payment status
450
400
 
451
401
  * `pending` - Pending
452
402
  * `confirming` - Confirming
453
403
  * `confirmed` - Confirmed
454
404
  * `completed` - Completed
405
+ * `partially_paid` - Partially Paid
455
406
  * `failed` - Failed
456
407
  * `expired` - Expired
457
- * `cancelled` - Cancelled
458
- * `refunded` - Refunded * @property {string} status_display * @property {string} amount_display - Get formatted amount display. * @property {string} created_at - When this record was created * @property {string} expires_at - When this payment expires */
459
-
460
- /**
461
- * @typedef {Object} PaymentOverview * @description Payments overview metrics * @property {number} total_payments - Total number of payments * @property {number} completed_payments - Number of completed payments * @property {number} pending_payments - Number of pending payments * @property {number} failed_payments - Number of failed payments * @property {number} total_amount_usd - Total payment amount in USD * @property {number} completed_amount_usd - Total completed amount in USD * @property {number} average_payment_usd - Average payment amount in USD * @property {number} success_rate - Payment success rate percentage * @property {string} last_payment_at - Last payment timestamp * @property {number} payments_this_month - Number of payments this month * @property {number} amount_this_month - Total amount this month * @property {string} top_currency - Most used currency * @property {number} top_currency_count - Usage count for top currency */
408
+ * `cancelled` - Cancelled * @property {string} status_display * @property {string} pay_address - Cryptocurrency payment address * @property {string} qr_code_url - Get QR code URL. * @property {string} payment_url - Payment page URL (if provided by provider) * @property {string} transaction_hash - Blockchain transaction hash * @property {string} explorer_link - Get blockchain explorer link. * @property {number} confirmations_count - Number of blockchain confirmations * @property {string} expires_at - When this payment expires (typically 30 minutes) * @property {string} completed_at - When this payment was completed * @property {string} created_at - When this record was created * @property {boolean} is_completed * @property {boolean} is_failed * @property {boolean} is_expired * @property {string} description - Payment description */
462
409
 
463
410
  /**
464
- * @typedef {Object} PaymentRequest * @description Complete payment serializer with full details.
465
-
466
- Used for detail views and updates. * @property {number} amount_usd - Payment amount in USD (float for performance) * @property {number} currency - Payment currency * @property {number} [network] - Blockchain network (for crypto payments) * @property {"nowpayments"} [provider] - Payment provider
467
-
468
- * `nowpayments` - NowPayments * @property {"pending" | "confirming" | "confirmed" | "completed" | "failed" | "expired" | "cancelled" | "refunded"} [status] - Current payment status
411
+ * @typedef {Object} PaymentList * @description Payment list item (lighter than detail). * @property {string} id - Unique identifier for this record * @property {string} internal_payment_id - Internal payment identifier (PAY_YYYYMMDDHHMMSS_UUID) * @property {string} amount_usd - Payment amount in USD * @property {string} currency_code * @property {string} currency_token * @property {"pending" | "confirming" | "confirmed" | "completed" | "partially_paid" | "failed" | "expired" | "cancelled"} status - Current payment status
469
412
 
470
413
  * `pending` - Pending
471
414
  * `confirming` - Confirming
472
415
  * `confirmed` - Confirmed
473
416
  * `completed` - Completed
417
+ * `partially_paid` - Partially Paid
474
418
  * `failed` - Failed
475
419
  * `expired` - Expired
476
- * `cancelled` - Cancelled
477
- * `refunded` - Refunded * @property {string} [callback_url] - Success callback URL * @property {string} [cancel_url] - Cancellation URL * @property {string} [description] - Payment description * @property {string} [expires_at] - When this payment expires */
478
-
479
- /**
480
- * @typedef {Object} PaymentsChartResponse * @description Complete chart response for payments analytics * @property {ChartSeries[]} series - Chart series data * @property {string} period - Time period * @property {number} total_amount - Total amount for period * @property {number} total_payments - Total payments for period * @property {number} success_rate - Success rate for period */
481
-
482
- /**
483
- * @typedef {Object} PaymentsDashboardOverview * @description Complete payments dashboard overview response * @property {any} metrics - Dashboard metrics * @property {RecentPayment[]} recent_payments - Recent payments * @property {RecentTransaction[]} recent_transactions - Recent transactions * @property {any} chart_data - Chart data for analytics */
420
+ * `cancelled` - Cancelled * @property {string} status_display * @property {string} created_at - When this record was created * @property {string} completed_at - When this payment was completed */
484
421
 
485
422
  /**
486
- * @typedef {Object} PaymentsMetrics * @description Complete payments dashboard metrics * @property {any} balance - Balance overview * @property {any} subscription - Subscription overview * @property {any} api_keys - API keys overview * @property {any} payments - Payments overview */
423
+ * @typedef {Object} PublicCategory * @description Public category serializer. * @property {string} id * @property {string} name - Category name * @property {string} [description] - Category description */
487
424
 
488
425
  /**
489
- * @typedef {Object} ProviderAnalyticsItem * @description Analytics data for a single payment provider * @property {string} provider - Provider code * @property {string} provider_display - Provider display name * @property {number} total_payments - Total number of payments * @property {number} total_amount - Total amount in USD * @property {number} completed_payments - Number of completed payments * @property {number} success_rate - Success rate percentage */
426
+ * @typedef {Object} PublicDocument * @description Public document detail serializer - only essential data for clients. * @property {string} id * @property {string} title - Document title * @property {string} content - Full document content * @property {any} category * @property {string} created_at * @property {string} updated_at */
490
427
 
491
428
  /**
492
- * @typedef {Object} ProviderCurrency * @description Provider currency serializer for provider-specific currency info.
493
-
494
- Used for provider currency management and rates. * @property {number} id * @property {any} currency * @property {any} network * @property {string} provider - Payment provider name (e.g., nowpayments) * @property {string} provider_currency_code - Currency code as used by the provider * @property {number} provider_min_amount_usd - Get minimum amount from provider configuration. * @property {number} provider_max_amount_usd - Get maximum amount from provider configuration. * @property {number} provider_fee_percentage - Get fee percentage from provider configuration. * @property {number} provider_fixed_fee_usd - Get fixed fee from provider configuration. * @property {boolean} is_enabled - Whether this currency is enabled for this provider * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
429
+ * @typedef {Object} PublicDocumentList * @description Public document list serializer - minimal fields for listing. * @property {string} id * @property {string} title - Document title * @property {any} category * @property {string} created_at * @property {string} updated_at */
495
430
 
496
431
  /**
497
432
  * @typedef {Object} QueueAction * @description Serializer for queue management actions. * @property {"clear" | "clear_all" | "purge" | "purge_failed" | "flush"} action - Action to perform on queues
@@ -520,15 +455,9 @@ Used for provider currency management and rates. * @property {number} id * @prop
520
455
  /**
521
456
  * @typedef {Object} RPCRequest * @description Serializer for individual RPC request. * @property {string} [id] - Stream entry ID * @property {string} [request_id] - Unique request ID * @property {string} timestamp - ISO timestamp of the request * @property {string} method - RPC method name * @property {Record<string, any>} [params] - Request parameters * @property {string} [correlation_id] - Correlation ID for tracking * @property {string} [source] - Source of the request */
522
457
 
523
- /**
524
- * @typedef {Object} RecentPayment * @description Recent payment item * @property {string} id - Payment ID * @property {string} internal_payment_id - Internal payment ID * @property {number} amount_usd - Payment amount in USD * @property {string} amount_display - Formatted amount display * @property {string} currency_code - Currency code * @property {string} status - Payment status * @property {string} status_display - Human-readable status * @property {string} status_color - Color for status display * @property {string} provider - Payment provider * @property {string} created_at - Payment creation timestamp * @property {string} completed_at - Payment completion timestamp * @property {boolean} is_pending - Whether payment is pending * @property {boolean} is_completed - Whether payment is completed * @property {boolean} is_failed - Whether payment failed */
525
-
526
458
  /**
527
459
  * @typedef {Object} RecentRequests * @description Serializer for recent requests response. * @property {RPCRequest[]} requests - List of recent RPC requests * @property {number} count - Number of requests returned * @property {number} total_available - Total number of requests available */
528
460
 
529
- /**
530
- * @typedef {Object} RecentTransaction * @description Recent transaction item * @property {string} id - Transaction ID * @property {string} transaction_type - Transaction type * @property {number} amount_usd - Transaction amount in USD * @property {string} amount_display - Formatted amount display * @property {number} balance_after - Balance after transaction * @property {string} description - Transaction description * @property {string} created_at - Transaction timestamp * @property {string} payment_id - Related payment ID * @property {boolean} is_credit - Whether this is a credit transaction * @property {boolean} is_debit - Whether this is a debit transaction * @property {string} type_color - Color for transaction type display */
531
-
532
461
  /**
533
462
  * @typedef {Object} SendCampaignRequest * @description Simple serializer for sending campaign. * @property {number} campaign_id */
534
463
 
@@ -544,78 +473,20 @@ Used for provider currency management and rates. * @property {number} id * @prop
544
473
  /**
545
474
  * @typedef {Object} SubscribeResponse * @description Response for subscription. * @property {boolean} success * @property {string} message * @property {number} [subscription_id] */
546
475
 
547
- /**
548
- * @typedef {Object} Subscription * @description Complete subscription serializer with full details.
549
-
550
- Used for subscription detail views and updates. * @property {string} id - Unique identifier for this record * @property {string} user * @property {any} tariff * @property {any} endpoint_group * @property {"active" | "inactive" | "suspended" | "cancelled" | "expired"} [status] - Subscription status
551
-
552
- * `active` - Active
553
- * `inactive` - Inactive
554
- * `suspended` - Suspended
555
- * `cancelled` - Cancelled
556
- * `expired` - Expired * @property {string} status_display * @property {string} status_color - Get color for status display. * @property {"free" | "basic" | "pro" | "enterprise"} [tier] - Subscription tier
557
-
558
- * `free` - Free Tier
559
- * `basic` - Basic Tier
560
- * `pro` - Pro Tier
561
- * `enterprise` - Enterprise Tier * @property {number} total_requests - Total API requests made with this subscription * @property {number} usage_percentage - Get usage percentage for current period. * @property {string} last_request_at - When the last API request was made * @property {string} expires_at - When this subscription expires * @property {boolean} is_active - Check if subscription is active and not expired. * @property {boolean} is_expired - Check if subscription is expired. * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
562
-
563
- /**
564
- * @typedef {Object} SubscriptionCreate * @description Subscription creation serializer with service integration.
565
-
566
- Validates input and delegates to SubscriptionService. * @property {number} tariff_id - Tariff ID for the subscription * @property {number} [endpoint_group_id] - Endpoint group ID (optional) * @property {number} [duration_days] - Subscription duration in days */
567
-
568
- /**
569
- * @typedef {Object} SubscriptionCreateRequest * @description Subscription creation serializer with service integration.
570
-
571
- Validates input and delegates to SubscriptionService. * @property {number} tariff_id - Tariff ID for the subscription * @property {number} [endpoint_group_id] - Endpoint group ID (optional) * @property {number} [duration_days] - Subscription duration in days */
572
-
573
- /**
574
- * @typedef {Object} SubscriptionList * @description Lightweight subscription serializer for lists.
575
-
576
- Optimized for subscription lists with minimal data. * @property {string} id - Unique identifier for this record * @property {string} user * @property {string} tariff_name * @property {"active" | "inactive" | "suspended" | "cancelled" | "expired"} status - Subscription status
577
-
578
- * `active` - Active
579
- * `inactive` - Inactive
580
- * `suspended` - Suspended
581
- * `cancelled` - Cancelled
582
- * `expired` - Expired * @property {string} status_display * @property {boolean} is_active - Check if subscription is active and not expired. * @property {boolean} is_expired - Check if subscription is expired. * @property {string} expires_at - When this subscription expires * @property {string} created_at - When this record was created */
583
-
584
- /**
585
- * @typedef {Object} SubscriptionOverview * @description Current subscription overview * @property {string} tier - Subscription tier * @property {string} tier_display - Human-readable tier name * @property {string} status - Subscription status * @property {string} status_display - Human-readable status * @property {string} status_color - Color for status display * @property {boolean} is_active - Whether subscription is active * @property {boolean} is_expired - Whether subscription is expired * @property {number} days_remaining - Days until expiration * @property {number} requests_per_hour - Hourly request limit * @property {number} requests_per_day - Daily request limit * @property {number} total_requests - Total requests made * @property {number} usage_percentage - Usage percentage for current period * @property {number} monthly_cost_usd - Monthly cost in USD * @property {string} cost_display - Formatted cost display * @property {string} starts_at - Subscription start date * @property {string} expires_at - Subscription expiration date * @property {string} last_request_at - Last API request timestamp * @property {number} endpoint_groups_count - Number of accessible endpoint groups * @property {string[]} endpoint_groups - List of accessible endpoint group names */
586
-
587
- /**
588
- * @typedef {Object} SubscriptionRequest * @description Complete subscription serializer with full details.
589
-
590
- Used for subscription detail views and updates. * @property {"active" | "inactive" | "suspended" | "cancelled" | "expired"} [status] - Subscription status
591
-
592
- * `active` - Active
593
- * `inactive` - Inactive
594
- * `suspended` - Suspended
595
- * `cancelled` - Cancelled
596
- * `expired` - Expired * @property {"free" | "basic" | "pro" | "enterprise"} [tier] - Subscription tier
597
-
598
- * `free` - Free Tier
599
- * `basic` - Basic Tier
600
- * `pro` - Pro Tier
601
- * `enterprise` - Enterprise Tier * @property {string} expires_at - When this subscription expires */
602
-
603
476
  /**
604
477
  * @typedef {Object} SuccessResponse * @description Generic success response. * @property {boolean} success * @property {string} message */
605
478
 
606
479
  /**
607
- * @typedef {Object} SupportedProviders * @description Serializer for supported providers response. * @property {boolean} success - Request success status * @property {any} providers - List of supported providers * @property {number} total_count - Total number of providers * @property {string} timestamp - Response timestamp */
480
+ * @typedef {Object} TaskStatistics * @description Serializer for task statistics data. * @property {Record<string, number>} statistics - Task count statistics * @property {Record<string, any>[]} recent_tasks - List of recent tasks * @property {string} timestamp - Current timestamp * @property {string} [error] - Error message if any */
608
481
 
609
482
  /**
610
- * @typedef {Object} Tariff * @description Tariff serializer for subscription pricing.
611
-
612
- Used for tariff information and selection. * @property {number} id * @property {string} name - Tariff name (e.g., 'Free', 'Basic', 'Pro') * @property {string} description - Detailed description of what this tariff includes * @property {number} monthly_price_usd - Monthly price in USD * @property {number} requests_per_month - API requests allowed per month * @property {number} requests_per_hour - API requests allowed per hour * @property {boolean} is_active - Whether this tariff is available for new subscriptions * @property {EndpointGroup[]} endpoint_groups * @property {number} endpoint_groups_count * @property {string} created_at - When this record was created * @property {string} updated_at - When this record was last updated */
483
+ * @typedef {Object} TestEmailRequest * @description Simple serializer for test email. * @property {string} email * @property {string} [subject] * @property {string} [message] */
613
484
 
614
485
  /**
615
- * @typedef {Object} TaskStatistics * @description Serializer for task statistics data. * @property {Record<string, number>} statistics - Task count statistics * @property {Record<string, any>[]} recent_tasks - List of recent tasks * @property {string} timestamp - Current timestamp * @property {string} [error] - Error message if any */
486
+ * @typedef {Object} TestRPCRequestRequest * @description Serializer for test RPC request input. * @property {string} method - RPC method to call * @property {any} params - Parameters for the RPC call * @property {number} [timeout] - Timeout in seconds */
616
487
 
617
488
  /**
618
- * @typedef {Object} TestEmailRequest * @description Simple serializer for test email. * @property {string} email * @property {string} [subject] * @property {string} [message] */
489
+ * @typedef {Object} TestRPCResponse * @description Serializer for test RPC response. * @property {boolean} success - Whether the call was successful * @property {number} duration_ms - Call duration in milliseconds * @property {any} [response] - Response data from RPC call * @property {string} [error] - Error message if failed * @property {string} correlation_id - Correlation ID for tracking */
619
490
 
620
491
  /**
621
492
  * @typedef {Object} Ticket * @property {string} uuid * @property {number} user * @property {string} subject * @property {"open" | "waiting_for_user" | "waiting_for_admin" | "resolved" | "closed"} [status] - * `open` - Open
@@ -638,9 +509,7 @@ Used for tariff information and selection. * @property {number} id * @property {
638
509
  * @typedef {Object} TokenRefreshRequest * @property {string} refresh */
639
510
 
640
511
  /**
641
- * @typedef {Object} Transaction * @description Transaction serializer with full details.
642
-
643
- Used for transaction history and details. * @property {string} id - Unique identifier for this record * @property {string} user * @property {number} amount_usd - Transaction amount in USD (positive=credit, negative=debit) * @property {string} amount_display * @property {"deposit" | "withdrawal" | "payment" | "refund" | "fee" | "bonus" | "adjustment"} transaction_type - Type of transaction
512
+ * @typedef {Object} Transaction * @description Transaction serializer. * @property {string} id - Unique identifier for this record * @property {"deposit" | "withdrawal" | "payment" | "refund" | "fee" | "bonus" | "adjustment"} transaction_type - Type of transaction
644
513
 
645
514
  * `deposit` - Deposit
646
515
  * `withdrawal` - Withdrawal
@@ -648,7 +517,7 @@ Used for transaction history and details. * @property {string} id - Unique ident
648
517
  * `refund` - Refund
649
518
  * `fee` - Fee
650
519
  * `bonus` - Bonus
651
- * `adjustment` - Adjustment * @property {string} type_color * @property {string} description - Transaction description * @property {string} payment_id - Related payment ID (if applicable) * @property {any} metadata - Additional transaction metadata * @property {boolean} is_credit * @property {boolean} is_debit * @property {string} created_at - When this record was created */
520
+ * `adjustment` - Adjustment * @property {string} type_display * @property {string} amount_usd - Transaction amount in USD (positive=credit, negative=debit) * @property {string} amount_display * @property {string} balance_after - User balance after this transaction * @property {string} payment_id - Related payment ID (if applicable) * @property {string} description - Transaction description * @property {string} created_at - When this record was created */
652
521
 
653
522
  /**
654
523
  * @typedef {Object} Unsubscribe * @description Simple serializer for unsubscribe. * @property {number} subscription_id */
@@ -657,58 +526,16 @@ Used for transaction history and details. * @property {string} id - Unique ident
657
526
  * @typedef {Object} UnsubscribeRequest * @description Simple serializer for unsubscribe. * @property {number} subscription_id */
658
527
 
659
528
  /**
660
- * @typedef {Object} User * @description Serializer for user details. * @property {number} id * @property {string} email * @property {string} [first_name] * @property {string} [last_name] * @property {string} full_name - Get user's full name. * @property {string} initials - Get user's initials for avatar fallback. * @property {string} display_username - Get formatted username for display. * @property {string} [company] * @property {string} [phone] * @property {string} [position] * @property {string} [avatar] * @property {boolean} is_staff - Designates whether the user can log into this admin site. * @property {boolean} is_superuser - Designates that this user has all permissions without explicitly assigning them. * @property {string} date_joined * @property {string} last_login * @property {number} unanswered_messages_count - Get count of unanswered messages for the user. */
661
-
662
- /**
663
- * @typedef {Object} UserBalance * @description User balance serializer with computed fields.
664
-
665
- Provides balance information with display helpers. * @property {string} user * @property {number} balance_usd - Current balance in USD (float for performance) * @property {string} balance_display - Formatted balance display. * @property {boolean} is_empty - Check if balance is zero. * @property {boolean} has_transactions - Check if user has any transactions. * @property {string} created_at * @property {string} updated_at */
529
+ * @typedef {Object} User * @description Serializer for user details. * @property {number} id * @property {string} email * @property {string} [first_name] * @property {string} [last_name] * @property {string} full_name - Get user's full name. * @property {string} initials - Get user's initials for avatar fallback. * @property {string} display_username - Get formatted username for display. * @property {string} [company] * @property {string} [phone] * @property {string} [position] * @property {string} avatar * @property {boolean} is_staff - Designates whether the user can log into this admin site. * @property {boolean} is_superuser - Designates that this user has all permissions without explicitly assigning them. * @property {string} date_joined * @property {string} last_login * @property {number} unanswered_messages_count - Get count of unanswered messages for the user. */
666
530
 
667
531
  /**
668
532
  * @typedef {Object} UserProfileUpdateRequest * @description Serializer for updating user profile. * @property {string} [first_name] * @property {string} [last_name] * @property {string} [company] * @property {string} [phone] * @property {string} [position] */
669
533
 
670
534
  /**
671
- * @typedef {Object} WebhookEvent * @description Serializer for individual webhook event. * @property {number} id * @property {string} provider * @property {string} event_type * @property {"success" | "failed" | "pending" | "retry"} status - * `success` - Success
672
- * `failed` - Failed
673
- * `pending` - Pending
674
- * `retry` - Retry * @property {string} timestamp * @property {number} payload_size - Size in bytes * @property {number} response_time - Response time in ms * @property {number} [retry_count] * @property {string} [error_message] * @property {string} [payload_preview] * @property {number} [response_status_code] * @property {string} [webhook_url] */
675
-
676
- /**
677
- * @typedef {Object} WebhookEventList * @description Serializer for paginated webhook events list. * @property {WebhookEvent[]} events * @property {number} total * @property {number} page * @property {number} per_page * @property {boolean} has_next * @property {boolean} has_previous */
678
-
679
- /**
680
- * @typedef {Object} WebhookEventListRequest * @description Serializer for paginated webhook events list. * @property {WebhookEventRequest[]} events * @property {number} total * @property {number} page * @property {number} per_page * @property {boolean} has_next * @property {boolean} has_previous */
681
-
682
- /**
683
- * @typedef {Object} WebhookEventRequest * @description Serializer for individual webhook event. * @property {string} provider * @property {string} event_type * @property {"success" | "failed" | "pending" | "retry"} status - * `success` - Success
684
- * `failed` - Failed
685
- * `pending` - Pending
686
- * `retry` - Retry * @property {string} timestamp * @property {number} payload_size - Size in bytes * @property {number} response_time - Response time in ms * @property {number} [retry_count] * @property {string} [error_message] * @property {string} [payload_preview] * @property {number} [response_status_code] * @property {string} [webhook_url] */
687
-
688
- /**
689
- * @typedef {Object} WebhookHealth * @description Serializer for webhook health check response. * @property {string} status - Health status * @property {string} timestamp - Check timestamp * @property {any} providers - Provider health status */
690
-
691
- /**
692
- * @typedef {Object} WebhookProviderStats * @description Serializer for provider-specific webhook statistics. * @property {number} total * @property {number} successful * @property {number} failed * @property {number} [pending] * @property {number} success_rate */
693
-
694
- /**
695
- * @typedef {Object} WebhookProviderStatsRequest * @description Serializer for provider-specific webhook statistics. * @property {number} total * @property {number} successful * @property {number} failed * @property {number} [pending] * @property {number} success_rate */
696
-
697
- /**
698
- * @typedef {Object} WebhookResponse * @description Serializer for webhook processing response.
699
-
700
- Standard response format for all webhook endpoints. * @property {boolean} success - Whether webhook was processed successfully * @property {string} message - Processing result message * @property {string} [payment_id] - Internal payment ID * @property {string} [provider_payment_id] - Provider payment ID * @property {string} [processed_at] - Processing timestamp */
701
-
702
- /**
703
- * @typedef {Object} WebhookResponseRequest * @description Serializer for webhook processing response.
704
-
705
- Standard response format for all webhook endpoints. * @property {boolean} success - Whether webhook was processed successfully * @property {string} message - Processing result message * @property {string} [payment_id] - Internal payment ID * @property {string} [provider_payment_id] - Provider payment ID * @property {string} [processed_at] - Processing timestamp */
706
-
707
- /**
708
- * @typedef {Object} WebhookStats * @description Serializer for comprehensive webhook statistics. * @property {number} total * @property {number} successful * @property {number} failed * @property {number} pending * @property {number} success_rate * @property {Record<string, WebhookProviderStats>} providers - Statistics by provider * @property {Record<string, number>} last_24h - Events in last 24 hours * @property {number} avg_response_time * @property {number} max_response_time */
535
+ * @typedef {Object} VectorizationResult * @description Vectorization result serializer. * @property {number} vectorized_count * @property {number} failed_count * @property {number} total_tokens * @property {number} total_cost * @property {number} success_rate * @property {string[]} errors */
709
536
 
710
537
  /**
711
- * @typedef {Object} WebhookStatsRequest * @description Serializer for comprehensive webhook statistics. * @property {number} total * @property {number} successful * @property {number} failed * @property {number} pending * @property {number} success_rate * @property {Record<string, WebhookProviderStatsRequest>} providers - Statistics by provider * @property {Record<string, number>} last_24h - Events in last 24 hours * @property {number} avg_response_time * @property {number} max_response_time */
538
+ * @typedef {Object} VectorizationStatistics * @description Vectorization statistics serializer. * @property {number} total_chunks * @property {number} vectorized_chunks * @property {number} pending_chunks * @property {number} vectorization_rate * @property {number} total_tokens * @property {number} total_cost * @property {number} avg_tokens_per_chunk * @property {number} avg_cost_per_chunk */
712
539
 
713
540
  /**
714
541
  * @typedef {Object} WorkerAction * @description Serializer for worker management actions. * @property {"start" | "stop" | "restart"} action - Action to perform on workers