@zilfu/sdk 0.1.2 → 0.1.3
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 +51 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -120
- package/dist/index.d.ts +98 -120
- package/dist/index.js +51 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -834,8 +834,6 @@ var HeyApiRegistry = class {
|
|
|
834
834
|
var Accounts = class extends HeyApiClient {
|
|
835
835
|
/**
|
|
836
836
|
* List accounts
|
|
837
|
-
*
|
|
838
|
-
* Returns all connected social accounts for the given space.
|
|
839
837
|
*/
|
|
840
838
|
list(options) {
|
|
841
839
|
return (options.client ?? this.client).get({
|
|
@@ -847,7 +845,7 @@ var Accounts = class extends HeyApiClient {
|
|
|
847
845
|
/**
|
|
848
846
|
* Activate an account
|
|
849
847
|
*
|
|
850
|
-
*
|
|
848
|
+
* Deactivates other accounts on the same platform within the space.
|
|
851
849
|
*/
|
|
852
850
|
activate(options) {
|
|
853
851
|
return (options.client ?? this.client).patch({
|
|
@@ -858,8 +856,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
858
856
|
}
|
|
859
857
|
/**
|
|
860
858
|
* List Pinterest boards
|
|
861
|
-
*
|
|
862
|
-
* Returns the Pinterest boards available for the given account.
|
|
863
859
|
*/
|
|
864
860
|
boards(options) {
|
|
865
861
|
return (options.client ?? this.client).get({
|
|
@@ -871,7 +867,7 @@ var Accounts = class extends HeyApiClient {
|
|
|
871
867
|
/**
|
|
872
868
|
* Disconnect an account
|
|
873
869
|
*
|
|
874
|
-
* Removes
|
|
870
|
+
* Removes every account on the same platform within the space and fires an AccountDisconnected webhook for each.
|
|
875
871
|
*/
|
|
876
872
|
delete(options) {
|
|
877
873
|
return (options.client ?? this.client).delete({
|
|
@@ -884,8 +880,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
884
880
|
var ApiTokens = class extends HeyApiClient {
|
|
885
881
|
/**
|
|
886
882
|
* Create an API token
|
|
887
|
-
*
|
|
888
|
-
* Generates a new personal access token for the authenticated user.
|
|
889
883
|
*/
|
|
890
884
|
create(options) {
|
|
891
885
|
return (options.client ?? this.client).post({
|
|
@@ -900,8 +894,6 @@ var ApiTokens = class extends HeyApiClient {
|
|
|
900
894
|
}
|
|
901
895
|
/**
|
|
902
896
|
* Revoke an API token
|
|
903
|
-
*
|
|
904
|
-
* Deletes the specified personal access token.
|
|
905
897
|
*/
|
|
906
898
|
delete(options) {
|
|
907
899
|
return (options.client ?? this.client).delete({
|
|
@@ -912,6 +904,9 @@ var ApiTokens = class extends HeyApiClient {
|
|
|
912
904
|
}
|
|
913
905
|
};
|
|
914
906
|
var Blocks = class extends HeyApiClient {
|
|
907
|
+
/**
|
|
908
|
+
* List bio blocks
|
|
909
|
+
*/
|
|
915
910
|
list(options) {
|
|
916
911
|
return (options.client ?? this.client).get({
|
|
917
912
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -919,6 +914,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
919
914
|
...options
|
|
920
915
|
});
|
|
921
916
|
}
|
|
917
|
+
/**
|
|
918
|
+
* Create a bio block
|
|
919
|
+
*/
|
|
922
920
|
create(options) {
|
|
923
921
|
return (options.client ?? this.client).post({
|
|
924
922
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -930,6 +928,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
930
928
|
}
|
|
931
929
|
});
|
|
932
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Delete a bio block
|
|
933
|
+
*/
|
|
933
934
|
delete(options) {
|
|
934
935
|
return (options.client ?? this.client).delete({
|
|
935
936
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -937,6 +938,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
937
938
|
...options
|
|
938
939
|
});
|
|
939
940
|
}
|
|
941
|
+
/**
|
|
942
|
+
* Update a bio block
|
|
943
|
+
*/
|
|
940
944
|
update(options) {
|
|
941
945
|
return (options.client ?? this.client).put({
|
|
942
946
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -948,6 +952,11 @@ var Blocks = class extends HeyApiClient {
|
|
|
948
952
|
}
|
|
949
953
|
});
|
|
950
954
|
}
|
|
955
|
+
/**
|
|
956
|
+
* Reorder a bio block
|
|
957
|
+
*
|
|
958
|
+
* Moves the block up or down by swapping with its neighbour.
|
|
959
|
+
*/
|
|
951
960
|
reorder(options) {
|
|
952
961
|
return (options.client ?? this.client).post({
|
|
953
962
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -961,6 +970,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
961
970
|
}
|
|
962
971
|
};
|
|
963
972
|
var Bio = class extends HeyApiClient {
|
|
973
|
+
/**
|
|
974
|
+
* Get the bio page
|
|
975
|
+
*/
|
|
964
976
|
get(options) {
|
|
965
977
|
return (options.client ?? this.client).get({
|
|
966
978
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -968,6 +980,11 @@ var Bio = class extends HeyApiClient {
|
|
|
968
980
|
...options
|
|
969
981
|
});
|
|
970
982
|
}
|
|
983
|
+
/**
|
|
984
|
+
* Create the bio page
|
|
985
|
+
*
|
|
986
|
+
* Seeds a social icons block from the space's active accounts.
|
|
987
|
+
*/
|
|
971
988
|
create(options) {
|
|
972
989
|
return (options.client ?? this.client).post({
|
|
973
990
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -979,6 +996,9 @@ var Bio = class extends HeyApiClient {
|
|
|
979
996
|
}
|
|
980
997
|
});
|
|
981
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Update the bio page
|
|
1001
|
+
*/
|
|
982
1002
|
update(options) {
|
|
983
1003
|
return (options.client ?? this.client).put({
|
|
984
1004
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -990,6 +1010,9 @@ var Bio = class extends HeyApiClient {
|
|
|
990
1010
|
}
|
|
991
1011
|
});
|
|
992
1012
|
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Upload a bio page avatar
|
|
1015
|
+
*/
|
|
993
1016
|
uploadAvatar(options) {
|
|
994
1017
|
return (options.client ?? this.client).post({
|
|
995
1018
|
...formDataBodySerializer,
|
|
@@ -1008,6 +1031,9 @@ var Bio = class extends HeyApiClient {
|
|
|
1008
1031
|
}
|
|
1009
1032
|
};
|
|
1010
1033
|
var Health = class extends HeyApiClient {
|
|
1034
|
+
/**
|
|
1035
|
+
* Health check
|
|
1036
|
+
*/
|
|
1011
1037
|
check(options) {
|
|
1012
1038
|
return (options?.client ?? this.client).get({
|
|
1013
1039
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -1018,40 +1044,27 @@ var Health = class extends HeyApiClient {
|
|
|
1018
1044
|
};
|
|
1019
1045
|
var Media = class extends HeyApiClient {
|
|
1020
1046
|
/**
|
|
1021
|
-
*
|
|
1047
|
+
* Get an upload URL
|
|
1022
1048
|
*
|
|
1023
|
-
*
|
|
1049
|
+
* PUT the file to the returned `upload_url` with `Content-Type: <mime>`, then send `url` back when creating or updating a post.
|
|
1024
1050
|
*/
|
|
1025
|
-
|
|
1051
|
+
sign(options) {
|
|
1026
1052
|
return (options.client ?? this.client).post({
|
|
1027
|
-
...formDataBodySerializer,
|
|
1028
1053
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1029
|
-
url: "/media",
|
|
1054
|
+
url: "/media/sign",
|
|
1030
1055
|
...options,
|
|
1031
1056
|
headers: {
|
|
1032
|
-
"Content-Type":
|
|
1057
|
+
"Content-Type": "application/json",
|
|
1033
1058
|
...options.headers
|
|
1034
1059
|
}
|
|
1035
1060
|
});
|
|
1036
1061
|
}
|
|
1037
|
-
/**
|
|
1038
|
-
* Delete a media file
|
|
1039
|
-
*
|
|
1040
|
-
* Removes the media file from storage and deletes the record.
|
|
1041
|
-
*/
|
|
1042
|
-
delete(options) {
|
|
1043
|
-
return (options.client ?? this.client).delete({
|
|
1044
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1045
|
-
url: "/media/{media}",
|
|
1046
|
-
...options
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
1062
|
};
|
|
1050
1063
|
var Posts = class extends HeyApiClient {
|
|
1051
1064
|
/**
|
|
1052
1065
|
* List posts
|
|
1053
1066
|
*
|
|
1054
|
-
*
|
|
1067
|
+
* Filterable by status, account, and date range.
|
|
1055
1068
|
*/
|
|
1056
1069
|
list(options) {
|
|
1057
1070
|
return (options.client ?? this.client).get({
|
|
@@ -1063,7 +1076,7 @@ var Posts = class extends HeyApiClient {
|
|
|
1063
1076
|
/**
|
|
1064
1077
|
* Create posts
|
|
1065
1078
|
*
|
|
1066
|
-
* Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing
|
|
1079
|
+
* Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing.
|
|
1067
1080
|
*/
|
|
1068
1081
|
create(options) {
|
|
1069
1082
|
return (options.client ?? this.client).post({
|
|
@@ -1078,8 +1091,6 @@ var Posts = class extends HeyApiClient {
|
|
|
1078
1091
|
}
|
|
1079
1092
|
/**
|
|
1080
1093
|
* Delete a post
|
|
1081
|
-
*
|
|
1082
|
-
* Permanently deletes the given post.
|
|
1083
1094
|
*/
|
|
1084
1095
|
delete(options) {
|
|
1085
1096
|
return (options.client ?? this.client).delete({
|
|
@@ -1090,8 +1101,6 @@ var Posts = class extends HeyApiClient {
|
|
|
1090
1101
|
}
|
|
1091
1102
|
/**
|
|
1092
1103
|
* Get a post
|
|
1093
|
-
*
|
|
1094
|
-
* Returns a single post with its account, children, and media.
|
|
1095
1104
|
*/
|
|
1096
1105
|
get(options) {
|
|
1097
1106
|
return (options.client ?? this.client).get({
|
|
@@ -1102,8 +1111,6 @@ var Posts = class extends HeyApiClient {
|
|
|
1102
1111
|
}
|
|
1103
1112
|
/**
|
|
1104
1113
|
* Update a post
|
|
1105
|
-
*
|
|
1106
|
-
* Updates a single post's content, schedule, and media attachments.
|
|
1107
1114
|
*/
|
|
1108
1115
|
update(options) {
|
|
1109
1116
|
return (options.client ?? this.client).put({
|
|
@@ -1119,9 +1126,9 @@ var Posts = class extends HeyApiClient {
|
|
|
1119
1126
|
};
|
|
1120
1127
|
var Clusters = class extends HeyApiClient {
|
|
1121
1128
|
/**
|
|
1122
|
-
* Update a cluster
|
|
1129
|
+
* Update a cluster
|
|
1123
1130
|
*
|
|
1124
|
-
* Updates all posts
|
|
1131
|
+
* Updates all posts in the cluster, including adding or removing accounts and re-scheduling.
|
|
1125
1132
|
*/
|
|
1126
1133
|
update(options) {
|
|
1127
1134
|
return (options.client ?? this.client).put({
|
|
@@ -1137,9 +1144,9 @@ var Clusters = class extends HeyApiClient {
|
|
|
1137
1144
|
};
|
|
1138
1145
|
var Queue = class extends HeyApiClient {
|
|
1139
1146
|
/**
|
|
1140
|
-
*
|
|
1147
|
+
* List available queue slots
|
|
1141
1148
|
*
|
|
1142
|
-
* Returns up to 9 upcoming
|
|
1149
|
+
* Returns up to 9 upcoming free slots from the space's schedule.
|
|
1143
1150
|
*/
|
|
1144
1151
|
list(options) {
|
|
1145
1152
|
return (options.client ?? this.client).get({
|
|
@@ -1152,8 +1159,6 @@ var Queue = class extends HeyApiClient {
|
|
|
1152
1159
|
var Slots = class extends HeyApiClient {
|
|
1153
1160
|
/**
|
|
1154
1161
|
* List slots
|
|
1155
|
-
*
|
|
1156
|
-
* Returns all scheduling slots for the space, ordered by day and time.
|
|
1157
1162
|
*/
|
|
1158
1163
|
list(options) {
|
|
1159
1164
|
return (options.client ?? this.client).get({
|
|
@@ -1165,7 +1170,7 @@ var Slots = class extends HeyApiClient {
|
|
|
1165
1170
|
/**
|
|
1166
1171
|
* Create slots
|
|
1167
1172
|
*
|
|
1168
|
-
* Creates
|
|
1173
|
+
* Creates a slot at the given time for each day of the week.
|
|
1169
1174
|
*/
|
|
1170
1175
|
create(options) {
|
|
1171
1176
|
return (options.client ?? this.client).post({
|
|
@@ -1180,8 +1185,6 @@ var Slots = class extends HeyApiClient {
|
|
|
1180
1185
|
}
|
|
1181
1186
|
/**
|
|
1182
1187
|
* Delete a slot
|
|
1183
|
-
*
|
|
1184
|
-
* Removes a scheduling slot from the space.
|
|
1185
1188
|
*/
|
|
1186
1189
|
delete(options) {
|
|
1187
1190
|
return (options.client ?? this.client).delete({
|
|
@@ -1194,8 +1197,6 @@ var Slots = class extends HeyApiClient {
|
|
|
1194
1197
|
var Spaces = class extends HeyApiClient {
|
|
1195
1198
|
/**
|
|
1196
1199
|
* List spaces
|
|
1197
|
-
*
|
|
1198
|
-
* Returns all spaces belonging to the authenticated user, ordered by most recent.
|
|
1199
1200
|
*/
|
|
1200
1201
|
list(options) {
|
|
1201
1202
|
return (options?.client ?? this.client).get({
|
|
@@ -1206,8 +1207,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1206
1207
|
}
|
|
1207
1208
|
/**
|
|
1208
1209
|
* Create a space
|
|
1209
|
-
*
|
|
1210
|
-
* Creates a new space for the authenticated user.
|
|
1211
1210
|
*/
|
|
1212
1211
|
create(options) {
|
|
1213
1212
|
return (options.client ?? this.client).post({
|
|
@@ -1223,7 +1222,7 @@ var Spaces = class extends HeyApiClient {
|
|
|
1223
1222
|
/**
|
|
1224
1223
|
* Delete a space
|
|
1225
1224
|
*
|
|
1226
|
-
*
|
|
1225
|
+
* Cascades to all accounts, posts, slots, and other associated data.
|
|
1227
1226
|
*/
|
|
1228
1227
|
delete(options) {
|
|
1229
1228
|
return (options.client ?? this.client).delete({
|
|
@@ -1234,8 +1233,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1234
1233
|
}
|
|
1235
1234
|
/**
|
|
1236
1235
|
* Get a space
|
|
1237
|
-
*
|
|
1238
|
-
* Returns a single space by ID.
|
|
1239
1236
|
*/
|
|
1240
1237
|
get(options) {
|
|
1241
1238
|
return (options.client ?? this.client).get({
|
|
@@ -1246,8 +1243,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1246
1243
|
}
|
|
1247
1244
|
/**
|
|
1248
1245
|
* Update a space
|
|
1249
|
-
*
|
|
1250
|
-
* Updates the given space's settings.
|
|
1251
1246
|
*/
|
|
1252
1247
|
update(options) {
|
|
1253
1248
|
return (options.client ?? this.client).put({
|
|
@@ -1265,7 +1260,7 @@ var Subscription = class extends HeyApiClient {
|
|
|
1265
1260
|
/**
|
|
1266
1261
|
* Get subscription details
|
|
1267
1262
|
*
|
|
1268
|
-
*
|
|
1263
|
+
* Includes plan, usage limits, trial state, and cancellation state.
|
|
1269
1264
|
*/
|
|
1270
1265
|
get(options) {
|
|
1271
1266
|
return (options?.client ?? this.client).get({
|
|
@@ -1278,8 +1273,6 @@ var Subscription = class extends HeyApiClient {
|
|
|
1278
1273
|
var Webhooks = class extends HeyApiClient {
|
|
1279
1274
|
/**
|
|
1280
1275
|
* List webhooks
|
|
1281
|
-
*
|
|
1282
|
-
* Returns all webhooks configured for the given space.
|
|
1283
1276
|
*/
|
|
1284
1277
|
list(options) {
|
|
1285
1278
|
return (options.client ?? this.client).get({
|
|
@@ -1291,7 +1284,7 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1291
1284
|
/**
|
|
1292
1285
|
* Create a webhook
|
|
1293
1286
|
*
|
|
1294
|
-
*
|
|
1287
|
+
* Returns an auto-generated signing secret on the response.
|
|
1295
1288
|
*/
|
|
1296
1289
|
create(options) {
|
|
1297
1290
|
return (options.client ?? this.client).post({
|
|
@@ -1306,8 +1299,6 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1306
1299
|
}
|
|
1307
1300
|
/**
|
|
1308
1301
|
* Delete a webhook
|
|
1309
|
-
*
|
|
1310
|
-
* Permanently removes the webhook endpoint.
|
|
1311
1302
|
*/
|
|
1312
1303
|
delete(options) {
|
|
1313
1304
|
return (options.client ?? this.client).delete({
|
|
@@ -1318,8 +1309,6 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1318
1309
|
}
|
|
1319
1310
|
/**
|
|
1320
1311
|
* Update a webhook
|
|
1321
|
-
*
|
|
1322
|
-
* Updates the webhook's URL, events, or active status.
|
|
1323
1312
|
*/
|
|
1324
1313
|
update(options) {
|
|
1325
1314
|
return (options.client ?? this.client).put({
|