@go-avro/avro-js 1.6.4-rc2 → 1.6.4-rc4

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 (70) hide show
  1. package/dist/client/QueryClient.d.ts +105 -65
  2. package/dist/client/QueryClient.js +144 -24
  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/companies.js +20 -4
  10. package/dist/client/hooks/events.js +13 -9
  11. package/dist/client/hooks/jobs.js +29 -3
  12. package/dist/client/hooks/messages.js +6 -2
  13. package/dist/client/hooks/plans.js +1 -1
  14. package/dist/client/hooks/routes.js +55 -5
  15. package/dist/client/hooks/sessions.js +37 -9
  16. package/dist/client/hooks/skills.js +1 -1
  17. package/dist/client/hooks/teams.js +1 -1
  18. package/dist/client/hooks/timecards.js +2 -1
  19. package/dist/client/hooks/users.js +8 -3
  20. package/dist/client/realtime.js +8 -3
  21. package/dist/client/requests.d.ts +470 -0
  22. package/dist/client/requests.js +5 -0
  23. package/dist/client/wire.d.ts +7 -0
  24. package/dist/client/wire.js +14 -0
  25. package/dist/index.d.ts +1 -0
  26. package/dist/types/api/AdditionalCharge.d.ts +2 -1
  27. package/dist/types/api/Avro.d.ts +33 -28
  28. package/dist/types/api/Bill.d.ts +7 -5
  29. package/dist/types/api/BillPayment.d.ts +8 -4
  30. package/dist/types/api/BillUser.d.ts +3 -2
  31. package/dist/types/api/CatalogItem.d.ts +9 -6
  32. package/dist/types/api/Chat.d.ts +3 -5
  33. package/dist/types/api/Company.d.ts +39 -13
  34. package/dist/types/api/DelayEvent.d.ts +5 -2
  35. package/dist/types/api/Device.d.ts +5 -4
  36. package/dist/types/api/Email.d.ts +14 -3
  37. package/dist/types/api/Friendship.d.ts +8 -0
  38. package/dist/types/api/Group.d.ts +3 -2
  39. package/dist/types/api/Job.d.ts +55 -5
  40. package/dist/types/api/LineItem.d.ts +3 -2
  41. package/dist/types/api/MemberState.d.ts +2 -1
  42. package/dist/types/api/Message.d.ts +4 -3
  43. package/dist/types/api/Notification.d.ts +26 -0
  44. package/dist/types/api/PaymentMethod.d.ts +7 -2
  45. package/dist/types/api/PaymentOption.d.ts +6 -4
  46. package/dist/types/api/Payout.d.ts +1 -1
  47. package/dist/types/api/Plan.d.ts +5 -4
  48. package/dist/types/api/PlanPayment.d.ts +5 -3
  49. package/dist/types/api/Prepayment.d.ts +2 -1
  50. package/dist/types/api/Reaction.d.ts +3 -3
  51. package/dist/types/api/Refund.d.ts +1 -1
  52. package/dist/types/api/Route.d.ts +11 -10
  53. package/dist/types/api/Route.js +5 -0
  54. package/dist/types/api/RouteJob.d.ts +1 -1
  55. package/dist/types/api/ServiceMonth.d.ts +2 -2
  56. package/dist/types/api/Session.d.ts +5 -2
  57. package/dist/types/api/Skill.d.ts +2 -2
  58. package/dist/types/api/Subscription.d.ts +5 -3
  59. package/dist/types/api/Task.d.ts +10 -9
  60. package/dist/types/api/Task.js +3 -1
  61. package/dist/types/api/TimecardAction.d.ts +2 -2
  62. package/dist/types/api/User.d.ts +11 -9
  63. package/dist/types/api/UserCompanyAssociation.d.ts +7 -1
  64. package/dist/types/api/UserMerge.d.ts +3 -3
  65. package/dist/types/api/_Event.d.ts +20 -4
  66. package/dist/types/api/_Event.js +1 -0
  67. package/dist/types/api.d.ts +156 -39
  68. package/dist/version.d.ts +1 -1
  69. package/dist/version.js +1 -1
  70. 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,15 +289,7 @@ declare module './QueryClient.js' {
285
289
  useReviewProposal(proposal_id: string): ReturnType<typeof useMutation<{
286
290
  msg: string;
287
291
  bill_id?: string;
288
- }, 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;
296
- }>>;
292
+ }, StandardError, ProposalReviewPayload>>;
297
293
  useCreateMessage(chatId: string): ReturnType<typeof useMutation<{
298
294
  msg?: string;
299
295
  id: string;
@@ -303,36 +299,47 @@ declare module './QueryClient.js' {
303
299
  id?: string;
304
300
  }>>;
305
301
  useCreateProposal(): ReturnType<typeof useMutation<{
302
+ msg: string;
306
303
  id: string;
307
304
  }, StandardError, {
308
305
  job_id: string;
309
- data: Record<string, any>;
306
+ data: ProposalWritePayload;
310
307
  }>>;
311
308
  useCreateGroup(): ReturnType<typeof useMutation<{
309
+ msg: string;
312
310
  id: string;
313
311
  }, StandardError, {
314
- groupData: Partial<Group>;
312
+ groupData: Partial<Group> & {
313
+ name: string;
314
+ };
315
315
  }>>;
316
316
  useCreateWaiver(): ReturnType<typeof useMutation<{
317
+ msg: string;
317
318
  id: string;
318
319
  }, StandardError, {
319
- waiverData: Partial<Waiver>;
320
+ waiverData: Partial<Waiver> & {
321
+ name: string;
322
+ };
320
323
  }>>;
321
324
  useCreateLabel(): ReturnType<typeof useMutation<{
325
+ msg: string;
322
326
  id: string;
323
327
  }, StandardError, {
324
- labelData: Partial<Label>;
328
+ labelData: Partial<Label> & {
329
+ name: string;
330
+ };
325
331
  }>>;
326
332
  useCreateSkill(): ReturnType<typeof useMutation<{
333
+ msg: string;
327
334
  id: string;
328
335
  }, StandardError, {
329
- skillData: Partial<Skill>;
336
+ skillData: SkillCreatePayload;
330
337
  }>>;
331
338
  useCreateEvent(): ReturnType<typeof useMutation<{
332
339
  id: string;
333
340
  msg: string;
334
341
  }, StandardError, {
335
- eventData: Partial<_Event>;
342
+ eventData: EventCreatePayload;
336
343
  }>>;
337
344
  useCreateDelayEvent(): ReturnType<typeof useMutation<{
338
345
  id: string;
@@ -341,9 +348,10 @@ declare module './QueryClient.js' {
341
348
  delayData: DelayEventCreatePayload;
342
349
  }>>;
343
350
  useCreateUserSession(): ReturnType<typeof useMutation<{
344
- id: string;
351
+ msg: string;
352
+ id: string | null;
345
353
  }, StandardError, {
346
- sessionData: Partial<Session>;
354
+ sessionData: SessionCreatePayload;
347
355
  }>>;
348
356
  useCreateTimecard(): ReturnType<typeof useMutation<{
349
357
  msg: string;
@@ -358,65 +366,62 @@ declare module './QueryClient.js' {
358
366
  };
359
367
  }>>;
360
368
  useCreateBill(): ReturnType<typeof useMutation<{
369
+ msg: string;
361
370
  id: string;
362
371
  invoice_id: number;
363
372
  }, StandardError, {
364
- data: Partial<Bill>;
373
+ data: BillWritePayload;
365
374
  }>>;
366
375
  useCreateCompany(): ReturnType<typeof useMutation<{
376
+ msg: string;
367
377
  id: string;
368
378
  }, StandardError, {
369
- companyData: Partial<Company | {
370
- logo: File | null;
371
- }>;
379
+ companyData: CompanyCreatePayload;
372
380
  }>>;
373
381
  useCreateCatalogItem(): ReturnType<typeof useMutation<{
382
+ msg: string;
374
383
  id: string;
375
384
  }, StandardError, {
376
- data: Partial<CatalogItem>;
385
+ data: CatalogItemCreatePayload;
377
386
  }>>;
378
387
  useCreateJob(): ReturnType<typeof useMutation<{
388
+ msg: string;
379
389
  id: string;
380
390
  }, StandardError, {
381
- jobData: Partial<Job>;
391
+ jobData: JobUpdate;
382
392
  }>>;
383
393
  useCreateRoute(): ReturnType<typeof useMutation<{
394
+ msg: string;
384
395
  id: string;
385
396
  }, StandardError, {
386
397
  routeData: RouteWritePayload;
387
398
  }>>;
388
399
  useCreateTeam(): ReturnType<typeof useMutation<{
400
+ msg: string;
389
401
  id: string;
390
402
  }, StandardError, {
391
- teamData: Partial<Team>;
403
+ teamData: TeamWritePayload & {
404
+ name: string;
405
+ };
392
406
  }>>;
393
407
  useCreateSelf(): ReturnType<typeof useMutation<{
394
408
  msg: string;
395
409
  id?: string;
396
410
  access_token?: string;
397
411
  refresh_token?: string;
398
- }, StandardError, Partial<User> & {
399
- code?: string;
400
- invite_token?: string;
401
- password?: string;
402
- company_id?: string;
403
- }>>;
412
+ }, StandardError, UserCreatePayload>>;
404
413
  useCreateUser(): ReturnType<typeof useMutation<{
405
414
  msg: string;
406
415
  id?: string;
407
416
  access_token?: string;
408
417
  refresh_token?: string;
409
- }, StandardError, Partial<User> & {
410
- code?: string;
411
- invite_token?: string;
412
- password?: string;
413
- company_id?: string;
414
- }>>;
418
+ }, StandardError, UserCreatePayload>>;
415
419
  useCreateSessionBreak(): ReturnType<typeof useMutation<{
420
+ msg: string;
416
421
  id: string;
417
422
  }, StandardError, {
418
423
  sessionId: string;
419
- breakData: Partial<Break>;
424
+ breakData: BreakWritePayload;
420
425
  }>>;
