@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.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
- * 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.
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 the given account and every other account on the same platform within the space, dispatching an AccountDisconnected webhook for each.
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
- * Upload a media file
1045
+ * Get an upload URL
1020
1046
  *
1021
- * 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.
1022
1048
  */
1023
- create(options) {
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": null,
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
- * Returns paginated posts for the space. Filterable by status, account, and date range via query parameters.
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 modes.
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({
@@ -1100,8 +1109,6 @@ var Posts = class extends HeyApiClient {
1100
1109
  }
1101
1110
  /**
1102
1111
  * Update a post
1103
- *
1104
- * Updates a single post's content, schedule, and media attachments.
1105
1112
  */
1106
1113
  update(options) {
1107
1114
  return (options.client ?? this.client).put({
@@ -1117,9 +1124,9 @@ var Posts = class extends HeyApiClient {
1117
1124
  };
1118
1125
  var Clusters = class extends HeyApiClient {
1119
1126
  /**
1120
- * Update a cluster of posts
1127
+ * Update a cluster
1121
1128
  *
1122
- * 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.
1123
1130
  */
1124
1131
  update(options) {
1125
1132
  return (options.client ?? this.client).put({
@@ -1135,9 +1142,9 @@ var Clusters = class extends HeyApiClient {
1135
1142
  };
1136
1143
  var Queue = class extends HeyApiClient {
1137
1144
  /**
1138
- * Get next available queue slots
1145
+ * List available queue slots
1139
1146
  *
1140
- * 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.
1141
1148
  */
1142
1149
  list(options) {
1143
1150
  return (options.client ?? this.client).get({
@@ -1150,8 +1157,6 @@ var Queue = class extends HeyApiClient {
1150
1157
  var Slots = class extends HeyApiClient {
1151
1158
  /**
1152
1159
  * List slots
1153
- *
1154
- * Returns all scheduling slots for the space, ordered by day and time.
1155
1160
  */
1156
1161
  list(options) {
1157
1162
  return (options.client ?? this.client).get({
@@ -1163,7 +1168,7 @@ var Slots = class extends HeyApiClient {
1163
1168
  /**
1164
1169
  * Create slots
1165
1170
  *
1166
- * 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.
1167
1172
  */
1168
1173
  create(options) {
1169
1174
  return (options.client ?? this.client).post({
@@ -1178,8 +1183,6 @@ var Slots = class extends HeyApiClient {
1178
1183
  }
1179
1184
  /**
1180
1185
  * Delete a slot
1181
- *
1182
- * Removes a scheduling slot from the space.
1183
1186
  */
1184
1187
  delete(options) {
1185
1188
  return (options.client ?? this.client).delete({
@@ -1192,8 +1195,6 @@ var Slots = class extends HeyApiClient {
1192
1195
  var Spaces = class extends HeyApiClient {
1193
1196
  /**
1194
1197
  * List spaces
1195
- *
1196
- * Returns all spaces belonging to the authenticated user, ordered by most recent.
1197
1198
  */
1198
1199
  list(options) {
1199
1200
  return (options?.client ?? this.client).get({
@@ -1204,8 +1205,6 @@ var Spaces = class extends HeyApiClient {
1204
1205
  }
1205
1206
  /**
1206
1207
  * Create a space
1207
- *
1208
- * Creates a new space for the authenticated user.
1209
1208
  */
1210
1209
  create(options) {
1211
1210
  return (options.client ?? this.client).post({
@@ -1221,7 +1220,7 @@ var Spaces = class extends HeyApiClient {
1221
1220
  /**
1222
1221
  * Delete a space
1223
1222
  *
1224
- * Permanently deletes the given space and all associated data.
1223
+ * Cascades to all accounts, posts, slots, and other associated data.
1225
1224
  */
1226
1225
  delete(options) {
1227
1226
  return (options.client ?? this.client).delete({
@@ -1232,8 +1231,6 @@ var Spaces = class extends HeyApiClient {
1232
1231
  }
1233
1232
  /**
1234
1233
  * Get a space
1235
- *
1236
- * Returns a single space by ID.
1237
1234
  */
1238
1235
  get(options) {
1239
1236
  return (options.client ?? this.client).get({
@@ -1244,8 +1241,6 @@ var Spaces = class extends HeyApiClient {
1244
1241
  }
1245
1242
  /**
1246
1243
  * Update a space
1247
- *
1248
- * Updates the given space's settings.
1249
1244
  */
1250
1245
  update(options) {
1251
1246
  return (options.client ?? this.client).put({
@@ -1263,7 +1258,7 @@ var Subscription = class extends HeyApiClient {
1263
1258
  /**
1264
1259
  * Get subscription details
1265
1260
  *
1266
- * Returns the current plan, usage limits, trial status, and cancellation state.
1261
+ * Includes plan, usage limits, trial state, and cancellation state.
1267
1262
  */
1268
1263
  get(options) {
1269
1264
  return (options?.client ?? this.client).get({
@@ -1276,8 +1271,6 @@ var Subscription = class extends HeyApiClient {
1276
1271
  var Webhooks = class extends HeyApiClient {
1277
1272
  /**
1278
1273
  * List webhooks
1279
- *
1280
- * Returns all webhooks configured for the given space.
1281
1274
  */
1282
1275
  list(options) {
1283
1276
  return (options.client ?? this.client).get({
@@ -1289,7 +1282,7 @@ var Webhooks = class extends HeyApiClient {
1289
1282
  /**
1290
1283
  * Create a webhook
1291
1284
  *
1292
- * Registers a new webhook endpoint with an auto-generated signing secret.
1285
+ * Returns an auto-generated signing secret on the response.
1293
1286
  */
1294
1287
  create(options) {
1295
1288
  return (options.client ?? this.client).post({
@@ -1304,8 +1297,6 @@ var Webhooks = class extends HeyApiClient {
1304
1297
  }
1305
1298
  /**
1306
1299
  * Delete a webhook
1307
- *
1308
- * Permanently removes the webhook endpoint.
1309
1300
  */
1310
1301
  delete(options) {
1311
1302
  return (options.client ?? this.client).delete({
@@ -1316,8 +1307,6 @@ var Webhooks = class extends HeyApiClient {
1316
1307
  }
1317
1308
  /**
1318
1309
  * Update a webhook
1319
- *
1320
- * Updates the webhook's URL, events, or active status.
1321
1310
  */
1322
1311
  update(options) {
1323
1312
  return (options.client ?? this.client).put({