@evcraddock/slug-api 0.2.0 → 1.1.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/README.md +15 -1
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +1 -1
- package/dist/contract.json +3 -3
- package/dist/openapi.d.ts +483 -5
- package/dist/openapi.js +313 -2
- package/dist/openapi.json +588 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,18 @@ Generated sites should keep local API route modules that compose these helpers w
|
|
|
20
20
|
|
|
21
21
|
Generated sites import this document and pass its identity/version explicitly to `createApiMetaResponse` via `contract`. The `/api/v1/meta` response exposes `api.contract`; the document repeats it in `x-slugkit-contract` and uses the contract version in `info.version`. The legacy `api.version` remains the API routing generation marker and is not evidence of a specific contract.
|
|
22
22
|
|
|
23
|
+
## Contact deletion contract 2.3.0
|
|
24
|
+
|
|
25
|
+
Package **1.1.0** carries compatible contract **2.3.0**, adding safe deletion of contacts whose only follow references are inactive. This is a compatible relaxation of deletion restrictions, classified as additive: existing requests, response shapes, required non-null `Following.accountId`, authentication and route prefixes are unchanged. Pending/accepted follows and unrelated references still return `409`. Site-owned deletion atomically detaches inactive history and removes the contact and its owned accounts without purging incoming bodies, snapshots, aliases or tombstones. Detached history is hidden from following lists and activity routes return `404` until explicit refollow reattaches the same identity to a real account; cursors and duplicate suppression survive. Direct account-delete/URL-change guards are unchanged.
|
|
26
|
+
|
|
27
|
+
Adopt migration 031 and the site-owned contacts/following changes together; updating this package alone does not implement the behavior. See [adoption guidance](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/package-updates.md#contact-deletion-after-unfollow-contract-230). Update with `npm install --save-exact @evcraddock/slug-api@1.1.0` and adopt the site-owned implementation. Package publication does not deploy websites; migration execution, site deployment and production contact cleanup remain separately authorized.
|
|
28
|
+
|
|
29
|
+
## Incoming activity contract 2.2.0
|
|
30
|
+
|
|
31
|
+
The unreleased source contract adds boosts to the existing per-followed-account GET/DELETE activity buffer as the explicitly approved minor feature increment. Incoming pages contain `IncomingPost` or `IncomingBoost` without an opt-in filter; existing post payloads and Slug CLI commands remain unchanged. Readers must branch on `kind`, distinguish the followed sharing account from the original author, and handle Account-shaped unsaved-author snapshots with null stored IDs and no permanent Contact creation. Download, explicit removal and reading remain independent; there is no shared-read authority or automatic retention policy. See [Spec 12](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/specs/12-incoming-activity.md), [isolated evidence](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/incoming-activity-evidence.md) and [consumer reconciliation](https://forge.caradoc.com/erik/slugkit/src/branch/main/docs/incoming-activity-consumers.md).
|
|
32
|
+
|
|
33
|
+
The API package supplies the shared schema/helpers, not website inbox handlers, storage migrations or deployment. Adopt site-owned changes and migration 030 before claiming implementation support. This source version is not a published package mapping or proof of slugkit.com availability; npm version selection and publication remain explicitly gated.
|
|
34
|
+
|
|
23
35
|
## Version and release policy
|
|
24
36
|
|
|
25
37
|
Contract identity is `slugkit-management-api`. Contract `1.1.0` is the first explicitly identified packaged contract; earlier sites reporting `api.version: 1.0.0` may implement different interfaces and must be treated as having an unknown contract.
|
|
@@ -28,7 +40,9 @@ Released contract versions are immutable. Identical documents retain their contr
|
|
|
28
40
|
|
|
29
41
|
Package versions describe the library, including helpers and dependencies. Template versions describe generated-site code. Neither determines a contract version. `contract.json` gives the explicit package-to-contract mapping. A contract change requires a new package release, but several package releases can carry the same contract. Template releases pin the API package they consume.
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
During implementation, edit the contract definition and version constants, select `changeType` (`documentation`, `additive`, or `breaking`) in `contract-release.json`, and update the manifest digest from the formatted JSON output. Keep npm package versions and consumer pins unchanged until explicitly requested release preparation. The development build checks artifact consistency, recorded-version immutability and contract-version compatibility, without demanding a package-version bump. Its generated manifest describes a local build, not a published release or public availability.
|
|
44
|
+
|
|
45
|
+
During release preparation, choose a fresh npm package version, update consumer pins/lockfile and the manifest's `packageVersion`, and run `node scripts/check-api-contract.mjs --release`. This strict check also runs in release preparation validation and both API publishing paths, before npm writes. Changed contract bytes require a new package release. The history guard rejects reuse of a recorded contract version with different bytes in both modes; published contract artifacts remain immutable. Run with full Git history; the release workflow clones full history. The manifest is review evidence, not an independently maintained specification.
|
|
32
46
|
|
|
33
47
|
## Existing-site adoption
|
|
34
48
|
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const SLUGKIT_CONTRACT_ID = "slugkit-management-api";
|
|
2
|
-
export declare const SLUGKIT_CONTRACT_VERSION = "
|
|
2
|
+
export declare const SLUGKIT_CONTRACT_VERSION = "2.3.0";
|
package/dist/contract.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const SLUGKIT_CONTRACT_ID = "slugkit-management-api";
|
|
2
|
-
export const SLUGKIT_CONTRACT_VERSION = "
|
|
2
|
+
export const SLUGKIT_CONTRACT_VERSION = "2.3.0";
|
package/dist/contract.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "slugkit-management-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"packageName": "@evcraddock/slug-api",
|
|
5
|
-
"packageVersion": "
|
|
5
|
+
"packageVersion": "1.1.0",
|
|
6
6
|
"artifact": "openapi.json",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "4c46d091f6e92e6f58af92d066e1811a69b382f6e9f3b560bdd64559e84973ac",
|
|
8
8
|
"changeType": "additive"
|
|
9
9
|
}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export declare const openApiDocument: {
|
|
|
2
2
|
readonly openapi: "3.1.0";
|
|
3
3
|
readonly "x-slugkit-contract": {
|
|
4
4
|
readonly id: "slugkit-management-api";
|
|
5
|
-
readonly version: "
|
|
5
|
+
readonly version: "2.3.0";
|
|
6
6
|
};
|
|
7
7
|
readonly info: {
|
|
8
8
|
readonly title: "Slugkit API";
|
|
9
|
-
readonly version: "
|
|
9
|
+
readonly version: "2.3.0";
|
|
10
10
|
};
|
|
11
11
|
readonly servers: readonly [{
|
|
12
12
|
readonly url: "/api/v1";
|
|
@@ -579,6 +579,7 @@ export declare const openApiDocument: {
|
|
|
579
579
|
readonly delete: {
|
|
580
580
|
readonly operationId: "contacts.delete";
|
|
581
581
|
readonly summary: "Delete a contact by ID";
|
|
582
|
+
readonly description: "Deletes the contact and its owned accounts after detaching inactive follow history. Pending or accepted follows and unrelated references return 409. Retained incoming snapshots and delivery identities are not deleted. Detached history is omitted from following lists and activity routes return 404 until refollow reattaches it to an account.";
|
|
582
583
|
readonly security: readonly [{
|
|
583
584
|
readonly bearerAuth: readonly [];
|
|
584
585
|
}];
|
|
@@ -1087,6 +1088,7 @@ export declare const openApiDocument: {
|
|
|
1087
1088
|
readonly put: {
|
|
1088
1089
|
readonly operationId: "accounts.update";
|
|
1089
1090
|
readonly summary: "Update an account by ID";
|
|
1091
|
+
readonly description: "Changing the URL of an account referenced by following returns 409; other metadata remains editable.";
|
|
1090
1092
|
readonly security: readonly [{
|
|
1091
1093
|
readonly bearerAuth: readonly [];
|
|
1092
1094
|
}];
|
|
@@ -1139,6 +1141,16 @@ export declare const openApiDocument: {
|
|
|
1139
1141
|
};
|
|
1140
1142
|
};
|
|
1141
1143
|
};
|
|
1144
|
+
readonly "409": {
|
|
1145
|
+
readonly description: "The request conflicts with an existing resource.";
|
|
1146
|
+
readonly content: {
|
|
1147
|
+
readonly "application/json": {
|
|
1148
|
+
readonly schema: {
|
|
1149
|
+
readonly $ref: "#/components/schemas/ConflictResponse";
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1142
1154
|
readonly "422": {
|
|
1143
1155
|
readonly description: "The request is invalid.";
|
|
1144
1156
|
readonly content: {
|
|
@@ -1154,6 +1166,7 @@ export declare const openApiDocument: {
|
|
|
1154
1166
|
readonly delete: {
|
|
1155
1167
|
readonly operationId: "accounts.delete";
|
|
1156
1168
|
readonly summary: "Delete an account by ID";
|
|
1169
|
+
readonly description: "Accounts referenced by following (including inactive records) cannot be deleted; returns 409.";
|
|
1157
1170
|
readonly security: readonly [{
|
|
1158
1171
|
readonly bearerAuth: readonly [];
|
|
1159
1172
|
}];
|
|
@@ -1189,6 +1202,16 @@ export declare const openApiDocument: {
|
|
|
1189
1202
|
};
|
|
1190
1203
|
};
|
|
1191
1204
|
};
|
|
1205
|
+
readonly "409": {
|
|
1206
|
+
readonly description: "The request conflicts with an existing resource.";
|
|
1207
|
+
readonly content: {
|
|
1208
|
+
readonly "application/json": {
|
|
1209
|
+
readonly schema: {
|
|
1210
|
+
readonly $ref: "#/components/schemas/ConflictResponse";
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1192
1215
|
readonly "422": {
|
|
1193
1216
|
readonly description: "The request is invalid.";
|
|
1194
1217
|
readonly content: {
|
|
@@ -1447,6 +1470,7 @@ export declare const openApiDocument: {
|
|
|
1447
1470
|
readonly get: {
|
|
1448
1471
|
readonly operationId: "following.list";
|
|
1449
1472
|
readonly summary: "List following records";
|
|
1473
|
+
readonly description: "Lists account-backed following records. Inactive history detached by contact deletion is internal and omitted; accountId remains required and non-null.";
|
|
1450
1474
|
readonly security: readonly [{
|
|
1451
1475
|
readonly bearerAuth: readonly [];
|
|
1452
1476
|
}];
|
|
@@ -1505,6 +1529,7 @@ export declare const openApiDocument: {
|
|
|
1505
1529
|
readonly post: {
|
|
1506
1530
|
readonly operationId: "following.create";
|
|
1507
1531
|
readonly summary: "Follow a target";
|
|
1532
|
+
readonly description: "Reuses an inactive following identity, including history detached by contact deletion, and attaches it to the uniquely resolved contact-owned account. Retained incoming snapshots, cursors and deduplication identities survive refollow.";
|
|
1508
1533
|
readonly security: readonly [{
|
|
1509
1534
|
readonly bearerAuth: readonly [];
|
|
1510
1535
|
}];
|
|
@@ -1572,6 +1597,194 @@ export declare const openApiDocument: {
|
|
|
1572
1597
|
};
|
|
1573
1598
|
};
|
|
1574
1599
|
};
|
|
1600
|
+
readonly "/following/{id}/activity": {
|
|
1601
|
+
readonly get: {
|
|
1602
|
+
readonly operationId: "following.activity.list";
|
|
1603
|
+
readonly summary: "Download buffered posts and boosts from one followed account";
|
|
1604
|
+
readonly description: "Non-consuming, actor-scoped delivery buffer of posts and boosts, without an opt-in filter. No read acknowledgment or deletion. Ordered by stable receipt sequence, not original publication time. Cursors survive deletion and remain usable when hasMore is false. Handle each item's kind; boosts distinguish sharing from original-author attribution. See docs/specs/12-incoming-activity.md for delivery and retry semantics.";
|
|
1605
|
+
readonly security: readonly [{
|
|
1606
|
+
readonly bearerAuth: readonly [];
|
|
1607
|
+
}];
|
|
1608
|
+
readonly parameters: readonly [{
|
|
1609
|
+
readonly name: "id";
|
|
1610
|
+
readonly in: "path";
|
|
1611
|
+
readonly required: true;
|
|
1612
|
+
readonly schema: {
|
|
1613
|
+
readonly type: "integer";
|
|
1614
|
+
readonly minimum: 1;
|
|
1615
|
+
};
|
|
1616
|
+
}, {
|
|
1617
|
+
readonly name: "limit";
|
|
1618
|
+
readonly in: "query";
|
|
1619
|
+
readonly required: false;
|
|
1620
|
+
readonly schema: {
|
|
1621
|
+
readonly type: "integer";
|
|
1622
|
+
readonly minimum: 1;
|
|
1623
|
+
readonly maximum: 100;
|
|
1624
|
+
readonly default: 50;
|
|
1625
|
+
};
|
|
1626
|
+
}, {
|
|
1627
|
+
readonly name: "cursor";
|
|
1628
|
+
readonly in: "query";
|
|
1629
|
+
readonly required: false;
|
|
1630
|
+
readonly description: "Opaque continuation for this actor/following pair. Omit for the oldest available copy. Invalid/cross-scope cursors return 422.";
|
|
1631
|
+
readonly schema: {
|
|
1632
|
+
readonly type: "string";
|
|
1633
|
+
readonly minLength: 1;
|
|
1634
|
+
readonly maxLength: 2048;
|
|
1635
|
+
};
|
|
1636
|
+
}];
|
|
1637
|
+
readonly responses: {
|
|
1638
|
+
readonly "200": {
|
|
1639
|
+
readonly description: "Available copies at query time; concurrent explicit deletion may change later responses. Cache-Control: no-store.";
|
|
1640
|
+
readonly content: {
|
|
1641
|
+
readonly "application/json": {
|
|
1642
|
+
readonly schema: {
|
|
1643
|
+
readonly $ref: "#/components/schemas/IncomingActivityPage";
|
|
1644
|
+
};
|
|
1645
|
+
};
|
|
1646
|
+
};
|
|
1647
|
+
};
|
|
1648
|
+
readonly "401": {
|
|
1649
|
+
readonly description: "The API key is missing or invalid.";
|
|
1650
|
+
readonly content: {
|
|
1651
|
+
readonly "application/json": {
|
|
1652
|
+
readonly schema: {
|
|
1653
|
+
readonly $ref: "#/components/schemas/AuthenticationErrorResponse";
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
};
|
|
1658
|
+
readonly "404": {
|
|
1659
|
+
readonly description: "The requested resource was not found.";
|
|
1660
|
+
readonly content: {
|
|
1661
|
+
readonly "application/json": {
|
|
1662
|
+
readonly schema: {
|
|
1663
|
+
readonly $ref: "#/components/schemas/NotFoundResponse";
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
readonly "422": {
|
|
1669
|
+
readonly description: "The request is invalid.";
|
|
1670
|
+
readonly content: {
|
|
1671
|
+
readonly "application/json": {
|
|
1672
|
+
readonly schema: {
|
|
1673
|
+
readonly $ref: "#/components/schemas/ValidationErrorResponse";
|
|
1674
|
+
};
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
readonly "501": {
|
|
1679
|
+
readonly description: "This site does not implement this operation.";
|
|
1680
|
+
readonly content: {
|
|
1681
|
+
readonly "application/json": {
|
|
1682
|
+
readonly schema: {
|
|
1683
|
+
readonly $ref: "#/components/schemas/NotImplementedResponse";
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
};
|
|
1690
|
+
readonly delete: {
|
|
1691
|
+
readonly operationId: "following.activity.remove";
|
|
1692
|
+
readonly summary: "Remove selected buffered website copies";
|
|
1693
|
+
readonly description: "Atomic body removal in the selected followed account and configured actor only. Does not remove remote originals, owned publications or client bodies. Missing/already-removed/out-of-scope IDs are harmless; duplicates are coalesced. Retry identical requests after uncertain responses; removed may be zero. No read or persistence acknowledgment. Bodies are removed; minimal deduplication identities remain indefinitely.";
|
|
1694
|
+
readonly security: readonly [{
|
|
1695
|
+
readonly bearerAuth: readonly [];
|
|
1696
|
+
}];
|
|
1697
|
+
readonly parameters: readonly [{
|
|
1698
|
+
readonly name: "id";
|
|
1699
|
+
readonly in: "path";
|
|
1700
|
+
readonly required: true;
|
|
1701
|
+
readonly schema: {
|
|
1702
|
+
readonly type: "integer";
|
|
1703
|
+
readonly minimum: 1;
|
|
1704
|
+
};
|
|
1705
|
+
}];
|
|
1706
|
+
readonly requestBody: {
|
|
1707
|
+
readonly required: true;
|
|
1708
|
+
readonly description: "JSON payload, at most 16384 bytes. Validate the entire batch before changing anything.";
|
|
1709
|
+
readonly "x-max-body-bytes": 16384;
|
|
1710
|
+
readonly content: {
|
|
1711
|
+
readonly "application/json": {
|
|
1712
|
+
readonly schema: {
|
|
1713
|
+
readonly $ref: "#/components/schemas/RemoveIncomingActivityRequest";
|
|
1714
|
+
};
|
|
1715
|
+
readonly example: {
|
|
1716
|
+
readonly ids: readonly ["b40eac11-4a38-44cc-a969-ecf2e7c4654b"];
|
|
1717
|
+
};
|
|
1718
|
+
};
|
|
1719
|
+
};
|
|
1720
|
+
};
|
|
1721
|
+
readonly responses: {
|
|
1722
|
+
readonly "200": {
|
|
1723
|
+
readonly description: "Number of copies actually removed by this request; zero is a successful idempotent retry, not an error.";
|
|
1724
|
+
readonly content: {
|
|
1725
|
+
readonly "application/json": {
|
|
1726
|
+
readonly schema: {
|
|
1727
|
+
readonly $ref: "#/components/schemas/RemoveIncomingActivityResponse";
|
|
1728
|
+
};
|
|
1729
|
+
};
|
|
1730
|
+
};
|
|
1731
|
+
};
|
|
1732
|
+
readonly "401": {
|
|
1733
|
+
readonly description: "The API key is missing or invalid.";
|
|
1734
|
+
readonly content: {
|
|
1735
|
+
readonly "application/json": {
|
|
1736
|
+
readonly schema: {
|
|
1737
|
+
readonly $ref: "#/components/schemas/AuthenticationErrorResponse";
|
|
1738
|
+
};
|
|
1739
|
+
};
|
|
1740
|
+
};
|
|
1741
|
+
};
|
|
1742
|
+
readonly "404": {
|
|
1743
|
+
readonly description: "The requested resource was not found.";
|
|
1744
|
+
readonly content: {
|
|
1745
|
+
readonly "application/json": {
|
|
1746
|
+
readonly schema: {
|
|
1747
|
+
readonly $ref: "#/components/schemas/NotFoundResponse";
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
readonly "413": {
|
|
1753
|
+
readonly description: "JSON payload exceeds 16384 bytes; no changes.";
|
|
1754
|
+
readonly content: {
|
|
1755
|
+
readonly "application/json": {
|
|
1756
|
+
readonly schema: {
|
|
1757
|
+
readonly $ref: "#/components/schemas/PayloadTooLargeResponse";
|
|
1758
|
+
};
|
|
1759
|
+
};
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
readonly "422": {
|
|
1763
|
+
readonly description: "The request is invalid.";
|
|
1764
|
+
readonly content: {
|
|
1765
|
+
readonly "application/json": {
|
|
1766
|
+
readonly schema: {
|
|
1767
|
+
readonly $ref: "#/components/schemas/ValidationErrorResponse";
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
};
|
|
1771
|
+
};
|
|
1772
|
+
readonly "500": {
|
|
1773
|
+
readonly description: "Persistence failure rolls back the batch. A lost/uncertain transport response never establishes whether removal committed; retry the same IDs.";
|
|
1774
|
+
};
|
|
1775
|
+
readonly "501": {
|
|
1776
|
+
readonly description: "This site does not implement this operation.";
|
|
1777
|
+
readonly content: {
|
|
1778
|
+
readonly "application/json": {
|
|
1779
|
+
readonly schema: {
|
|
1780
|
+
readonly $ref: "#/components/schemas/NotImplementedResponse";
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
};
|
|
1575
1788
|
readonly "/following/{id}/unfollow": {
|
|
1576
1789
|
readonly post: {
|
|
1577
1790
|
readonly operationId: "following.unfollow";
|
|
@@ -2578,7 +2791,7 @@ export declare const openApiDocument: {
|
|
|
2578
2791
|
};
|
|
2579
2792
|
readonly version: {
|
|
2580
2793
|
readonly type: "string";
|
|
2581
|
-
readonly const: "
|
|
2794
|
+
readonly const: "2.3.0";
|
|
2582
2795
|
};
|
|
2583
2796
|
};
|
|
2584
2797
|
};
|
|
@@ -3225,13 +3438,14 @@ export declare const openApiDocument: {
|
|
|
3225
3438
|
};
|
|
3226
3439
|
readonly Following: {
|
|
3227
3440
|
readonly type: "object";
|
|
3228
|
-
readonly required: readonly ["id", "
|
|
3441
|
+
readonly required: readonly ["id", "accountId", "profileUrl", "displayName", "handle", "inboxUrl", "avatarUrl", "status", "lastError", "followedAt", "acceptedAt", "rejectedAt", "unfollowedAt"];
|
|
3229
3442
|
readonly properties: {
|
|
3230
3443
|
readonly id: {
|
|
3231
3444
|
readonly type: "integer";
|
|
3232
3445
|
};
|
|
3233
|
-
readonly
|
|
3446
|
+
readonly accountId: {
|
|
3234
3447
|
readonly type: "integer";
|
|
3448
|
+
readonly description: "Followed contact-owned account ID. Resolve its ownerId through GET /accounts/{id} for contact attribution.";
|
|
3235
3449
|
};
|
|
3236
3450
|
readonly profileUrl: {
|
|
3237
3451
|
readonly type: "string";
|
|
@@ -3276,6 +3490,270 @@ export declare const openApiDocument: {
|
|
|
3276
3490
|
};
|
|
3277
3491
|
};
|
|
3278
3492
|
};
|
|
3493
|
+
readonly IncomingPost: {
|
|
3494
|
+
readonly type: "object";
|
|
3495
|
+
readonly description: "Immutable first-delivery snapshot of a remote post, not an owned publication. Account/Contact attribution uses existing shapes. For posts, sharing and author attribution are equal. Remote content is untrusted; sanitize HTML before rendering. No attachment binaries are fetched.";
|
|
3496
|
+
readonly required: readonly ["id", "kind", "activityId", "objectId", "objectType", "url", "title", "contentHtml", "contentText", "publishedAt", "receivedAt", "sharingAccount", "sharingContact", "authorAccount", "authorContact"];
|
|
3497
|
+
readonly properties: {
|
|
3498
|
+
readonly id: {
|
|
3499
|
+
readonly type: "string";
|
|
3500
|
+
readonly format: "uuid";
|
|
3501
|
+
readonly description: "Opaque buffered-copy identity, not an activity or original-object ID. Treat as opaque and use only for this followed account.";
|
|
3502
|
+
};
|
|
3503
|
+
readonly kind: {
|
|
3504
|
+
readonly type: "string";
|
|
3505
|
+
readonly const: "post";
|
|
3506
|
+
};
|
|
3507
|
+
readonly activityId: {
|
|
3508
|
+
readonly type: "string";
|
|
3509
|
+
readonly format: "uri";
|
|
3510
|
+
};
|
|
3511
|
+
readonly objectId: {
|
|
3512
|
+
readonly type: "string";
|
|
3513
|
+
readonly format: "uri";
|
|
3514
|
+
};
|
|
3515
|
+
readonly objectType: {
|
|
3516
|
+
readonly type: "string";
|
|
3517
|
+
readonly enum: readonly ["Note", "Article", "Page"];
|
|
3518
|
+
};
|
|
3519
|
+
readonly url: {
|
|
3520
|
+
readonly type: "string";
|
|
3521
|
+
readonly format: "uri";
|
|
3522
|
+
};
|
|
3523
|
+
readonly title: {
|
|
3524
|
+
readonly type: readonly ["string", "null"];
|
|
3525
|
+
};
|
|
3526
|
+
readonly contentHtml: {
|
|
3527
|
+
readonly type: "string";
|
|
3528
|
+
readonly description: "Original remote HTML, untrusted and not sanitized. Clients must sanitize before rendering; never execute embedded scripts.";
|
|
3529
|
+
};
|
|
3530
|
+
readonly contentText: {
|
|
3531
|
+
readonly type: "string";
|
|
3532
|
+
readonly description: "Plain-text derivative, not a trusted instruction or a substitute for the preserved HTML.";
|
|
3533
|
+
};
|
|
3534
|
+
readonly publishedAt: {
|
|
3535
|
+
readonly type: readonly ["string", "null"];
|
|
3536
|
+
readonly format: "date-time";
|
|
3537
|
+
};
|
|
3538
|
+
readonly receivedAt: {
|
|
3539
|
+
readonly type: "string";
|
|
3540
|
+
readonly format: "date-time";
|
|
3541
|
+
};
|
|
3542
|
+
readonly sharingAccount: {
|
|
3543
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3544
|
+
};
|
|
3545
|
+
readonly sharingContact: {
|
|
3546
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3547
|
+
};
|
|
3548
|
+
readonly authorAccount: {
|
|
3549
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3550
|
+
};
|
|
3551
|
+
readonly authorContact: {
|
|
3552
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3553
|
+
};
|
|
3554
|
+
};
|
|
3555
|
+
};
|
|
3556
|
+
readonly IncomingAuthorAccount: {
|
|
3557
|
+
readonly description: "Original-author attribution using the existing Account shape. A unique saved contact account uses its real IDs; otherwise use an unsaved snapshot with null id/ownerType/ownerId and no persistent account/contact creation. Never pass a null ID to account-management routes.";
|
|
3558
|
+
readonly oneOf: readonly [{
|
|
3559
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3560
|
+
}, {
|
|
3561
|
+
readonly type: "object";
|
|
3562
|
+
readonly required: readonly ["id", "ownerType", "ownerId", "label", "url", "avatarUrl", "kind", "protocol", "isDefault", "sortOrder"];
|
|
3563
|
+
readonly properties: {
|
|
3564
|
+
readonly id: {
|
|
3565
|
+
readonly type: "null";
|
|
3566
|
+
};
|
|
3567
|
+
readonly ownerType: {
|
|
3568
|
+
readonly type: "null";
|
|
3569
|
+
};
|
|
3570
|
+
readonly ownerId: {
|
|
3571
|
+
readonly type: "null";
|
|
3572
|
+
};
|
|
3573
|
+
readonly label: {
|
|
3574
|
+
readonly type: "string";
|
|
3575
|
+
readonly description: "Resolved original-author display name, or its URI if enrichment is unavailable.";
|
|
3576
|
+
};
|
|
3577
|
+
readonly url: {
|
|
3578
|
+
readonly type: "string";
|
|
3579
|
+
readonly format: "uri";
|
|
3580
|
+
readonly description: "Stable original-author actor URI from the canonical original.";
|
|
3581
|
+
};
|
|
3582
|
+
readonly avatarUrl: {
|
|
3583
|
+
readonly type: readonly ["string", "null"];
|
|
3584
|
+
readonly format: "uri";
|
|
3585
|
+
};
|
|
3586
|
+
readonly kind: {
|
|
3587
|
+
readonly type: "string";
|
|
3588
|
+
readonly const: "social";
|
|
3589
|
+
};
|
|
3590
|
+
readonly protocol: {
|
|
3591
|
+
readonly type: "string";
|
|
3592
|
+
readonly const: "activitypub";
|
|
3593
|
+
};
|
|
3594
|
+
readonly isDefault: {
|
|
3595
|
+
readonly type: "boolean";
|
|
3596
|
+
readonly const: false;
|
|
3597
|
+
};
|
|
3598
|
+
readonly sortOrder: {
|
|
3599
|
+
readonly type: "integer";
|
|
3600
|
+
readonly const: 0;
|
|
3601
|
+
};
|
|
3602
|
+
};
|
|
3603
|
+
}];
|
|
3604
|
+
};
|
|
3605
|
+
readonly IncomingBoost: {
|
|
3606
|
+
readonly type: "object";
|
|
3607
|
+
readonly description: "One newly delivered boost of a remote post, including older originals. The followed sharing account is distinct from the original author. Resolve the referenced canonical original, not posting history. Distinct Announce activity IDs are distinct copies even for the same original; retries of an observed ID never resurrect a removed copy. Existing post payloads are unchanged.";
|
|
3608
|
+
readonly required: readonly ["id", "kind", "activityId", "objectId", "objectType", "url", "title", "contentHtml", "contentText", "publishedAt", "sharedAt", "receivedAt", "sharingAccount", "sharingContact", "authorAccount", "authorContact"];
|
|
3609
|
+
readonly properties: {
|
|
3610
|
+
readonly id: {
|
|
3611
|
+
readonly type: "string";
|
|
3612
|
+
readonly format: "uuid";
|
|
3613
|
+
readonly description: "Opaque buffered-copy identity; not the Announce or original-object ID.";
|
|
3614
|
+
};
|
|
3615
|
+
readonly kind: {
|
|
3616
|
+
readonly type: "string";
|
|
3617
|
+
readonly const: "boost";
|
|
3618
|
+
};
|
|
3619
|
+
readonly activityId: {
|
|
3620
|
+
readonly type: "string";
|
|
3621
|
+
readonly format: "uri";
|
|
3622
|
+
readonly description: "Delivered Announce identity.";
|
|
3623
|
+
};
|
|
3624
|
+
readonly objectId: {
|
|
3625
|
+
readonly type: "string";
|
|
3626
|
+
readonly format: "uri";
|
|
3627
|
+
readonly description: "Canonical remote original-object identity, independent of this boost.";
|
|
3628
|
+
};
|
|
3629
|
+
readonly objectType: {
|
|
3630
|
+
readonly type: "string";
|
|
3631
|
+
readonly enum: readonly ["Note", "Article", "Page"];
|
|
3632
|
+
};
|
|
3633
|
+
readonly url: {
|
|
3634
|
+
readonly type: "string";
|
|
3635
|
+
readonly format: "uri";
|
|
3636
|
+
};
|
|
3637
|
+
readonly title: {
|
|
3638
|
+
readonly type: readonly ["string", "null"];
|
|
3639
|
+
};
|
|
3640
|
+
readonly contentHtml: {
|
|
3641
|
+
readonly type: "string";
|
|
3642
|
+
readonly description: "Untrusted original HTML; sanitize before rendering and never execute embedded scripts.";
|
|
3643
|
+
};
|
|
3644
|
+
readonly contentText: {
|
|
3645
|
+
readonly type: "string";
|
|
3646
|
+
};
|
|
3647
|
+
readonly publishedAt: {
|
|
3648
|
+
readonly type: readonly ["string", "null"];
|
|
3649
|
+
readonly format: "date-time";
|
|
3650
|
+
readonly description: "Original publication time, not the boost's age or receipt order.";
|
|
3651
|
+
};
|
|
3652
|
+
readonly sharedAt: {
|
|
3653
|
+
readonly type: readonly ["string", "null"];
|
|
3654
|
+
readonly format: "date-time";
|
|
3655
|
+
readonly description: "Announce publication time, if supplied; not proof of receipt.";
|
|
3656
|
+
};
|
|
3657
|
+
readonly receivedAt: {
|
|
3658
|
+
readonly type: "string";
|
|
3659
|
+
readonly format: "date-time";
|
|
3660
|
+
};
|
|
3661
|
+
readonly sharingAccount: {
|
|
3662
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3663
|
+
};
|
|
3664
|
+
readonly sharingContact: {
|
|
3665
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3666
|
+
};
|
|
3667
|
+
readonly authorAccount: {
|
|
3668
|
+
readonly $ref: "#/components/schemas/IncomingAuthorAccount";
|
|
3669
|
+
};
|
|
3670
|
+
readonly authorContact: {
|
|
3671
|
+
readonly oneOf: readonly [{
|
|
3672
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3673
|
+
}, {
|
|
3674
|
+
readonly type: "null";
|
|
3675
|
+
}];
|
|
3676
|
+
readonly description: "Frozen known Contact attribution, or null for an unsaved/ambiguous original author.";
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
};
|
|
3680
|
+
readonly IncomingActivityPage: {
|
|
3681
|
+
readonly type: "object";
|
|
3682
|
+
readonly required: readonly ["data", "meta"];
|
|
3683
|
+
readonly properties: {
|
|
3684
|
+
readonly data: {
|
|
3685
|
+
readonly type: "array";
|
|
3686
|
+
readonly maxItems: 100;
|
|
3687
|
+
readonly items: {
|
|
3688
|
+
readonly oneOf: readonly [{
|
|
3689
|
+
readonly $ref: "#/components/schemas/IncomingPost";
|
|
3690
|
+
}, {
|
|
3691
|
+
readonly $ref: "#/components/schemas/IncomingBoost";
|
|
3692
|
+
}];
|
|
3693
|
+
readonly discriminator: {
|
|
3694
|
+
readonly propertyName: "kind";
|
|
3695
|
+
readonly mapping: {
|
|
3696
|
+
readonly post: "#/components/schemas/IncomingPost";
|
|
3697
|
+
readonly boost: "#/components/schemas/IncomingBoost";
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3700
|
+
};
|
|
3701
|
+
};
|
|
3702
|
+
readonly meta: {
|
|
3703
|
+
readonly type: "object";
|
|
3704
|
+
readonly required: readonly ["nextCursor", "hasMore", "limit"];
|
|
3705
|
+
readonly properties: {
|
|
3706
|
+
readonly nextCursor: {
|
|
3707
|
+
readonly type: "string";
|
|
3708
|
+
readonly description: "Continuation after the last returned copy, or unchanged position for an empty page; usable for polling new arrivals. Advancing this cursor is a client choice, not proof of persistence.";
|
|
3709
|
+
};
|
|
3710
|
+
readonly hasMore: {
|
|
3711
|
+
readonly type: "boolean";
|
|
3712
|
+
readonly description: "More copies were available at query time, not a guarantee against concurrent deletion.";
|
|
3713
|
+
};
|
|
3714
|
+
readonly limit: {
|
|
3715
|
+
readonly type: "integer";
|
|
3716
|
+
readonly minimum: 1;
|
|
3717
|
+
readonly maximum: 100;
|
|
3718
|
+
};
|
|
3719
|
+
};
|
|
3720
|
+
};
|
|
3721
|
+
};
|
|
3722
|
+
};
|
|
3723
|
+
readonly RemoveIncomingActivityRequest: {
|
|
3724
|
+
readonly type: "object";
|
|
3725
|
+
readonly additionalProperties: false;
|
|
3726
|
+
readonly required: readonly ["ids"];
|
|
3727
|
+
readonly properties: {
|
|
3728
|
+
readonly ids: {
|
|
3729
|
+
readonly type: "array";
|
|
3730
|
+
readonly minItems: 1;
|
|
3731
|
+
readonly maxItems: 100;
|
|
3732
|
+
readonly items: {
|
|
3733
|
+
readonly type: "string";
|
|
3734
|
+
readonly format: "uuid";
|
|
3735
|
+
readonly pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
3736
|
+
};
|
|
3737
|
+
};
|
|
3738
|
+
};
|
|
3739
|
+
};
|
|
3740
|
+
readonly RemoveIncomingActivityResponse: {
|
|
3741
|
+
readonly type: "object";
|
|
3742
|
+
readonly required: readonly ["data"];
|
|
3743
|
+
readonly properties: {
|
|
3744
|
+
readonly data: {
|
|
3745
|
+
readonly type: "object";
|
|
3746
|
+
readonly required: readonly ["removed"];
|
|
3747
|
+
readonly properties: {
|
|
3748
|
+
readonly removed: {
|
|
3749
|
+
readonly type: "integer";
|
|
3750
|
+
readonly minimum: 0;
|
|
3751
|
+
readonly maximum: 100;
|
|
3752
|
+
};
|
|
3753
|
+
};
|
|
3754
|
+
};
|
|
3755
|
+
};
|
|
3756
|
+
};
|
|
3279
3757
|
readonly FollowingResponse: {
|
|
3280
3758
|
readonly type: "object";
|
|
3281
3759
|
readonly required: readonly ["data"];
|