@linebundle-sdk/ts 0.1.58 → 0.2.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/esm/index.d.ts +1850 -222
- package/esm/index.js +671 -480
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var jsonBodySerializer = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// src/generated/core/serverSentEvents.gen.ts
|
|
17
|
-
|
|
17
|
+
function createSseClient({
|
|
18
18
|
onRequest,
|
|
19
19
|
onSseError,
|
|
20
20
|
onSseEvent,
|
|
@@ -26,7 +26,7 @@ var createSseClient = ({
|
|
|
26
26
|
sseSleepFn,
|
|
27
27
|
url,
|
|
28
28
|
...options
|
|
29
|
-
})
|
|
29
|
+
}) {
|
|
30
30
|
let lastEventId;
|
|
31
31
|
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
32
32
|
const createStream = async function* () {
|
|
@@ -70,7 +70,7 @@ var createSseClient = ({
|
|
|
70
70
|
const { done, value } = await reader.read();
|
|
71
71
|
if (done) break;
|
|
72
72
|
buffer += value;
|
|
73
|
-
buffer = buffer.replace(/\r\n
|
|
73
|
+
buffer = buffer.replace(/\r\n?/g, "\n");
|
|
74
74
|
const chunks = buffer.split("\n\n");
|
|
75
75
|
buffer = chunks.pop() ?? "";
|
|
76
76
|
for (const chunk of chunks) {
|
|
@@ -138,7 +138,7 @@ var createSseClient = ({
|
|
|
138
138
|
};
|
|
139
139
|
const stream = createStream();
|
|
140
140
|
return { stream };
|
|
141
|
-
}
|
|
141
|
+
}
|
|
142
142
|
|
|
143
143
|
// src/generated/core/pathSerializer.gen.ts
|
|
144
144
|
var separatorArrayExplode = (style) => {
|
|
@@ -455,11 +455,8 @@ var checkForExistence = (options, name) => {
|
|
|
455
455
|
}
|
|
456
456
|
return false;
|
|
457
457
|
};
|
|
458
|
-
|
|
459
|
-
security
|
|
460
|
-
...options
|
|
461
|
-
}) => {
|
|
462
|
-
for (const auth of security) {
|
|
458
|
+
async function setAuthParams(options) {
|
|
459
|
+
for (const auth of options.security ?? []) {
|
|
463
460
|
if (checkForExistence(options, auth.name)) {
|
|
464
461
|
continue;
|
|
465
462
|
}
|
|
@@ -484,7 +481,7 @@ var setAuthParams = async ({
|
|
|
484
481
|
break;
|
|
485
482
|
}
|
|
486
483
|
}
|
|
487
|
-
}
|
|
484
|
+
}
|
|
488
485
|
var buildUrl = (options) => getUrl({
|
|
489
486
|
baseUrl: options.baseUrl,
|
|
490
487
|
path: options.path,
|
|
@@ -612,10 +609,7 @@ var createClient = (config = {}) => {
|
|
|
612
609
|
serializedBody: void 0
|
|
613
610
|
};
|
|
614
611
|
if (opts.security) {
|
|
615
|
-
await setAuthParams(
|
|
616
|
-
...opts,
|
|
617
|
-
security: opts.security
|
|
618
|
-
});
|
|
612
|
+
await setAuthParams(opts);
|
|
619
613
|
}
|
|
620
614
|
if (opts.requestValidator) {
|
|
621
615
|
await opts.requestValidator(opts);
|
|
@@ -631,127 +625,116 @@ var createClient = (config = {}) => {
|
|
|
631
625
|
return { opts: resolvedOpts, url };
|
|
632
626
|
};
|
|
633
627
|
const request = async (options) => {
|
|
634
|
-
const
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
...opts,
|
|
638
|
-
body: getValidRequestBody(opts)
|
|
639
|
-
};
|
|
640
|
-
let request2 = new Request(url, requestInit);
|
|
641
|
-
for (const fn of interceptors.request.fns) {
|
|
642
|
-
if (fn) {
|
|
643
|
-
request2 = await fn(request2, opts);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
const _fetch = opts.fetch;
|
|
628
|
+
const throwOnError = options.throwOnError ?? _config.throwOnError;
|
|
629
|
+
const responseStyle = options.responseStyle ?? _config.responseStyle;
|
|
630
|
+
let request2;
|
|
647
631
|
let response;
|
|
648
632
|
try {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
633
|
+
const { opts, url } = await beforeRequest(options);
|
|
634
|
+
const requestInit = {
|
|
635
|
+
redirect: "follow",
|
|
636
|
+
...opts,
|
|
637
|
+
body: getValidRequestBody(opts)
|
|
638
|
+
};
|
|
639
|
+
request2 = new Request(url, requestInit);
|
|
640
|
+
for (const fn of interceptors.request.fns) {
|
|
653
641
|
if (fn) {
|
|
654
|
-
|
|
642
|
+
request2 = await fn(request2, opts);
|
|
655
643
|
}
|
|
656
644
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
645
|
+
const _fetch = opts.fetch;
|
|
646
|
+
response = await _fetch(request2);
|
|
647
|
+
for (const fn of interceptors.response.fns) {
|
|
648
|
+
if (fn) {
|
|
649
|
+
response = await fn(response, request2, opts);
|
|
650
|
+
}
|
|
660
651
|
}
|
|
661
|
-
|
|
662
|
-
error: finalError2,
|
|
652
|
+
const result = {
|
|
663
653
|
request: request2,
|
|
664
|
-
response
|
|
654
|
+
response
|
|
665
655
|
};
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
656
|
+
if (response.ok) {
|
|
657
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
658
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
659
|
+
let emptyData;
|
|
660
|
+
switch (parseAs) {
|
|
661
|
+
case "arrayBuffer":
|
|
662
|
+
case "blob":
|
|
663
|
+
case "text":
|
|
664
|
+
emptyData = await response[parseAs]();
|
|
665
|
+
break;
|
|
666
|
+
case "formData":
|
|
667
|
+
emptyData = new FormData();
|
|
668
|
+
break;
|
|
669
|
+
case "stream":
|
|
670
|
+
emptyData = response.body;
|
|
671
|
+
break;
|
|
672
|
+
case "json":
|
|
673
|
+
default:
|
|
674
|
+
emptyData = {};
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
678
|
+
data: emptyData,
|
|
679
|
+
...result
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
let data;
|
|
680
683
|
switch (parseAs) {
|
|
681
684
|
case "arrayBuffer":
|
|
682
685
|
case "blob":
|
|
686
|
+
case "formData":
|
|
683
687
|
case "text":
|
|
684
|
-
|
|
688
|
+
data = await response[parseAs]();
|
|
685
689
|
break;
|
|
686
|
-
case "
|
|
687
|
-
|
|
690
|
+
case "json": {
|
|
691
|
+
const text = await response.text();
|
|
692
|
+
data = text ? JSON.parse(text) : {};
|
|
688
693
|
break;
|
|
694
|
+
}
|
|
689
695
|
case "stream":
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
+
return opts.responseStyle === "data" ? response.body : {
|
|
697
|
+
data: response.body,
|
|
698
|
+
...result
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
if (parseAs === "json") {
|
|
702
|
+
if (opts.responseValidator) {
|
|
703
|
+
await opts.responseValidator(data);
|
|
704
|
+
}
|
|
705
|
+
if (opts.responseTransformer) {
|
|
706
|
+
data = await opts.responseTransformer(data);
|
|
707
|
+
}
|
|
696
708
|
}
|
|
697
|
-
return opts.responseStyle === "data" ?
|
|
698
|
-
data
|
|
709
|
+
return opts.responseStyle === "data" ? data : {
|
|
710
|
+
data,
|
|
699
711
|
...result
|
|
700
712
|
};
|
|
701
713
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
case "text":
|
|
708
|
-
data = await response[parseAs]();
|
|
709
|
-
break;
|
|
710
|
-
case "json": {
|
|
711
|
-
const text = await response.text();
|
|
712
|
-
data = text ? JSON.parse(text) : {};
|
|
713
|
-
break;
|
|
714
|
-
}
|
|
715
|
-
case "stream":
|
|
716
|
-
return opts.responseStyle === "data" ? response.body : {
|
|
717
|
-
data: response.body,
|
|
718
|
-
...result
|
|
719
|
-
};
|
|
714
|
+
const textError = await response.text();
|
|
715
|
+
let jsonError;
|
|
716
|
+
try {
|
|
717
|
+
jsonError = JSON.parse(textError);
|
|
718
|
+
} catch {
|
|
720
719
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
if (
|
|
726
|
-
|
|
720
|
+
throw jsonError ?? textError;
|
|
721
|
+
} catch (error) {
|
|
722
|
+
let finalError = error;
|
|
723
|
+
for (const fn of interceptors.error.fns) {
|
|
724
|
+
if (fn) {
|
|
725
|
+
finalError = await fn(finalError, response, request2, options);
|
|
727
726
|
}
|
|
728
727
|
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
const textError = await response.text();
|
|
735
|
-
let jsonError;
|
|
736
|
-
try {
|
|
737
|
-
jsonError = JSON.parse(textError);
|
|
738
|
-
} catch {
|
|
739
|
-
}
|
|
740
|
-
const error = jsonError ?? textError;
|
|
741
|
-
let finalError = error;
|
|
742
|
-
for (const fn of interceptors.error.fns) {
|
|
743
|
-
if (fn) {
|
|
744
|
-
finalError = await fn(error, response, request2, opts);
|
|
728
|
+
finalError = finalError || {};
|
|
729
|
+
if (throwOnError) {
|
|
730
|
+
throw finalError;
|
|
745
731
|
}
|
|
732
|
+
return responseStyle === "data" ? void 0 : {
|
|
733
|
+
error: finalError,
|
|
734
|
+
request: request2,
|
|
735
|
+
response
|
|
736
|
+
};
|
|
746
737
|
}
|
|
747
|
-
finalError = finalError || {};
|
|
748
|
-
if (opts.throwOnError) {
|
|
749
|
-
throw finalError;
|
|
750
|
-
}
|
|
751
|
-
return opts.responseStyle === "data" ? void 0 : {
|
|
752
|
-
error: finalError,
|
|
753
|
-
...result
|
|
754
|
-
};
|
|
755
738
|
};
|
|
756
739
|
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
757
740
|
const makeSseFn = (method) => async (options) => {
|
|
@@ -759,7 +742,6 @@ var createClient = (config = {}) => {
|
|
|
759
742
|
return createSseClient({
|
|
760
743
|
...opts,
|
|
761
744
|
body: opts.body,
|
|
762
|
-
headers: opts.headers,
|
|
763
745
|
method,
|
|
764
746
|
onRequest: async (url2, init) => {
|
|
765
747
|
let request2 = new Request(url2, init);
|
|
@@ -895,60 +877,25 @@ var Announcements = class extends HeyApiClient {
|
|
|
895
877
|
});
|
|
896
878
|
}
|
|
897
879
|
/**
|
|
898
|
-
*
|
|
880
|
+
* Upload announcement cover image (multipart/form-data, field: file)
|
|
899
881
|
*/
|
|
900
|
-
|
|
901
|
-
return (options.client ?? this.client).
|
|
902
|
-
|
|
882
|
+
uploadCover(options) {
|
|
883
|
+
return (options.client ?? this.client).put({
|
|
884
|
+
bodySerializer: null,
|
|
885
|
+
url: "/api/v1/announcements/{id}/cover",
|
|
903
886
|
...options,
|
|
904
887
|
headers: {
|
|
905
|
-
"Content-Type": "application/
|
|
888
|
+
"Content-Type": "application/octet-stream",
|
|
906
889
|
...options.headers
|
|
907
890
|
}
|
|
908
891
|
});
|
|
909
892
|
}
|
|
910
|
-
};
|
|
911
|
-
var Audit = class extends HeyApiClient {
|
|
912
|
-
/**
|
|
913
|
-
* List audit log entries for the organisation
|
|
914
|
-
*/
|
|
915
|
-
list(options) {
|
|
916
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/audit-logs", ...options });
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
var Auth = class extends HeyApiClient {
|
|
920
|
-
/**
|
|
921
|
-
* Get the authenticated caller's identity and permissions
|
|
922
|
-
*/
|
|
923
|
-
context(options) {
|
|
924
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/auth/context", ...options });
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
* Get the authenticated caller's identity and permissions
|
|
928
|
-
*/
|
|
929
|
-
me(options) {
|
|
930
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/auth/me", ...options });
|
|
931
|
-
}
|
|
932
|
-
};
|
|
933
|
-
var Automation = class extends HeyApiClient {
|
|
934
|
-
/**
|
|
935
|
-
* List available native automation action types
|
|
936
|
-
*/
|
|
937
|
-
listActions(options) {
|
|
938
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/automation/actions", ...options });
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* List automation rules
|
|
942
|
-
*/
|
|
943
|
-
listRules(options) {
|
|
944
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/automation/rules", ...options });
|
|
945
|
-
}
|
|
946
893
|
/**
|
|
947
|
-
*
|
|
894
|
+
* Publish an announcement (queues email delivery)
|
|
948
895
|
*/
|
|
949
|
-
|
|
896
|
+
publish(options) {
|
|
950
897
|
return (options.client ?? this.client).post({
|
|
951
|
-
url: "/api/v1/
|
|
898
|
+
url: "/api/v1/announcements/{id}/publish",
|
|
952
899
|
...options,
|
|
953
900
|
headers: {
|
|
954
901
|
"Content-Type": "application/json",
|
|
@@ -956,24 +903,28 @@ var Automation = class extends HeyApiClient {
|
|
|
956
903
|
}
|
|
957
904
|
});
|
|
958
905
|
}
|
|
906
|
+
};
|
|
907
|
+
var Attachments = class extends HeyApiClient {
|
|
959
908
|
/**
|
|
960
|
-
*
|
|
909
|
+
* Remove an attachment
|
|
961
910
|
*/
|
|
962
|
-
|
|
963
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/
|
|
911
|
+
remove(options) {
|
|
912
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/attachments/{id}", ...options });
|
|
964
913
|
}
|
|
965
914
|
/**
|
|
966
|
-
*
|
|
915
|
+
* List attachments on an event
|
|
967
916
|
*/
|
|
968
|
-
|
|
969
|
-
return (options.client ?? this.client).get({ url: "/api/v1/
|
|
917
|
+
list(options) {
|
|
918
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{event_id}/attachments", ...options });
|
|
970
919
|
}
|
|
971
920
|
/**
|
|
972
|
-
*
|
|
921
|
+
* Attach a file / reference to an event
|
|
922
|
+
*
|
|
923
|
+
* Attaches a kind+ref to an event. Kind is validated against the parent template's AllowedAttachmentKinds (e.g. announcement accepts 'image'; delivery accepts 'image', 'document', and 'proof_of_delivery').
|
|
973
924
|
*/
|
|
974
|
-
|
|
975
|
-
return (options.client ?? this.client).
|
|
976
|
-
url: "/api/v1/
|
|
925
|
+
add(options) {
|
|
926
|
+
return (options.client ?? this.client).post({
|
|
927
|
+
url: "/api/v1/events/{event_id}/attachments",
|
|
977
928
|
...options,
|
|
978
929
|
headers: {
|
|
979
930
|
"Content-Type": "application/json",
|
|
@@ -981,38 +932,40 @@ var Automation = class extends HeyApiClient {
|
|
|
981
932
|
}
|
|
982
933
|
});
|
|
983
934
|
}
|
|
935
|
+
};
|
|
936
|
+
var Templates = class extends HeyApiClient {
|
|
984
937
|
/**
|
|
985
|
-
*
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
return (options.client ?? this.client).post({ url: "/api/v1/automation/rules/{id}/execute", ...options });
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* List execution history for a rule
|
|
938
|
+
* List all registered event templates
|
|
939
|
+
*
|
|
940
|
+
* Returns the full catalog so the studio (or any SDK consumer) can render template-aware UI dynamically. AI callers: start here to discover what kinds of events you can create — each entry includes the metadata JSON Schema you must satisfy when POSTing to /api/v1/events.
|
|
992
941
|
*/
|
|
993
|
-
|
|
994
|
-
return (options
|
|
942
|
+
list(options) {
|
|
943
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/event-templates", ...options });
|
|
995
944
|
}
|
|
996
945
|
/**
|
|
997
|
-
*
|
|
946
|
+
* Get the latest version of a single event template
|
|
947
|
+
*
|
|
948
|
+
* Returns the full descriptor for one template: schema, state machine, required attendee functions, allowed attachment kinds, notification policy.
|
|
998
949
|
*/
|
|
999
|
-
|
|
1000
|
-
return (options
|
|
950
|
+
get(options) {
|
|
951
|
+
return (options.client ?? this.client).get({ url: "/api/v1/event-templates/{id}", ...options });
|
|
1001
952
|
}
|
|
1002
953
|
};
|
|
1003
|
-
var
|
|
954
|
+
var Activity = class extends HeyApiClient {
|
|
1004
955
|
/**
|
|
1005
|
-
* List
|
|
956
|
+
* List activity for an event
|
|
957
|
+
*
|
|
958
|
+
* Returns the append-only activity log: state transitions, attachments added, edits. AI callers: poll this to learn how a delivery has progressed.
|
|
1006
959
|
*/
|
|
1007
960
|
list(options) {
|
|
1008
|
-
return (options
|
|
961
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{event_id}/activity", ...options });
|
|
1009
962
|
}
|
|
1010
963
|
/**
|
|
1011
|
-
*
|
|
964
|
+
* Append an activity row
|
|
1012
965
|
*/
|
|
1013
|
-
|
|
966
|
+
append(options) {
|
|
1014
967
|
return (options.client ?? this.client).post({
|
|
1015
|
-
url: "/api/v1/
|
|
968
|
+
url: "/api/v1/events/{event_id}/activity",
|
|
1016
969
|
...options,
|
|
1017
970
|
headers: {
|
|
1018
971
|
"Content-Type": "application/json",
|
|
@@ -1020,12 +973,24 @@ var Bookings = class extends HeyApiClient {
|
|
|
1020
973
|
}
|
|
1021
974
|
});
|
|
1022
975
|
}
|
|
976
|
+
};
|
|
977
|
+
var Events = class extends HeyApiClient {
|
|
1023
978
|
/**
|
|
1024
|
-
*
|
|
979
|
+
* List events
|
|
980
|
+
*
|
|
981
|
+
* Lists events. Filter with `?template=announcement` or `?template_in=delivery&template_in=announcement` to scope by kind.
|
|
1025
982
|
*/
|
|
1026
|
-
|
|
983
|
+
list(options) {
|
|
984
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/events", ...options });
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Create an event
|
|
988
|
+
*
|
|
989
|
+
* Creates an event. Supply `template` to opt into a template's metadata schema (call GET /event-templates first to discover available templates and their JSON Schemas).
|
|
990
|
+
*/
|
|
991
|
+
create(options) {
|
|
1027
992
|
return (options.client ?? this.client).post({
|
|
1028
|
-
url: "/api/v1/
|
|
993
|
+
url: "/api/v1/events",
|
|
1029
994
|
...options,
|
|
1030
995
|
headers: {
|
|
1031
996
|
"Content-Type": "application/json",
|
|
@@ -1034,29 +999,23 @@ var Bookings = class extends HeyApiClient {
|
|
|
1034
999
|
});
|
|
1035
1000
|
}
|
|
1036
1001
|
/**
|
|
1037
|
-
*
|
|
1038
|
-
*/
|
|
1039
|
-
placeSchedule(options) {
|
|
1040
|
-
return (options.client ?? this.client).get({ url: "/api/v1/bookings/places/{place_id}/schedule", ...options });
|
|
1041
|
-
}
|
|
1042
|
-
/**
|
|
1043
|
-
* Delete a booking
|
|
1002
|
+
* List events overlapping a date range (calendar view)
|
|
1044
1003
|
*/
|
|
1045
|
-
|
|
1046
|
-
return (options.client ?? this.client).
|
|
1004
|
+
calendar(options) {
|
|
1005
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/calendar", ...options });
|
|
1047
1006
|
}
|
|
1048
1007
|
/**
|
|
1049
|
-
*
|
|
1008
|
+
* List all assignable event manager permissions
|
|
1050
1009
|
*/
|
|
1051
|
-
|
|
1052
|
-
return (options
|
|
1010
|
+
managerPermissions(options) {
|
|
1011
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/events/manager-permissions", ...options });
|
|
1053
1012
|
}
|
|
1054
1013
|
/**
|
|
1055
|
-
*
|
|
1014
|
+
* Accept an event manager invite via token
|
|
1056
1015
|
*/
|
|
1057
|
-
|
|
1058
|
-
return (options.client ?? this.client).
|
|
1059
|
-
url: "/api/v1/
|
|
1016
|
+
acceptManagerInvite(options) {
|
|
1017
|
+
return (options.client ?? this.client).post({
|
|
1018
|
+
url: "/api/v1/events/managers/accept",
|
|
1060
1019
|
...options,
|
|
1061
1020
|
headers: {
|
|
1062
1021
|
"Content-Type": "application/json",
|
|
@@ -1064,20 +1023,20 @@ var Bookings = class extends HeyApiClient {
|
|
|
1064
1023
|
}
|
|
1065
1024
|
});
|
|
1066
1025
|
}
|
|
1067
|
-
};
|
|
1068
|
-
var Contacts = class extends HeyApiClient {
|
|
1069
1026
|
/**
|
|
1070
|
-
* List
|
|
1027
|
+
* List pending event manager invites for the current user
|
|
1071
1028
|
*/
|
|
1072
|
-
|
|
1073
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/
|
|
1029
|
+
listPendingManagerInvites(options) {
|
|
1030
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/events/managers/pending", ...options });
|
|
1074
1031
|
}
|
|
1075
1032
|
/**
|
|
1076
|
-
* Create a
|
|
1033
|
+
* Create an event and optionally a recurring series in one atomic call
|
|
1034
|
+
*
|
|
1035
|
+
* If series.freq is provided the event is converted into the anchor of a new recurring series. On series creation failure the event is rolled back.
|
|
1077
1036
|
*/
|
|
1078
|
-
|
|
1037
|
+
createWithSeries(options) {
|
|
1079
1038
|
return (options.client ?? this.client).post({
|
|
1080
|
-
url: "/api/v1/
|
|
1039
|
+
url: "/api/v1/events/with-series",
|
|
1081
1040
|
...options,
|
|
1082
1041
|
headers: {
|
|
1083
1042
|
"Content-Type": "application/json",
|
|
@@ -1086,29 +1045,25 @@ var Contacts = class extends HeyApiClient {
|
|
|
1086
1045
|
});
|
|
1087
1046
|
}
|
|
1088
1047
|
/**
|
|
1089
|
-
*
|
|
1090
|
-
*/
|
|
1091
|
-
search(options) {
|
|
1092
|
-
return (options?.client ?? this.client).get({ url: "/api/v1/contacts/search", ...options });
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
* Delete a contact
|
|
1048
|
+
* Delete an event
|
|
1096
1049
|
*/
|
|
1097
1050
|
delete(options) {
|
|
1098
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/
|
|
1051
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}", ...options });
|
|
1099
1052
|
}
|
|
1100
1053
|
/**
|
|
1101
|
-
* Get
|
|
1054
|
+
* Get an event
|
|
1102
1055
|
*/
|
|
1103
1056
|
get(options) {
|
|
1104
|
-
return (options.client ?? this.client).get({ url: "/api/v1/
|
|
1057
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}", ...options });
|
|
1105
1058
|
}
|
|
1106
1059
|
/**
|
|
1107
|
-
*
|
|
1060
|
+
* Partial-update an event (merge-patch)
|
|
1061
|
+
*
|
|
1062
|
+
* Updates only the fields present in the request body. Absent fields are left unchanged. Allows individual form sections to auto-save without submitting the full event payload.
|
|
1108
1063
|
*/
|
|
1109
|
-
|
|
1110
|
-
return (options.client ?? this.client).
|
|
1111
|
-
url: "/api/v1/
|
|
1064
|
+
patch(options) {
|
|
1065
|
+
return (options.client ?? this.client).patch({
|
|
1066
|
+
url: "/api/v1/events/{id}",
|
|
1112
1067
|
...options,
|
|
1113
1068
|
headers: {
|
|
1114
1069
|
"Content-Type": "application/json",
|
|
@@ -1117,11 +1072,11 @@ var Contacts = class extends HeyApiClient {
|
|
|
1117
1072
|
});
|
|
1118
1073
|
}
|
|
1119
1074
|
/**
|
|
1120
|
-
*
|
|
1075
|
+
* Update an event
|
|
1121
1076
|
*/
|
|
1122
|
-
|
|
1123
|
-
return (options.client ?? this.client).
|
|
1124
|
-
url: "/api/v1/
|
|
1077
|
+
update(options) {
|
|
1078
|
+
return (options.client ?? this.client).put({
|
|
1079
|
+
url: "/api/v1/events/{id}",
|
|
1125
1080
|
...options,
|
|
1126
1081
|
headers: {
|
|
1127
1082
|
"Content-Type": "application/json",
|
|
@@ -1129,20 +1084,24 @@ var Contacts = class extends HeyApiClient {
|
|
|
1129
1084
|
}
|
|
1130
1085
|
});
|
|
1131
1086
|
}
|
|
1132
|
-
};
|
|
1133
|
-
var Credentials = class extends HeyApiClient {
|
|
1134
1087
|
/**
|
|
1135
|
-
*
|
|
1088
|
+
* Archive an event
|
|
1136
1089
|
*/
|
|
1137
|
-
|
|
1138
|
-
return (options
|
|
1090
|
+
archive(options) {
|
|
1091
|
+
return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/archive", ...options });
|
|
1139
1092
|
}
|
|
1140
1093
|
/**
|
|
1141
|
-
*
|
|
1094
|
+
* List event attendees
|
|
1142
1095
|
*/
|
|
1143
|
-
|
|
1096
|
+
listAttendees(options) {
|
|
1097
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/attendees", ...options });
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Add an attendee to an event
|
|
1101
|
+
*/
|
|
1102
|
+
addAttendee(options) {
|
|
1144
1103
|
return (options.client ?? this.client).post({
|
|
1145
|
-
url: "/api/v1/
|
|
1104
|
+
url: "/api/v1/events/{id}/attendees",
|
|
1146
1105
|
...options,
|
|
1147
1106
|
headers: {
|
|
1148
1107
|
"Content-Type": "application/json",
|
|
@@ -1151,31 +1110,37 @@ var Credentials = class extends HeyApiClient {
|
|
|
1151
1110
|
});
|
|
1152
1111
|
}
|
|
1153
1112
|
/**
|
|
1154
|
-
*
|
|
1113
|
+
* Bulk remove attendees from an event
|
|
1155
1114
|
*/
|
|
1156
|
-
|
|
1157
|
-
return (options.client ?? this.client).delete({
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1115
|
+
bulkRemoveAttendees(options) {
|
|
1116
|
+
return (options.client ?? this.client).delete({
|
|
1117
|
+
url: "/api/v1/events/{id}/attendees/bulk",
|
|
1118
|
+
...options,
|
|
1119
|
+
headers: {
|
|
1120
|
+
"Content-Type": "application/json",
|
|
1121
|
+
...options.headers
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1164
1124
|
}
|
|
1165
|
-
};
|
|
1166
|
-
var Events = class extends HeyApiClient {
|
|
1167
1125
|
/**
|
|
1168
|
-
*
|
|
1126
|
+
* Bulk add attendees to an event
|
|
1169
1127
|
*/
|
|
1170
|
-
|
|
1171
|
-
return (options
|
|
1128
|
+
bulkAddAttendees(options) {
|
|
1129
|
+
return (options.client ?? this.client).post({
|
|
1130
|
+
url: "/api/v1/events/{id}/attendees/bulk",
|
|
1131
|
+
...options,
|
|
1132
|
+
headers: {
|
|
1133
|
+
"Content-Type": "application/json",
|
|
1134
|
+
...options.headers
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1172
1137
|
}
|
|
1173
1138
|
/**
|
|
1174
|
-
*
|
|
1139
|
+
* Bulk update attendee statuses
|
|
1175
1140
|
*/
|
|
1176
|
-
|
|
1177
|
-
return (options.client ?? this.client).
|
|
1178
|
-
url: "/api/v1/events",
|
|
1141
|
+
bulkUpdateAttendeeStatus(options) {
|
|
1142
|
+
return (options.client ?? this.client).patch({
|
|
1143
|
+
url: "/api/v1/events/{id}/attendees/bulk/status",
|
|
1179
1144
|
...options,
|
|
1180
1145
|
headers: {
|
|
1181
1146
|
"Content-Type": "application/json",
|
|
@@ -1184,23 +1149,30 @@ var Events = class extends HeyApiClient {
|
|
|
1184
1149
|
});
|
|
1185
1150
|
}
|
|
1186
1151
|
/**
|
|
1187
|
-
*
|
|
1152
|
+
* Remove an attendee from an event
|
|
1188
1153
|
*/
|
|
1189
|
-
|
|
1190
|
-
return (options.client ?? this.client).
|
|
1154
|
+
removeAttendee(options) {
|
|
1155
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/attendees/{contact_id}", ...options });
|
|
1191
1156
|
}
|
|
1192
1157
|
/**
|
|
1193
|
-
*
|
|
1158
|
+
* Update attendee status
|
|
1194
1159
|
*/
|
|
1195
|
-
|
|
1196
|
-
return (options
|
|
1160
|
+
updateAttendeeStatus(options) {
|
|
1161
|
+
return (options.client ?? this.client).patch({
|
|
1162
|
+
url: "/api/v1/events/{id}/attendees/{contact_id}",
|
|
1163
|
+
...options,
|
|
1164
|
+
headers: {
|
|
1165
|
+
"Content-Type": "application/json",
|
|
1166
|
+
...options.headers
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1197
1169
|
}
|
|
1198
1170
|
/**
|
|
1199
|
-
*
|
|
1171
|
+
* Check in an attendee
|
|
1200
1172
|
*/
|
|
1201
|
-
|
|
1173
|
+
checkInAttendee(options) {
|
|
1202
1174
|
return (options.client ?? this.client).post({
|
|
1203
|
-
url: "/api/v1/events/
|
|
1175
|
+
url: "/api/v1/events/{id}/attendees/{contact_id}/check-in",
|
|
1204
1176
|
...options,
|
|
1205
1177
|
headers: {
|
|
1206
1178
|
"Content-Type": "application/json",
|
|
@@ -1209,19 +1181,17 @@ var Events = class extends HeyApiClient {
|
|
|
1209
1181
|
});
|
|
1210
1182
|
}
|
|
1211
1183
|
/**
|
|
1212
|
-
* List
|
|
1184
|
+
* List automations attached to an event
|
|
1213
1185
|
*/
|
|
1214
|
-
|
|
1215
|
-
return (options
|
|
1186
|
+
listAutomations(options) {
|
|
1187
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations", ...options });
|
|
1216
1188
|
}
|
|
1217
1189
|
/**
|
|
1218
|
-
* Create an
|
|
1219
|
-
*
|
|
1220
|
-
* If series.freq is provided the event is converted into the anchor of a new recurring series. On series creation failure the event is rolled back.
|
|
1190
|
+
* Create an automation attached to an event
|
|
1221
1191
|
*/
|
|
1222
|
-
|
|
1192
|
+
createAutomation(options) {
|
|
1223
1193
|
return (options.client ?? this.client).post({
|
|
1224
|
-
url: "/api/v1/events/
|
|
1194
|
+
url: "/api/v1/events/{id}/automations",
|
|
1225
1195
|
...options,
|
|
1226
1196
|
headers: {
|
|
1227
1197
|
"Content-Type": "application/json",
|
|
@@ -1230,25 +1200,29 @@ var Events = class extends HeyApiClient {
|
|
|
1230
1200
|
});
|
|
1231
1201
|
}
|
|
1232
1202
|
/**
|
|
1233
|
-
*
|
|
1203
|
+
* List event automation templates
|
|
1234
1204
|
*/
|
|
1235
|
-
|
|
1236
|
-
return (options.client ?? this.client).
|
|
1205
|
+
automationTemplates(options) {
|
|
1206
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/templates", ...options });
|
|
1237
1207
|
}
|
|
1238
1208
|
/**
|
|
1239
|
-
*
|
|
1209
|
+
* Delete an event automation
|
|
1240
1210
|
*/
|
|
1241
|
-
|
|
1242
|
-
return (options.client ?? this.client).
|
|
1211
|
+
deleteAutomation(options) {
|
|
1212
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/automations/{rule_id}", ...options });
|
|
1243
1213
|
}
|
|
1244
1214
|
/**
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
* Updates only the fields present in the request body. Absent fields are left unchanged. Allows individual form sections to auto-save without submitting the full event payload.
|
|
1215
|
+
* Get an event automation
|
|
1248
1216
|
*/
|
|
1249
|
-
|
|
1250
|
-
return (options.client ?? this.client).
|
|
1251
|
-
|
|
1217
|
+
getAutomation(options) {
|
|
1218
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/{rule_id}", ...options });
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Update an event automation
|
|
1222
|
+
*/
|
|
1223
|
+
updateAutomation(options) {
|
|
1224
|
+
return (options.client ?? this.client).put({
|
|
1225
|
+
url: "/api/v1/events/{id}/automations/{rule_id}",
|
|
1252
1226
|
...options,
|
|
1253
1227
|
headers: {
|
|
1254
1228
|
"Content-Type": "application/json",
|
|
@@ -1257,36 +1231,55 @@ var Events = class extends HeyApiClient {
|
|
|
1257
1231
|
});
|
|
1258
1232
|
}
|
|
1259
1233
|
/**
|
|
1260
|
-
*
|
|
1234
|
+
* Run an event automation now
|
|
1261
1235
|
*/
|
|
1262
|
-
|
|
1236
|
+
executeAutomation(options) {
|
|
1237
|
+
return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/automations/{rule_id}/execute", ...options });
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* List execution history for an event automation
|
|
1241
|
+
*/
|
|
1242
|
+
listAutomationExecutions(options) {
|
|
1243
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/{rule_id}/executions", ...options });
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Upload event cover image (multipart/form-data, field: file)
|
|
1247
|
+
*/
|
|
1248
|
+
uploadCover(options) {
|
|
1263
1249
|
return (options.client ?? this.client).put({
|
|
1264
|
-
|
|
1250
|
+
bodySerializer: null,
|
|
1251
|
+
url: "/api/v1/events/{id}/cover",
|
|
1265
1252
|
...options,
|
|
1266
1253
|
headers: {
|
|
1267
|
-
"Content-Type": "application/
|
|
1254
|
+
"Content-Type": "application/octet-stream",
|
|
1268
1255
|
...options.headers
|
|
1269
1256
|
}
|
|
1270
1257
|
});
|
|
1271
1258
|
}
|
|
1272
1259
|
/**
|
|
1273
|
-
*
|
|
1260
|
+
* Discard draft, keep published version
|
|
1274
1261
|
*/
|
|
1275
|
-
|
|
1276
|
-
return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/
|
|
1262
|
+
discard(options) {
|
|
1263
|
+
return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/discard", ...options });
|
|
1277
1264
|
}
|
|
1278
1265
|
/**
|
|
1279
|
-
* List event
|
|
1266
|
+
* List documents linked to an event
|
|
1280
1267
|
*/
|
|
1281
|
-
|
|
1282
|
-
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/
|
|
1268
|
+
listDocuments(options) {
|
|
1269
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/documents", ...options });
|
|
1283
1270
|
}
|
|
1284
1271
|
/**
|
|
1285
|
-
*
|
|
1272
|
+
* Unlink a document from an event
|
|
1286
1273
|
*/
|
|
1287
|
-
|
|
1274
|
+
removeDocument(options) {
|
|
1275
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/documents/{document_id}", ...options });
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Link a document to an event
|
|
1279
|
+
*/
|
|
1280
|
+
addDocument(options) {
|
|
1288
1281
|
return (options.client ?? this.client).post({
|
|
1289
|
-
url: "/api/v1/events/{id}/
|
|
1282
|
+
url: "/api/v1/events/{id}/documents/{document_id}",
|
|
1290
1283
|
...options,
|
|
1291
1284
|
headers: {
|
|
1292
1285
|
"Content-Type": "application/json",
|
|
@@ -1295,11 +1288,29 @@ var Events = class extends HeyApiClient {
|
|
|
1295
1288
|
});
|
|
1296
1289
|
}
|
|
1297
1290
|
/**
|
|
1298
|
-
*
|
|
1291
|
+
* Get draft version of an event
|
|
1299
1292
|
*/
|
|
1300
|
-
|
|
1301
|
-
return (options.client ?? this.client).
|
|
1302
|
-
|
|
1293
|
+
getDraft(options) {
|
|
1294
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/draft", ...options });
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Start editing (creates draft clone)
|
|
1298
|
+
*/
|
|
1299
|
+
startEdit(options) {
|
|
1300
|
+
return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/edit", ...options });
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* List cross-reference links for this event
|
|
1304
|
+
*/
|
|
1305
|
+
listLinks(options) {
|
|
1306
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/links", ...options });
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Link another event as a cross-reference
|
|
1310
|
+
*/
|
|
1311
|
+
addLink(options) {
|
|
1312
|
+
return (options.client ?? this.client).post({
|
|
1313
|
+
url: "/api/v1/events/{id}/links",
|
|
1303
1314
|
...options,
|
|
1304
1315
|
headers: {
|
|
1305
1316
|
"Content-Type": "application/json",
|
|
@@ -1308,11 +1319,23 @@ var Events = class extends HeyApiClient {
|
|
|
1308
1319
|
});
|
|
1309
1320
|
}
|
|
1310
1321
|
/**
|
|
1311
|
-
*
|
|
1322
|
+
* Remove a cross-reference link
|
|
1312
1323
|
*/
|
|
1313
|
-
|
|
1324
|
+
removeLink(options) {
|
|
1325
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/links/{target_id}", ...options });
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* List managers for an event
|
|
1329
|
+
*/
|
|
1330
|
+
listManagers(options) {
|
|
1331
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/managers", ...options });
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Add a manager to an event
|
|
1335
|
+
*/
|
|
1336
|
+
addManager(options) {
|
|
1314
1337
|
return (options.client ?? this.client).post({
|
|
1315
|
-
url: "/api/v1/events/{id}/
|
|
1338
|
+
url: "/api/v1/events/{id}/managers",
|
|
1316
1339
|
...options,
|
|
1317
1340
|
headers: {
|
|
1318
1341
|
"Content-Type": "application/json",
|
|
@@ -1321,11 +1344,11 @@ var Events = class extends HeyApiClient {
|
|
|
1321
1344
|
});
|
|
1322
1345
|
}
|
|
1323
1346
|
/**
|
|
1324
|
-
*
|
|
1347
|
+
* Invite a manager to an event by email
|
|
1325
1348
|
*/
|
|
1326
|
-
|
|
1327
|
-
return (options.client ?? this.client).
|
|
1328
|
-
url: "/api/v1/events/{id}/
|
|
1349
|
+
inviteManager(options) {
|
|
1350
|
+
return (options.client ?? this.client).post({
|
|
1351
|
+
url: "/api/v1/events/{id}/managers/invite",
|
|
1329
1352
|
...options,
|
|
1330
1353
|
headers: {
|
|
1331
1354
|
"Content-Type": "application/json",
|
|
@@ -1334,17 +1357,23 @@ var Events = class extends HeyApiClient {
|
|
|
1334
1357
|
});
|
|
1335
1358
|
}
|
|
1336
1359
|
/**
|
|
1337
|
-
* Remove
|
|
1360
|
+
* Remove a manager from an event
|
|
1338
1361
|
*/
|
|
1339
|
-
|
|
1340
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/
|
|
1362
|
+
removeManager(options) {
|
|
1363
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/managers/{user_id}", ...options });
|
|
1341
1364
|
}
|
|
1342
1365
|
/**
|
|
1343
|
-
*
|
|
1366
|
+
* Get a single event manager
|
|
1344
1367
|
*/
|
|
1345
|
-
|
|
1346
|
-
return (options.client ?? this.client).
|
|
1347
|
-
|
|
1368
|
+
getManager(options) {
|
|
1369
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/managers/{user_id}", ...options });
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Update an event manager's permissions
|
|
1373
|
+
*/
|
|
1374
|
+
updateManager(options) {
|
|
1375
|
+
return (options.client ?? this.client).put({
|
|
1376
|
+
url: "/api/v1/events/{id}/managers/{user_id}",
|
|
1348
1377
|
...options,
|
|
1349
1378
|
headers: {
|
|
1350
1379
|
"Content-Type": "application/json",
|
|
@@ -1353,11 +1382,17 @@ var Events = class extends HeyApiClient {
|
|
|
1353
1382
|
});
|
|
1354
1383
|
}
|
|
1355
1384
|
/**
|
|
1356
|
-
*
|
|
1385
|
+
* List milestones for an event
|
|
1357
1386
|
*/
|
|
1358
|
-
|
|
1387
|
+
listMilestones(options) {
|
|
1388
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/milestones", ...options });
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Add a milestone event to a base event
|
|
1392
|
+
*/
|
|
1393
|
+
addMilestone(options) {
|
|
1359
1394
|
return (options.client ?? this.client).post({
|
|
1360
|
-
url: "/api/v1/events/{id}/
|
|
1395
|
+
url: "/api/v1/events/{id}/milestones",
|
|
1361
1396
|
...options,
|
|
1362
1397
|
headers: {
|
|
1363
1398
|
"Content-Type": "application/json",
|
|
@@ -1366,17 +1401,45 @@ var Events = class extends HeyApiClient {
|
|
|
1366
1401
|
});
|
|
1367
1402
|
}
|
|
1368
1403
|
/**
|
|
1369
|
-
*
|
|
1404
|
+
* Remove a milestone from an event
|
|
1370
1405
|
*/
|
|
1371
|
-
|
|
1372
|
-
return (options.client ?? this.client).
|
|
1406
|
+
removeMilestone(options) {
|
|
1407
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/milestones/{milestone_event_id}", ...options });
|
|
1373
1408
|
}
|
|
1374
1409
|
/**
|
|
1375
|
-
*
|
|
1410
|
+
* Update milestone lifecycle status or reset to automatic mode
|
|
1376
1411
|
*/
|
|
1377
|
-
|
|
1412
|
+
patchMilestoneLifecycle(options) {
|
|
1413
|
+
return (options.client ?? this.client).patch({
|
|
1414
|
+
url: "/api/v1/events/{id}/milestones/{milestone_event_id}",
|
|
1415
|
+
...options,
|
|
1416
|
+
headers: {
|
|
1417
|
+
"Content-Type": "application/json",
|
|
1418
|
+
...options.headers
|
|
1419
|
+
}
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Update milestone sequence
|
|
1424
|
+
*/
|
|
1425
|
+
updateMilestone(options) {
|
|
1426
|
+
return (options.client ?? this.client).put({
|
|
1427
|
+
url: "/api/v1/events/{id}/milestones/{milestone_event_id}",
|
|
1428
|
+
...options,
|
|
1429
|
+
headers: {
|
|
1430
|
+
"Content-Type": "application/json",
|
|
1431
|
+
...options.headers
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Publish an event
|
|
1437
|
+
*
|
|
1438
|
+
* Publishes a new draft or promotes the current draft changes for a published event. Optionally sends a notification to the creator by providing a JSON body with notification options.
|
|
1439
|
+
*/
|
|
1440
|
+
publish(options) {
|
|
1378
1441
|
return (options.client ?? this.client).post({
|
|
1379
|
-
url: "/api/v1/events/{id}/
|
|
1442
|
+
url: "/api/v1/events/{id}/publish",
|
|
1380
1443
|
...options,
|
|
1381
1444
|
headers: {
|
|
1382
1445
|
"Content-Type": "application/json",
|
|
@@ -1385,29 +1448,36 @@ var Events = class extends HeyApiClient {
|
|
|
1385
1448
|
});
|
|
1386
1449
|
}
|
|
1387
1450
|
/**
|
|
1388
|
-
*
|
|
1451
|
+
* Remove from series (scope: this | future | all)
|
|
1389
1452
|
*/
|
|
1390
|
-
|
|
1391
|
-
return (options.client ?? this.client).
|
|
1453
|
+
deleteSeries(options) {
|
|
1454
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/series", ...options });
|
|
1392
1455
|
}
|
|
1393
1456
|
/**
|
|
1394
|
-
*
|
|
1457
|
+
* Get series rule and all occurrences for a recurring event
|
|
1395
1458
|
*/
|
|
1396
|
-
|
|
1397
|
-
return (options.client ?? this.client).
|
|
1459
|
+
getSeries(options) {
|
|
1460
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/series", ...options });
|
|
1398
1461
|
}
|
|
1399
1462
|
/**
|
|
1400
|
-
*
|
|
1463
|
+
* Update series fields. Cascades to occurrences without overrides.
|
|
1401
1464
|
*/
|
|
1402
|
-
|
|
1403
|
-
return (options.client ?? this.client).
|
|
1465
|
+
patchSeries(options) {
|
|
1466
|
+
return (options.client ?? this.client).patch({
|
|
1467
|
+
url: "/api/v1/events/{id}/series",
|
|
1468
|
+
...options,
|
|
1469
|
+
headers: {
|
|
1470
|
+
"Content-Type": "application/json",
|
|
1471
|
+
...options.headers
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1404
1474
|
}
|
|
1405
1475
|
/**
|
|
1406
|
-
*
|
|
1476
|
+
* Convert an event into the anchor of a new recurring series
|
|
1407
1477
|
*/
|
|
1408
|
-
|
|
1409
|
-
return (options.client ?? this.client).
|
|
1410
|
-
url: "/api/v1/events/{id}/
|
|
1478
|
+
createSeries(options) {
|
|
1479
|
+
return (options.client ?? this.client).post({
|
|
1480
|
+
url: "/api/v1/events/{id}/series",
|
|
1411
1481
|
...options,
|
|
1412
1482
|
headers: {
|
|
1413
1483
|
"Content-Type": "application/json",
|
|
@@ -1416,55 +1486,74 @@ var Events = class extends HeyApiClient {
|
|
|
1416
1486
|
});
|
|
1417
1487
|
}
|
|
1418
1488
|
/**
|
|
1419
|
-
*
|
|
1489
|
+
* Invite series manager
|
|
1490
|
+
*
|
|
1491
|
+
* Invites a user as series manager by email. Only the series owner can do this.
|
|
1420
1492
|
*/
|
|
1421
|
-
|
|
1422
|
-
return (options.client ?? this.client).post({
|
|
1493
|
+
inviteSeriesManager(options) {
|
|
1494
|
+
return (options.client ?? this.client).post({
|
|
1495
|
+
url: "/api/v1/events/{id}/series/manager",
|
|
1496
|
+
...options,
|
|
1497
|
+
headers: {
|
|
1498
|
+
"Content-Type": "application/json",
|
|
1499
|
+
...options.headers
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1423
1502
|
}
|
|
1424
1503
|
/**
|
|
1425
|
-
* List
|
|
1504
|
+
* List occurrences of the series this event belongs to (paginated)
|
|
1426
1505
|
*/
|
|
1427
|
-
|
|
1428
|
-
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/
|
|
1506
|
+
listOccurrences(options) {
|
|
1507
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/series/occurrences", ...options });
|
|
1429
1508
|
}
|
|
1430
1509
|
/**
|
|
1431
|
-
*
|
|
1510
|
+
* Publish series
|
|
1511
|
+
*
|
|
1512
|
+
* Publishes a series and all its occurrences. Optionally sends a notification to attendees.
|
|
1432
1513
|
*/
|
|
1433
|
-
|
|
1434
|
-
return (options.client ?? this.client).
|
|
1435
|
-
|
|
1436
|
-
url: "/api/v1/events/{id}/cover",
|
|
1514
|
+
publishSeries(options) {
|
|
1515
|
+
return (options.client ?? this.client).post({
|
|
1516
|
+
url: "/api/v1/events/{id}/series/publish",
|
|
1437
1517
|
...options,
|
|
1438
1518
|
headers: {
|
|
1439
|
-
"Content-Type": "application/
|
|
1519
|
+
"Content-Type": "application/json",
|
|
1440
1520
|
...options.headers
|
|
1441
1521
|
}
|
|
1442
1522
|
});
|
|
1443
1523
|
}
|
|
1444
1524
|
/**
|
|
1445
|
-
*
|
|
1525
|
+
* List spaces this event belongs to
|
|
1446
1526
|
*/
|
|
1447
|
-
|
|
1448
|
-
return (options.client ?? this.client).
|
|
1527
|
+
listSpaces(options) {
|
|
1528
|
+
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/spaces", ...options });
|
|
1449
1529
|
}
|
|
1450
1530
|
/**
|
|
1451
|
-
*
|
|
1531
|
+
* Add event to a space
|
|
1452
1532
|
*/
|
|
1453
|
-
|
|
1454
|
-
return (options.client ?? this.client).
|
|
1533
|
+
addSpace(options) {
|
|
1534
|
+
return (options.client ?? this.client).post({
|
|
1535
|
+
url: "/api/v1/events/{id}/spaces",
|
|
1536
|
+
...options,
|
|
1537
|
+
headers: {
|
|
1538
|
+
"Content-Type": "application/json",
|
|
1539
|
+
...options.headers
|
|
1540
|
+
}
|
|
1541
|
+
});
|
|
1455
1542
|
}
|
|
1456
1543
|
/**
|
|
1457
|
-
*
|
|
1544
|
+
* Remove event from a space
|
|
1458
1545
|
*/
|
|
1459
|
-
|
|
1460
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/
|
|
1546
|
+
removeSpace(options) {
|
|
1547
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/spaces/{space_id}", ...options });
|
|
1461
1548
|
}
|
|
1462
1549
|
/**
|
|
1463
|
-
*
|
|
1550
|
+
* Transition an event to a new state per its template's state machine
|
|
1551
|
+
*
|
|
1552
|
+
* Validates the transition against the template's declared edges and guards. Appends a `state_changed` activity row on success. AI callers: consult GET /event-templates/{template_id} for the state machine's allowed transitions and guard requirements (e.g. delivery's `delivered` state requires a proof_of_delivery payload).
|
|
1464
1553
|
*/
|
|
1465
|
-
|
|
1554
|
+
transition(options) {
|
|
1466
1555
|
return (options.client ?? this.client).post({
|
|
1467
|
-
url: "/api/v1/events/{id}/
|
|
1556
|
+
url: "/api/v1/events/{id}/transition",
|
|
1468
1557
|
...options,
|
|
1469
1558
|
headers: {
|
|
1470
1559
|
"Content-Type": "application/json",
|
|
@@ -1472,30 +1561,57 @@ var Events = class extends HeyApiClient {
|
|
|
1472
1561
|
}
|
|
1473
1562
|
});
|
|
1474
1563
|
}
|
|
1564
|
+
get attachments() {
|
|
1565
|
+
return this._attachments ?? (this._attachments = new Attachments({ client: this.client }));
|
|
1566
|
+
}
|
|
1567
|
+
get templates() {
|
|
1568
|
+
return this._templates ?? (this._templates = new Templates({ client: this.client }));
|
|
1569
|
+
}
|
|
1570
|
+
get activity() {
|
|
1571
|
+
return this._activity ?? (this._activity = new Activity({ client: this.client }));
|
|
1572
|
+
}
|
|
1573
|
+
};
|
|
1574
|
+
var Audit = class extends HeyApiClient {
|
|
1475
1575
|
/**
|
|
1476
|
-
*
|
|
1576
|
+
* List audit log entries for the organisation
|
|
1477
1577
|
*/
|
|
1478
|
-
|
|
1479
|
-
return (options
|
|
1578
|
+
list(options) {
|
|
1579
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/audit-logs", ...options });
|
|
1480
1580
|
}
|
|
1581
|
+
};
|
|
1582
|
+
var Auth = class extends HeyApiClient {
|
|
1481
1583
|
/**
|
|
1482
|
-
*
|
|
1584
|
+
* Get the authenticated caller's identity and permissions
|
|
1483
1585
|
*/
|
|
1484
|
-
|
|
1485
|
-
return (options
|
|
1586
|
+
context(options) {
|
|
1587
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/auth/context", ...options });
|
|
1486
1588
|
}
|
|
1487
1589
|
/**
|
|
1488
|
-
*
|
|
1590
|
+
* Get the authenticated caller's identity and permissions
|
|
1591
|
+
*/
|
|
1592
|
+
me(options) {
|
|
1593
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/auth/me", ...options });
|
|
1594
|
+
}
|
|
1595
|
+
};
|
|
1596
|
+
var Automation = class extends HeyApiClient {
|
|
1597
|
+
/**
|
|
1598
|
+
* List available native automation action types
|
|
1599
|
+
*/
|
|
1600
|
+
listActions(options) {
|
|
1601
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/automation/actions", ...options });
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* List automation rules
|
|
1489
1605
|
*/
|
|
1490
|
-
|
|
1491
|
-
return (options
|
|
1606
|
+
listRules(options) {
|
|
1607
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/automation/rules", ...options });
|
|
1492
1608
|
}
|
|
1493
1609
|
/**
|
|
1494
|
-
*
|
|
1610
|
+
* Create an automation rule
|
|
1495
1611
|
*/
|
|
1496
|
-
|
|
1612
|
+
createRule(options) {
|
|
1497
1613
|
return (options.client ?? this.client).post({
|
|
1498
|
-
url: "/api/v1/
|
|
1614
|
+
url: "/api/v1/automation/rules",
|
|
1499
1615
|
...options,
|
|
1500
1616
|
headers: {
|
|
1501
1617
|
"Content-Type": "application/json",
|
|
@@ -1504,23 +1620,23 @@ var Events = class extends HeyApiClient {
|
|
|
1504
1620
|
});
|
|
1505
1621
|
}
|
|
1506
1622
|
/**
|
|
1507
|
-
*
|
|
1623
|
+
* Delete an automation rule
|
|
1508
1624
|
*/
|
|
1509
|
-
|
|
1510
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/
|
|
1625
|
+
deleteRule(options) {
|
|
1626
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/automation/rules/{id}", ...options });
|
|
1511
1627
|
}
|
|
1512
1628
|
/**
|
|
1513
|
-
*
|
|
1629
|
+
* Get an automation rule
|
|
1514
1630
|
*/
|
|
1515
|
-
|
|
1516
|
-
return (options.client ?? this.client).get({ url: "/api/v1/
|
|
1631
|
+
getRule(options) {
|
|
1632
|
+
return (options.client ?? this.client).get({ url: "/api/v1/automation/rules/{id}", ...options });
|
|
1517
1633
|
}
|
|
1518
1634
|
/**
|
|
1519
|
-
*
|
|
1635
|
+
* Update an automation rule
|
|
1520
1636
|
*/
|
|
1521
|
-
|
|
1522
|
-
return (options.client ?? this.client).
|
|
1523
|
-
url: "/api/v1/
|
|
1637
|
+
updateRule(options) {
|
|
1638
|
+
return (options.client ?? this.client).put({
|
|
1639
|
+
url: "/api/v1/automation/rules/{id}",
|
|
1524
1640
|
...options,
|
|
1525
1641
|
headers: {
|
|
1526
1642
|
"Content-Type": "application/json",
|
|
@@ -1529,36 +1645,37 @@ var Events = class extends HeyApiClient {
|
|
|
1529
1645
|
});
|
|
1530
1646
|
}
|
|
1531
1647
|
/**
|
|
1532
|
-
*
|
|
1648
|
+
* Manually trigger an automation rule
|
|
1533
1649
|
*/
|
|
1534
|
-
|
|
1535
|
-
return (options.client ?? this.client).post({
|
|
1536
|
-
url: "/api/v1/events/{id}/managers/invite",
|
|
1537
|
-
...options,
|
|
1538
|
-
headers: {
|
|
1539
|
-
"Content-Type": "application/json",
|
|
1540
|
-
...options.headers
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1650
|
+
executeRule(options) {
|
|
1651
|
+
return (options.client ?? this.client).post({ url: "/api/v1/automation/rules/{id}/execute", ...options });
|
|
1543
1652
|
}
|
|
1544
1653
|
/**
|
|
1545
|
-
*
|
|
1654
|
+
* List execution history for a rule
|
|
1546
1655
|
*/
|
|
1547
|
-
|
|
1548
|
-
return (options.client ?? this.client).
|
|
1656
|
+
listExecutions(options) {
|
|
1657
|
+
return (options.client ?? this.client).get({ url: "/api/v1/automation/rules/{id}/executions", ...options });
|
|
1549
1658
|
}
|
|
1550
1659
|
/**
|
|
1551
|
-
*
|
|
1660
|
+
* List available automation trigger types
|
|
1552
1661
|
*/
|
|
1553
|
-
|
|
1554
|
-
return (options
|
|
1662
|
+
listTriggers(options) {
|
|
1663
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/automation/triggers", ...options });
|
|
1555
1664
|
}
|
|
1665
|
+
};
|
|
1666
|
+
var Bookings = class extends HeyApiClient {
|
|
1556
1667
|
/**
|
|
1557
|
-
*
|
|
1668
|
+
* List bookings
|
|
1558
1669
|
*/
|
|
1559
|
-
|
|
1560
|
-
return (options
|
|
1561
|
-
|
|
1670
|
+
list(options) {
|
|
1671
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/bookings", ...options });
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Create a booking
|
|
1675
|
+
*/
|
|
1676
|
+
create(options) {
|
|
1677
|
+
return (options.client ?? this.client).post({
|
|
1678
|
+
url: "/api/v1/bookings",
|
|
1562
1679
|
...options,
|
|
1563
1680
|
headers: {
|
|
1564
1681
|
"Content-Type": "application/json",
|
|
@@ -1567,17 +1684,11 @@ var Events = class extends HeyApiClient {
|
|
|
1567
1684
|
});
|
|
1568
1685
|
}
|
|
1569
1686
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
*/
|
|
1572
|
-
listMilestones(options) {
|
|
1573
|
-
return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/milestones", ...options });
|
|
1574
|
-
}
|
|
1575
|
-
/**
|
|
1576
|
-
* Add a milestone event to a base event
|
|
1687
|
+
* Check place availability for a time slot
|
|
1577
1688
|
*/
|
|
1578
|
-
|
|
1689
|
+
checkAvailability(options) {
|
|
1579
1690
|
return (options.client ?? this.client).post({
|
|
1580
|
-
url: "/api/v1/
|
|
1691
|
+
url: "/api/v1/bookings/check-availability",
|
|
1581
1692
|
...options,
|
|
1582
1693
|
headers: {
|
|
1583
1694
|
"Content-Type": "application/json",
|
|
@@ -1586,30 +1697,29 @@ var Events = class extends HeyApiClient {
|
|
|
1586
1697
|
});
|
|
1587
1698
|
}
|
|
1588
1699
|
/**
|
|
1589
|
-
*
|
|
1700
|
+
* Get all bookings for a place within a date range
|
|
1590
1701
|
*/
|
|
1591
|
-
|
|
1592
|
-
return (options.client ?? this.client).
|
|
1702
|
+
placeSchedule(options) {
|
|
1703
|
+
return (options.client ?? this.client).get({ url: "/api/v1/bookings/places/{place_id}/schedule", ...options });
|
|
1593
1704
|
}
|
|
1594
1705
|
/**
|
|
1595
|
-
*
|
|
1706
|
+
* Delete a booking
|
|
1596
1707
|
*/
|
|
1597
|
-
|
|
1598
|
-
return (options.client ?? this.client).
|
|
1599
|
-
url: "/api/v1/events/{id}/milestones/{milestone_event_id}",
|
|
1600
|
-
...options,
|
|
1601
|
-
headers: {
|
|
1602
|
-
"Content-Type": "application/json",
|
|
1603
|
-
...options.headers
|
|
1604
|
-
}
|
|
1605
|
-
});
|
|
1708
|
+
delete(options) {
|
|
1709
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/bookings/{id}", ...options });
|
|
1606
1710
|
}
|
|
1607
1711
|
/**
|
|
1608
|
-
*
|
|
1712
|
+
* Get a booking by ID
|
|
1609
1713
|
*/
|
|
1610
|
-
|
|
1714
|
+
get(options) {
|
|
1715
|
+
return (options.client ?? this.client).get({ url: "/api/v1/bookings/{id}", ...options });
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Update a booking
|
|
1719
|
+
*/
|
|
1720
|
+
update(options) {
|
|
1611
1721
|
return (options.client ?? this.client).put({
|
|
1612
|
-
url: "/api/v1/
|
|
1722
|
+
url: "/api/v1/bookings/{id}",
|
|
1613
1723
|
...options,
|
|
1614
1724
|
headers: {
|
|
1615
1725
|
"Content-Type": "application/json",
|
|
@@ -1617,14 +1727,20 @@ var Events = class extends HeyApiClient {
|
|
|
1617
1727
|
}
|
|
1618
1728
|
});
|
|
1619
1729
|
}
|
|
1730
|
+
};
|
|
1731
|
+
var Contacts = class extends HeyApiClient {
|
|
1620
1732
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
1623
|
-
* Publishes a new draft or promotes the current draft changes for a published event. Optionally sends a notification to the creator by providing a JSON body with notification options.
|
|
1733
|
+
* List contacts
|
|
1624
1734
|
*/
|
|
1625
|
-
|
|
1735
|
+
list(options) {
|
|
1736
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/contacts", ...options });
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* Create a contact
|
|
1740
|
+
*/
|
|
1741
|
+
create(options) {
|
|
1626
1742
|
return (options.client ?? this.client).post({
|
|
1627
|
-
url: "/api/v1/
|
|
1743
|
+
url: "/api/v1/contacts",
|
|
1628
1744
|
...options,
|
|
1629
1745
|
headers: {
|
|
1630
1746
|
"Content-Type": "application/json",
|
|
@@ -1633,36 +1749,29 @@ var Events = class extends HeyApiClient {
|
|
|
1633
1749
|
});
|
|
1634
1750
|
}
|
|
1635
1751
|
/**
|
|
1636
|
-
*
|
|
1752
|
+
* Search contacts
|
|
1637
1753
|
*/
|
|
1638
|
-
|
|
1639
|
-
return (options
|
|
1754
|
+
search(options) {
|
|
1755
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/contacts/search", ...options });
|
|
1640
1756
|
}
|
|
1641
1757
|
/**
|
|
1642
|
-
*
|
|
1758
|
+
* Delete a contact
|
|
1643
1759
|
*/
|
|
1644
|
-
|
|
1645
|
-
return (options.client ?? this.client).
|
|
1760
|
+
delete(options) {
|
|
1761
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/contacts/{id}", ...options });
|
|
1646
1762
|
}
|
|
1647
1763
|
/**
|
|
1648
|
-
*
|
|
1764
|
+
* Get a contact
|
|
1649
1765
|
*/
|
|
1650
|
-
|
|
1651
|
-
return (options.client ?? this.client).
|
|
1652
|
-
url: "/api/v1/events/{id}/series",
|
|
1653
|
-
...options,
|
|
1654
|
-
headers: {
|
|
1655
|
-
"Content-Type": "application/json",
|
|
1656
|
-
...options.headers
|
|
1657
|
-
}
|
|
1658
|
-
});
|
|
1766
|
+
get(options) {
|
|
1767
|
+
return (options.client ?? this.client).get({ url: "/api/v1/contacts/{id}", ...options });
|
|
1659
1768
|
}
|
|
1660
1769
|
/**
|
|
1661
|
-
*
|
|
1770
|
+
* Update a contact
|
|
1662
1771
|
*/
|
|
1663
|
-
|
|
1664
|
-
return (options.client ?? this.client).
|
|
1665
|
-
url: "/api/v1/
|
|
1772
|
+
update(options) {
|
|
1773
|
+
return (options.client ?? this.client).put({
|
|
1774
|
+
url: "/api/v1/contacts/{id}",
|
|
1666
1775
|
...options,
|
|
1667
1776
|
headers: {
|
|
1668
1777
|
"Content-Type": "application/json",
|
|
@@ -1671,13 +1780,11 @@ var Events = class extends HeyApiClient {
|
|
|
1671
1780
|
});
|
|
1672
1781
|
}
|
|
1673
1782
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
* Invites a user as series manager by email. Only the series owner can do this.
|
|
1783
|
+
* Toggle contact favorite
|
|
1677
1784
|
*/
|
|
1678
|
-
|
|
1679
|
-
return (options.client ?? this.client).
|
|
1680
|
-
url: "/api/v1/
|
|
1785
|
+
toggleFavorite(options) {
|
|
1786
|
+
return (options.client ?? this.client).patch({
|
|
1787
|
+
url: "/api/v1/contacts/{id}/favorite",
|
|
1681
1788
|
...options,
|
|
1682
1789
|
headers: {
|
|
1683
1790
|
"Content-Type": "application/json",
|
|
@@ -1686,19 +1793,17 @@ var Events = class extends HeyApiClient {
|
|
|
1686
1793
|
});
|
|
1687
1794
|
}
|
|
1688
1795
|
/**
|
|
1689
|
-
* List
|
|
1796
|
+
* List integration-linked fields for a contact
|
|
1690
1797
|
*/
|
|
1691
|
-
|
|
1692
|
-
return (options.client ?? this.client).get({ url: "/api/v1/
|
|
1798
|
+
listIntegrationFields(options) {
|
|
1799
|
+
return (options.client ?? this.client).get({ url: "/api/v1/contacts/{id}/integration-fields", ...options });
|
|
1693
1800
|
}
|
|
1694
1801
|
/**
|
|
1695
|
-
*
|
|
1696
|
-
*
|
|
1697
|
-
* Publishes a series and all its occurrences. Optionally sends a notification to attendees.
|
|
1802
|
+
* Create or update an integration-linked field on a contact
|
|
1698
1803
|
*/
|
|
1699
|
-
|
|
1700
|
-
return (options.client ?? this.client).
|
|
1701
|
-
url: "/api/v1/
|
|
1804
|
+
upsertIntegrationField(options) {
|
|
1805
|
+
return (options.client ?? this.client).put({
|
|
1806
|
+
url: "/api/v1/contacts/{id}/integration-fields",
|
|
1702
1807
|
...options,
|
|
1703
1808
|
headers: {
|
|
1704
1809
|
"Content-Type": "application/json",
|
|
@@ -1707,17 +1812,25 @@ var Events = class extends HeyApiClient {
|
|
|
1707
1812
|
});
|
|
1708
1813
|
}
|
|
1709
1814
|
/**
|
|
1710
|
-
*
|
|
1815
|
+
* Remove an integration-linked field from a contact
|
|
1711
1816
|
*/
|
|
1712
|
-
|
|
1713
|
-
return (options.client ?? this.client).
|
|
1817
|
+
deleteIntegrationField(options) {
|
|
1818
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/contacts/{id}/integration-fields/{app_id}/{field_key}", ...options });
|
|
1714
1819
|
}
|
|
1820
|
+
};
|
|
1821
|
+
var Credentials = class extends HeyApiClient {
|
|
1715
1822
|
/**
|
|
1716
|
-
*
|
|
1823
|
+
* List machine credentials
|
|
1717
1824
|
*/
|
|
1718
|
-
|
|
1825
|
+
list(options) {
|
|
1826
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/credentials", ...options });
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Create a machine credential
|
|
1830
|
+
*/
|
|
1831
|
+
create(options) {
|
|
1719
1832
|
return (options.client ?? this.client).post({
|
|
1720
|
-
url: "/api/v1/
|
|
1833
|
+
url: "/api/v1/credentials",
|
|
1721
1834
|
...options,
|
|
1722
1835
|
headers: {
|
|
1723
1836
|
"Content-Type": "application/json",
|
|
@@ -1726,10 +1839,16 @@ var Events = class extends HeyApiClient {
|
|
|
1726
1839
|
});
|
|
1727
1840
|
}
|
|
1728
1841
|
/**
|
|
1729
|
-
*
|
|
1842
|
+
* Revoke a machine credential
|
|
1730
1843
|
*/
|
|
1731
|
-
|
|
1732
|
-
return (options.client ?? this.client).delete({ url: "/api/v1/
|
|
1844
|
+
revoke(options) {
|
|
1845
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/credentials/{id}", ...options });
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* Get a machine credential
|
|
1849
|
+
*/
|
|
1850
|
+
get(options) {
|
|
1851
|
+
return (options.client ?? this.client).get({ url: "/api/v1/credentials/{id}", ...options });
|
|
1733
1852
|
}
|
|
1734
1853
|
};
|
|
1735
1854
|
var Zitadel = class extends HeyApiClient {
|
|
@@ -1831,6 +1950,16 @@ var Organizations = class extends HeyApiClient {
|
|
|
1831
1950
|
return this._invites ?? (this._invites = new Invites({ client: this.client }));
|
|
1832
1951
|
}
|
|
1833
1952
|
};
|
|
1953
|
+
var Permissions = class extends HeyApiClient {
|
|
1954
|
+
/**
|
|
1955
|
+
* List all assignable role bundles
|
|
1956
|
+
*
|
|
1957
|
+
* Returns every role bundle (org / event_manager / space_manager / token) with its permissions. UI uses this to render permission/bundle pickers without hardcoding lists.
|
|
1958
|
+
*/
|
|
1959
|
+
listRoles(options) {
|
|
1960
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/permissions/roles", ...options });
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1834
1963
|
var Places = class extends HeyApiClient {
|
|
1835
1964
|
/**
|
|
1836
1965
|
* List places
|
|
@@ -1939,6 +2068,16 @@ var Profiles = class extends HeyApiClient {
|
|
|
1939
2068
|
return this._me ?? (this._me = new Me({ client: this.client }));
|
|
1940
2069
|
}
|
|
1941
2070
|
};
|
|
2071
|
+
var Announcements2 = class extends HeyApiClient {
|
|
2072
|
+
/**
|
|
2073
|
+
* List public announcements
|
|
2074
|
+
*
|
|
2075
|
+
* Returns published announcements from all spaces that the owning organisation has made publicly visible. No authentication required.
|
|
2076
|
+
*/
|
|
2077
|
+
list(options) {
|
|
2078
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/public/announcements", ...options });
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
1942
2081
|
var Events2 = class extends HeyApiClient {
|
|
1943
2082
|
/**
|
|
1944
2083
|
* List public events
|
|
@@ -1966,6 +2105,14 @@ var Spaces = class extends HeyApiClient {
|
|
|
1966
2105
|
list(options) {
|
|
1967
2106
|
return (options?.client ?? this.client).get({ url: "/api/v1/public/spaces", ...options });
|
|
1968
2107
|
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Get public spaces as a hierarchical tree
|
|
2110
|
+
*
|
|
2111
|
+
* Returns all publicly visible spaces (visibility=40, status=published) arranged as a multi-root hierarchy. No authentication required. Use this to render collapsible space filter UIs.
|
|
2112
|
+
*/
|
|
2113
|
+
tree(options) {
|
|
2114
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/public/spaces/tree", ...options });
|
|
2115
|
+
}
|
|
1969
2116
|
/**
|
|
1970
2117
|
* Get a public space
|
|
1971
2118
|
*
|
|
@@ -1976,6 +2123,9 @@ var Spaces = class extends HeyApiClient {
|
|
|
1976
2123
|
}
|
|
1977
2124
|
};
|
|
1978
2125
|
var Public = class extends HeyApiClient {
|
|
2126
|
+
get announcements() {
|
|
2127
|
+
return this._announcements ?? (this._announcements = new Announcements2({ client: this.client }));
|
|
2128
|
+
}
|
|
1979
2129
|
get events() {
|
|
1980
2130
|
return this._events ?? (this._events = new Events2({ client: this.client }));
|
|
1981
2131
|
}
|
|
@@ -2224,6 +2374,14 @@ var Spaces2 = class extends HeyApiClient {
|
|
|
2224
2374
|
listPendingManagerInvites(options) {
|
|
2225
2375
|
return (options?.client ?? this.client).get({ url: "/api/v1/spaces/managers/pending", ...options });
|
|
2226
2376
|
}
|
|
2377
|
+
/**
|
|
2378
|
+
* Get spaces as a hierarchical tree
|
|
2379
|
+
*
|
|
2380
|
+
* Returns all published spaces arranged as a multi-root hierarchy. Each node may have children nested under it. Because spaces support multiple parents, a space can appear under more than one parent node.
|
|
2381
|
+
*/
|
|
2382
|
+
tree(options) {
|
|
2383
|
+
return (options?.client ?? this.client).get({ url: "/api/v1/spaces/tree", ...options });
|
|
2384
|
+
}
|
|
2227
2385
|
/**
|
|
2228
2386
|
* Delete a space
|
|
2229
2387
|
*/
|
|
@@ -2467,6 +2625,31 @@ var Spaces2 = class extends HeyApiClient {
|
|
|
2467
2625
|
removeMember(options) {
|
|
2468
2626
|
return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/members/{user_id}", ...options });
|
|
2469
2627
|
}
|
|
2628
|
+
/**
|
|
2629
|
+
* List parent spaces of a space
|
|
2630
|
+
*/
|
|
2631
|
+
listParents(options) {
|
|
2632
|
+
return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/parents", ...options });
|
|
2633
|
+
}
|
|
2634
|
+
/**
|
|
2635
|
+
* Add a parent to a space
|
|
2636
|
+
*/
|
|
2637
|
+
addParent(options) {
|
|
2638
|
+
return (options.client ?? this.client).post({
|
|
2639
|
+
url: "/api/v1/spaces/{id}/parents",
|
|
2640
|
+
...options,
|
|
2641
|
+
headers: {
|
|
2642
|
+
"Content-Type": "application/json",
|
|
2643
|
+
...options.headers
|
|
2644
|
+
}
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Remove a parent from a space
|
|
2649
|
+
*/
|
|
2650
|
+
removeParent(options) {
|
|
2651
|
+
return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/parents/{parent_id}", ...options });
|
|
2652
|
+
}
|
|
2470
2653
|
/**
|
|
2471
2654
|
* Publish a space
|
|
2472
2655
|
*
|
|
@@ -2529,6 +2712,9 @@ var _Linebundle = class _Linebundle extends HeyApiClient {
|
|
|
2529
2712
|
get announcements() {
|
|
2530
2713
|
return this._announcements ?? (this._announcements = new Announcements({ client: this.client }));
|
|
2531
2714
|
}
|
|
2715
|
+
get events() {
|
|
2716
|
+
return this._events ?? (this._events = new Events({ client: this.client }));
|
|
2717
|
+
}
|
|
2532
2718
|
get audit() {
|
|
2533
2719
|
return this._audit ?? (this._audit = new Audit({ client: this.client }));
|
|
2534
2720
|
}
|
|
@@ -2547,15 +2733,15 @@ var _Linebundle = class _Linebundle extends HeyApiClient {
|
|
|
2547
2733
|
get credentials() {
|
|
2548
2734
|
return this._credentials ?? (this._credentials = new Credentials({ client: this.client }));
|
|
2549
2735
|
}
|
|
2550
|
-
get events() {
|
|
2551
|
-
return this._events ?? (this._events = new Events({ client: this.client }));
|
|
2552
|
-
}
|
|
2553
2736
|
get integrations() {
|
|
2554
2737
|
return this._integrations ?? (this._integrations = new Integrations({ client: this.client }));
|
|
2555
2738
|
}
|
|
2556
2739
|
get organizations() {
|
|
2557
2740
|
return this._organizations ?? (this._organizations = new Organizations({ client: this.client }));
|
|
2558
2741
|
}
|
|
2742
|
+
get permissions() {
|
|
2743
|
+
return this._permissions ?? (this._permissions = new Permissions({ client: this.client }));
|
|
2744
|
+
}
|
|
2559
2745
|
get places() {
|
|
2560
2746
|
return this._places ?? (this._places = new Places({ client: this.client }));
|
|
2561
2747
|
}
|
|
@@ -2834,8 +3020,11 @@ function createLinebundle({
|
|
|
2834
3020
|
});
|
|
2835
3021
|
}
|
|
2836
3022
|
export {
|
|
3023
|
+
Activity,
|
|
2837
3024
|
Analytics,
|
|
2838
3025
|
Announcements,
|
|
3026
|
+
Announcements2,
|
|
3027
|
+
Attachments,
|
|
2839
3028
|
Audit,
|
|
2840
3029
|
Auth,
|
|
2841
3030
|
Automation,
|
|
@@ -2849,12 +3038,14 @@ export {
|
|
|
2849
3038
|
Linebundle,
|
|
2850
3039
|
Me,
|
|
2851
3040
|
Organizations,
|
|
3041
|
+
Permissions,
|
|
2852
3042
|
Places,
|
|
2853
3043
|
Profiles,
|
|
2854
3044
|
Public,
|
|
2855
3045
|
Series,
|
|
2856
3046
|
Spaces,
|
|
2857
3047
|
Spaces2,
|
|
3048
|
+
Templates,
|
|
2858
3049
|
Zitadel,
|
|
2859
3050
|
client,
|
|
2860
3051
|
createLinebundle
|