421
426
  useManageJobs(): ReturnType<typeof useMutation<void, StandardError, {
422
427
  jobs: JobUpdate[];
@@ -446,7 +451,7 @@ declare module './QueryClient.js' {
446
451
  }>>;
447
452
  useCheckOut(): ReturnType<typeof useMutation<{
448
453
  msg: string;
449
- id: string;
454
+ id: string | null;
450
455
  job_id: string | null;
451
456
  }, StandardError, {
452
457
  checkinId: string;
@@ -458,14 +463,10 @@ declare module './QueryClient.js' {
458
463
  }>;
459
464
  checkOut(checkinId: string): Promise<{
460
465
  msg: string;
461
- id: string;
466
+ id: string | null;
462
467
  job_id: string | null;
463
468
  }>;
464
- useImportBillsFromIntuit(): ReturnType<typeof useMutation<{
465
- msg: string;
466
- imported: number;
467
- skipped: number;
468
- }, StandardError, void>>;
469
+ useImportBillsFromIntuit(): ReturnType<typeof useMutation<IntuitImportResult, StandardError, void>>;
469
470
  useSyncBillToIntuit(): ReturnType<typeof useMutation<{
470
471
  msg: string;
471
472
  }, StandardError, {
@@ -481,7 +482,7 @@ declare module './QueryClient.js' {
481
482
  msg: string;
482
483
  }, StandardError, {
483
484
  sessionId: string;
484
- updates: Partial<Session>;
485
+ updates: SessionUpdatePayload;
485
486
  }>>;
486
487
  useUpdateTimecard(): ReturnType<typeof useMutation<{
487
488
  msg: string;
@@ -518,7 +519,7 @@ declare module './QueryClient.js' {
518
519
  msg: string;
519
520
  }, StandardError, {
520
521
  catalogItemId: string;
521
- data: Partial<CatalogItem>;
522
+ data: CatalogItemUpdatePayload;
522
523
  }>>;
523
524
  useUpdateJob(): ReturnType<typeof useMutation<{
524
525
  msg: string;
@@ -530,13 +531,13 @@ declare module './QueryClient.js' {
530
531
  msg: string;
531
532
  }, StandardError, {
532
533
  skillId: string;
533
- updates: Partial<Skill>;
534
+ updates: SkillUpdatePayload;
534
535
  }>>;
535
536
  useUpdateBill(): ReturnType<typeof useMutation<{
536
537
  msg: string;
537
538
  }, StandardError, {
538
539
  billId: string;
539
- updates: Partial<Bill>;
540
+ updates: BillWritePayload;
540
541
  }>>;
541
542
  useUpdateBillLineItemStatus(): ReturnType<typeof useMutation<{
542
543
  msg: string;
@@ -561,7 +562,7 @@ declare module './QueryClient.js' {
561
562
  msg: string;
562
563
  }, StandardError, {
563
564
  teamId: string;
564
- teamData: Partial<Team>;
565
+ teamData: TeamWritePayload;
565
566
  }>>;
566
567
  useUpdateMonth(): ReturnType<typeof useMutation<{
567
568
  msg: string;
@@ -585,7 +586,7 @@ declare module './QueryClient.js' {
585
586
  msg: string;
586
587
  }, StandardError, {
587
588
  user_id: string;
588
- data: Partial<UserCompanyAssociation>;
589
+ data: MemberUpdatePayload;
589
590
  }>>;
590
591
  useDevices(): UseQueryResult<Device[], StandardError>;
591
592
  useGetCompanyUsers(body?: {
@@ -610,13 +611,13 @@ declare module './QueryClient.js' {
610
611
  msg: string;
611
612
  }, StandardError, {
612
613
  breakId: string;
613
- updates: Partial<Break>;
614
+ updates: BreakWritePayload;
614
615
  }>>;
615
616
  useUpdateCompanySession(): ReturnType<typeof useMutation<{
616
617
  msg: string;
617
618
  }, StandardError, {
618
619
  sessionId: string;
619
- updates: Partial<Session>;
620
+ updates: SessionUpdatePayload;
620
621
  companyId?: string;
621
622
  }>>;
622
623
  useDeleteCompanySession(): ReturnType<typeof useMutation<{
@@ -627,7 +628,7 @@ declare module './QueryClient.js' {
627
628
  }>>;
628
629
  useUpdateUser(userId: string): ReturnType<typeof useMutation<{
629
630
  msg: string;
630
- }, StandardError, Partial<User>>>;
631
+ }, StandardError, UserUpdatePayload>>;
631
632
  useDeleteJobs(): ReturnType<typeof useMutation<{
632
633
  msg: string;
633
634
  }, StandardError, {
@@ -642,15 +643,13 @@ declare module './QueryClient.js' {
642
643
  msg: string;
643
644
  }, StandardError, {
644
645
  companyId: string;
645
- companyData: Partial<Company | {
646
- logo: File | null;
647
- }>;
646
+ companyData: CompanyUpdatePayload;
648
647
  }>>;
649
648
  useCreateUserCompany(): ReturnType<typeof useMutation<{
650
649
  id: string;
651
650
  }, StandardError, {
652
651
  user_id: string;
653
- data: Partial<UserCompanyAssociation>;
652
+ data: MemberAddPayload;
654
653
  }>>;
655
654
  useAddUserCompany(): ReturnType<typeof useMutation<{
656
655
  msg: string;
@@ -806,7 +805,7 @@ export declare class AvroQueryClient {
806
805
  * Fire-and-forget: never throws, so it is safe inside error handlers.
807
806
  */
808
807
  reportClientError(report: ClientErrorReport): Promise<void>;
809
- post<T>({ path, data, cancelToken, headers, progressUpdateCallback, maxRetries, idempotent, }: {
808
+ post<T>({ path, data, cancelToken, headers, progressUpdateCallback, maxRetries, idempotent, refreshOnUnauthorized, }: {
810
809
  path: string;
811
810
  data?: any;
812
811
  cancelToken?: CancelToken;
@@ -819,6 +818,12 @@ export declare class AvroQueryClient {
819
818
  * reached the server is never replayed.
820
819
  */
821
820
  idempotent?: boolean;
821
+ /**
822
+ * Refresh the session and replay once on a 401 (default true).
823
+ * Turn off for requests whose 401 is an answer, not an expired
824
+ * token, and that can't be replayed (one-time handles).
825
+ */
826
+ refreshOnUnauthorized?: boolean;
822
827
  }): Promise<T>;
823
828
  put<T>({ path, data, cancelToken, headers, progressUpdateCallback, }: {
824
829
  path: string;
@@ -899,6 +904,37 @@ export declare class AvroQueryClient {
899
904
  useAppleUnlink(): ReturnType<typeof useMutation<{
900
905
  msg: string;
901
906
  }, StandardError, void>>;
907
+ /**
908
+ * Sign in with a Microsoft authorization code (`code` + the `uri` it was
909
+ * issued for). With no account for the identity yet this resolves
910
+ * `NEEDS_ACCOUNT` (rather than failing) carrying the handle for
911
+ * `useMicrosoftLink`. A 401 means the matching account is linked to
912
+ * another Microsoft identity.
913
+ */
914
+ useMicrosoftLogin(): ReturnType<typeof useMutation<MicrosoftLoginResult, StandardError, {
915
+ code: string;
916
+ uri: string;
917
+ cancelToken?: CancelToken;
918
+ }>>;
919
+ /**
920
+ * Finish a `NEEDS_ACCOUNT` Microsoft sign-in with its `microsoft_token`
921
+ * once the account exists, then sign in with the returned tokens.
922
+ *
923
+ * When the 404 carried an `email`, the handle signs in to the account
924
+ * with that address and no session is needed. When `email` was null,
925
+ * the identity is linked to the account this client is signed in to:
926
+ * sign in to the new account first (e.g. `loginSuccess` with the tokens
927
+ * `POST /user` returned, or a code login when it answered
928
+ * `TOTP required`); the request carries the current session's token.
929
+ * 401s: `Sign in to link this Microsoft account` (no session; the
930
+ * handle stays valid for a retry within 10 min), `This Microsoft
931
+ * account is linked to another account`, `This account is linked to
932
+ * another Microsoft account`. 400: the handle is invalid or expired.
933
+ */
934
+ useMicrosoftLink(): ReturnType<typeof useMutation<LoginResponse, StandardError, {
935
+ microsoftToken: string;
936
+ cancelToken?: CancelToken;
937
+ }>>;
902
938
  setTokens(tokens: Tokens): Promise<void>;
903
939
  setCache(data: Partial<CacheData> | Object): Promise<void>;
904
940
  getCache(key?: keyof CacheData | string): Promise<CacheData[keyof CacheData] | Object | string | null>;
@@ -1003,9 +1039,12 @@ export declare class AvroQueryClient {
1003
1039
  billed?: boolean;
1004
1040
  paid?: boolean;
1005
1041
  job_id?: string | null;
1042
+ task_id?: string | null;
1006
1043
  sort_by?: 'date' | 'amount' | 'name';
1007
1044
  direction?: 'asc' | 'desc';
1008
1045
  line_item_types?: LineItemType[];
1046
+ created_from?: number;
1047
+ created_to?: number;
1009
1048
  }, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
1010
1049
  fetchMonths(body?: {
1011
1050
  amt?: number;
@@ -1042,7 +1081,7 @@ export declare class AvroQueryClient {
1042
1081
  fetchPayouts(body?: {
1043
1082
  amt?: number;
1044
1083
  query?: string;
1045
- status?: string;
1084
+ status?: PayoutStatusFilter | '';
1046
1085
  known_ids?: string[];
1047
1086
  unknown_ids?: string[];
1048
1087
  offset?: number;
@@ -1112,7 +1151,8 @@ export declare class AvroQueryClient {
1112
1151
  sendEmail(emailId: string, formData: FormData, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<void>;
1113
1152
  sendBillEmail(billId: string, body?: {
1114
1153
  subject?: string;
1115
- recipients?: string[][];
1154
+ /** `[name, email]` pairs; omitted: the bill's own recipients. */
1155
+ recipients?: [string, string][];
1116
1156
  base_url?: string;
1117
1157
  request_id?: string;
1118
1158
  }): Promise<void>;