@zilfu/sdk 0.1.3 → 0.1.5

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
@@ -1111,6 +1111,8 @@ var Posts = class extends HeyApiClient {
1111
1111
  }
1112
1112
  /**
1113
1113
  * Update a post
1114
+ *
1115
+ * Updates content, media, thread replies, schedule, status, and metadata for a single post.
1114
1116
  */
1115
1117
  update(options) {
1116
1118
  return (options.client ?? this.client).put({
@@ -1123,22 +1125,18 @@ var Posts = class extends HeyApiClient {
1123
1125
  }
1124
1126
  });
1125
1127
  }
1126
- };
1127
- var Clusters = class extends HeyApiClient {
1128
1128
  /**
1129
- * Update a cluster
1129
+ * Retry publishing a failed post
1130
1130
  *
1131
- * Updates all posts in the cluster, including adding or removing accounts and re-scheduling.
1131
+ * Resets the post (and any non-published children) from Error to Scheduled,
1132
+ * clears the stored error metadata, and re-dispatches the publish job.
1133
+ * For threads, already-published children are skipped on retry.
1132
1134
  */
1133
- update(options) {
1134
- return (options.client ?? this.client).put({
1135
+ retry(options) {
1136
+ return (options.client ?? this.client).post({
1135
1137
  security: [{ scheme: "bearer", type: "http" }],
1136
- url: "/spaces/{space}/clusters/{cluster_id}",
1137
- ...options,
1138
- headers: {
1139
- "Content-Type": "application/json",
1140
- ...options.headers
1141
- }
1138
+ url: "/spaces/{space}/posts/{post}/retry",
1139
+ ...options
1142
1140
  });
1143
1141
  }
1144
1142
  };
@@ -1156,6 +1154,18 @@ var Queue = class extends HeyApiClient {
1156
1154
  });
1157
1155
  }
1158
1156
  };
1157
+ var Session = class extends HeyApiClient {
1158
+ /**
1159
+ * Get the authenticated session's user
1160
+ */
1161
+ get(options) {
1162
+ return (options?.client ?? this.client).get({
1163
+ security: [{ scheme: "bearer", type: "http" }],
1164
+ url: "/session",
1165
+ ...options
1166
+ });
1167
+ }
1168
+ };
1159
1169
  var Slots = class extends HeyApiClient {
1160
1170
  /**
1161
1171
  * List slots
@@ -1352,14 +1362,14 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1352
1362
  get posts() {
1353
1363
  return this._posts ??= new Posts({ client: this.client });
1354
1364
  }
1355
- _clusters;
1356
- get clusters() {
1357
- return this._clusters ??= new Clusters({ client: this.client });
1358
- }
1359
1365
  _queue;
1360
1366
  get queue() {
1361
1367
  return this._queue ??= new Queue({ client: this.client });
1362
1368
  }
1369
+ _session;
1370
+ get session() {
1371
+ return this._session ??= new Session({ client: this.client });
1372
+ }
1363
1373
  _slots;
1364
1374
  get slots() {
1365
1375
  return this._slots ??= new Slots({ client: this.client });