fivexer 0.4.0__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.
fivexer/__init__.py ADDED
@@ -0,0 +1,368 @@
1
+ """Fivexer Platform /v1 SDK for Python.
2
+
3
+ Two credential planes, two clients::
4
+
5
+ # Workspace plane — server-to-server, `sk_` API key
6
+ from fivexer import Fivexer, AsyncFivexer, CreateTask, UpsertWorker
7
+
8
+ client = Fivexer(base_url="https://api.fivexer.com", api_key="sk_test_...")
9
+ client.workers.upsert(UpsertWorker(id="agent_1", tags=["english"]))
10
+ task = client.tasks.create(CreateTask(tags=["english"], priority=90))
11
+
12
+ # Worker portal plane — one worker's own view, `wt_` session token
13
+ from fivexer import FivexerWorker, WorkerLogin
14
+
15
+ worker = FivexerWorker(base_url="https://api.fivexer.com")
16
+ worker.login(WorkerLogin(workspace_id="ws_1", worker_id="agent_1", pin="4821"))
17
+ worker.accept(worker.queue().task_ids[0])
18
+
19
+ # Webhook verification — pure, no client needed
20
+ from fivexer import Webhook
21
+ """
22
+
23
+ from .client import AsyncFivexer, Fivexer
24
+ from .errors import FivexerApiError, FivexerError, SignatureVerificationError
25
+ from .models import (
26
+ CLEAR,
27
+ AcceptSupervisorInvite,
28
+ AcceptWorkerInvite,
29
+ AcceptWorkerInviteResult,
30
+ AddComment,
31
+ AssignTaskResult,
32
+ Attachment,
33
+ AttachmentDownload,
34
+ AttachmentUpload,
35
+ AttachmentUploader,
36
+ BulkTaskError,
37
+ BulkTaskReport,
38
+ BulkTaskResult,
39
+ ChangePin,
40
+ Comment,
41
+ CommentAuthor,
42
+ CommentPage,
43
+ CreateAttachment,
44
+ CreatedAttachment,
45
+ CreateJoinLink,
46
+ CreateJoinLinkResult,
47
+ CreateNotificationChannel,
48
+ CreateNotificationSequence,
49
+ CreateTask,
50
+ CreateWorkerIdentity,
51
+ Decision,
52
+ DecisionCandidate,
53
+ InviteWorkerIdentity,
54
+ JoinLink,
55
+ JoinWorkspace,
56
+ JoinWorkspaceResult,
57
+ LearnedWeightsPreview,
58
+ LearningFeedbackItem,
59
+ LearningFeedbackResult,
60
+ LearningStats,
61
+ LearningStatus,
62
+ ListDecisionsQuery,
63
+ ListRunsQuery,
64
+ ListTasksQuery,
65
+ MatchingPolicy,
66
+ NotificationChannel,
67
+ NotificationSequence,
68
+ NotificationSequenceStep,
69
+ ParallelBranch,
70
+ PatchSkill,
71
+ PatchTeam,
72
+ PatchWorker,
73
+ PreviewedWorkerWeights,
74
+ PublicWorkerIdentity,
75
+ PushConfig,
76
+ PushSubscription,
77
+ PushSubscriptionInput,
78
+ QueueAuditEntry,
79
+ QueueAuditQuery,
80
+ QueueAuditReport,
81
+ QueueAuditSweepBacklog,
82
+ QueueStats,
83
+ QuotaInfo,
84
+ RequiredSkill,
85
+ RevertedWeights,
86
+ SetTaskContext,
87
+ Skill,
88
+ SlaStats,
89
+ StartRun,
90
+ StatsTimeseriesBucket,
91
+ StatsTimeseriesResult,
92
+ StatsWindowQuery,
93
+ SuggestedWorker,
94
+ SuggestWorkers,
95
+ SuggestWorkersResult,
96
+ SupervisorAssignResult,
97
+ SupervisorAvailabilityResult,
98
+ SupervisorCounts,
99
+ SupervisorCrewMember,
100
+ SupervisorEntry,
101
+ SupervisorIdentity,
102
+ SupervisorMe,
103
+ SupervisorOverview,
104
+ SupervisorParkedTask,
105
+ SupervisorSession,
106
+ Task,
107
+ TaskAction,
108
+ TaskCheckIssue,
109
+ TaskCheckReport,
110
+ TaskContext,
111
+ TaskDataSummary,
112
+ TaskEscalation,
113
+ TaskList,
114
+ TaskPage,
115
+ TaskPriority,
116
+ TaskReference,
117
+ TaskReferenceInput,
118
+ Team,
119
+ TeamMember,
120
+ TeamMembers,
121
+ TeamPresence,
122
+ TeamPresenceCounts,
123
+ TeamPresenceMember,
124
+ TeamRoster,
125
+ UnparkTask,
126
+ UpdateNotificationChannel,
127
+ UpdateNotificationSequence,
128
+ UpdateWorkerIdentity,
129
+ UpsertSkill,
130
+ UpsertTeam,
131
+ UpsertWorker,
132
+ WorkerAvailability,
133
+ WorkerAvailabilityState,
134
+ WorkerBreak,
135
+ WorkerBreakEnded,
136
+ WorkerBreakMetric,
137
+ WorkerBreakStarted,
138
+ WorkerBreakToday,
139
+ WorkerDetail,
140
+ WorkerDevice,
141
+ WorkerDeviceInput,
142
+ WorkerIdentityResult,
143
+ WorkerInviteResult,
144
+ WorkerLearningSkillStat,
145
+ WorkerLearningStats,
146
+ WorkerList,
147
+ WorkerLoad,
148
+ WorkerLocation,
149
+ WorkerLocationResult,
150
+ WorkerLogin,
151
+ WorkerMe,
152
+ WorkerMetricsToday,
153
+ WorkerMetricsWindow,
154
+ WorkerMetricsWindowDay,
155
+ WorkerPortalLink,
156
+ WorkerProductivity,
157
+ WorkerQueue,
158
+ WorkerSessionToken,
159
+ WorkerSkill,
160
+ WorkerSkillAssignment,
161
+ WorkerSkillLevel,
162
+ WorkerSkillSet,
163
+ WorkerStatsResult,
164
+ WorkerTaskDetail,
165
+ WorkflowDefinition,
166
+ WorkflowDefinitionInput,
167
+ WorkflowDefinitionSummary,
168
+ WorkflowRouting,
169
+ WorkflowRun,
170
+ WorkflowRunHistoryEntry,
171
+ WorkflowRunPage,
172
+ WorkflowRunStep,
173
+ WorkflowRunSteps,
174
+ WorkflowStep,
175
+ WorkspaceBreakMetrics,
176
+ WorkspaceStats,
177
+ )
178
+ from .supervisor import AsyncFivexerSupervisor, FivexerSupervisor
179
+ from .webhook import SIGNATURE_HEADER, Webhook, WebhookEvent
180
+ from .worker import AsyncFivexerWorker, FivexerWorker
181
+
182
+ __version__ = "0.4.0"
183
+
184
+ __all__ = [
185
+ # clients
186
+ "AsyncFivexer",
187
+ "AsyncFivexerWorker",
188
+ "Fivexer",
189
+ "FivexerWorker",
190
+ # webhooks
191
+ "Webhook",
192
+ "WebhookEvent",
193
+ "SIGNATURE_HEADER",
194
+ # errors
195
+ "FivexerApiError",
196
+ "FivexerError",
197
+ "SignatureVerificationError",
198
+ # tasks
199
+ "AssignTaskResult",
200
+ "CreateTask",
201
+ "ListTasksQuery",
202
+ "Task",
203
+ "TaskAction",
204
+ "TaskDataSummary",
205
+ "TaskPage",
206
+ "TaskPriority",
207
+ "TaskReference",
208
+ "TaskReferenceInput",
209
+ # task rich data
210
+ "AddComment",
211
+ "Attachment",
212
+ "AttachmentDownload",
213
+ "AttachmentUpload",
214
+ "AttachmentUploader",
215
+ "Comment",
216
+ "CommentAuthor",
217
+ "CommentPage",
218
+ "CreateAttachment",
219
+ "CreatedAttachment",
220
+ "SetTaskContext",
221
+ "TaskContext",
222
+ # workers
223
+ "PatchWorker",
224
+ "UpsertWorker",
225
+ "WorkerAvailability",
226
+ "WorkerDetail",
227
+ "WorkerList",
228
+ "WorkerQueue",
229
+ # skills
230
+ "PatchSkill",
231
+ "Skill",
232
+ "UpsertSkill",
233
+ "WorkerSkill",
234
+ "WorkerSkillAssignment",
235
+ # worker suggestion
236
+ "RequiredSkill",
237
+ "SuggestWorkers",
238
+ "SuggestWorkersResult",
239
+ "SuggestedWorker",
240
+ # decisions
241
+ "Decision",
242
+ "DecisionCandidate",
243
+ "ListDecisionsQuery",
244
+ # workflows
245
+ "WorkflowDefinition",
246
+ "WorkflowDefinitionInput",
247
+ "WorkflowDefinitionSummary",
248
+ "WorkflowRouting",
249
+ "WorkflowStep",
250
+ # workflow runs
251
+ "ListRunsQuery",
252
+ "ParallelBranch",
253
+ "StartRun",
254
+ "WorkflowRun",
255
+ "WorkflowRunHistoryEntry",
256
+ "WorkflowRunPage",
257
+ "WorkflowRunStep",
258
+ "WorkflowRunSteps",
259
+ # learning
260
+ "LearnedWeightsPreview",
261
+ "LearningFeedbackItem",
262
+ "LearningFeedbackResult",
263
+ "LearningStats",
264
+ "LearningStatus",
265
+ "PreviewedWorkerWeights",
266
+ "WorkerLearningSkillStat",
267
+ "WorkerLearningStats",
268
+ # notifications
269
+ "CreateNotificationChannel",
270
+ "CreateNotificationSequence",
271
+ "NotificationChannel",
272
+ "NotificationSequence",
273
+ "NotificationSequenceStep",
274
+ "UpdateNotificationChannel",
275
+ "UpdateNotificationSequence",
276
+ # stats
277
+ "MatchingPolicy",
278
+ "QueueStats",
279
+ "QuotaInfo",
280
+ "StatsTimeseriesBucket",
281
+ "StatsTimeseriesResult",
282
+ "StatsWindowQuery",
283
+ "WorkerLoad",
284
+ "WorkerProductivity",
285
+ "WorkerStatsResult",
286
+ "WorkspaceStats",
287
+ # presence & breaks
288
+ "TeamPresence",
289
+ "TeamPresenceCounts",
290
+ "TeamPresenceMember",
291
+ "WorkerBreak",
292
+ "WorkerBreakMetric",
293
+ "WorkspaceBreakMetrics",
294
+ # worker portal plane
295
+ "WorkerBreakEnded",
296
+ "WorkerBreakStarted",
297
+ "WorkerBreakToday",
298
+ "WorkerLogin",
299
+ "WorkerMetricsToday",
300
+ "WorkerSessionToken",
301
+ "WorkerTaskDetail",
302
+ # added surface: bulk/check, teams, join links, identities, SLA & queue audit,
303
+ # worker self-service, push
304
+ "AcceptWorkerInvite",
305
+ "AcceptWorkerInviteResult",
306
+ "BulkTaskError",
307
+ "BulkTaskReport",
308
+ "BulkTaskResult",
309
+ "CLEAR",
310
+ "ChangePin",
311
+ "CreateJoinLink",
312
+ "CreateJoinLinkResult",
313
+ "CreateWorkerIdentity",
314
+ "InviteWorkerIdentity",
315
+ "JoinLink",
316
+ "JoinWorkspace",
317
+ "JoinWorkspaceResult",
318
+ "PatchTeam",
319
+ "PublicWorkerIdentity",
320
+ "PushConfig",
321
+ "PushSubscription",
322
+ "PushSubscriptionInput",
323
+ "QueueAuditEntry",
324
+ "QueueAuditQuery",
325
+ "QueueAuditReport",
326
+ "QueueAuditSweepBacklog",
327
+ "RevertedWeights",
328
+ "SlaStats",
329
+ "TaskCheckIssue",
330
+ "TaskCheckReport",
331
+ "TaskEscalation",
332
+ "TaskList",
333
+ "Team",
334
+ "TeamMember",
335
+ "TeamMembers",
336
+ "TeamRoster",
337
+ "UnparkTask",
338
+ "UpdateWorkerIdentity",
339
+ "UpsertTeam",
340
+ "WorkerAvailabilityState",
341
+ "WorkerDevice",
342
+ "WorkerDeviceInput",
343
+ "WorkerIdentityResult",
344
+ "WorkerInviteResult",
345
+ "WorkerLocation",
346
+ "WorkerLocationResult",
347
+ "WorkerMe",
348
+ "WorkerMetricsWindow",
349
+ "WorkerMetricsWindowDay",
350
+ "WorkerPortalLink",
351
+ "WorkerSkillLevel",
352
+ "WorkerSkillSet",
353
+ # supervisor plane
354
+ "AcceptSupervisorInvite",
355
+ "SupervisorAssignResult",
356
+ "SupervisorAvailabilityResult",
357
+ "SupervisorCounts",
358
+ "SupervisorCrewMember",
359
+ "SupervisorEntry",
360
+ "SupervisorIdentity",
361
+ "SupervisorMe",
362
+ "SupervisorOverview",
363
+ "SupervisorParkedTask",
364
+ "SupervisorSession",
365
+ "AsyncFivexerSupervisor",
366
+ "FivexerSupervisor",
367
+ "__version__",
368
+ ]