@go-avro/avro-js 1.6.5 → 1.6.6-rc2

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.
Files changed (72) hide show
  1. package/dist/client/QueryClient.d.ts +122 -63
  2. package/dist/client/QueryClient.js +151 -26
  3. package/dist/client/core/xhr.js +2 -1
  4. package/dist/client/hooks/audit.js +4 -2
  5. package/dist/client/hooks/avro.js +6 -2
  6. package/dist/client/hooks/bills.d.ts +1 -1
  7. package/dist/client/hooks/bills.js +26 -13
  8. package/dist/client/hooks/catalog_items.js +4 -1
  9. package/dist/client/hooks/chats.js +33 -1
  10. package/dist/client/hooks/companies.js +38 -4
  11. package/dist/client/hooks/events.js +13 -9
  12. package/dist/client/hooks/jobs.js +29 -3
  13. package/dist/client/hooks/messages.js +6 -2
  14. package/dist/client/hooks/plans.js +1 -1
  15. package/dist/client/hooks/routes.js +55 -5
  16. package/dist/client/hooks/sessions.js +39 -11
  17. package/dist/client/hooks/skills.js +1 -1
  18. package/dist/client/hooks/teams.js +1 -1
  19. package/dist/client/hooks/timecards.js +2 -1
  20. package/dist/client/hooks/users.js +8 -3
  21. package/dist/client/realtime.d.ts +13 -0
  22. package/dist/client/realtime.js +30 -5
  23. package/dist/client/requests.d.ts +470 -0
  24. package/dist/client/requests.js +5 -0
  25. package/dist/client/wire.d.ts +7 -0
  26. package/dist/client/wire.js +14 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/types/api/AdditionalCharge.d.ts +2 -1
  29. package/dist/types/api/Avro.d.ts +33 -28
  30. package/dist/types/api/Bill.d.ts +7 -5
  31. package/dist/types/api/BillPayment.d.ts +8 -4
  32. package/dist/types/api/BillUser.d.ts +3 -2
  33. package/dist/types/api/CatalogItem.d.ts +9 -6
  34. package/dist/types/api/Chat.d.ts +3 -5
  35. package/dist/types/api/Company.d.ts +39 -13
  36. package/dist/types/api/DelayEvent.d.ts +5 -2
  37. package/dist/types/api/Device.d.ts +5 -4
  38. package/dist/types/api/Email.d.ts +14 -3
  39. package/dist/types/api/Friendship.d.ts +8 -0
  40. package/dist/types/api/Group.d.ts +3 -2
  41. package/dist/types/api/Job.d.ts +55 -5
  42. package/dist/types/api/LineItem.d.ts +3 -2
  43. package/dist/types/api/MemberState.d.ts +2 -1
  44. package/dist/types/api/Message.d.ts +4 -3
  45. package/dist/types/api/Notification.d.ts +26 -0
  46. package/dist/types/api/PaymentMethod.d.ts +7 -2
  47. package/dist/types/api/PaymentOption.d.ts +6 -4
  48. package/dist/types/api/Payout.d.ts +1 -1
  49. package/dist/types/api/Plan.d.ts +5 -4
  50. package/dist/types/api/PlanPayment.d.ts +5 -3
  51. package/dist/types/api/Prepayment.d.ts +2 -1
  52. package/dist/types/api/Reaction.d.ts +3 -3
  53. package/dist/types/api/Refund.d.ts +1 -1
  54. package/dist/types/api/Route.d.ts +11 -10
  55. package/dist/types/api/Route.js +5 -0
  56. package/dist/types/api/RouteJob.d.ts +1 -1
  57. package/dist/types/api/ServiceMonth.d.ts +2 -2
  58. package/dist/types/api/Session.d.ts +5 -2
  59. package/dist/types/api/Skill.d.ts +2 -2
  60. package/dist/types/api/Subscription.d.ts +5 -3
  61. package/dist/types/api/Task.d.ts +10 -9
  62. package/dist/types/api/Task.js +3 -1
  63. package/dist/types/api/TimecardAction.d.ts +2 -2
  64. package/dist/types/api/User.d.ts +11 -9
  65. package/dist/types/api/UserCompanyAssociation.d.ts +7 -1
  66. package/dist/types/api/UserMerge.d.ts +3 -3
  67. package/dist/types/api/_Event.d.ts +20 -4
  68. package/dist/types/api/_Event.js +1 -0
  69. package/dist/types/api.d.ts +156 -39
  70. package/dist/version.d.ts +1 -1
  71. package/dist/version.js +1 -1
  72. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { Socket } from 'socket.io-client';
