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