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