@axivoy/api 2.52.0 → 2.53.0
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/generated/schema.d.ts +272 -0
- package/package.json +1 -1
|
@@ -20481,6 +20481,62 @@ export interface webhooks {
|
|
|
20481
20481
|
patch?: never;
|
|
20482
20482
|
trace?: never;
|
|
20483
20483
|
};
|
|
20484
|
+
"employment.ended": {
|
|
20485
|
+
parameters: {
|
|
20486
|
+
query?: never;
|
|
20487
|
+
header?: never;
|
|
20488
|
+
path?: never;
|
|
20489
|
+
cookie?: never;
|
|
20490
|
+
};
|
|
20491
|
+
get?: never;
|
|
20492
|
+
put?: never;
|
|
20493
|
+
/**
|
|
20494
|
+
* Employment ended
|
|
20495
|
+
* @description A person's employment period was closed with their last day worked; their sign-in ends at the end of that day or when the office chose.
|
|
20496
|
+
*
|
|
20497
|
+
* Version 1. Delivered at least once; dedupe by `id`.
|
|
20498
|
+
*
|
|
20499
|
+
* Read the current record with `users.list` using `fetch.input`.
|
|
20500
|
+
*
|
|
20501
|
+
* Subscriptions can filter on: `user_id` (Person), `is_driver` (Driver).
|
|
20502
|
+
*
|
|
20503
|
+
* Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
|
|
20504
|
+
*/
|
|
20505
|
+
post: operations["events.employment.ended"];
|
|
20506
|
+
delete?: never;
|
|
20507
|
+
options?: never;
|
|
20508
|
+
head?: never;
|
|
20509
|
+
patch?: never;
|
|
20510
|
+
trace?: never;
|
|
20511
|
+
};
|
|
20512
|
+
"employment.started": {
|
|
20513
|
+
parameters: {
|
|
20514
|
+
query?: never;
|
|
20515
|
+
header?: never;
|
|
20516
|
+
path?: never;
|
|
20517
|
+
cookie?: never;
|
|
20518
|
+
};
|
|
20519
|
+
get?: never;
|
|
20520
|
+
put?: never;
|
|
20521
|
+
/**
|
|
20522
|
+
* Hired or rehired
|
|
20523
|
+
* @description A person started working here: a hire, a rehire, or an undone termination that reopened their latest employment period.
|
|
20524
|
+
*
|
|
20525
|
+
* Version 1. Delivered at least once; dedupe by `id`.
|
|
20526
|
+
*
|
|
20527
|
+
* Read the current record with `users.list` using `fetch.input`.
|
|
20528
|
+
*
|
|
20529
|
+
* Subscriptions can filter on: `user_id` (Person), `kind` (Kind), `is_driver` (Driver).
|
|
20530
|
+
*
|
|
20531
|
+
* Verify `Axivoy-Signature` before trusting the body; answer 2xx within 10 seconds. Failed tries retry at 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours; replay any delivery from the last 30 days with `webhooks.deliveries.replay`.
|
|
20532
|
+
*/
|
|
20533
|
+
post: operations["events.employment.started"];
|
|
20534
|
+
delete?: never;
|
|
20535
|
+
options?: never;
|
|
20536
|
+
head?: never;
|
|
20537
|
+
patch?: never;
|
|
20538
|
+
trace?: never;
|
|
20539
|
+
};
|
|
20484
20540
|
"fleet.acquisition.started": {
|
|
20485
20541
|
parameters: {
|
|
20486
20542
|
query?: never;
|
|
@@ -171672,6 +171728,222 @@ export interface operations {
|
|
|
171672
171728
|
};
|
|
171673
171729
|
};
|
|
171674
171730
|
};
|
|
171731
|
+
"events.employment.ended": {
|
|
171732
|
+
parameters: {
|
|
171733
|
+
query?: never;
|
|
171734
|
+
header: {
|
|
171735
|
+
/** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
|
|
171736
|
+
"Axivoy-Signature": string;
|
|
171737
|
+
/** @description Delivery id, the same on every retry of this delivery. */
|
|
171738
|
+
"Axivoy-Webhook-Id": string;
|
|
171739
|
+
/** @description The event `id`; dedupe on it. */
|
|
171740
|
+
"Axivoy-Event-Id": string;
|
|
171741
|
+
/** @description The event key, for example `load.created`. */
|
|
171742
|
+
"Axivoy-Event-Type": string;
|
|
171743
|
+
/** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
|
|
171744
|
+
"Axivoy-Test"?: string;
|
|
171745
|
+
};
|
|
171746
|
+
path?: never;
|
|
171747
|
+
cookie?: never;
|
|
171748
|
+
};
|
|
171749
|
+
requestBody: {
|
|
171750
|
+
content: {
|
|
171751
|
+
/**
|
|
171752
|
+
* @example {
|
|
171753
|
+
* "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
|
|
171754
|
+
* "type": "employment.ended",
|
|
171755
|
+
* "version": 1,
|
|
171756
|
+
* "occurred_at": "2026-10-01T15:04:05Z",
|
|
171757
|
+
* "effective_at": "2026-10-01T15:04:05Z",
|
|
171758
|
+
* "tenant": 1,
|
|
171759
|
+
* "subject": {
|
|
171760
|
+
* "type": "user",
|
|
171761
|
+
* "id": 10
|
|
171762
|
+
* },
|
|
171763
|
+
* "sequence": 2,
|
|
171764
|
+
* "facts": {
|
|
171765
|
+
* "user_id": 10,
|
|
171766
|
+
* "is_driver": false,
|
|
171767
|
+
* "period_id": 1,
|
|
171768
|
+
* "termination_date": "2026-11-06",
|
|
171769
|
+
* "sign_in_ends_at": "2026-11-07T00:00:00Z"
|
|
171770
|
+
* },
|
|
171771
|
+
* "causation": {
|
|
171772
|
+
* "invocation_id": null,
|
|
171773
|
+
* "event_id": null,
|
|
171774
|
+
* "subscription_id": null
|
|
171775
|
+
* },
|
|
171776
|
+
* "chain_depth": 0,
|
|
171777
|
+
* "fetch": {
|
|
171778
|
+
* "operation": "users.list",
|
|
171779
|
+
* "input": []
|
|
171780
|
+
* }
|
|
171781
|
+
* }
|
|
171782
|
+
*/
|
|
171783
|
+
"application/json": {
|
|
171784
|
+
/** @description Event id; the same on every delivery of this event. */
|
|
171785
|
+
id: string;
|
|
171786
|
+
/** @constant */
|
|
171787
|
+
type: "employment.ended";
|
|
171788
|
+
/** @constant */
|
|
171789
|
+
version: 1;
|
|
171790
|
+
/** Format: date-time */
|
|
171791
|
+
occurred_at: string;
|
|
171792
|
+
/**
|
|
171793
|
+
* Format: date-time
|
|
171794
|
+
* @description When it counts operationally; differs from `occurred_at` for back-dated facts.
|
|
171795
|
+
*/
|
|
171796
|
+
effective_at: string;
|
|
171797
|
+
/** @description Workspace id. */
|
|
171798
|
+
tenant: number;
|
|
171799
|
+
subject: {
|
|
171800
|
+
type: string;
|
|
171801
|
+
id: number | string;
|
|
171802
|
+
};
|
|
171803
|
+
/** @description Increases per subject; apply events for one subject in this order. */
|
|
171804
|
+
sequence: number;
|
|
171805
|
+
facts: {
|
|
171806
|
+
user_id: number;
|
|
171807
|
+
is_driver: boolean;
|
|
171808
|
+
period_id: number;
|
|
171809
|
+
/** Format: date */
|
|
171810
|
+
termination_date: string;
|
|
171811
|
+
/** Format: date-time */
|
|
171812
|
+
sign_in_ends_at: string;
|
|
171813
|
+
};
|
|
171814
|
+
causation: {
|
|
171815
|
+
invocation_id?: string | null;
|
|
171816
|
+
event_id?: string | null;
|
|
171817
|
+
subscription_id?: number | null;
|
|
171818
|
+
};
|
|
171819
|
+
chain_depth: number;
|
|
171820
|
+
fetch: {
|
|
171821
|
+
operation?: string;
|
|
171822
|
+
input?: Record<string, never>;
|
|
171823
|
+
} | null;
|
|
171824
|
+
/** @description Present and `true` only on test sends. */
|
|
171825
|
+
test?: boolean;
|
|
171826
|
+
};
|
|
171827
|
+
};
|
|
171828
|
+
};
|
|
171829
|
+
responses: {
|
|
171830
|
+
/** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
|
|
171831
|
+
"2XX": {
|
|
171832
|
+
headers: {
|
|
171833
|
+
[name: string]: unknown;
|
|
171834
|
+
};
|
|
171835
|
+
content?: never;
|
|
171836
|
+
};
|
|
171837
|
+
};
|
|
171838
|
+
};
|
|
171839
|
+
"events.employment.started": {
|
|
171840
|
+
parameters: {
|
|
171841
|
+
query?: never;
|
|
171842
|
+
header: {
|
|
171843
|
+
/** @description `t=<unix seconds>,v1=<hex>`: HMAC-SHA256 of `{t}.{raw body}` with the endpoint secret. For 24 hours after a secret rotation a second `v1=` signed with the old secret follows. Compare in constant time and reject a `t` older than 300 seconds. */
|
|
171844
|
+
"Axivoy-Signature": string;
|
|
171845
|
+
/** @description Delivery id, the same on every retry of this delivery. */
|
|
171846
|
+
"Axivoy-Webhook-Id": string;
|
|
171847
|
+
/** @description The event `id`; dedupe on it. */
|
|
171848
|
+
"Axivoy-Event-Id": string;
|
|
171849
|
+
/** @description The event key, for example `load.created`. */
|
|
171850
|
+
"Axivoy-Event-Type": string;
|
|
171851
|
+
/** @description `true` on test sends from Settings, which also carry `"test": true` in the body. */
|
|
171852
|
+
"Axivoy-Test"?: string;
|
|
171853
|
+
};
|
|
171854
|
+
path?: never;
|
|
171855
|
+
cookie?: never;
|
|
171856
|
+
};
|
|
171857
|
+
requestBody: {
|
|
171858
|
+
content: {
|
|
171859
|
+
/**
|
|
171860
|
+
* @example {
|
|
171861
|
+
* "id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
|
|
171862
|
+
* "type": "employment.started",
|
|
171863
|
+
* "version": 1,
|
|
171864
|
+
* "occurred_at": "2026-10-01T15:04:05Z",
|
|
171865
|
+
* "effective_at": "2026-10-01T15:04:05Z",
|
|
171866
|
+
* "tenant": 1,
|
|
171867
|
+
* "subject": {
|
|
171868
|
+
* "type": "user",
|
|
171869
|
+
* "id": 10
|
|
171870
|
+
* },
|
|
171871
|
+
* "sequence": 1,
|
|
171872
|
+
* "facts": {
|
|
171873
|
+
* "user_id": 10,
|
|
171874
|
+
* "kind": "hire",
|
|
171875
|
+
* "is_driver": false,
|
|
171876
|
+
* "period_id": 1,
|
|
171877
|
+
* "hire_date": "2026-10-28"
|
|
171878
|
+
* },
|
|
171879
|
+
* "causation": {
|
|
171880
|
+
* "invocation_id": null,
|
|
171881
|
+
* "event_id": null,
|
|
171882
|
+
* "subscription_id": null
|
|
171883
|
+
* },
|
|
171884
|
+
* "chain_depth": 0,
|
|
171885
|
+
* "fetch": {
|
|
171886
|
+
* "operation": "users.list",
|
|
171887
|
+
* "input": []
|
|
171888
|
+
* }
|
|
171889
|
+
* }
|
|
171890
|
+
*/
|
|
171891
|
+
"application/json": {
|
|
171892
|
+
/** @description Event id; the same on every delivery of this event. */
|
|
171893
|
+
id: string;
|
|
171894
|
+
/** @constant */
|
|
171895
|
+
type: "employment.started";
|
|
171896
|
+
/** @constant */
|
|
171897
|
+
version: 1;
|
|
171898
|
+
/** Format: date-time */
|
|
171899
|
+
occurred_at: string;
|
|
171900
|
+
/**
|
|
171901
|
+
* Format: date-time
|
|
171902
|
+
* @description When it counts operationally; differs from `occurred_at` for back-dated facts.
|
|
171903
|
+
*/
|
|
171904
|
+
effective_at: string;
|
|
171905
|
+
/** @description Workspace id. */
|
|
171906
|
+
tenant: number;
|
|
171907
|
+
subject: {
|
|
171908
|
+
type: string;
|
|
171909
|
+
id: number | string;
|
|
171910
|
+
};
|
|
171911
|
+
/** @description Increases per subject; apply events for one subject in this order. */
|
|
171912
|
+
sequence: number;
|
|
171913
|
+
facts: {
|
|
171914
|
+
user_id: number;
|
|
171915
|
+
/** @description hire, rehire or termination_undone. */
|
|
171916
|
+
kind: string;
|
|
171917
|
+
is_driver: boolean;
|
|
171918
|
+
period_id: number;
|
|
171919
|
+
/** Format: date */
|
|
171920
|
+
hire_date: string;
|
|
171921
|
+
};
|
|
171922
|
+
causation: {
|
|
171923
|
+
invocation_id?: string | null;
|
|
171924
|
+
event_id?: string | null;
|
|
171925
|
+
subscription_id?: number | null;
|
|
171926
|
+
};
|
|
171927
|
+
chain_depth: number;
|
|
171928
|
+
fetch: {
|
|
171929
|
+
operation?: string;
|
|
171930
|
+
input?: Record<string, never>;
|
|
171931
|
+
} | null;
|
|
171932
|
+
/** @description Present and `true` only on test sends. */
|
|
171933
|
+
test?: boolean;
|
|
171934
|
+
};
|
|
171935
|
+
};
|
|
171936
|
+
};
|
|
171937
|
+
responses: {
|
|
171938
|
+
/** @description Received. Any other answer, a redirect or no answer within 10 seconds fails the try. */
|
|
171939
|
+
"2XX": {
|
|
171940
|
+
headers: {
|
|
171941
|
+
[name: string]: unknown;
|
|
171942
|
+
};
|
|
171943
|
+
content?: never;
|
|
171944
|
+
};
|
|
171945
|
+
};
|
|
171946
|
+
};
|
|
171675
171947
|
"events.fleet.acquisition.started": {
|
|
171676
171948
|
parameters: {
|
|
171677
171949
|
query?: never;
|