@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.js CHANGED
@@ -830,22 +830,8 @@ var HeyApiRegistry = class {
830
830
  }
831
831
  };
832
832
  var Accounts = class extends HeyApiClient {
833
- /**
834
- * Disconnect multiple accounts
835
- *
836
- * Removes several social account connections in a single request and dispatches a webhook event for each.
837
- */
838
- deleteMany(options) {
839
- return (options.client ?? this.client).delete({
840
- security: [{ scheme: "bearer", type: "http" }],
841
- url: "/spaces/{space}/accounts",
842
- ...options
843
- });
844
- }
845
833
  /**
846
834
  * List accounts
847
- *
848
- * Returns all connected social accounts for the given space.
849
835
  */
850
836
  list(options) {
851
837
  return (options.client ?? this.client).get({
@@ -857,7 +843,7 @@ var Accounts = class extends HeyApiClient {
857
843
  /**
858
844
  * Activate an account
859
845
  *
860
- * Activates the given account and deactivates all other accounts on the same platform within the space.
846
+ * Deactivates other accounts on the same platform within the space.
861
847
  */
862
848
  activate(options) {
863
849
  return (options.client ?? this.client).patch({
@@ -868,8 +854,6 @@ var Accounts = class extends HeyApiClient {
868
854
  }
869
855
  /**
870
856
  * List Pinterest boards
871
- *
872
- * Returns the Pinterest boards available for the given account.
873
857
  */
874
858
  boards(options) {
875
859
  return (options.client ?? this.client).get({
@@ -881,7 +865,7 @@ var Accounts = class extends HeyApiClient {
881
865
  /**
882
866
  * Disconnect an account
883
867
  *
884
- * Removes the social account connection and dispatches a webhook event.
868
+ * Removes every account on the same platform within the space and fires an AccountDisconnected webhook for each.
885
869
  */
886
870
  delete(options) {
887
871
  return (options.client ?? this.client).delete({
@@ -894,8 +878,6 @@ var Accounts = class extends HeyApiClient {
894
878
  var ApiTokens = class extends HeyApiClient {
895
879
  /**
896
880
  * Create an API token
897
- *
898
- * Generates a new personal access token for the authenticated user.
899
881
  */
900
882
  create(options) {
901
883
  return (options.client ?? this.client).post({
@@ -910,8 +892,6 @@ var ApiTokens = class extends HeyApiClient {
910
892
  }
911
893
  /**
912
894
  * Revoke an API token
913
- *
914
- * Deletes the specified personal access token.
915
895
  */
916
896
  delete(options) {
917
897
  return (options.client ?? this.client).delete({
@@ -922,6 +902,9 @@ var ApiTokens = class extends HeyApiClient {
922
902
  }
923
903
  };
924
904
  var Blocks = class extends HeyApiClient {
905
+ /**
906
+ * List bio blocks
907
+ */
925
908
  list(options) {
926
909
  return (options.client ?? this.client).get({
927
910
  security: [{ scheme: "bearer", type: "http" }],
@@ -929,6 +912,9 @@ var Blocks = class extends HeyApiClient {
929
912
  ...options
930
913
  });
931
914
  }
915
+ /**
916
+ * Create a bio block
917
+ */
932
918
  create(options) {
933
919
  return (options.client ?? this.client).post({
934
920
  security: [{ scheme: "bearer", type: "http" }],
@@ -940,6 +926,9 @@ var Blocks = class extends HeyApiClient {
940
926
  }
941
927
  });
942
928
  }
929
+ /**
930
+ * Delete a bio block
931
+ */
943
932
  delete(options) {
944
933
  return (options.client ?? this.client).delete({
945
934
  security: [{ scheme: "bearer", type: "http" }],
@@ -947,6 +936,9 @@ var Blocks = class extends HeyApiClient {
947
936
  ...options
948
937
  });
949
938
  }
939
+ /**
940
+ * Update a bio block
941
+ */
950
942
  update(options) {
951
943
  return (options.client ?? this.client).put({
952
944
  security: [{ scheme: "bearer", type: "http" }],
@@ -958,6 +950,11 @@ var Blocks = class extends HeyApiClient {
958
950
  }
959
951
  });
960
952
  }
953
+ /**
954
+ * Reorder a bio block
955
+ *
956
+ * Moves the block up or down by swapping with its neighbour.
957
+ */
961
958
  reorder(options) {
962
959
  return (options.client ?? this.client).post({
963
960
  security: [{ scheme: "bearer", type: "http" }],
@@ -971,6 +968,9 @@ var Blocks = class extends HeyApiClient {
971
968
  }
972
969
  };
973
970
  var Bio = class extends HeyApiClient {
971
+ /**
972
+ * Get the bio page
973
+ */
974
974
  get(options) {
975
975
  return (options.client ?? this.client).get({
976
976
  security: [{ scheme: "bearer", type: "http" }],
@@ -978,6 +978,11 @@ var Bio = class extends HeyApiClient {
978
978
  ...options
979
979
  });
980
980
  }
981
+ /**
982
+ * Create the bio page
983
+ *
984
+ * Seeds a social icons block from the space's active accounts.
985
+ */
981
986
  create(options) {
982
987
  return (options.client ?? this.client).post({
983
988
  security: [{ scheme: "bearer", type: "http" }],
@@ -989,6 +994,9 @@ var Bio = class extends HeyApiClient {
989
994
  }
990
995
  });
991
996
  }
997
+ /**
998
+ * Update the bio page
999
+ */
992
1000
  update(options) {
993
1001
  return (options.client ?? this.client).put({
994
1002
  security: [{ scheme: "bearer", type: "http" }],
@@ -1000,6 +1008,9 @@ var Bio = class extends HeyApiClient {
1000
1008
  }
1001
1009
  });
1002
1010
  }
1011
+ /**
1012
+ * Upload a bio page avatar
1013
+ */
1003
1014
  uploadAvatar(options) {
1004
1015
  return (options.client ?? this.client).post({
1005
1016
  ...formDataBodySerializer,
@@ -1018,6 +1029,9 @@ var Bio = class extends HeyApiClient {
1018
1029
  }
1019
1030
  };
1020
1031
  var Health = class extends HeyApiClient {
1032
+ /**
1033
+ * Health check
1034
+ */
1021
1035
  check(options) {
1022
1036
  return (options?.client ?? this.client).get({
1023
1037
  security: [{ scheme: "bearer", type: "http" }],
@@ -1028,40 +1042,27 @@ var Health = class extends HeyApiClient {
1028
1042
  };
1029
1043
  var Media = class extends HeyApiClient {
1030
1044
  /**
1031
- * Upload a media file
1045
+ * Get an upload URL
1032
1046
  *
1033
- * Accepts images (JPEG, PNG, WebP) and videos (MP4, QuickTime). Images are auto-optimized.
1047
+ * PUT the file to the returned `upload_url` with `Content-Type: <mime>`, then send `url` back when creating or updating a post.
1034
1048
  */
1035
- create(options) {
1049
+ sign(options) {
1036
1050
  return (options.client ?? this.client).post({
1037
- ...formDataBodySerializer,
1038
1051
  security: [{ scheme: "bearer", type: "http" }],
1039
- url: "/media",
1052
+ url: "/media/sign",
1040
1053
  ...options,
1041
1054
  headers: {
1042
- "Content-Type": null,
1055
+ "Content-Type": "application/json",
1043
1056
  ...options.headers
1044
1057
  }
1045
1058
  });
1046
1059
  }
1047
- /**
1048
- * Delete a media file
1049
- *
1050
- * Removes the media file from storage and deletes the record.
1051
- */
1052
- delete(options) {
1053
- return (options.client ?? this.client).delete({
1054
- security: [{ scheme: "bearer", type: "http" }],
1055
- url: "/media/{media}",
1056
- ...options
1057
- });
1058
- }
1059
1060
  };
1060
1061
  var Posts = class extends HeyApiClient {
1061
1062
  /**
1062
1063
  * List posts
1063
1064
  *
1064
- * Returns paginated posts for the space. Filterable by status, account, and date range via query parameters.
1065
+ * Filterable by status, account, and date range.
1065
1066
  */
1066
1067
  list(options) {
1067
1068
  return (options.client ?? this.client).get({
@@ -1073,7 +1074,7 @@ var Posts = class extends HeyApiClient {
1073
1074
  /**
1074
1075
  * Create posts
1075
1076
  *
1076
- * Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing modes.
1077
+ * Creates one or more posts as a cluster. Supports draft, scheduled, or immediate publishing.
1077
1078
  */
1078
1079
  create(options) {
1079
1080
  return (options.client ?? this.client).post({
@@ -1088,8 +1089,6 @@ var Posts = class extends HeyApiClient {
1088
1089
  }
1089
1090
  /**
1090
1091
  * Delete a post
1091
- *
1092
- * Permanently deletes the given post.
1093
1092
  */
1094
1093
  delete(options) {
1095
1094
  return (options.client ?? this.client).delete({
@@ -1100,8 +1099,6 @@ var Posts = class extends HeyApiClient {
1100
1099
  }
1101
1100
  /**
1102
1101
  * Get a post
1103
- *
1104
- * Returns a single post with its account, children, and media.
1105
1102
  */
1106
1103
  get(options) {
1107
1104
  return (options.client ?? this.client).get({
@@ -1112,8 +1109,6 @@ var Posts = class extends HeyApiClient {
1112
1109
  }
1113
1110
  /**
1114
1111
  * Update a post
1115
- *
1116
- * Updates a single post's content, schedule, and media attachments.
1117
1112
  */
1118
1113
  update(options) {
1119
1114
  return (options.client ?? this.client).put({
@@ -1129,9 +1124,9 @@ var Posts = class extends HeyApiClient {
1129
1124
  };
1130
1125
  var Clusters = class extends HeyApiClient {
1131
1126
  /**
1132
- * Update a cluster of posts
1127
+ * Update a cluster
1133
1128
  *
1134
- * Updates all posts sharing the given cluster ID. Handles adding/removing accounts and re-scheduling.
1129
+ * Updates all posts in the cluster, including adding or removing accounts and re-scheduling.
1135
1130
  */
1136
1131
  update(options) {
1137
1132
  return (options.client ?? this.client).put({
@@ -1147,9 +1142,9 @@ var Clusters = class extends HeyApiClient {
1147
1142
  };
1148
1143
  var Queue = class extends HeyApiClient {
1149
1144
  /**
1150
- * Get next available queue slots
1145
+ * List available queue slots
1151
1146
  *
1152
- * Returns up to 9 upcoming available time slots based on the space's scheduling configuration.
1147
+ * Returns up to 9 upcoming free slots from the space's schedule.
1153
1148
  */
1154
1149
  list(options) {
1155
1150
  return (options.client ?? this.client).get({
@@ -1162,8 +1157,6 @@ var Queue = class extends HeyApiClient {
1162
1157
  var Slots = class extends HeyApiClient {
1163
1158
  /**
1164
1159
  * List slots
1165
- *
1166
- * Returns all scheduling slots for the space, ordered by day and time.
1167
1160
  */
1168
1161
  list(options) {
1169
1162
  return (options.client ?? this.client).get({
@@ -1175,7 +1168,7 @@ var Slots = class extends HeyApiClient {
1175
1168
  /**
1176
1169
  * Create slots
1177
1170
  *
1178
- * Creates scheduling slots for the given days of the week and time.
1171
+ * Creates a slot at the given time for each day of the week.
1179
1172
  */
1180
1173
  create(options) {
1181
1174
  return (options.client ?? this.client).post({
@@ -1190,8 +1183,6 @@ var Slots = class extends HeyApiClient {
1190
1183
  }
1191
1184
  /**
1192
1185
  * Delete a slot
1193
- *
1194
- * Removes a scheduling slot from the space.
1195
1186
  */
1196
1187
  delete(options) {
1197
1188
  return (options.client ?? this.client).delete({
@@ -1204,8 +1195,6 @@ var Slots = class extends HeyApiClient {
1204
1195
  var Spaces = class extends HeyApiClient {
1205
1196
  /**
1206
1197
  * List spaces
1207
- *
1208
- * Returns all spaces belonging to the authenticated user, ordered by most recent.
1209
1198
  */
1210
1199
  list(options) {
1211
1200
  return (options?.client ?? this.client).get({
@@ -1216,8 +1205,6 @@ var Spaces = class extends HeyApiClient {
1216
1205
  }
1217
1206
  /**
1218
1207
  * Create a space
1219
- *
1220
- * Creates a new space for the authenticated user.
1221
1208
  */
1222
1209
  create(options) {
1223
1210
  return (options.client ?? this.client).post({
@@ -1233,7 +1220,7 @@ var Spaces = class extends HeyApiClient {
1233
1220
  /**
1234
1221
  * Delete a space
1235
1222
  *
1236
- * Permanently deletes the given space and all associated data.
1223
+ * Cascades to all accounts, posts, slots, and other associated data.
1237
1224
  */
1238
1225
  delete(options) {
1239
1226
  return (options.client ?? this.client).delete({
@@ -1244,8 +1231,6 @@ var Spaces = class extends HeyApiClient {
1244
1231
  }
1245
1232
  /**
1246
1233
  * Get a space
1247
- *
1248
- * Returns a single space by ID.
1249
1234
  */
1250
1235
  get(options) {
1251
1236
  return (options.client ?? this.client).get({
@@ -1256,8 +1241,6 @@ var Spaces = class extends HeyApiClient {
1256
1241
  }
1257
1242
  /**
1258
1243
  * Update a space
1259
- *
1260
- * Updates the given space's settings.
1261
1244
  */
1262
1245
  update(options) {
1263
1246
  return (options.client ?? this.client).put({
@@ -1275,7 +1258,7 @@ var Subscription = class extends HeyApiClient {
1275
1258
  /**
1276
1259
  * Get subscription details
1277
1260
  *
1278
- * Returns the current plan, usage limits, trial status, and cancellation state.
1261
+ * Includes plan, usage limits, trial state, and cancellation state.
1279
1262
  */
1280
1263
  get(options) {
1281
1264
  return (options?.client ?? this.client).get({
@@ -1288,8 +1271,6 @@ var Subscription = class extends HeyApiClient {
1288
1271
  var Webhooks = class extends HeyApiClient {
1289
1272
  /**
1290
1273
  * List webhooks
1291
- *
1292
- * Returns all webhooks configured for the given space.
1293
1274
  */
1294
1275
  list(options) {
1295
1276
  return (options.client ?? this.client).get({
@@ -1301,7 +1282,7 @@ var Webhooks = class extends HeyApiClient {
1301
1282
  /**
1302
1283
  * Create a webhook
1303
1284
  *
1304
- * Registers a new webhook endpoint with an auto-generated signing secret.
1285
+ * Returns an auto-generated signing secret on the response.
1305
1286
  */
1306
1287
  create(options) {
1307
1288
  return (options.client ?? this.client).post({
@@ -1316,8 +1297,6 @@ var Webhooks = class extends HeyApiClient {
1316
1297
  }
1317
1298
  /**
1318
1299
  * Delete a webhook
1319
- *
1320
- * Permanently removes the webhook endpoint.
1321
1300
  */
1322
1301
  delete(options) {
1323
1302
  return (options.client ?? this.client).delete({
@@ -1328,8 +1307,6 @@ var Webhooks = class extends HeyApiClient {
1328
1307
  }
1329
1308
  /**
1330
1309
  * Update a webhook
1331
- *
1332
- * Updates the webhook's URL, events, or active status.
1333
1310
  */
1334
1311
  update(options) {
1335
1312
  return (options.client ?? this.client).put({