@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 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
- * Activates the given account and deactivates all other accounts on the same platform within the space.
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 the given account and every other account on the same platform within the space, dispatching an AccountDisconnected webhook for each.
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
- * Upload a media file
1047
+ * Get an upload URL
1022
1048
  *
1023
- * Accepts images (JPEG, PNG, WebP) and videos (MP4, QuickTime). Images are auto-optimized.
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
- create(options) {
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": null,
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
- * Returns paginated posts for the space. Filterable by status, account, and date range via query parameters.
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 modes.
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({
@@ -1103,7 +1112,7 @@ var Posts = class extends HeyApiClient {
1103
1112
  /**
1104
1113
  * Update a post
1105
1114
  *
1106
- * Updates a single post's content, schedule, and media attachments.
1115
+ * Updates content, media, thread replies, schedule, status, and metadata for a single post.
1107
1116
  */
1108
1117
  update(options) {
1109
1118
  return (options.client ?? this.client).put({
@@ -1117,29 +1126,11 @@ var Posts = class extends HeyApiClient {
1117
1126
  });
1118
1127
  }
1119
1128
  };
1120
- var Clusters = class extends HeyApiClient {
1121
- /**
1122
- * Update a cluster of posts
1123
- *
1124
- * Updates all posts sharing the given cluster ID. Handles adding/removing accounts and re-scheduling.
1125
- */
1126
- update(options) {
1127
- return (options.client ?? this.client).put({
1128
- security: [{ scheme: "bearer", type: "http" }],
1129
- url: "/spaces/{space}/clusters/{cluster_id}",
1130
- ...options,
1131
- headers: {
1132
- "Content-Type": "application/json",
1133
- ...options.headers
1134
- }
1135
- });
1136
- }
1137
- };
1138
1129
  var Queue = class extends HeyApiClient {
1139
1130
  /**
1140
- * Get next available queue slots
1131
+ * List available queue slots
1141
1132
  *
1142
- * Returns up to 9 upcoming available time slots based on the space's scheduling configuration.
1133
+ * Returns up to 9 upcoming free slots from the space's schedule.
1143
1134
  */
1144
1135
  list(options) {
1145
1136
  return (options.client ?? this.client).get({
@@ -1152,8 +1143,6 @@ var Queue = class extends HeyApiClient {
1152
1143
  var Slots = class extends HeyApiClient {
1153
1144
  /**
1154
1145
  * List slots
1155
- *
1156
- * Returns all scheduling slots for the space, ordered by day and time.
1157
1146
  */
1158
1147
  list(options) {
1159
1148
  return (options.client ?? this.client).get({
@@ -1165,7 +1154,7 @@ var Slots = class extends HeyApiClient {
1165
1154
  /**
1166
1155
  * Create slots
1167
1156
  *
1168
- * Creates scheduling slots for the given days of the week and time.
1157
+ * Creates a slot at the given time for each day of the week.
1169
1158
  */
1170
1159
  create(options) {
1171
1160
  return (options.client ?? this.client).post({
@@ -1180,8 +1169,6 @@ var Slots = class extends HeyApiClient {
1180
1169
  }
1181
1170
  /**
1182
1171
  * Delete a slot
1183
- *
1184
- * Removes a scheduling slot from the space.
1185
1172
  */
1186
1173
  delete(options) {
1187
1174
  return (options.client ?? this.client).delete({
@@ -1194,8 +1181,6 @@ var Slots = class extends HeyApiClient {
1194
1181
  var Spaces = class extends HeyApiClient {
1195
1182
  /**
1196
1183
  * List spaces
1197
- *
1198
- * Returns all spaces belonging to the authenticated user, ordered by most recent.
1199
1184
  */
1200
1185
  list(options) {
1201
1186
  return (options?.client ?? this.client).get({
@@ -1206,8 +1191,6 @@ var Spaces = class extends HeyApiClient {
1206
1191
  }
1207
1192
  /**
1208
1193
  * Create a space
1209
- *
1210
- * Creates a new space for the authenticated user.
1211
1194
  */
1212
1195
  create(options) {
1213
1196
  return (options.client ?? this.client).post({
@@ -1223,7 +1206,7 @@ var Spaces = class extends HeyApiClient {
1223
1206
  /**
1224
1207
  * Delete a space
1225
1208
  *
1226
- * Permanently deletes the given space and all associated data.
1209
+ * Cascades to all accounts, posts, slots, and other associated data.
1227
1210
  */
1228
1211
  delete(options) {
1229
1212
  return (options.client ?? this.client).delete({
@@ -1234,8 +1217,6 @@ var Spaces = class extends HeyApiClient {
1234
1217
  }
1235
1218
  /**
1236
1219
  * Get a space
1237
- *
1238
- * Returns a single space by ID.
1239
1220
  */
1240
1221
  get(options) {
1241
1222
  return (options.client ?? this.client).get({
@@ -1246,8 +1227,6 @@ var Spaces = class extends HeyApiClient {
1246
1227
  }
1247
1228
  /**
1248
1229
  * Update a space
1249
- *
1250
- * Updates the given space's settings.
1251
1230
  */
1252
1231
  update(options) {
1253
1232
  return (options.client ?? this.client).put({
@@ -1265,7 +1244,7 @@ var Subscription = class extends HeyApiClient {
1265
1244
  /**
1266
1245
  * Get subscription details
1267
1246
  *
1268
- * Returns the current plan, usage limits, trial status, and cancellation state.
1247
+ * Includes plan, usage limits, trial state, and cancellation state.
1269
1248
  */
1270
1249
  get(options) {
1271
1250
  return (options?.client ?? this.client).get({
@@ -1278,8 +1257,6 @@ var Subscription = class extends HeyApiClient {
1278
1257
  var Webhooks = class extends HeyApiClient {
1279
1258
  /**
1280
1259
  * List webhooks
1281
- *
1282
- * Returns all webhooks configured for the given space.
1283
1260
  */
1284
1261
  list(options) {
1285
1262
  return (options.client ?? this.client).get({
@@ -1291,7 +1268,7 @@ var Webhooks = class extends HeyApiClient {
1291
1268
  /**
1292
1269
  * Create a webhook
1293
1270
  *
1294
- * Registers a new webhook endpoint with an auto-generated signing secret.
1271
+ * Returns an auto-generated signing secret on the response.
1295
1272
  */
1296
1273
  create(options) {
1297
1274
  return (options.client ?? this.client).post({
@@ -1306,8 +1283,6 @@ var Webhooks = class extends HeyApiClient {
1306
1283
  }
1307
1284
  /**
1308
1285
  * Delete a webhook
1309
- *
1310
- * Permanently removes the webhook endpoint.
1311
1286
  */
1312
1287
  delete(options) {
1313
1288
  return (options.client ?? this.client).delete({
@@ -1318,8 +1293,6 @@ var Webhooks = class extends HeyApiClient {
1318
1293
  }
1319
1294
  /**
1320
1295
  * Update a webhook
1321
- *
1322
- * Updates the webhook's URL, events, or active status.
1323
1296
  */
1324
1297
  update(options) {
1325
1298
  return (options.client ?? this.client).put({
@@ -1363,10 +1336,6 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1363
1336
  get posts() {
1364
1337
  return this._posts ??= new Posts({ client: this.client });
1365
1338
  }
1366
- _clusters;
1367
- get clusters() {
1368
- return this._clusters ??= new Clusters({ client: this.client });
1369
- }
1370
1339
  _queue;
1371
1340
  get queue() {
1372
1341
  return this._queue ??= new Queue({ client: this.client });