2
2
  import { InfiniteData, QueryClient, UseInfiniteQueryResult, useMutation, UseQueryResult } from '@tanstack/react-query';
3
3
  import { AuthManager } from '../auth/AuthManager.js';
4
- import { _Event, ActiveSessionSummary, AddressFeatureCollection, ApiInfo, Avro, StorageAnalytics, ClientErrorReport, ErrorLogEntry, PerformanceMetrics, AuditLogEntry, AuditQueryParams, Bill, BillInsightData, BillLineItemStatusUpdate, BillStatus, Break, Chat, CheckIn, Company, DelayEventCreatePayload, EventUpdatePayload, LineItemType, FinancialInsightData, RevenueInsightData, Job, JobUpdate, EventInsightData, AppleLinkProof, AppleLoginResult, LoginResponse, Message, Plan, Route, ServiceMonth, Session, Team, User, UserCompanyAssociation, UserMergeSummary, Skill, Group, Label, RouteScheduleConfig, RouteWritePayload, CatalogItem, Device, DeviceInfo, LocationServicesStatus, Payout, Prepayment, Timecard, TimecardActionType, TimecardStatus } from '../types/api.js';
4
+ import { _Event, ActiveSessionSummary, AddressFeatureCollection, ApiInfo, Avro, StorageAnalytics, ClientErrorReport, ErrorLogEntry, PerformanceMetrics, AuditLogEntry, AuditQueryParams, Bill, BillInsightData, BillLineItemStatusUpdate, BillStatus, Chat, CheckIn, Company, CompanySummary, DelayEventCreatePayload, EventUpdatePayload, LineItemType, FinancialInsightData, RevenueInsightData, Job, JobUpdate, EventInsightData, AppleLinkProof, AppleLoginResult, MicrosoftLoginResult, LoginResponse, Message, Plan, Route, ServiceMonth, Session, Team, User, UserCompanyAssociation, UserMergeSummary, Skill, Group, Label, RouteScheduleConfig, RouteWritePayload, CatalogItem, Device, DeviceInfo, LocationServicesStatus, Payout, Prepayment, Timecard, TimecardActionType, TimecardStatus } from '../types/api.js';
5
5
  import { AuthState, Tokens } from '../types/auth.js';
6
6
  import { CancelToken, ClientId, RetryStrategy } from '../types/client.js';
7
7
  import { StandardError } from '../types/error.js';
@@ -11,6 +11,7 @@ import { Proposal } from '../types/api/Proposal.js';
11
11
  import { ProposalTerms } from '../types/api/ProposalTerms.js';
12
12
  import type { EmailSucceededPayload, EmailFailedPayload, EmailType } from '../types/api/EmailNotification.js';
13
13
  import type { BulkDeleteBillsResponse, BulkEmailBillsResponse } from './hooks/bills.js';
14
+ import type { BillWritePayload, BreakWritePayload, CatalogItemCreatePayload, CatalogItemUpdatePayload, CompanyCreatePayload, CompanyUpdatePayload, EventCreatePayload, IntuitImportResult, MemberAddPayload, MemberUpdatePayload, PayoutStatusFilter, ProposalReviewPayload, ProposalWritePayload, SessionCreatePayload, SessionUpdatePayload, SkillCreatePayload, SkillUpdatePayload, TeamWritePayload, UserCreatePayload, UserUpdatePayload } from './requests.js';
14
15
  import { type QueryPersistOptions } from './persist.js';
