ad2app-lib 1.14.0 → 1.15.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ad2app-lib",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -90,3 +90,15 @@ test('SchedulingUpdatePostDTO platforms/mediaItems are absent by default (backwa
90
90
  assert.equal(patch.platforms, undefined);
91
91
  assert.equal(patch.mediaItems, undefined);
92
92
  });
93
+
94
+ // AD2-1153 — the backend's local SocialPostStatus enum already has a
95
+ // PUBLISHING member (Zernio accepted the post but its outcome couldn't be
96
+ // confirmed inline); this pins the lib side so the backend's
97
+ // `entity.status as unknown as PostStatus` cast in post-response.dto.ts can
98
+ // eventually be replaced by importing this enum directly instead of
99
+ // maintaining a parallel local one.
100
+ test('SchedulingPostStatus gains PUBLISHING (AD2-1153 publish resilience)', () => {
101
+ assert.equal(SchedulingPostStatus.PUBLISHING, 'publishing');
102
+ const post = basePost({ status: SchedulingPostStatus.PUBLISHING });
103
+ assert.equal(post.status, 'publishing');
104
+ });
@@ -13,6 +13,14 @@ export enum SchedulingPostStatus {
13
13
  PUBLISHED = 'published',
14
14
  FAILED = 'failed',
15
15
  PARTIAL = 'partial',
16
+ /**
17
+ * The publisher accepted the post (an id exists) but its outcome could not
18
+ * be confirmed inline — a gateway timeout, or a 409 whose live status
19
+ * couldn't be fetched immediately (AD2-1153). Distinct from SCHEDULED: a
20
+ * PUBLISHING post may already be publishing server-side and must not be
21
+ * treated as still-editable.
22
+ */
23
+ PUBLISHING = 'publishing',
16
24
  }
17
25
 
18
26
  // ── Platform-status map ───────────────────────────────────────────────────────