@proteos/sdk 0.77.0 → 0.79.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/index.cjs +136 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +277 -42
- package/dist/index.d.ts +277 -42
- package/dist/index.js +136 -49
- package/dist/index.js.map +1 -1
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/{types-Bn5y5wHZ.d.cts → types-CWj1h9l0.d.cts} +1 -1
- package/dist/{types-Bn5y5wHZ.d.ts → types-CWj1h9l0.d.ts} +1 -1
- package/package.json +1 -1
- package/src/auth/platform-entities.ts +7 -0
- package/src/conversation/types.ts +13 -0
- package/src/discovery/index.ts +138 -0
- package/src/discovery/types.ts +200 -0
- package/src/index.ts +28 -0
- package/src/storage/files.ts +13 -3
package/dist/index.cjs
CHANGED
|
@@ -1016,7 +1016,10 @@ var PLATFORM_ENTITIES = [
|
|
|
1016
1016
|
{ slug: "calendar-event-types", name: "Calendar Event Types" },
|
|
1017
1017
|
{ slug: "scheduling-links", name: "Scheduling Links" },
|
|
1018
1018
|
{ slug: "scheduling-profiles", name: "Scheduling Profiles" },
|
|
1019
|
-
{ slug: "availability-constraints", name: "Availability Constraints" }
|
|
1019
|
+
{ slug: "availability-constraints", name: "Availability Constraints" },
|
|
1020
|
+
// Discovery (discovery-service): what users send Proteos to show how they
|
|
1021
|
+
// work — screenshots, recordings, written feedback. Mass noun, no plural.
|
|
1022
|
+
{ slug: "discovery-evidence", name: "Discovery Evidence" }
|
|
1020
1023
|
];
|
|
1021
1024
|
var PLATFORM_ENTITY_SLUGS = PLATFORM_ENTITIES.map(
|
|
1022
1025
|
(entity) => entity.slug
|
|
@@ -1038,7 +1041,11 @@ var SCOPED_PLATFORM_ENTITY_SLUGS = [
|
|
|
1038
1041
|
// shares; messages inherit their conversation. /conversations/v1/shares.
|
|
1039
1042
|
"connections",
|
|
1040
1043
|
"conversations",
|
|
1041
|
-
"messages"
|
|
1044
|
+
"messages",
|
|
1045
|
+
// discovery-service: evidence is owned by its creator; a caller holding no
|
|
1046
|
+
// grant at all is treated as scoped (own rows), so every org member can
|
|
1047
|
+
// send feedback and see what they sent.
|
|
1048
|
+
"discovery-evidence"
|
|
1042
1049
|
];
|
|
1043
1050
|
function isPlatformEntity(slug) {
|
|
1044
1051
|
return PLATFORM_ENTITY_SLUGS.includes(slug);
|
|
@@ -3136,6 +3143,77 @@ var DataClient = class {
|
|
|
3136
3143
|
}
|
|
3137
3144
|
};
|
|
3138
3145
|
|
|
3146
|
+
// src/discovery/index.ts
|
|
3147
|
+
var DISCOVERY_BASE_PATH = "/discovery/v1";
|
|
3148
|
+
var encode = encodeURIComponent;
|
|
3149
|
+
var DiscoveryClient = class {
|
|
3150
|
+
evidence;
|
|
3151
|
+
platform;
|
|
3152
|
+
constructor(client) {
|
|
3153
|
+
this.evidence = new DiscoveryEvidenceServiceImpl(client);
|
|
3154
|
+
this.platform = new PlatformDiscoveryEvidenceServiceImpl(client);
|
|
3155
|
+
}
|
|
3156
|
+
};
|
|
3157
|
+
var DiscoveryEvidenceServiceImpl = class {
|
|
3158
|
+
constructor(client) {
|
|
3159
|
+
this.client = client;
|
|
3160
|
+
}
|
|
3161
|
+
client;
|
|
3162
|
+
create(request) {
|
|
3163
|
+
return this.client.request("POST", `${DISCOVERY_BASE_PATH}/evidence`, request);
|
|
3164
|
+
}
|
|
3165
|
+
list(query = {}) {
|
|
3166
|
+
return this.client.requestWithQuery("GET", `${DISCOVERY_BASE_PATH}/evidence`, query);
|
|
3167
|
+
}
|
|
3168
|
+
get(id) {
|
|
3169
|
+
return this.client.request("GET", `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`);
|
|
3170
|
+
}
|
|
3171
|
+
update(id, request) {
|
|
3172
|
+
return this.client.request("PATCH", `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`, request);
|
|
3173
|
+
}
|
|
3174
|
+
async delete(id) {
|
|
3175
|
+
await this.client.request("DELETE", `${DISCOVERY_BASE_PATH}/evidence/${encode(id)}`);
|
|
3176
|
+
}
|
|
3177
|
+
createDownloadUrl(id, fileId) {
|
|
3178
|
+
return this.client.request(
|
|
3179
|
+
"POST",
|
|
3180
|
+
`${DISCOVERY_BASE_PATH}/evidence/${encode(id)}/files/${encode(fileId)}/download-url`
|
|
3181
|
+
);
|
|
3182
|
+
}
|
|
3183
|
+
};
|
|
3184
|
+
var PlatformDiscoveryEvidenceServiceImpl = class {
|
|
3185
|
+
constructor(client) {
|
|
3186
|
+
this.client = client;
|
|
3187
|
+
}
|
|
3188
|
+
client;
|
|
3189
|
+
list(query = {}) {
|
|
3190
|
+
return this.client.requestWithQuery("GET", `${DISCOVERY_BASE_PATH}/platform/evidence`, query);
|
|
3191
|
+
}
|
|
3192
|
+
async summary() {
|
|
3193
|
+
const response = await this.client.request(
|
|
3194
|
+
"GET",
|
|
3195
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/summary`
|
|
3196
|
+
);
|
|
3197
|
+
return response.data;
|
|
3198
|
+
}
|
|
3199
|
+
get(id) {
|
|
3200
|
+
return this.client.request("GET", `${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}`);
|
|
3201
|
+
}
|
|
3202
|
+
updateStatus(id, request) {
|
|
3203
|
+
return this.client.request(
|
|
3204
|
+
"PATCH",
|
|
3205
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}/status`,
|
|
3206
|
+
request
|
|
3207
|
+
);
|
|
3208
|
+
}
|
|
3209
|
+
createDownloadUrl(id, fileId) {
|
|
3210
|
+
return this.client.request(
|
|
3211
|
+
"POST",
|
|
3212
|
+
`${DISCOVERY_BASE_PATH}/platform/evidence/${encode(id)}/files/${encode(fileId)}/download-url`
|
|
3213
|
+
);
|
|
3214
|
+
}
|
|
3215
|
+
};
|
|
3216
|
+
|
|
3139
3217
|
// src/events/index.ts
|
|
3140
3218
|
var EVENTS_BASE_PATH = "/events/v1";
|
|
3141
3219
|
var TAIL_TIMEOUT_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -3653,7 +3731,7 @@ var KnowledgeClient = class {
|
|
|
3653
3731
|
|
|
3654
3732
|
// src/scheduling/index.ts
|
|
3655
3733
|
var SCHEDULING_BASE_PATH = "/scheduling/v1";
|
|
3656
|
-
var
|
|
3734
|
+
var encode2 = encodeURIComponent;
|
|
3657
3735
|
var SchedulingClient = class {
|
|
3658
3736
|
calendarConnections;
|
|
3659
3737
|
calendars;
|
|
@@ -3695,41 +3773,41 @@ var CalendarConnectionServiceImpl = class {
|
|
|
3695
3773
|
updateMine(id, request) {
|
|
3696
3774
|
return this.client.request(
|
|
3697
3775
|
"PATCH",
|
|
3698
|
-
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${
|
|
3776
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode2(id)}`,
|
|
3699
3777
|
request
|
|
3700
3778
|
);
|
|
3701
3779
|
}
|
|
3702
3780
|
async disconnectMine(id) {
|
|
3703
3781
|
await this.client.request(
|
|
3704
3782
|
"DELETE",
|
|
3705
|
-
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${
|
|
3783
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode2(id)}`
|
|
3706
3784
|
);
|
|
3707
3785
|
}
|
|
3708
3786
|
syncMine(id, request = {}) {
|
|
3709
3787
|
return this.client.request(
|
|
3710
3788
|
"POST",
|
|
3711
|
-
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${
|
|
3789
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode2(id)}/sync`,
|
|
3712
3790
|
request
|
|
3713
3791
|
);
|
|
3714
3792
|
}
|
|
3715
3793
|
listForUser(userId, query = {}) {
|
|
3716
3794
|
return this.client.requestWithQuery(
|
|
3717
3795
|
"GET",
|
|
3718
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3796
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendar-connections`,
|
|
3719
3797
|
query
|
|
3720
3798
|
);
|
|
3721
3799
|
}
|
|
3722
3800
|
updateForUser(userId, id, request) {
|
|
3723
3801
|
return this.client.request(
|
|
3724
3802
|
"PATCH",
|
|
3725
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3803
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendar-connections/${encode2(id)}`,
|
|
3726
3804
|
request
|
|
3727
3805
|
);
|
|
3728
3806
|
}
|
|
3729
3807
|
async disconnectForUser(userId, id) {
|
|
3730
3808
|
await this.client.request(
|
|
3731
3809
|
"DELETE",
|
|
3732
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3810
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendar-connections/${encode2(id)}`
|
|
3733
3811
|
);
|
|
3734
3812
|
}
|
|
3735
3813
|
};
|
|
@@ -3742,32 +3820,32 @@ var CalendarServiceImpl = class {
|
|
|
3742
3820
|
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/me/calendars`, query);
|
|
3743
3821
|
}
|
|
3744
3822
|
getMine(id) {
|
|
3745
|
-
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/me/calendars/${
|
|
3823
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/me/calendars/${encode2(id)}`);
|
|
3746
3824
|
}
|
|
3747
3825
|
updateMine(id, request) {
|
|
3748
3826
|
return this.client.request(
|
|
3749
3827
|
"PATCH",
|
|
3750
|
-
`${SCHEDULING_BASE_PATH}/me/calendars/${
|
|
3828
|
+
`${SCHEDULING_BASE_PATH}/me/calendars/${encode2(id)}`,
|
|
3751
3829
|
request
|
|
3752
3830
|
);
|
|
3753
3831
|
}
|
|
3754
3832
|
listForUser(userId, query = {}) {
|
|
3755
3833
|
return this.client.requestWithQuery(
|
|
3756
3834
|
"GET",
|
|
3757
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3835
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendars`,
|
|
3758
3836
|
query
|
|
3759
3837
|
);
|
|
3760
3838
|
}
|
|
3761
3839
|
getForUser(userId, id) {
|
|
3762
3840
|
return this.client.request(
|
|
3763
3841
|
"GET",
|
|
3764
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3842
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendars/${encode2(id)}`
|
|
3765
3843
|
);
|
|
3766
3844
|
}
|
|
3767
3845
|
updateForUser(userId, id, request) {
|
|
3768
3846
|
return this.client.request(
|
|
3769
3847
|
"PATCH",
|
|
3770
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3848
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/calendars/${encode2(id)}`,
|
|
3771
3849
|
request
|
|
3772
3850
|
);
|
|
3773
3851
|
}
|
|
@@ -3786,13 +3864,13 @@ var SchedulingProfileServiceImpl = class {
|
|
|
3786
3864
|
getForUser(userId) {
|
|
3787
3865
|
return this.client.request(
|
|
3788
3866
|
"GET",
|
|
3789
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3867
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/scheduling-profile`
|
|
3790
3868
|
);
|
|
3791
3869
|
}
|
|
3792
3870
|
putForUser(userId, request) {
|
|
3793
3871
|
return this.client.request(
|
|
3794
3872
|
"PUT",
|
|
3795
|
-
`${SCHEDULING_BASE_PATH}/users/${
|
|
3873
|
+
`${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/scheduling-profile`,
|
|
3796
3874
|
request
|
|
3797
3875
|
);
|
|
3798
3876
|
}
|
|
@@ -3806,7 +3884,7 @@ var CalendarEventServiceImpl = class {
|
|
|
3806
3884
|
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/calendar-events`, query);
|
|
3807
3885
|
}
|
|
3808
3886
|
get(id) {
|
|
3809
|
-
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-events/${
|
|
3887
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-events/${encode2(id)}`);
|
|
3810
3888
|
}
|
|
3811
3889
|
create(request) {
|
|
3812
3890
|
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/calendar-events`, request);
|
|
@@ -3814,7 +3892,7 @@ var CalendarEventServiceImpl = class {
|
|
|
3814
3892
|
update(id, request, scope) {
|
|
3815
3893
|
return this.client.requestWithQuery(
|
|
3816
3894
|
"PATCH",
|
|
3817
|
-
`${SCHEDULING_BASE_PATH}/calendar-events/${
|
|
3895
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode2(id)}`,
|
|
3818
3896
|
scope ? { scope } : void 0,
|
|
3819
3897
|
request
|
|
3820
3898
|
);
|
|
@@ -3822,14 +3900,14 @@ var CalendarEventServiceImpl = class {
|
|
|
3822
3900
|
async delete(id, scope) {
|
|
3823
3901
|
await this.client.requestWithQuery(
|
|
3824
3902
|
"DELETE",
|
|
3825
|
-
`${SCHEDULING_BASE_PATH}/calendar-events/${
|
|
3903
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode2(id)}`,
|
|
3826
3904
|
scope ? { scope } : void 0
|
|
3827
3905
|
);
|
|
3828
3906
|
}
|
|
3829
3907
|
respond(id, request) {
|
|
3830
3908
|
return this.client.request(
|
|
3831
3909
|
"POST",
|
|
3832
|
-
`${SCHEDULING_BASE_PATH}/calendar-events/${
|
|
3910
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode2(id)}/respond`,
|
|
3833
3911
|
request
|
|
3834
3912
|
);
|
|
3835
3913
|
}
|
|
@@ -3843,26 +3921,26 @@ var CalendarEventTypeServiceImpl = class {
|
|
|
3843
3921
|
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types`, query);
|
|
3844
3922
|
}
|
|
3845
3923
|
get(key) {
|
|
3846
|
-
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types/${
|
|
3924
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types/${encode2(key)}`);
|
|
3847
3925
|
}
|
|
3848
3926
|
put(key, request) {
|
|
3849
3927
|
return this.client.request(
|
|
3850
3928
|
"PUT",
|
|
3851
|
-
`${SCHEDULING_BASE_PATH}/calendar-event-types/${
|
|
3929
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode2(key)}`,
|
|
3852
3930
|
request
|
|
3853
3931
|
);
|
|
3854
3932
|
}
|
|
3855
3933
|
update(key, request) {
|
|
3856
3934
|
return this.client.request(
|
|
3857
3935
|
"PATCH",
|
|
3858
|
-
`${SCHEDULING_BASE_PATH}/calendar-event-types/${
|
|
3936
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode2(key)}`,
|
|
3859
3937
|
request
|
|
3860
3938
|
);
|
|
3861
3939
|
}
|
|
3862
3940
|
async delete(key) {
|
|
3863
3941
|
await this.client.request(
|
|
3864
3942
|
"DELETE",
|
|
3865
|
-
`${SCHEDULING_BASE_PATH}/calendar-event-types/${
|
|
3943
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode2(key)}`
|
|
3866
3944
|
);
|
|
3867
3945
|
}
|
|
3868
3946
|
};
|
|
@@ -3872,37 +3950,37 @@ var AvailabilityConstraintServiceImpl = class {
|
|
|
3872
3950
|
}
|
|
3873
3951
|
client;
|
|
3874
3952
|
base(userId) {
|
|
3875
|
-
return userId ? `${SCHEDULING_BASE_PATH}/users/${
|
|
3953
|
+
return userId ? `${SCHEDULING_BASE_PATH}/users/${encode2(userId)}/availability-constraints` : `${SCHEDULING_BASE_PATH}/me/availability-constraints`;
|
|
3876
3954
|
}
|
|
3877
3955
|
listMine(query = {}) {
|
|
3878
3956
|
return this.client.requestWithQuery("GET", this.base(), query);
|
|
3879
3957
|
}
|
|
3880
3958
|
getMine(id) {
|
|
3881
|
-
return this.client.request("GET", `${this.base()}/${
|
|
3959
|
+
return this.client.request("GET", `${this.base()}/${encode2(id)}`);
|
|
3882
3960
|
}
|
|
3883
3961
|
createMine(request) {
|
|
3884
3962
|
return this.client.request("POST", this.base(), request);
|
|
3885
3963
|
}
|
|
3886
3964
|
updateMine(id, request) {
|
|
3887
|
-
return this.client.request("PATCH", `${this.base()}/${
|
|
3965
|
+
return this.client.request("PATCH", `${this.base()}/${encode2(id)}`, request);
|
|
3888
3966
|
}
|
|
3889
3967
|
async deleteMine(id) {
|
|
3890
|
-
await this.client.request("DELETE", `${this.base()}/${
|
|
3968
|
+
await this.client.request("DELETE", `${this.base()}/${encode2(id)}`);
|
|
3891
3969
|
}
|
|
3892
3970
|
listForUser(userId, query = {}) {
|
|
3893
3971
|
return this.client.requestWithQuery("GET", this.base(userId), query);
|
|
3894
3972
|
}
|
|
3895
3973
|
getForUser(userId, id) {
|
|
3896
|
-
return this.client.request("GET", `${this.base(userId)}/${
|
|
3974
|
+
return this.client.request("GET", `${this.base(userId)}/${encode2(id)}`);
|
|
3897
3975
|
}
|
|
3898
3976
|
createForUser(userId, request) {
|
|
3899
3977
|
return this.client.request("POST", this.base(userId), request);
|
|
3900
3978
|
}
|
|
3901
3979
|
updateForUser(userId, id, request) {
|
|
3902
|
-
return this.client.request("PATCH", `${this.base(userId)}/${
|
|
3980
|
+
return this.client.request("PATCH", `${this.base(userId)}/${encode2(id)}`, request);
|
|
3903
3981
|
}
|
|
3904
3982
|
async deleteForUser(userId, id) {
|
|
3905
|
-
await this.client.request("DELETE", `${this.base(userId)}/${
|
|
3983
|
+
await this.client.request("DELETE", `${this.base(userId)}/${encode2(id)}`);
|
|
3906
3984
|
}
|
|
3907
3985
|
};
|
|
3908
3986
|
var SlotServiceImpl = class {
|
|
@@ -3923,26 +4001,26 @@ var SchedulingLinkServiceImpl = class {
|
|
|
3923
4001
|
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/scheduling-links`, query);
|
|
3924
4002
|
}
|
|
3925
4003
|
get(key) {
|
|
3926
|
-
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4004
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}`);
|
|
3927
4005
|
}
|
|
3928
4006
|
create(request) {
|
|
3929
4007
|
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links`, request);
|
|
3930
4008
|
}
|
|
3931
4009
|
update(key, request) {
|
|
3932
|
-
return this.client.request("PATCH", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4010
|
+
return this.client.request("PATCH", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}`, request);
|
|
3933
4011
|
}
|
|
3934
4012
|
async delete(key) {
|
|
3935
|
-
await this.client.request("DELETE", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4013
|
+
await this.client.request("DELETE", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}`);
|
|
3936
4014
|
}
|
|
3937
4015
|
getPage(key, contactId) {
|
|
3938
|
-
const suffix = contactId ? `?contact_id=${
|
|
3939
|
-
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4016
|
+
const suffix = contactId ? `?contact_id=${encode2(contactId)}` : "";
|
|
4017
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/page${suffix}`);
|
|
3940
4018
|
}
|
|
3941
4019
|
getSlots(key, query) {
|
|
3942
|
-
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4020
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/slots`, query);
|
|
3943
4021
|
}
|
|
3944
4022
|
book(key, request) {
|
|
3945
|
-
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links/${
|
|
4023
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/calendar-events`, request);
|
|
3946
4024
|
}
|
|
3947
4025
|
};
|
|
3948
4026
|
var PublicSchedulingServiceImpl = class {
|
|
@@ -3951,29 +4029,29 @@ var PublicSchedulingServiceImpl = class {
|
|
|
3951
4029
|
}
|
|
3952
4030
|
client;
|
|
3953
4031
|
base(orgId) {
|
|
3954
|
-
return `${SCHEDULING_BASE_PATH}/public/orgs/${
|
|
4032
|
+
return `${SCHEDULING_BASE_PATH}/public/orgs/${encode2(orgId)}`;
|
|
3955
4033
|
}
|
|
3956
4034
|
getLink(orgId, key, contactId) {
|
|
3957
|
-
const suffix = contactId ? `?contact_id=${
|
|
3958
|
-
return this.client.request("GET", `${this.base(orgId)}/links/${
|
|
4035
|
+
const suffix = contactId ? `?contact_id=${encode2(contactId)}` : "";
|
|
4036
|
+
return this.client.request("GET", `${this.base(orgId)}/links/${encode2(key)}${suffix}`, void 0, { skipAuth: true });
|
|
3959
4037
|
}
|
|
3960
4038
|
getSlots(orgId, key, query) {
|
|
3961
4039
|
const params = new URLSearchParams({ from: query.from, to: query.to, timezone: query.timezone });
|
|
3962
4040
|
if (query.host_user_id) params.set("host_user_id", query.host_user_id);
|
|
3963
4041
|
if (query.type_key) params.set("type_key", query.type_key);
|
|
3964
|
-
return this.client.request("GET", `${this.base(orgId)}/links/${
|
|
4042
|
+
return this.client.request("GET", `${this.base(orgId)}/links/${encode2(key)}/slots?${params.toString()}`, void 0, { skipAuth: true });
|
|
3965
4043
|
}
|
|
3966
4044
|
book(orgId, key, request) {
|
|
3967
|
-
return this.client.request("POST", `${this.base(orgId)}/links/${
|
|
4045
|
+
return this.client.request("POST", `${this.base(orgId)}/links/${encode2(key)}/calendar-events`, request, { skipAuth: true });
|
|
3968
4046
|
}
|
|
3969
4047
|
getEvent(orgId, id, token) {
|
|
3970
|
-
return this.client.request("GET", `${this.base(orgId)}/calendar-events/${
|
|
4048
|
+
return this.client.request("GET", `${this.base(orgId)}/calendar-events/${encode2(id)}?token=${encode2(token)}`, void 0, { skipAuth: true });
|
|
3971
4049
|
}
|
|
3972
4050
|
cancel(orgId, id, request) {
|
|
3973
|
-
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${
|
|
4051
|
+
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${encode2(id)}/cancel`, request, { skipAuth: true });
|
|
3974
4052
|
}
|
|
3975
4053
|
reschedule(orgId, id, request) {
|
|
3976
|
-
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${
|
|
4054
|
+
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${encode2(id)}/reschedule`, request, { skipAuth: true });
|
|
3977
4055
|
}
|
|
3978
4056
|
};
|
|
3979
4057
|
|
|
@@ -4080,8 +4158,17 @@ var FileServiceImpl = class {
|
|
|
4080
4158
|
);
|
|
4081
4159
|
return response.data;
|
|
4082
4160
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
4161
|
+
/**
|
|
4162
|
+
* The file's bytes. `options.timeout` covers reading the whole body, so raise
|
|
4163
|
+
* it for large files; `options.signal` aborts the download.
|
|
4164
|
+
*/
|
|
4165
|
+
async download(id, options) {
|
|
4166
|
+
const { response } = await this.client.requestRaw(
|
|
4167
|
+
"GET",
|
|
4168
|
+
`${FILES_BASE_PATH}/${id}/download`,
|
|
4169
|
+
void 0,
|
|
4170
|
+
options
|
|
4171
|
+
);
|
|
4085
4172
|
return await response.blob();
|
|
4086
4173
|
}
|
|
4087
4174
|
async downloadPublic(orgId, id) {
|
|
@@ -4571,6 +4658,7 @@ exports.ConversationClient = ConversationClient;
|
|
|
4571
4658
|
exports.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
|
|
4572
4659
|
exports.DEFAULT_PORT = DEFAULT_PORT;
|
|
4573
4660
|
exports.DataClient = DataClient;
|
|
4661
|
+
exports.DiscoveryClient = DiscoveryClient;
|
|
4574
4662
|
exports.ERROR_PORT = ERROR_PORT;
|
|
4575
4663
|
exports.ErrorCode = ErrorCode;
|
|
4576
4664
|
exports.EventsClient = EventsClient;
|