@zilfu/sdk 0.2.6 → 0.2.7

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
@@ -1058,6 +1058,23 @@ var Media = class extends HeyApiClient {
1058
1058
  });
1059
1059
  }
1060
1060
  };
1061
+ var Comment = class extends HeyApiClient {
1062
+ /**
1063
+ * Attach a follow-up comment to an existing post. If the post has already
1064
+ * published, the comment is armed immediately against its remote id
1065
+ */
1066
+ create(options) {
1067
+ return (options.client ?? this.client).post({
1068
+ security: [{ scheme: "bearer", type: "http" }],
1069
+ url: "/spaces/{space}/posts/{post}/comment",
1070
+ ...options,
1071
+ headers: {
1072
+ "Content-Type": "application/json",
1073
+ ...options.headers
1074
+ }
1075
+ });
1076
+ }
1077
+ };
1061
1078
  var Posts = class extends HeyApiClient {
1062
1079
  /**
1063
1080
  * List posts
@@ -1138,6 +1155,10 @@ var Posts = class extends HeyApiClient {
1138
1155
  ...options
1139
1156
  });
1140
1157
  }
1158
+ _comment;
1159
+ get comment() {
1160
+ return this._comment ??= new Comment({ client: this.client });
1161
+ }
1141
1162
  };
1142
1163
  var Queue = class extends HeyApiClient {
1143
1164
  /**
@@ -1153,6 +1174,32 @@ var Queue = class extends HeyApiClient {
1153
1174
  });
1154
1175
  }
1155
1176
  };
1177
+ var Comments = class extends HeyApiClient {
1178
+ /**
1179
+ * Cancel a follow-up comment before it publishes
1180
+ */
1181
+ delete(options) {
1182
+ return (options.client ?? this.client).delete({
1183
+ security: [{ scheme: "bearer", type: "http" }],
1184
+ url: "/spaces/{space}/comments/{scheduledComment}",
1185
+ ...options
1186
+ });
1187
+ }
1188
+ /**
1189
+ * Edit a pending or armed follow-up comment
1190
+ */
1191
+ update(options) {
1192
+ return (options.client ?? this.client).put({
1193
+ security: [{ scheme: "bearer", type: "http" }],
1194
+ url: "/spaces/{space}/comments/{scheduledComment}",
1195
+ ...options,
1196
+ headers: {
1197
+ "Content-Type": "application/json",
1198
+ ...options.headers
1199
+ }
1200
+ });
1201
+ }
1202
+ };
1156
1203
  var Session = class extends HeyApiClient {
1157
1204
  /**
1158
1205
  * Get the authenticated session's user
@@ -1457,6 +1504,10 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1457
1504
  get queue() {
1458
1505
  return this._queue ??= new Queue({ client: this.client });
1459
1506
  }
1507
+ _comments;
1508
+ get comments() {
1509
+ return this._comments ??= new Comments({ client: this.client });
1510
+ }
1460
1511
  _session;
1461
1512
  get session() {
1462
1513
  return this._session ??= new Session({ client: this.client });