15
16
  export interface TrackEmailOptions {
16
17
  emailType?: EmailType;
@@ -34,7 +35,7 @@ export interface AvroQueryClientConfig {
34
35
  }
35
36
  declare module './QueryClient.js' {
36
37
  interface AvroQueryClient {
37
- _xhr<T>(method: string, path: string, body: any, cancelToken?: CancelToken, headers?: Record<string, string>, isIdempotent?: boolean, retryCount?: number, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<T>;
38
+ _xhr<T>(method: string, path: string, body: any, cancelToken?: CancelToken, headers?: Record<string, string>, isIdempotent?: boolean, retryCount?: number, progressUpdateCallback?: (loaded: number, total: number) => void, refreshOnUnauthorized?: boolean): Promise<T>;
38
39
  _fetch<T>(method: string, path: string, body: any, cancelToken?: CancelToken, headers?: Record<string, string>, isIdempotent?: boolean, retryCount?: number): Promise<T>;
39
40
  getDelay(strategy: RetryStrategy, attempt: number): number;
40
41
  sleep(ms: number): Promise<void>;
@@ -146,7 +147,7 @@ declare module './QueryClient.js' {
146
147
  useGetPayouts(body: {
147
148
  amt?: number;
148
149
  query?: string;
149
- status?: string;
150
+ status?: PayoutStatusFilter | '';
150
151
  known_ids?: string[];
151
152
  unknown_ids?: string[];
152
153
  created_from?: number;
@@ -178,14 +179,15 @@ declare module './QueryClient.js' {
178
179
  offset?: number;
179
180
  }, total: number, onProgress?: (fraction: number) => void): UseQueryResult<Group[], StandardError>;
180
181
  useGetPlans(code: string): UseQueryResult<Plan[], StandardError>;
181
- useGetCompanies(options?: {}): UseQueryResult<Company[], StandardError>;
182
+ useGetCompanies(options?: {}): UseQueryResult<CompanySummary[], StandardError>;
182
183
  generatePDFFromBackend({ billId }: {
183
184
  billId: string;
184
185
  }): Promise<Blob>;
185
186
  sendBillingEmail(options: {
186
187
  billId: string;
187
188
  subject?: string;
188
- recipients?: string[][];
189
+ /** `[name, email]` pairs; omitted: the bill's own recipients. */
190
+ recipients?: [string, string][];
189
191
  request_id?: string;
190
192
  }): Promise<{
191
193
  msg: string;
@@ -193,10 +195,12 @@ declare module './QueryClient.js' {
193
195
  useGetProposal(proposal_id: string): UseQueryResult<Proposal, StandardError>;
194
196
  useGetProposalTerms(): UseQueryResult<ProposalTerms[], StandardError>;
195
197
  useCreateProposalTerms(): ReturnType<typeof useMutation<{
198
+ msg: string;
196
199
  id: string;
197
200
  }, StandardError, {
198
201
  name: string;
199
202
  body: string;
203
+ archived?: boolean;
200
204
  }>>;
201
205
  useUpdateProposalTerms(): ReturnType<typeof useMutation<{
202
206
  msg: string;
@@ -285,14 +289,17 @@ declare module './QueryClient.js' {
285
289
  useReviewProposal(proposal_id: string): ReturnType<typeof useMutation<{
286
290
  msg: string;
287
291
  bill_id?: string;
292
+ }, StandardError, ProposalReviewPayload>>;
293
+ useCreateChat(): ReturnType<typeof useMutation<{
294
+ msg?: string;
295
+ id: string;
288
296
  }, StandardError, {
289
- tasks: {
290
- id: string;
291
- status: string;
292
- payment_option_id: string;
293
- }[];
294
- terms_version_id?: string;
295
- pay_in_cash?: boolean;
297
+ name: string;
298
+ users: string[];
299
+ message?: {
300
+ content: string;
301
+ time_sent?: number;
302
+ };
296
303
  }>>;
297
304
  useCreateMessage(chatId: string): ReturnType<typeof useMutation<{
298
305
  msg?: string;
@@ -303,36 +310,47 @@ declare module './QueryClient.js' {
303
310
  id?: string;
304
311
  }>>;
305
312
  useCreateProposal(): ReturnType<typeof useMutation<{
313
+ msg: string;
306
314
  id: string;
307
315
  }, StandardError, {
308
316
  job_id: string;
309
- data: Record<string, any>;
317
+ data: ProposalWritePayload;
310
318
  }>>;
311
319
  useCreateGroup(): ReturnType<typeof useMutation<{
320
+ msg: string;
312
321
  id: string;
313
322
  }, StandardError, {
314
- groupData: Partial<Group>;
323
+ groupData: Partial<Group> & {
324
+ name: string;
325
+ };
315
326
  }>>;
316
327
  useCreateWaiver(): ReturnType<typeof useMutation<{
328
+ msg: string;
317
329
  id: string;
318
330
  }, StandardError, {
319
- waiverData: Partial<Waiver>;
331
+ waiverData: Partial<Waiver> & {
332
+ name: string;
333
+ };
320
334
  }>>;
321
335
  useCreateLabel(): ReturnType<typeof useMutation<{
336
+ msg: string;
322
337
  id: string;
323
338
  }, StandardError, {
324
- labelData: Partial<Label>;
339
+ labelData: Partial<Label> & {
340
+ name: string;
341
+ };
325
342
  }>>;
326
343
  useCreateSkill(): ReturnType<typeof useMutation<{
344
+ msg: string;
327
345
  id: string;
328
346
  }, StandardError, {
329
- skillData: Partial<Skill>;
347
+ skillData: SkillCreatePayload;
330
348
  }>>;
331
349
  useCreateEvent(): ReturnType<typeof useMutation<{
332
350
  id: string;
333
351
  msg: string;
334
352
  }, StandardError, {
335
- eventData: Partial<_Event>;
353
+ eventData: EventCreatePayload;
336
354
  }>>;
337
355
  useCreateDelayEvent(): ReturnType<typeof useMutation<{
338
356
  id: string;
@@ -341,9 +359,10 @@ declare module './QueryClient.js' {
341
359
  delayData: DelayEventCreatePayload;
342
360
  }>>;
343
361
  useCreateUserSession(): ReturnType<typeof useMutation<{
344
- id: string;
362
+ msg: string;
363
+ id: string | null;
345
364
  }, StandardError, {
346
- sessionData: Partial<Session>;
365
+ sessionData: SessionCreatePayload;
347
366
  }>>;
348
367
  useCreateTimecard(): ReturnType<typeof useMutation<{
349
368
  msg: string;
@@ -358,65 +377,62 @@ declare module './QueryClient.js' {
358
377
  };
359
378
  }>>;
360
379
  useCreateBill(): ReturnType<typeof useMutation<{
380
+ msg: string;
361
381
  id: string;
362
382
  invoice_id: number;
363
383
  }, StandardError, {
364
- data: Partial<Bill>;
384
+ data: BillWritePayload;
365
385
  }>>;
366
386
  useCreateCompany(): ReturnType<typeof useMutation<{
387
+ msg: string;
367
388
  id: string;
368
389
  }, StandardError, {
369
- companyData: Partial<Company | {
370
- logo: File | null;
371
- }>;
390
+ companyData: CompanyCreatePayload;
372
391
  }>>;
373
392
  useCreateCatalogItem(): ReturnType<typeof useMutation<{
393
+ msg: string;
374
394
  id: string;
375
395
  }, StandardError, {
376
- data: Partial<CatalogItem>;
396
+ data: CatalogItemCreatePayload;
377
397
  }>>;
378
398
  useCreateJob(): ReturnType<typeof useMutation<{
399
+ msg: string;
379
400
  id: string;
380
401
  }, StandardError, {
381
- jobData: Partial<Job>;
402
+ jobData: JobUpdate;
382
403
  }>>;
383
404
  useCreateRoute(): ReturnType<typeof useMutation<{
405
+ msg: string;
384
406
  id: string;
385
407
  }, StandardError, {
386
408
  routeData: RouteWritePayload;
387
409
  }>>;
388
410
  useCreateTeam(): ReturnType<typeof useMutation<{
411
+ msg: string;
389
412
  id: string;
390
413
  }, StandardError, {
391
- teamData: Partial<Team>;
414
+ teamData: TeamWritePayload & {
415
+ name: string;
416
+ };
392
417
  }>>;
393
418
  useCreateSelf(): ReturnType<typeof useMutation<{
394
419
  msg: string;
395
420
  id?: string;
396
421
  access_token?: string;
397
422
  refresh_token?: string;
398
- }, StandardError, Partial<User> & {
399
- code?: string;
400
- invite_token?: string;
401
- password?: string;
402
- company_id?: string;
403
- }>>;
423
+ }, StandardError, UserCreatePayload>>;
404
424
  useCreateUser(): ReturnType<typeof useMutation<{
405
425
  msg: string;
406
426
  id?: string;
407
427
  access_token?: string;
408
428
  refresh_token?: string;
409
- }, StandardError, Partial<User> & {
410
- code?: string;
411
- invite_token?: string;
412
- password?: string;
413
- company_id?: string;
414
- }>>;
429
+ }, StandardError, UserCreatePayload>>;
415
430
  useCreateSessionBreak(): ReturnType<typeof useMutation<{
431
+ msg: string;
416
432
  id: string;
417
433
  }, StandardError, {
418
434
  sessionId: string;
419
- breakData: Partial<Break>;
435
+ breakData: BreakWritePayload;
420
436
  }>>;
421
437
  useManageJobs(): ReturnType<typeof useMutation<void, StandardError, {
422
438
  jobs: JobUpdate[];
@@ -446,7 +462,7 @@ declare module './QueryClient.js' {
446
462
  }>>;
447
463
  useCheckOut(): ReturnType<typeof useMutation<{
448
464
  msg: string;
449
- id: string;
465
+ id: string | null;
450
466
  job_id: string | null;
451
467
  }, StandardError, {
452
468
  checkinId: string;
@@ -458,14 +474,10 @@ declare module './QueryClient.js' {
458
474
  }>;
459
475
  checkOut(checkinId: string): Promise<{
460
476
  msg: string;
461
- id: string;
477
+ id: string | null;
462
478
  job_id: string | null;
463
479
  }>;
464
- useImportBillsFromIntuit(): ReturnType<typeof useMutation<{
465
- msg: string;
466
- imported: number;
467
- skipped: number;
468
- }, StandardError, void>>;
480
+ useImportBillsFromIntuit(): ReturnType<typeof useMutation<IntuitImportResult, StandardError, void>>;
469
481
  useSyncBillToIntuit(): ReturnType<typeof useMutation<{
470
482
  msg: string;
471
483
  }, StandardError, {
@@ -481,7 +493,7 @@ declare module './QueryClient.js' {
481
493
  msg: string;
482
494
  }, StandardError, {
483
495
  sessionId: string;
484
- updates: Partial<Session>;
496
+ updates: SessionUpdatePayload;
485
497
  }>>;
486
498
  useUpdateTimecard(): ReturnType<typeof useMutation<{
487
499
  msg: string;
@@ -518,7 +530,7 @@ declare module './QueryClient.js' {
518
530
  msg: string;
519
531
  }, StandardError, {
520
532
  catalogItemId: string;
521
- data: Partial<CatalogItem>;
533
+ data: CatalogItemUpdatePayload;
522
534
  }>>;
523
535
  useUpdateJob(): ReturnType<typeof useMutation<{
524
536
  msg: string;
@@ -530,13 +542,13 @@ declare module './QueryClient.js' {
530
542
  msg: string;
531
543
  }, StandardError, {
532
544
  skillId: string;
533
- updates: Partial<Skill>;
545
+ updates: SkillUpdatePayload;
534
546
  }>>;
535
547
  useUpdateBill(): ReturnType<typeof useMutation<{
536
548
  msg: string;
537
549
  }, StandardError, {
538
550
  billId: string;
539
- updates: Partial<Bill>;
551
+ updates: BillWritePayload;
540
552
  }>>;
541
553
  useUpdateBillLineItemStatus(): ReturnType<typeof useMutation<{
542
554
  msg: string;
@@ -561,7 +573,7 @@ declare module './QueryClient.js' {
561
573
  msg: string;
562
574
  }, StandardError, {
563
575
  teamId: string;
564
- teamData: Partial<Team>;
576
+ teamData: TeamWritePayload;
565
577
  }>>;
566
578
  useUpdateMonth(): ReturnType<typeof useMutation<{
567
579
  msg: string;
@@ -585,7 +597,7 @@ declare module './QueryClient.js' {
585
597
  msg: string;
586
598
  }, StandardError, {
587
599
  user_id: string;
588
- data: Partial<UserCompanyAssociation>;
600
+ data: MemberUpdatePayload;
589
601
  }>>;
590
602
  useDevices(): UseQueryResult<Device[], StandardError>;
591
603
  useGetCompanyUsers(body?: {
@@ -610,13 +622,13 @@ declare module './QueryClient.js' {
610
622
  msg: string;
611
623
  }, StandardError, {
612
624
  breakId: string;
613
- updates: Partial<Break>;
625
+ updates: BreakWritePayload;
614
626
  }>>;
615
627
  useUpdateCompanySession(): ReturnType<typeof useMutation<{
616
628
  msg: string;
617
629
  }, StandardError, {
618
630
  sessionId: string;
619
- updates: Partial<Session>;
631
+ updates: SessionUpdatePayload;
620
632
  companyId?: string;
621
633
  }>>;
622
634
  useDeleteCompanySession(): ReturnType<typeof useMutation<{
@@ -627,7 +639,7 @@ declare module './QueryClient.js' {
627
639
  }>>;
628
640
  useUpdateUser(userId: string): ReturnType<typeof useMutation<{
629
641
  msg: string;
630
- }, StandardError, Partial<User>>>;
642
+ }, StandardError, UserUpdatePayload>>;
631
643
  useDeleteJobs(): ReturnType<typeof useMutation<{
632
644
  msg: string;
633
645
  }, StandardError, {
@@ -642,15 +654,21 @@ declare module './QueryClient.js' {
642
654
  msg: string;
643
655
  }, StandardError, {
644
656
  companyId: string;
645
- companyData: Partial<Company | {
646
- logo: File | null;
647
- }>;
657
+ companyData: CompanyUpdatePayload;
648
658
  }>>;
649
659
  useCreateUserCompany(): ReturnType<typeof useMutation<{
650
660
  id: string;
651
661
  }, StandardError, {
652
662
  user_id: string;
653
- data: Partial<UserCompanyAssociation>;
663
+ data: MemberAddPayload;
664
+ }>>;
665
+ useAddUserCompany(): ReturnType<typeof useMutation<{
666
+ msg: string;
667
+ id: string;
668
+ }, StandardError, {
669
+ userId: string;
670
+ groupId?: string;
671
+ companyId?: string;
654
672
  }>>;
655
673
  useRemoveUserCompany(): ReturnType<typeof useMutation<{
656
674
  msg: string;
@@ -798,7 +816,7 @@ export declare class AvroQueryClient {
798
816
  * Fire-and-forget: never throws, so it is safe inside error handlers.
799
817
  */
800
818
  reportClientError(report: ClientErrorReport): Promise<void>;
801
- post<T>({ path, data, cancelToken, headers, progressUpdateCallback, maxRetries, idempotent, }: {
819
+ post<T>({ path, data, cancelToken, headers, progressUpdateCallback, maxRetries, idempotent, refreshOnUnauthorized, }: {
802
820
  path: string;
803
821
  data?: any;
804
822
  cancelToken?: CancelToken;
@@ -811,6 +829,12 @@ export declare class AvroQueryClient {
811
829
  * reached the server is never replayed.
812
830
  */
813
831
  idempotent?: boolean;
832
+ /**
833
+ * Refresh the session and replay once on a 401 (default true).
834
+ * Turn off for requests whose 401 is an answer, not an expired
835
+ * token, and that can't be replayed (one-time handles).
836
+ */
837
+ refreshOnUnauthorized?: boolean;
814
838
  }): Promise<T>;
815
839
  put<T>({ path, data, cancelToken, headers, progressUpdateCallback, }: {
816
840
  path: string;
@@ -891,6 +915,37 @@ export declare class AvroQueryClient {
891
915
  useAppleUnlink(): ReturnType<typeof useMutation<{
892
916
  msg: string;
893
917
  }, StandardError, void>>;
918
+ /**
919
+ * Sign in with a Microsoft authorization code (`code` + the `uri` it was
920
+ * issued for). With no account for the identity yet this resolves
921
+ * `NEEDS_ACCOUNT` (rather than failing) carrying the handle for
922
+ * `useMicrosoftLink`. A 401 means the matching account is linked to
923
+ * another Microsoft identity.
924
+ */
925
+ useMicrosoftLogin(): ReturnType<typeof useMutation<MicrosoftLoginResult, StandardError, {
926
+ code: string;
927
+ uri: string;
928
+ cancelToken?: CancelToken;
929
+ }>>;
930
+ /**
931
+ * Finish a `NEEDS_ACCOUNT` Microsoft sign-in with its `microsoft_token`
932
+ * once the account exists, then sign in with the returned tokens.
933
+ *
934
+ * When the 404 carried an `email`, the handle signs in to the account
935
+ * with that address and no session is needed. When `email` was null,
936
+ * the identity is linked to the account this client is signed in to:
937
+ * sign in to the new account first (e.g. `loginSuccess` with the tokens
938
+ * `POST /user` returned, or a code login when it answered
939
+ * `TOTP required`); the request carries the current session's token.
940
+ * 401s: `Sign in to link this Microsoft account` (no session; the
941
+ * handle stays valid for a retry within 10 min), `This Microsoft
942
+ * account is linked to another account`, `This account is linked to
943
+ * another Microsoft account`. 400: the handle is invalid or expired.
944
+ */
945
+ useMicrosoftLink(): ReturnType<typeof useMutation<LoginResponse, StandardError, {
946
+ microsoftToken: string;
947
+ cancelToken?: CancelToken;
948
+ }>>;
894
949
  setTokens(tokens: Tokens): Promise<void>;
895
950
  setCache(data: Partial<CacheData> | Object): Promise<void>;
896
951
  getCache(key?: keyof CacheData | string): Promise<CacheData[keyof CacheData] | Object | string | null>;
@@ -995,9 +1050,12 @@ export declare class AvroQueryClient {
995
1050
  billed?: boolean;
996
1051
  paid?: boolean;
997
1052
  job_id?: string | null;
1053
+ task_id?: string | null;
998
1054
  sort_by?: 'date' | 'amount' | 'name';
999
1055
  direction?: 'asc' | 'desc';
1000
1056
  line_item_types?: LineItemType[];
1057
+ created_from?: number;
1058
+ created_to?: number;
1001
1059
  }, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
1002
1060
  fetchMonths(body?: {
1003
1061
  amt?: number;
@@ -1034,7 +1092,7 @@ export declare class AvroQueryClient {
1034
1092
  fetchPayouts(body?: {
1035
1093
  amt?: number;
1036
1094
  query?: string;
1037
- status?: string;
1095
+ status?: PayoutStatusFilter | '';
1038
1096
  known_ids?: string[];
1039
1097
  unknown_ids?: string[];
1040
1098
  offset?: number;
@@ -1104,7 +1162,8 @@ export declare class AvroQueryClient {
1104
1162
  sendEmail(emailId: string, formData: FormData, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<void>;
1105
1163
  sendBillEmail(billId: string, body?: {
1106
1164
  subject?: string;
1107
- recipients?: string[][];
1165
+ /** `[name, email]` pairs; omitted: the bill's own recipients. */
1166
+ recipients?: [string, string][];
1108
1167
  base_url?: string;
1109
1168
  request_id?: string;
1110
1169
  }): Promise<void>;