@zilfu/sdk 0.1.2 → 0.1.4
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 +50 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -235
- package/dist/index.d.ts +104 -235
- package/dist/index.js +50 -81
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -832,8 +832,6 @@ var HeyApiRegistry = class {
|
|
|
832
832
|
var Accounts = class extends HeyApiClient {
|
|
833
833
|
/**
|
|
834
834
|
* List accounts
|
|
835
|
-
*
|
|
836
|
-
* Returns all connected social accounts for the given space.
|
|
837
835
|
*/
|
|
838
836
|
list(options) {
|
|
839
837
|
return (options.client ?? this.client).get({
|
|
@@ -845,7 +843,7 @@ var Accounts = class extends HeyApiClient {
|
|
|
845
843
|
/**
|
|
846
844
|
* Activate an account
|
|
847
845
|
*
|
|
848
|
-
*
|
|
846
|
+
* Deactivates other accounts on the same platform within the space.
|
|
849
847
|
*/
|
|
850
848
|
activate(options) {
|
|
851
849
|
return (options.client ?? this.client).patch({
|
|
@@ -856,8 +854,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
856
854
|
}
|
|
857
855
|
/**
|
|
858
856
|
* List Pinterest boards
|
|
859
|
-
*
|
|
860
|
-
* Returns the Pinterest boards available for the given account.
|
|
861
857
|
*/
|
|
862
858
|
boards(options) {
|
|
863
859
|
return (options.client ?? this.client).get({
|
|
@@ -869,7 +865,7 @@ var Accounts = class extends HeyApiClient {
|
|
|
869
865
|
/**
|
|
870
866
|
* Disconnect an account
|
|
871
867
|
*
|
|
872
|
-
* Removes
|
|
868
|
+
* Removes every account on the same platform within the space and fires an AccountDisconnected webhook for each.
|
|
873
869
|
*/
|
|
874
870
|
delete(options) {
|
|
875
871
|
return (options.client ?? this.client).delete({
|
|
@@ -882,8 +878,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
882
878
|
var ApiTokens = class extends HeyApiClient {
|
|
883
879
|
/**
|
|
884
880
|
* Create an API token
|
|
885
|
-
*
|
|
886
|
-
* Generates a new personal access token for the authenticated user.
|
|
887
881
|
*/
|
|
888
882
|
create(options) {
|
|
889
883
|
return (options.client ?? this.client).post({
|
|
@@ -898,8 +892,6 @@ var ApiTokens = class extends HeyApiClient {
|
|
|
898
892
|
}
|
|
899
893
|
/**
|
|
900
894
|
* Revoke an API token
|
|
901
|
-
*
|
|
902
|
-
* Deletes the specified personal access token.
|
|
903
895
|
*/
|
|
904
896
|
delete(options) {
|
|
905
897
|
return (options.client ?? this.client).delete({
|
|
@@ -910,6 +902,9 @@ var ApiTokens = class extends HeyApiClient {
|
|
|
910
902
|
}
|
|
911
903
|
};
|
|
912
904
|
var Blocks = class extends HeyApiClient {
|
|
905
|
+
/**
|
|
906
|
+
* List bio blocks
|
|
907
|
+
*/
|
|
913
908
|
list(options) {
|
|
914
909
|
return (options.client ?? this.client).get({
|
|
915
910
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -917,6 +912,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
917
912
|
...options
|
|
918
913
|
});
|
|
919
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* Create a bio block
|
|
917
|
+
*/
|
|
920
918
|
create(options) {
|
|
921
919
|
return (options.client ?? this.client).post({
|
|
922
920
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -928,6 +926,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
928
926
|
}
|
|
929
927
|
});
|
|
930
928
|
}
|
|
929
|
+
/**
|
|
930
|
+
* Delete a bio block
|
|
931
|
+
*/
|
|
931
932
|
delete(options) {
|
|
932
933
|
return (options.client ?? this.client).delete({
|
|
933
934
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -935,6 +936,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
935
936
|
...options
|
|
936
937
|
});
|
|
937
938
|
}
|
|
939
|
+
/**
|
|
940
|
+
* Update a bio block
|
|
941
|
+
*/
|
|
938
942
|
update(options) {
|
|
939
943
|
return (options.client ?? this.client).put({
|
|
940
944
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -946,6 +950,11 @@ var Blocks = class extends HeyApiClient {
|
|
|
946
950
|
}
|
|
947
951
|
});
|
|
948
952
|
}
|
|
953
|
+
/**
|
|
954
|
+
* Reorder a bio block
|
|
955
|
+
*
|
|
956
|
+
* Moves the block up or down by swapping with its neighbour.
|
|
957
|
+
*/
|
|
949
958
|
reorder(options) {
|
|
950
959
|
return (options.client ?? this.client).post({
|
|
951
960
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -959,6 +968,9 @@ var Blocks = class extends HeyApiClient {
|
|
|
959
968
|
}
|
|
960
969
|
};
|
|
961
970
|
var Bio = class extends HeyApiClient {
|
|
971
|
+
/**
|
|
972
|
+
* Get the bio page
|
|
973
|
+
*/
|
|
962
974
|
get(options) {
|
|
963
975
|
return (options.client ?? this.client).get({
|
|
964
976
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -966,6 +978,11 @@ var Bio = class extends HeyApiClient {
|
|
|
966
978
|
...options
|
|
967
979
|
});
|
|
968
980
|
}
|
|
981
|
+
/**
|
|
982
|
+
* Create the bio page
|
|
983
|
+
*
|
|
984
|
+
* Seeds a social icons block from the space's active accounts.
|
|
985
|
+
*/
|
|
969
986
|
create(options) {
|
|
970
987
|
return (options.client ?? this.client).post({
|
|
971
988
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -977,6 +994,9 @@ var Bio = class extends HeyApiClient {
|
|
|
977
994
|
}
|
|
978
995
|
});
|
|
979
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Update the bio page
|
|
999
|
+
*/
|
|
980
1000
|
update(options) {
|
|
981
1001
|
return (options.client ?? this.client).put({
|
|
982
1002
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -988,6 +1008,9 @@ var Bio = class extends HeyApiClient {
|
|
|
988
1008
|
}
|
|
989
1009
|
});
|
|
990
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Upload a bio page avatar
|
|
1013
|
+
*/
|
|
991
1014
|
uploadAvatar(options) {
|
|
992
1015
|
return (options.client ?? this.client).post({
|
|
993
1016
|
...formDataBodySerializer,
|
|
@@ -1006,6 +1029,9 @@ var Bio = class extends HeyApiClient {
|
|
|
1006
1029
|
}
|
|
1007
1030
|
};
|
|
1008
1031
|
var Health = class extends HeyApiClient {
|
|
1032
|
+
/**
|
|
1033
|
+
* Health check
|
|
1034
|
+
*/
|
|
1009
1035
|
check(options) {
|
|
1010
1036
|
return (options?.client ?? this.client).get({
|
|
1011
1037
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -1016,40 +1042,27 @@ var Health = class extends HeyApiClient {
|
|
|
1016
1042
|
};
|
|
1017
1043
|
var Media = class extends HeyApiClient {
|
|
1018
1044
|
/**
|
|
1019
|
-
*
|
|
1045
|
+
* Get an upload URL
|
|
1020
1046
|
*
|
|
1021
|
-
*
|
|
1047
|
+
* PUT the file to the returned `upload_url` with `Content-Type: <mime>`, then send `url` back when creating or updating a post.
|
|
1022
1048
|
*/
|
|
1023
|
-
|
|
1049
|
+
sign(options) {
|
|
1024
1050
|
return (options.client ?? this.client).post({
|
|
1025
|
-
...formDataBodySerializer,
|
|
1026
1051
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1027
|
-
url: "/media",
|
|
1052
|
+
url: "/media/sign",
|
|
1028
1053
|
...options,
|
|
1029
1054
|
headers: {
|
|
1030
|
-
"Content-Type":
|
|
1055
|
+
"Content-Type": "application/json",
|
|
1031
1056
|
...options.headers
|
|
1032
1057
|
}
|
|
1033
1058
|
});
|
|
1034
1059
|
}
|
|
1035
|
-
/**
|
|
1036
|
-
* Delete a media file
|
|
1037
|
-
*
|
|
1038
|
-
* Removes the media file from storage and deletes the record.
|
|
1039
|
-
*/
|
|
1040
|
-
delete(options) {
|
|
1041
|
-
return (options.client ?? this.client).delete({
|
|
1042
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1043
|
-
url: "/media/{media}",
|
|
1044
|
-
...options
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
1060
|
};
|
|
1048
1061
|
var Posts = class extends HeyApiClient {
|
|
1049
1062
|
/**
|
|
1050
1063
|
* List posts
|
|
1051
1064
|
*
|
|
1052
|
-
*
|
|
1065
|
+
* Filterable by status, account, and date range.
|
|
1053
1066
|
*/
|
|
1054
1067
|
list(options) {
|
|
1055
1068
|
return (options.client ?? this.client).get({
|
|
@@ -1061,7 +1074,7 @@ var Posts = class extends HeyApiClient {
|
|
|
1061
1074
|
/**
|
|
1062
1075
|
* Create posts
|
|
1063
1076
|
*
|
|
1064
|
-
* Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing
|
|
1077
|
+
* Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing.
|
|
1065
1078
|
*/
|
|
1066
1079
|
create(options) {
|
|
1067
1080
|
return (options.client ?? this.client).post({
|
|
@@ -1076,8 +1089,6 @@ var Posts = class extends HeyApiClient {
|
|
|
1076
1089
|
}
|
|
1077
1090
|
/**
|
|
1078
1091
|
* Delete a post
|
|
1079
|
-
*
|
|
1080
|
-
* Permanently deletes the given post.
|
|
1081
1092
|
*/
|
|
1082
1093
|
delete(options) {
|
|
1083
1094
|
return (options.client ?? this.client).delete({
|
|
@@ -1088,8 +1099,6 @@ var Posts = class extends HeyApiClient {
|
|
|
1088
1099
|
}
|
|
1089
1100
|
/**
|
|
1090
1101
|
* Get a post
|
|
1091
|
-
*
|
|
1092
|
-
* Returns a single post with its account, children, and media.
|
|
1093
1102
|
*/
|
|
1094
1103
|
get(options) {
|
|
1095
1104
|
return (options.client ?? this.client).get({
|
|
@@ -1101,7 +1110,7 @@ var Posts = class extends HeyApiClient {
|
|
|
1101
1110
|
/**
|
|
1102
1111
|
* Update a post
|
|
1103
1112
|
*
|
|
1104
|
-
* Updates
|
|
1113
|
+
* Updates content, media, thread replies, schedule, status, and metadata for a single post.
|
|
1105
1114
|
*/
|
|
1106
1115
|
update(options) {
|
|
1107
1116
|
return (options.client ?? this.client).put({
|
|
@@ -1115,29 +1124,11 @@ var Posts = class extends HeyApiClient {
|
|
|
1115
1124
|
});
|
|
1116
1125
|
}
|
|
1117
1126
|
};
|
|
1118
|
-
var Clusters = class extends HeyApiClient {
|
|
1119
|
-
/**
|
|
1120
|
-
* Update a cluster of posts
|
|
1121
|
-
*
|
|
1122
|
-
* Updates all posts sharing the given cluster ID. Handles adding/removing accounts and re-scheduling.
|
|
1123
|
-
*/
|
|
1124
|
-
update(options) {
|
|
1125
|
-
return (options.client ?? this.client).put({
|
|
1126
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1127
|
-
url: "/spaces/{space}/clusters/{cluster_id}",
|
|
1128
|
-
...options,
|
|
1129
|
-
headers: {
|
|
1130
|
-
"Content-Type": "application/json",
|
|
1131
|
-
...options.headers
|
|
1132
|
-
}
|
|
1133
|
-
});
|
|
1134
|
-
}
|
|
1135
|
-
};
|
|
1136
1127
|
var Queue = class extends HeyApiClient {
|
|
1137
1128
|
/**
|
|
1138
|
-
*
|
|
1129
|
+
* List available queue slots
|
|
1139
1130
|
*
|
|
1140
|
-
* Returns up to 9 upcoming
|
|
1131
|
+
* Returns up to 9 upcoming free slots from the space's schedule.
|
|
1141
1132
|
*/
|
|
1142
1133
|
list(options) {
|
|
1143
1134
|
return (options.client ?? this.client).get({
|
|
@@ -1150,8 +1141,6 @@ var Queue = class extends HeyApiClient {
|
|
|
1150
1141
|
var Slots = class extends HeyApiClient {
|
|
1151
1142
|
/**
|
|
1152
1143
|
* List slots
|
|
1153
|
-
*
|
|
1154
|
-
* Returns all scheduling slots for the space, ordered by day and time.
|
|
1155
1144
|
*/
|
|
1156
1145
|
list(options) {
|
|
1157
1146
|
return (options.client ?? this.client).get({
|
|
@@ -1163,7 +1152,7 @@ var Slots = class extends HeyApiClient {
|
|
|
1163
1152
|
/**
|
|
1164
1153
|
* Create slots
|
|
1165
1154
|
*
|
|
1166
|
-
* Creates
|
|
1155
|
+
* Creates a slot at the given time for each day of the week.
|
|
1167
1156
|
*/
|
|
1168
1157
|
create(options) {
|
|
1169
1158
|
return (options.client ?? this.client).post({
|
|
@@ -1178,8 +1167,6 @@ var Slots = class extends HeyApiClient {
|
|
|
1178
1167
|
}
|
|
1179
1168
|
/**
|
|
1180
1169
|
* Delete a slot
|
|
1181
|
-
*
|
|
1182
|
-
* Removes a scheduling slot from the space.
|
|
1183
1170
|
*/
|
|
1184
1171
|
delete(options) {
|
|
1185
1172
|
return (options.client ?? this.client).delete({
|
|
@@ -1192,8 +1179,6 @@ var Slots = class extends HeyApiClient {
|
|
|
1192
1179
|
var Spaces = class extends HeyApiClient {
|
|
1193
1180
|
/**
|
|
1194
1181
|
* List spaces
|
|
1195
|
-
*
|
|
1196
|
-
* Returns all spaces belonging to the authenticated user, ordered by most recent.
|
|
1197
1182
|
*/
|
|
1198
1183
|
list(options) {
|
|
1199
1184
|
return (options?.client ?? this.client).get({
|
|
@@ -1204,8 +1189,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1204
1189
|
}
|
|
1205
1190
|
/**
|
|
1206
1191
|
* Create a space
|
|
1207
|
-
*
|
|
1208
|
-
* Creates a new space for the authenticated user.
|
|
1209
1192
|
*/
|
|
1210
1193
|
create(options) {
|
|
1211
1194
|
return (options.client ?? this.client).post({
|
|
@@ -1221,7 +1204,7 @@ var Spaces = class extends HeyApiClient {
|
|
|
1221
1204
|
/**
|
|
1222
1205
|
* Delete a space
|
|
1223
1206
|
*
|
|
1224
|
-
*
|
|
1207
|
+
* Cascades to all accounts, posts, slots, and other associated data.
|
|
1225
1208
|
*/
|
|
1226
1209
|
delete(options) {
|
|
1227
1210
|
return (options.client ?? this.client).delete({
|
|
@@ -1232,8 +1215,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1232
1215
|
}
|
|
1233
1216
|
/**
|
|
1234
1217
|
* Get a space
|
|
1235
|
-
*
|
|
1236
|
-
* Returns a single space by ID.
|
|
1237
1218
|
*/
|
|
1238
1219
|
get(options) {
|
|
1239
1220
|
return (options.client ?? this.client).get({
|
|
@@ -1244,8 +1225,6 @@ var Spaces = class extends HeyApiClient {
|
|
|
1244
1225
|
}
|
|
1245
1226
|
/**
|
|
1246
1227
|
* Update a space
|
|
1247
|
-
*
|
|
1248
|
-
* Updates the given space's settings.
|
|
1249
1228
|
*/
|
|
1250
1229
|
update(options) {
|
|
1251
1230
|
return (options.client ?? this.client).put({
|
|
@@ -1263,7 +1242,7 @@ var Subscription = class extends HeyApiClient {
|
|
|
1263
1242
|
/**
|
|
1264
1243
|
* Get subscription details
|
|
1265
1244
|
*
|
|
1266
|
-
*
|
|
1245
|
+
* Includes plan, usage limits, trial state, and cancellation state.
|
|
1267
1246
|
*/
|
|
1268
1247
|
get(options) {
|
|
1269
1248
|
return (options?.client ?? this.client).get({
|
|
@@ -1276,8 +1255,6 @@ var Subscription = class extends HeyApiClient {
|
|
|
1276
1255
|
var Webhooks = class extends HeyApiClient {
|
|
1277
1256
|
/**
|
|
1278
1257
|
* List webhooks
|
|
1279
|
-
*
|
|
1280
|
-
* Returns all webhooks configured for the given space.
|
|
1281
1258
|
*/
|
|
1282
1259
|
list(options) {
|
|
1283
1260
|
return (options.client ?? this.client).get({
|
|
@@ -1289,7 +1266,7 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1289
1266
|
/**
|
|
1290
1267
|
* Create a webhook
|
|
1291
1268
|
*
|
|
1292
|
-
*
|
|
1269
|
+
* Returns an auto-generated signing secret on the response.
|
|
1293
1270
|
*/
|
|
1294
1271
|
create(options) {
|
|
1295
1272
|
return (options.client ?? this.client).post({
|
|
@@ -1304,8 +1281,6 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1304
1281
|
}
|
|
1305
1282
|
/**
|
|
1306
1283
|
* Delete a webhook
|
|
1307
|
-
*
|
|
1308
|
-
* Permanently removes the webhook endpoint.
|
|
1309
1284
|
*/
|
|
1310
1285
|
delete(options) {
|
|
1311
1286
|
return (options.client ?? this.client).delete({
|
|
@@ -1316,8 +1291,6 @@ var Webhooks = class extends HeyApiClient {
|
|
|
1316
1291
|
}
|
|
1317
1292
|
/**
|
|
1318
1293
|
* Update a webhook
|
|
1319
|
-
*
|
|
1320
|
-
* Updates the webhook's URL, events, or active status.
|
|
1321
1294
|
*/
|
|
1322
1295
|
update(options) {
|
|
1323
1296
|
return (options.client ?? this.client).put({
|
|
@@ -1361,10 +1334,6 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
|
|
|
1361
1334
|
get posts() {
|
|
1362
1335
|
return this._posts ??= new Posts({ client: this.client });
|
|
1363
1336
|
}
|
|
1364
|
-
_clusters;
|
|
1365
|
-
get clusters() {
|
|
1366
|
-
return this._clusters ??= new Clusters({ client: this.client });
|
|
1367
|
-
}
|
|
1368
1337
|
_queue;
|
|
1369
1338
|
get queue() {
|
|
1370
1339
|
return this._queue ??= new Queue({ client: this.client });
|