@djangocfg/api 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7562 -3753
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8096 -3976
- package/dist/index.d.ts +8096 -3976
- package/dist/index.mjs +7581 -3799
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/TasksContext.tsx +242 -0
- package/src/cfg/contexts/index.ts +3 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +150 -0
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -57
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -8
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
- package/src/cfg/generated/_utils/fetchers/index.ts +5 -2
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +49 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +137 -0
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +29 -0
- package/src/cfg/generated/_utils/hooks/index.ts +5 -2
- package/src/cfg/generated/_utils/schemas/ActivityEntry.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/DashboardOverview.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
- package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +9 -12
- package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/QuickAction.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/StatCard.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/SystemHealth.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/SystemHealthItem.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/SystemMetrics.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/URLPattern.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/URLsList.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/UserStatistics.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/index.ts +42 -10
- package/src/cfg/generated/cfg__centrifugo/client.ts +30 -0
- package/src/cfg/generated/cfg__centrifugo/models.ts +0 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +92 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
- package/src/cfg/generated/cfg__dashboard/client.ts +106 -0
- package/src/cfg/generated/cfg__dashboard/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard/models.ts +108 -0
- package/src/cfg/generated/cfg__endpoints/client.ts +16 -0
- package/src/cfg/generated/cfg__endpoints/models.ts +44 -0
- package/src/cfg/generated/cfg__health/models.ts +7 -11
- package/src/cfg/generated/client.ts +15 -6
- package/src/cfg/generated/enums.ts +56 -0
- package/src/cfg/generated/index.ts +32 -20
- package/src/cfg/generated/schema.ts +4840 -2127
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_monitoring.ts +0 -179
- package/src/cfg/generated/_utils/fetchers/cfg__ipc__ipcrpc_testing.ts +0 -151
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_monitoring.ts +0 -166
- package/src/cfg/generated/_utils/hooks/cfg__ipc__ipcrpc_testing.ts +0 -162
- package/src/cfg/generated/_utils/schemas/LoadTestRequestRequest.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/LoadTestResponse.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/LoadTestStatus.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/MethodStat.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/MethodStats.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/NotificationStats.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/RPCRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/TestRPCRequestRequest.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/TestRPCResponse.schema.ts +0 -23
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/client.ts +0 -136
- package/src/cfg/generated/cfg__ipc__ipcrpc_monitoring/models.ts +0 -144
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/client.ts +0 -96
- package/src/cfg/generated/cfg__ipc__ipcrpc_testing/models.ts +0 -88
- /package/src/cfg/generated/{cfg__ipc__ipcrpc_monitoring → cfg__centrifugo}/index.ts +0 -0
- /package/src/cfg/generated/{cfg__ipc__ipcrpc_testing → cfg__centrifugo__centrifugo_admin_api}/index.ts +0 -0
|
@@ -39,7 +39,7 @@ import type { API } from '../../index'
|
|
|
39
39
|
* @method GET
|
|
40
40
|
* @path /cfg/newsletter/logs/
|
|
41
41
|
*/
|
|
42
|
-
export async function getNewsletterLogsList( params?: { page?: number; page_size?: number }, client
|
|
42
|
+
export async function getNewsletterLogsList( params?: { page?: number; page_size?: number }, client?: API
|
|
43
43
|
): Promise<PaginatedEmailLogList> {
|
|
44
44
|
const api = client || getAPIInstance()
|
|
45
45
|
const response = await api.cfg_logs.newsletterLogsList(params?.page, params?.page_size)
|
|
@@ -40,7 +40,7 @@ import type { API } from '../../index'
|
|
|
40
40
|
* @method GET
|
|
41
41
|
* @path /cfg/newsletter/newsletters/
|
|
42
42
|
*/
|
|
43
|
-
export async function getNewsletterNewslettersList( params?: { page?: number; page_size?: number }, client
|
|
43
|
+
export async function getNewsletterNewslettersList( params?: { page?: number; page_size?: number }, client?: API
|
|
44
44
|
): Promise<PaginatedNewsletterList> {
|
|
45
45
|
const api = client || getAPIInstance()
|
|
46
46
|
const response = await api.cfg_newsletters.newsletterNewslettersList(params?.page, params?.page_size)
|
|
@@ -54,7 +54,7 @@ export async function getNewsletterNewslettersList( params?: { page?: number; p
|
|
|
54
54
|
* @method GET
|
|
55
55
|
* @path /cfg/newsletter/newsletters/{id}/
|
|
56
56
|
*/
|
|
57
|
-
export async function getNewsletterNewslettersRetrieve( id: number, client
|
|
57
|
+
export async function getNewsletterNewslettersRetrieve( id: number, client?: API
|
|
58
58
|
): Promise<Newsletter> {
|
|
59
59
|
const api = client || getAPIInstance()
|
|
60
60
|
const response = await api.cfg_newsletters.newsletterNewslettersRetrieve(id)
|
|
@@ -43,7 +43,7 @@ import type { API } from '../../index'
|
|
|
43
43
|
* @method POST
|
|
44
44
|
* @path /cfg/newsletter/subscribe/
|
|
45
45
|
*/
|
|
46
|
-
export async function createNewsletterSubscribeCreate( data: SubscribeRequest, client
|
|
46
|
+
export async function createNewsletterSubscribeCreate( data: SubscribeRequest, client?: API
|
|
47
47
|
): Promise<SubscribeResponse> {
|
|
48
48
|
const api = client || getAPIInstance()
|
|
49
49
|
const response = await api.cfg_subscriptions.newsletterSubscribeCreate(data)
|
|
@@ -57,7 +57,7 @@ export async function createNewsletterSubscribeCreate( data: SubscribeRequest,
|
|
|
57
57
|
* @method GET
|
|
58
58
|
* @path /cfg/newsletter/subscriptions/
|
|
59
59
|
*/
|
|
60
|
-
export async function getNewsletterSubscriptionsList( params?: { page?: number; page_size?: number }, client
|
|
60
|
+
export async function getNewsletterSubscriptionsList( params?: { page?: number; page_size?: number }, client?: API
|
|
61
61
|
): Promise<PaginatedNewsletterSubscriptionList> {
|
|
62
62
|
const api = client || getAPIInstance()
|
|
63
63
|
const response = await api.cfg_subscriptions.newsletterSubscriptionsList(params?.page, params?.page_size)
|
|
@@ -71,7 +71,7 @@ export async function getNewsletterSubscriptionsList( params?: { page?: number;
|
|
|
71
71
|
* @method POST
|
|
72
72
|
* @path /cfg/newsletter/unsubscribe/
|
|
73
73
|
*/
|
|
74
|
-
export async function createNewsletterUnsubscribeCreate( data: UnsubscribeRequest, client
|
|
74
|
+
export async function createNewsletterUnsubscribeCreate( data: UnsubscribeRequest, client?: API
|
|
75
75
|
): Promise<SuccessResponse> {
|
|
76
76
|
const api = client || getAPIInstance()
|
|
77
77
|
const response = await api.cfg_subscriptions.newsletterUnsubscribeCreate(data)
|
|
@@ -40,7 +40,7 @@ import type { API } from '../../index'
|
|
|
40
40
|
* @method POST
|
|
41
41
|
* @path /cfg/newsletter/test/
|
|
42
42
|
*/
|
|
43
|
-
export async function createNewsletterTestCreate( data: TestEmailRequest, client
|
|
43
|
+
export async function createNewsletterTestCreate( data: TestEmailRequest, client?: API
|
|
44
44
|
): Promise<BulkEmailResponse> {
|
|
45
45
|
const api = client || getAPIInstance()
|
|
46
46
|
const response = await api.cfg_testing.newsletterTestCreate(data)
|
|
@@ -42,7 +42,7 @@ import type { API } from '../../index'
|
|
|
42
42
|
* @method GET
|
|
43
43
|
* @path /cfg/payments/balance/
|
|
44
44
|
*/
|
|
45
|
-
export async function getPaymentsBalanceRetrieve( client
|
|
45
|
+
export async function getPaymentsBalanceRetrieve( client?: API
|
|
46
46
|
): Promise<Balance> {
|
|
47
47
|
const api = client || getAPIInstance()
|
|
48
48
|
const response = await api.cfg_payments.balanceRetrieve()
|
|
@@ -56,7 +56,7 @@ export async function getPaymentsBalanceRetrieve( client?
|
|
|
56
56
|
* @method GET
|
|
57
57
|
* @path /cfg/payments/currencies/
|
|
58
58
|
*/
|
|
59
|
-
export async function getPaymentsCurrenciesList( client
|
|
59
|
+
export async function getPaymentsCurrenciesList( client?: API
|
|
60
60
|
): Promise<any> {
|
|
61
61
|
const api = client || getAPIInstance()
|
|
62
62
|
const response = await api.cfg_payments.currenciesList()
|
|
@@ -70,7 +70,7 @@ export async function getPaymentsCurrenciesList( client?
|
|
|
70
70
|
* @method GET
|
|
71
71
|
* @path /cfg/payments/payments/
|
|
72
72
|
*/
|
|
73
|
-
export async function getPaymentsPaymentsList( params?: { page?: number; page_size?: number }, client
|
|
73
|
+
export async function getPaymentsPaymentsList( params?: { page?: number; page_size?: number }, client?: API
|
|
74
74
|
): Promise<PaginatedPaymentListList> {
|
|
75
75
|
const api = client || getAPIInstance()
|
|
76
76
|
const response = await api.cfg_payments.paymentsList(params?.page, params?.page_size)
|
|
@@ -84,7 +84,7 @@ export async function getPaymentsPaymentsList( params?: { page?: number; page_s
|
|
|
84
84
|
* @method GET
|
|
85
85
|
* @path /cfg/payments/payments/{id}/
|
|
86
86
|
*/
|
|
87
|
-
export async function getPaymentsPaymentsRetrieve( id: string, client
|
|
87
|
+
export async function getPaymentsPaymentsRetrieve( id: string, client?: API
|
|
88
88
|
): Promise<PaymentDetail> {
|
|
89
89
|
const api = client || getAPIInstance()
|
|
90
90
|
const response = await api.cfg_payments.paymentsRetrieve(id)
|
|
@@ -98,7 +98,7 @@ export async function getPaymentsPaymentsRetrieve( id: string, client?
|
|
|
98
98
|
* @method POST
|
|
99
99
|
* @path /cfg/payments/payments/{id}/confirm/
|
|
100
100
|
*/
|
|
101
|
-
export async function createPaymentsPaymentsConfirmCreate( id: string, client
|
|
101
|
+
export async function createPaymentsPaymentsConfirmCreate( id: string, client?: API
|
|
102
102
|
): Promise<PaymentList> {
|
|
103
103
|
const api = client || getAPIInstance()
|
|
104
104
|
const response = await api.cfg_payments.paymentsConfirmCreate(id)
|
|
@@ -112,7 +112,7 @@ export async function createPaymentsPaymentsConfirmCreate( id: string, client?
|
|
|
112
112
|
* @method GET
|
|
113
113
|
* @path /cfg/payments/payments/{id}/status/
|
|
114
114
|
*/
|
|
115
|
-
export async function getPaymentsPaymentsStatusRetrieve( id: string, client
|
|
115
|
+
export async function getPaymentsPaymentsStatusRetrieve( id: string, client?: API
|
|
116
116
|
): Promise<PaymentList> {
|
|
117
117
|
const api = client || getAPIInstance()
|
|
118
118
|
const response = await api.cfg_payments.paymentsStatusRetrieve(id)
|
|
@@ -126,7 +126,7 @@ export async function getPaymentsPaymentsStatusRetrieve( id: string, client?
|
|
|
126
126
|
* @method POST
|
|
127
127
|
* @path /cfg/payments/payments/create/
|
|
128
128
|
*/
|
|
129
|
-
export async function createPaymentsPaymentsCreateCreate( client
|
|
129
|
+
export async function createPaymentsPaymentsCreateCreate( client?: API
|
|
130
130
|
): Promise<PaymentList> {
|
|
131
131
|
const api = client || getAPIInstance()
|
|
132
132
|
const response = await api.cfg_payments.paymentsCreateCreate()
|
|
@@ -140,7 +140,7 @@ export async function createPaymentsPaymentsCreateCreate( client?
|
|
|
140
140
|
* @method GET
|
|
141
141
|
* @path /cfg/payments/transactions/
|
|
142
142
|
*/
|
|
143
|
-
export async function getPaymentsTransactionsList( params?: { limit?: number; offset?: number; type?: string }, client
|
|
143
|
+
export async function getPaymentsTransactionsList( params?: { limit?: number; offset?: number; type?: string }, client?: API
|
|
144
144
|
): Promise<any> {
|
|
145
145
|
const api = client || getAPIInstance()
|
|
146
146
|
const response = await api.cfg_payments.transactionsList(params?.limit, params?.offset, params?.type)
|
|
@@ -48,7 +48,7 @@ import type { API } from '../../index'
|
|
|
48
48
|
* @method GET
|
|
49
49
|
* @path /cfg/support/tickets/
|
|
50
50
|
*/
|
|
51
|
-
export async function getSupportTicketsList( params?: { page?: number; page_size?: number }, client
|
|
51
|
+
export async function getSupportTicketsList( params?: { page?: number; page_size?: number }, client?: API
|
|
52
52
|
): Promise<PaginatedTicketList> {
|
|
53
53
|
const api = client || getAPIInstance()
|
|
54
54
|
const response = await api.cfg_support.ticketsList(params?.page, params?.page_size)
|
|
@@ -62,7 +62,7 @@ export async function getSupportTicketsList( params?: { page?: number; page_siz
|
|
|
62
62
|
* @method POST
|
|
63
63
|
* @path /cfg/support/tickets/
|
|
64
64
|
*/
|
|
65
|
-
export async function createSupportTicketsCreate( data: TicketRequest, client
|
|
65
|
+
export async function createSupportTicketsCreate( data: TicketRequest, client?: API
|
|
66
66
|
): Promise<Ticket> {
|
|
67
67
|
const api = client || getAPIInstance()
|
|
68
68
|
const response = await api.cfg_support.ticketsCreate(data)
|
|
@@ -76,7 +76,7 @@ export async function createSupportTicketsCreate( data: TicketRequest, client?
|
|
|
76
76
|
* @method GET
|
|
77
77
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/
|
|
78
78
|
*/
|
|
79
|
-
export async function getSupportTicketsMessagesList( ticket_uuid: string, params?: { page?: number; page_size?: number }, client
|
|
79
|
+
export async function getSupportTicketsMessagesList( ticket_uuid: string, params?: { page?: number; page_size?: number }, client?: API
|
|
80
80
|
): Promise<PaginatedMessageList> {
|
|
81
81
|
const api = client || getAPIInstance()
|
|
82
82
|
const response = await api.cfg_support.ticketsMessagesList(ticket_uuid, params?.page, params?.page_size)
|
|
@@ -90,7 +90,7 @@ export async function getSupportTicketsMessagesList( ticket_uuid: string, param
|
|
|
90
90
|
* @method POST
|
|
91
91
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/
|
|
92
92
|
*/
|
|
93
|
-
export async function createSupportTicketsMessagesCreate( ticket_uuid: string, data: MessageCreateRequest, client
|
|
93
|
+
export async function createSupportTicketsMessagesCreate( ticket_uuid: string, data: MessageCreateRequest, client?: API
|
|
94
94
|
): Promise<MessageCreate> {
|
|
95
95
|
const api = client || getAPIInstance()
|
|
96
96
|
const response = await api.cfg_support.ticketsMessagesCreate(ticket_uuid, data)
|
|
@@ -104,7 +104,7 @@ export async function createSupportTicketsMessagesCreate( ticket_uuid: string,
|
|
|
104
104
|
* @method GET
|
|
105
105
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
106
106
|
*/
|
|
107
|
-
export async function getSupportTicketsMessagesRetrieve( ticket_uuid: string, uuid: string, client
|
|
107
|
+
export async function getSupportTicketsMessagesRetrieve( ticket_uuid: string, uuid: string, client?: API
|
|
108
108
|
): Promise<Message> {
|
|
109
109
|
const api = client || getAPIInstance()
|
|
110
110
|
const response = await api.cfg_support.ticketsMessagesRetrieve(ticket_uuid, uuid)
|
|
@@ -118,7 +118,7 @@ export async function getSupportTicketsMessagesRetrieve( ticket_uuid: string, u
|
|
|
118
118
|
* @method PUT
|
|
119
119
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
120
120
|
*/
|
|
121
|
-
export async function updateSupportTicketsMessagesUpdate( ticket_uuid: string, uuid: string, data: MessageRequest, client
|
|
121
|
+
export async function updateSupportTicketsMessagesUpdate( ticket_uuid: string, uuid: string, data: MessageRequest, client?: API
|
|
122
122
|
): Promise<Message> {
|
|
123
123
|
const api = client || getAPIInstance()
|
|
124
124
|
const response = await api.cfg_support.ticketsMessagesUpdate(ticket_uuid, uuid, data)
|
|
@@ -132,7 +132,7 @@ export async function updateSupportTicketsMessagesUpdate( ticket_uuid: string,
|
|
|
132
132
|
* @method PATCH
|
|
133
133
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
134
134
|
*/
|
|
135
|
-
export async function partialUpdateSupportTicketsMessagesPartialUpdate( ticket_uuid: string, uuid: string, data?: PatchedMessageRequest, client
|
|
135
|
+
export async function partialUpdateSupportTicketsMessagesPartialUpdate( ticket_uuid: string, uuid: string, data?: PatchedMessageRequest, client?: API
|
|
136
136
|
): Promise<Message> {
|
|
137
137
|
const api = client || getAPIInstance()
|
|
138
138
|
const response = await api.cfg_support.ticketsMessagesPartialUpdate(ticket_uuid, uuid, data)
|
|
@@ -146,7 +146,7 @@ export async function partialUpdateSupportTicketsMessagesPartialUpdate( ticket_
|
|
|
146
146
|
* @method DELETE
|
|
147
147
|
* @path /cfg/support/tickets/{ticket_uuid}/messages/{uuid}/
|
|
148
148
|
*/
|
|
149
|
-
export async function deleteSupportTicketsMessagesDestroy( ticket_uuid: string, uuid: string, client
|
|
149
|
+
export async function deleteSupportTicketsMessagesDestroy( ticket_uuid: string, uuid: string, client?: API
|
|
150
150
|
): Promise<void> {
|
|
151
151
|
const api = client || getAPIInstance()
|
|
152
152
|
const response = await api.cfg_support.ticketsMessagesDestroy(ticket_uuid, uuid)
|
|
@@ -160,7 +160,7 @@ export async function deleteSupportTicketsMessagesDestroy( ticket_uuid: string,
|
|
|
160
160
|
* @method GET
|
|
161
161
|
* @path /cfg/support/tickets/{uuid}/
|
|
162
162
|
*/
|
|
163
|
-
export async function getSupportTicketsRetrieve( uuid: string, client
|
|
163
|
+
export async function getSupportTicketsRetrieve( uuid: string, client?: API
|
|
164
164
|
): Promise<Ticket> {
|
|
165
165
|
const api = client || getAPIInstance()
|
|
166
166
|
const response = await api.cfg_support.ticketsRetrieve(uuid)
|
|
@@ -174,7 +174,7 @@ export async function getSupportTicketsRetrieve( uuid: string, client?
|
|
|
174
174
|
* @method PUT
|
|
175
175
|
* @path /cfg/support/tickets/{uuid}/
|
|
176
176
|
*/
|
|
177
|
-
export async function updateSupportTicketsUpdate( uuid: string, data: TicketRequest, client
|
|
177
|
+
export async function updateSupportTicketsUpdate( uuid: string, data: TicketRequest, client?: API
|
|
178
178
|
): Promise<Ticket> {
|
|
179
179
|
const api = client || getAPIInstance()
|
|
180
180
|
const response = await api.cfg_support.ticketsUpdate(uuid, data)
|
|
@@ -188,7 +188,7 @@ export async function updateSupportTicketsUpdate( uuid: string, data: TicketReq
|
|
|
188
188
|
* @method PATCH
|
|
189
189
|
* @path /cfg/support/tickets/{uuid}/
|
|
190
190
|
*/
|
|
191
|
-
export async function partialUpdateSupportTicketsPartialUpdate( uuid: string, data?: PatchedTicketRequest, client
|
|
191
|
+
export async function partialUpdateSupportTicketsPartialUpdate( uuid: string, data?: PatchedTicketRequest, client?: API
|
|
192
192
|
): Promise<Ticket> {
|
|
193
193
|
const api = client || getAPIInstance()
|
|
194
194
|
const response = await api.cfg_support.ticketsPartialUpdate(uuid, data)
|
|
@@ -202,7 +202,7 @@ export async function partialUpdateSupportTicketsPartialUpdate( uuid: string, d
|
|
|
202
202
|
* @method DELETE
|
|
203
203
|
* @path /cfg/support/tickets/{uuid}/
|
|
204
204
|
*/
|
|
205
|
-
export async function deleteSupportTicketsDestroy( uuid: string, client
|
|
205
|
+
export async function deleteSupportTicketsDestroy( uuid: string, client?: API
|
|
206
206
|
): Promise<void> {
|
|
207
207
|
const api = client || getAPIInstance()
|
|
208
208
|
const response = await api.cfg_support.ticketsDestroy(uuid)
|
|
@@ -46,7 +46,7 @@ import type { API } from '../../index'
|
|
|
46
46
|
* @method POST
|
|
47
47
|
* @path /cfg/tasks/api/clear/
|
|
48
48
|
*/
|
|
49
|
-
export async function createTasksApiClearCreate( data: APIResponseRequest, client
|
|
49
|
+
export async function createTasksApiClearCreate( data: APIResponseRequest, client?: API
|
|
50
50
|
): Promise<APIResponse> {
|
|
51
51
|
const api = client || getAPIInstance()
|
|
52
52
|
const response = await api.cfg_tasks.apiClearCreate(data)
|
|
@@ -60,7 +60,7 @@ export async function createTasksApiClearCreate( data: APIResponseRequest, cli
|
|
|
60
60
|
* @method POST
|
|
61
61
|
* @path /cfg/tasks/api/clear-queues/
|
|
62
62
|
*/
|
|
63
|
-
export async function createTasksApiClearQueuesCreate( data: APIResponseRequest, client
|
|
63
|
+
export async function createTasksApiClearQueuesCreate( data: APIResponseRequest, client?: API
|
|
64
64
|
): Promise<APIResponse> {
|
|
65
65
|
const api = client || getAPIInstance()
|
|
66
66
|
const response = await api.cfg_tasks.apiClearQueuesCreate(data)
|
|
@@ -74,7 +74,7 @@ export async function createTasksApiClearQueuesCreate( data: APIResponseRequest
|
|
|
74
74
|
* @method POST
|
|
75
75
|
* @path /cfg/tasks/api/purge-failed/
|
|
76
76
|
*/
|
|
77
|
-
export async function createTasksApiPurgeFailedCreate( data: APIResponseRequest, client
|
|
77
|
+
export async function createTasksApiPurgeFailedCreate( data: APIResponseRequest, client?: API
|
|
78
78
|
): Promise<APIResponse> {
|
|
79
79
|
const api = client || getAPIInstance()
|
|
80
80
|
const response = await api.cfg_tasks.apiPurgeFailedCreate(data)
|
|
@@ -88,7 +88,7 @@ export async function createTasksApiPurgeFailedCreate( data: APIResponseRequest
|
|
|
88
88
|
* @method POST
|
|
89
89
|
* @path /cfg/tasks/api/queues/manage/
|
|
90
90
|
*/
|
|
91
|
-
export async function createTasksApiQueuesManageCreate( data: QueueActionRequest, client
|
|
91
|
+
export async function createTasksApiQueuesManageCreate( data: QueueActionRequest, client?: API
|
|
92
92
|
): Promise<QueueAction> {
|
|
93
93
|
const api = client || getAPIInstance()
|
|
94
94
|
const response = await api.cfg_tasks.apiQueuesManageCreate(data)
|
|
@@ -102,7 +102,7 @@ export async function createTasksApiQueuesManageCreate( data: QueueActionReques
|
|
|
102
102
|
* @method GET
|
|
103
103
|
* @path /cfg/tasks/api/queues/status/
|
|
104
104
|
*/
|
|
105
|
-
export async function getTasksApiQueuesStatusRetrieve( client
|
|
105
|
+
export async function getTasksApiQueuesStatusRetrieve( client?: API
|
|
106
106
|
): Promise<QueueStatus> {
|
|
107
107
|
const api = client || getAPIInstance()
|
|
108
108
|
const response = await api.cfg_tasks.apiQueuesStatusRetrieve()
|
|
@@ -116,7 +116,7 @@ export async function getTasksApiQueuesStatusRetrieve( client?
|
|
|
116
116
|
* @method POST
|
|
117
117
|
* @path /cfg/tasks/api/simulate/
|
|
118
118
|
*/
|
|
119
|
-
export async function createTasksApiSimulateCreate( data: APIResponseRequest, client
|
|
119
|
+
export async function createTasksApiSimulateCreate( data: APIResponseRequest, client?: API
|
|
120
120
|
): Promise<APIResponse> {
|
|
121
121
|
const api = client || getAPIInstance()
|
|
122
122
|
const response = await api.cfg_tasks.apiSimulateCreate(data)
|
|
@@ -130,7 +130,7 @@ export async function createTasksApiSimulateCreate( data: APIResponseRequest,
|
|
|
130
130
|
* @method GET
|
|
131
131
|
* @path /cfg/tasks/api/tasks/list/
|
|
132
132
|
*/
|
|
133
|
-
export async function getTasksApiTasksListRetrieve( client
|
|
133
|
+
export async function getTasksApiTasksListRetrieve( client?: API
|
|
134
134
|
): Promise<APIResponse> {
|
|
135
135
|
const api = client || getAPIInstance()
|
|
136
136
|
const response = await api.cfg_tasks.apiTasksListRetrieve()
|
|
@@ -144,7 +144,7 @@ export async function getTasksApiTasksListRetrieve( client?
|
|
|
144
144
|
* @method GET
|
|
145
145
|
* @path /cfg/tasks/api/tasks/stats/
|
|
146
146
|
*/
|
|
147
|
-
export async function getTasksApiTasksStatsRetrieve( client
|
|
147
|
+
export async function getTasksApiTasksStatsRetrieve( client?: API
|
|
148
148
|
): Promise<TaskStatistics> {
|
|
149
149
|
const api = client || getAPIInstance()
|
|
150
150
|
const response = await api.cfg_tasks.apiTasksStatsRetrieve()
|
|
@@ -158,7 +158,7 @@ export async function getTasksApiTasksStatsRetrieve( client?
|
|
|
158
158
|
* @method GET
|
|
159
159
|
* @path /cfg/tasks/api/workers/list/
|
|
160
160
|
*/
|
|
161
|
-
export async function getTasksApiWorkersListRetrieve( client
|
|
161
|
+
export async function getTasksApiWorkersListRetrieve( client?: API
|
|
162
162
|
): Promise<APIResponse> {
|
|
163
163
|
const api = client || getAPIInstance()
|
|
164
164
|
const response = await api.cfg_tasks.apiWorkersListRetrieve()
|
|
@@ -172,7 +172,7 @@ export async function getTasksApiWorkersListRetrieve( client?
|
|
|
172
172
|
* @method POST
|
|
173
173
|
* @path /cfg/tasks/api/workers/manage/
|
|
174
174
|
*/
|
|
175
|
-
export async function createTasksApiWorkersManageCreate( data: WorkerActionRequest, client
|
|
175
|
+
export async function createTasksApiWorkersManageCreate( data: WorkerActionRequest, client?: API
|
|
176
176
|
): Promise<WorkerAction> {
|
|
177
177
|
const api = client || getAPIInstance()
|
|
178
178
|
const response = await api.cfg_tasks.apiWorkersManageCreate(data)
|
|
@@ -28,10 +28,13 @@
|
|
|
28
28
|
export * from './cfg__accounts'
|
|
29
29
|
export * from './cfg__accounts__auth'
|
|
30
30
|
export * from './cfg__accounts__user_profile'
|
|
31
|
+
export * from './cfg__centrifugo'
|
|
32
|
+
export * from './cfg__centrifugo__centrifugo_admin_api'
|
|
33
|
+
export * from './cfg__centrifugo__centrifugo_monitoring'
|
|
34
|
+
export * from './cfg__centrifugo__centrifugo_testing'
|
|
35
|
+
export * from './cfg__dashboard'
|
|
31
36
|
export * from './cfg__endpoints'
|
|
32
37
|
export * from './cfg__health'
|
|
33
|
-
export * from './cfg__ipc__ipcrpc_monitoring'
|
|
34
|
-
export * from './cfg__ipc__ipcrpc_testing'
|
|
35
38
|
export * from './cfg__knowbase'
|
|
36
39
|
export * from './cfg__leads'
|
|
37
40
|
export * from './cfg__leads__lead_submission'
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Centrifugo
|
|
3
|
+
*
|
|
4
|
+
* React hooks powered by SWR for data fetching with automatic caching,
|
|
5
|
+
* revalidation, and optimistic updates.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Query hooks (GET)
|
|
10
|
+
* const { data, error, isLoading } = useUsers({ page: 1 })
|
|
11
|
+
*
|
|
12
|
+
* // Mutation hooks (POST/PUT/PATCH/DELETE)
|
|
13
|
+
* const createUser = useCreateUser()
|
|
14
|
+
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import useSWR from 'swr'
|
|
18
|
+
import { useSWRConfig } from 'swr'
|
|
19
|
+
import * as Fetchers from '../fetchers/cfg__centrifugo'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* API operation
|
|
24
|
+
*
|
|
25
|
+
* @method GET
|
|
26
|
+
* @path /cfg/centrifugo/admin/api/monitor/channels/
|
|
27
|
+
*/
|
|
28
|
+
export function useCentrifugoAdminApiMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
29
|
+
return useSWR<any>(
|
|
30
|
+
'cfg-centrifugo-admin-api-monitor-channel',
|
|
31
|
+
() => Fetchers.getCentrifugoAdminApiMonitorChannelsRetrieve(client)
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* API operation
|
|
38
|
+
*
|
|
39
|
+
* @method GET
|
|
40
|
+
* @path /cfg/centrifugo/monitor/channels/
|
|
41
|
+
*/
|
|
42
|
+
export function useCentrifugoMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
43
|
+
return useSWR<any>(
|
|
44
|
+
'cfg-centrifugo-monitor-channel',
|
|
45
|
+
() => Fetchers.getCentrifugoMonitorChannelsRetrieve(client)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Centrifugo Admin API
|
|
3
|
+
*
|
|
4
|
+
* React hooks powered by SWR for data fetching with automatic caching,
|
|
5
|
+
* revalidation, and optimistic updates.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Query hooks (GET)
|
|
10
|
+
* const { data, error, isLoading } = useUsers({ page: 1 })
|
|
11
|
+
*
|
|
12
|
+
* // Mutation hooks (POST/PUT/PATCH/DELETE)
|
|
13
|
+
* const createUser = useCreateUser()
|
|
14
|
+
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import useSWR from 'swr'
|
|
18
|
+
import { useSWRConfig } from 'swr'
|
|
19
|
+
import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_admin_api'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { CentrifugoChannelsRequestRequest } from '../schemas/CentrifugoChannelsRequestRequest.schema'
|
|
22
|
+
import type { CentrifugoChannelsResponse } from '../schemas/CentrifugoChannelsResponse.schema'
|
|
23
|
+
import type { CentrifugoHistoryRequestRequest } from '../schemas/CentrifugoHistoryRequestRequest.schema'
|
|
24
|
+
import type { CentrifugoHistoryResponse } from '../schemas/CentrifugoHistoryResponse.schema'
|
|
25
|
+
import type { CentrifugoInfoResponse } from '../schemas/CentrifugoInfoResponse.schema'
|
|
26
|
+
import type { CentrifugoPresenceRequestRequest } from '../schemas/CentrifugoPresenceRequestRequest.schema'
|
|
27
|
+
import type { CentrifugoPresenceResponse } from '../schemas/CentrifugoPresenceResponse.schema'
|
|
28
|
+
import type { CentrifugoPresenceStatsRequestRequest } from '../schemas/CentrifugoPresenceStatsRequestRequest.schema'
|
|
29
|
+
import type { CentrifugoPresenceStatsResponse } from '../schemas/CentrifugoPresenceStatsResponse.schema'
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get connection token for dashboard
|
|
33
|
+
*
|
|
34
|
+
* @method POST
|
|
35
|
+
* @path /cfg/centrifugo/admin/api/server/auth/token/
|
|
36
|
+
*/
|
|
37
|
+
export function useCreateCentrifugoAdminApiServerAuthTokenCreate() {
|
|
38
|
+
const { mutate } = useSWRConfig()
|
|
39
|
+
|
|
40
|
+
return async (client?: API): Promise<any> => {
|
|
41
|
+
const result = await Fetchers.createCentrifugoAdminApiServerAuthTokenCreate(client)
|
|
42
|
+
// Revalidate related queries
|
|
43
|
+
mutate('cfg-centrifugo-admin-api-server-auth-token')
|
|
44
|
+
return result
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* List active channels
|
|
51
|
+
*
|
|
52
|
+
* @method POST
|
|
53
|
+
* @path /cfg/centrifugo/admin/api/server/channels/
|
|
54
|
+
*/
|
|
55
|
+
export function useCreateCentrifugoAdminApiServerChannelsCreate() {
|
|
56
|
+
const { mutate } = useSWRConfig()
|
|
57
|
+
|
|
58
|
+
return async (data: CentrifugoChannelsRequestRequest, client?: API): Promise<CentrifugoChannelsResponse> => {
|
|
59
|
+
const result = await Fetchers.createCentrifugoAdminApiServerChannelsCreate(data, client)
|
|
60
|
+
// Revalidate related queries
|
|
61
|
+
mutate('cfg-centrifugo-admin-api-server-channels')
|
|
62
|
+
return result
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get channel history
|
|
69
|
+
*
|
|
70
|
+
* @method POST
|
|
71
|
+
* @path /cfg/centrifugo/admin/api/server/history/
|
|
72
|
+
*/
|
|
73
|
+
export function useCreateCentrifugoAdminApiServerHistoryCreate() {
|
|
74
|
+
const { mutate } = useSWRConfig()
|
|
75
|
+
|
|
76
|
+
return async (data: CentrifugoHistoryRequestRequest, client?: API): Promise<CentrifugoHistoryResponse> => {
|
|
77
|
+
const result = await Fetchers.createCentrifugoAdminApiServerHistoryCreate(data, client)
|
|
78
|
+
// Revalidate related queries
|
|
79
|
+
mutate('cfg-centrifugo-admin-api-server-history')
|
|
80
|
+
return result
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get Centrifugo server info
|
|
87
|
+
*
|
|
88
|
+
* @method POST
|
|
89
|
+
* @path /cfg/centrifugo/admin/api/server/info/
|
|
90
|
+
*/
|
|
91
|
+
export function useCreateCentrifugoAdminApiServerInfoCreate() {
|
|
92
|
+
const { mutate } = useSWRConfig()
|
|
93
|
+
|
|
94
|
+
return async (client?: API): Promise<CentrifugoInfoResponse> => {
|
|
95
|
+
const result = await Fetchers.createCentrifugoAdminApiServerInfoCreate(client)
|
|
96
|
+
// Revalidate related queries
|
|
97
|
+
mutate('cfg-centrifugo-admin-api-server-info')
|
|
98
|
+
return result
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Get channel presence
|
|
105
|
+
*
|
|
106
|
+
* @method POST
|
|
107
|
+
* @path /cfg/centrifugo/admin/api/server/presence/
|
|
108
|
+
*/
|
|
109
|
+
export function useCreateCentrifugoAdminApiServerPresenceCreate() {
|
|
110
|
+
const { mutate } = useSWRConfig()
|
|
111
|
+
|
|
112
|
+
return async (data: CentrifugoPresenceRequestRequest, client?: API): Promise<CentrifugoPresenceResponse> => {
|
|
113
|
+
const result = await Fetchers.createCentrifugoAdminApiServerPresenceCreate(data, client)
|
|
114
|
+
// Revalidate related queries
|
|
115
|
+
mutate('cfg-centrifugo-admin-api-server-presence')
|
|
116
|
+
return result
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get channel presence statistics
|
|
123
|
+
*
|
|
124
|
+
* @method POST
|
|
125
|
+
* @path /cfg/centrifugo/admin/api/server/presence-stats/
|
|
126
|
+
*/
|
|
127
|
+
export function useCreateCentrifugoAdminApiServerPresenceStatsCreate() {
|
|
128
|
+
const { mutate } = useSWRConfig()
|
|
129
|
+
|
|
130
|
+
return async (data: CentrifugoPresenceStatsRequestRequest, client?: API): Promise<CentrifugoPresenceStatsResponse> => {
|
|
131
|
+
const result = await Fetchers.createCentrifugoAdminApiServerPresenceStatsCreate(data, client)
|
|
132
|
+
// Revalidate related queries
|
|
133
|
+
mutate('cfg-centrifugo-admin-api-server-presence-stats')
|
|
134
|
+
return result
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Get connection token for dashboard
|
|
141
|
+
*
|
|
142
|
+
* @method POST
|
|
143
|
+
* @path /cfg/centrifugo/server/auth/token/
|
|
144
|
+
*/
|
|
145
|
+
export function useCreateCentrifugoServerAuthTokenCreate() {
|
|
146
|
+
const { mutate } = useSWRConfig()
|
|
147
|
+
|
|
148
|
+
return async (client?: API): Promise<any> => {
|
|
149
|
+
const result = await Fetchers.createCentrifugoServerAuthTokenCreate(client)
|
|
150
|
+
// Revalidate related queries
|
|
151
|
+
mutate('cfg-centrifugo-server-auth-token')
|
|
152
|
+
return result
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* List active channels
|
|
159
|
+
*
|
|
160
|
+
* @method POST
|
|
161
|
+
* @path /cfg/centrifugo/server/channels/
|
|
162
|
+
*/
|
|
163
|
+
export function useCreateCentrifugoServerChannelsCreate() {
|
|
164
|
+
const { mutate } = useSWRConfig()
|
|
165
|
+
|
|
166
|
+
return async (data: CentrifugoChannelsRequestRequest, client?: API): Promise<CentrifugoChannelsResponse> => {
|
|
167
|
+
const result = await Fetchers.createCentrifugoServerChannelsCreate(data, client)
|
|
168
|
+
// Revalidate related queries
|
|
169
|
+
mutate('cfg-centrifugo-server-channels')
|
|
170
|
+
return result
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Get channel history
|
|
177
|
+
*
|
|
178
|
+
* @method POST
|
|
179
|
+
* @path /cfg/centrifugo/server/history/
|
|
180
|
+
*/
|
|
181
|
+
export function useCreateCentrifugoServerHistoryCreate() {
|
|
182
|
+
const { mutate } = useSWRConfig()
|
|
183
|
+
|
|
184
|
+
return async (data: CentrifugoHistoryRequestRequest, client?: API): Promise<CentrifugoHistoryResponse> => {
|
|
185
|
+
const result = await Fetchers.createCentrifugoServerHistoryCreate(data, client)
|
|
186
|
+
// Revalidate related queries
|
|
187
|
+
mutate('cfg-centrifugo-server-history')
|
|
188
|
+
return result
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get Centrifugo server info
|
|
195
|
+
*
|
|
196
|
+
* @method POST
|
|
197
|
+
* @path /cfg/centrifugo/server/info/
|
|
198
|
+
*/
|
|
199
|
+
export function useCreateCentrifugoServerInfoCreate() {
|
|
200
|
+
const { mutate } = useSWRConfig()
|
|
201
|
+
|
|
202
|
+
return async (client?: API): Promise<CentrifugoInfoResponse> => {
|
|
203
|
+
const result = await Fetchers.createCentrifugoServerInfoCreate(client)
|
|
204
|
+
// Revalidate related queries
|
|
205
|
+
mutate('cfg-centrifugo-server-info')
|
|
206
|
+
return result
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Get channel presence
|
|
213
|
+
*
|
|
214
|
+
* @method POST
|
|
215
|
+
* @path /cfg/centrifugo/server/presence/
|
|
216
|
+
*/
|
|
217
|
+
export function useCreateCentrifugoServerPresenceCreate() {
|
|
218
|
+
const { mutate } = useSWRConfig()
|
|
219
|
+
|
|
220
|
+
return async (data: CentrifugoPresenceRequestRequest, client?: API): Promise<CentrifugoPresenceResponse> => {
|
|
221
|
+
const result = await Fetchers.createCentrifugoServerPresenceCreate(data, client)
|
|
222
|
+
// Revalidate related queries
|
|
223
|
+
mutate('cfg-centrifugo-server-presence')
|
|
224
|
+
return result
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Get channel presence statistics
|
|
231
|
+
*
|
|
232
|
+
* @method POST
|
|
233
|
+
* @path /cfg/centrifugo/server/presence-stats/
|
|
234
|
+
*/
|
|
235
|
+
export function useCreateCentrifugoServerPresenceStatsCreate() {
|
|
236
|
+
const { mutate } = useSWRConfig()
|
|
237
|
+
|
|
238
|
+
return async (data: CentrifugoPresenceStatsRequestRequest, client?: API): Promise<CentrifugoPresenceStatsResponse> => {
|
|
239
|
+
const result = await Fetchers.createCentrifugoServerPresenceStatsCreate(data, client)
|
|
240
|
+
// Revalidate related queries
|
|
241
|
+
mutate('cfg-centrifugo-server-presence-stats')
|
|
242
|
+
return result
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|