@evcraddock/slug-api 0.2.0 → 1.0.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 +9 -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 +480 -5
- package/dist/openapi.js +310 -2
- package/dist/openapi.json +585 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ 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
|
+
## Incoming activity contract 2.2.0
|
|
24
|
+
|
|
25
|
+
Package 1.0.0 carries contract 2.2.0. Compared with the previously published contract 1.1.0, following responses replace `contactId` with `accountId`; update clients before adopting the new contract. The source contract's approved 2.1.0 → 2.2.0 minor increment adds boosts to the per-followed-account GET/DELETE buffer. 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).
|
|
26
|
+
|
|
27
|
+
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. The package-to-contract mapping is recorded in `contract.json`; verify it and its OpenAPI digest after publication. Publishing these references does not establish that slugkit.com or another deployed website implements the new operations.
|
|
28
|
+
|
|
23
29
|
## Version and release policy
|
|
24
30
|
|
|
25
31
|
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 +34,9 @@ Released contract versions are immutable. Identical documents retain their contr
|
|
|
28
34
|
|
|
29
35
|
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
36
|
|
|
31
|
-
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
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
40
|
|
|
33
41
|
## Existing-site adoption
|
|
34
42
|
|
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.2.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.2.0";
|
package/dist/contract.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "slugkit-management-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"packageName": "@evcraddock/slug-api",
|
|
5
|
-
"packageVersion": "0.
|
|
5
|
+
"packageVersion": "1.0.0",
|
|
6
6
|
"artifact": "openapi.json",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "183e57ea59d2e37f9ea862940a94f38966b2c418d244ee9ff8f355bac1986925",
|
|
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.2.0";
|
|
6
6
|
};
|
|
7
7
|
readonly info: {
|
|
8
8
|
readonly title: "Slugkit API";
|
|
9
|
-
readonly version: "
|
|
9
|
+
readonly version: "2.2.0";
|
|
10
10
|
};
|
|
11
11
|
readonly servers: readonly [{
|
|
12
12
|
readonly url: "/api/v1";
|
|
@@ -1087,6 +1087,7 @@ export declare const openApiDocument: {
|
|
|
1087
1087
|
readonly put: {
|
|
1088
1088
|
readonly operationId: "accounts.update";
|
|
1089
1089
|
readonly summary: "Update an account by ID";
|
|
1090
|
+
readonly description: "Changing the URL of an account referenced by following returns 409; other metadata remains editable.";
|
|
1090
1091
|
readonly security: readonly [{
|
|
1091
1092
|
readonly bearerAuth: readonly [];
|
|
1092
1093
|
}];
|
|
@@ -1139,6 +1140,16 @@ export declare const openApiDocument: {
|
|
|
1139
1140
|
};
|
|
1140
1141
|
};
|
|
1141
1142
|
};
|
|
1143
|
+
readonly "409": {
|
|
1144
|
+
readonly description: "The request conflicts with an existing resource.";
|
|
1145
|
+
readonly content: {
|
|
1146
|
+
readonly "application/json": {
|
|
1147
|
+
readonly schema: {
|
|
1148
|
+
readonly $ref: "#/components/schemas/ConflictResponse";
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1142
1153
|
readonly "422": {
|
|
1143
1154
|
readonly description: "The request is invalid.";
|
|
1144
1155
|
readonly content: {
|
|
@@ -1154,6 +1165,7 @@ export declare const openApiDocument: {
|
|
|
1154
1165
|
readonly delete: {
|
|
1155
1166
|
readonly operationId: "accounts.delete";
|
|
1156
1167
|
readonly summary: "Delete an account by ID";
|
|
1168
|
+
readonly description: "Accounts referenced by following (including inactive records) cannot be deleted; returns 409.";
|
|
1157
1169
|
readonly security: readonly [{
|
|
1158
1170
|
readonly bearerAuth: readonly [];
|
|
1159
1171
|
}];
|
|
@@ -1189,6 +1201,16 @@ export declare const openApiDocument: {
|
|
|
1189
1201
|
};
|
|
1190
1202
|
};
|
|
1191
1203
|
};
|
|
1204
|
+
readonly "409": {
|
|
1205
|
+
readonly description: "The request conflicts with an existing resource.";
|
|
1206
|
+
readonly content: {
|
|
1207
|
+
readonly "application/json": {
|
|
1208
|
+
readonly schema: {
|
|
1209
|
+
readonly $ref: "#/components/schemas/ConflictResponse";
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1192
1214
|
readonly "422": {
|
|
1193
1215
|
readonly description: "The request is invalid.";
|
|
1194
1216
|
readonly content: {
|
|
@@ -1572,6 +1594,194 @@ export declare const openApiDocument: {
|
|
|
1572
1594
|
};
|
|
1573
1595
|
};
|
|
1574
1596
|
};
|
|
1597
|
+
readonly "/following/{id}/activity": {
|
|
1598
|
+
readonly get: {
|
|
1599
|
+
readonly operationId: "following.activity.list";
|
|
1600
|
+
readonly summary: "Download buffered posts and boosts from one followed account";
|
|
1601
|
+
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.";
|
|
1602
|
+
readonly security: readonly [{
|
|
1603
|
+
readonly bearerAuth: readonly [];
|
|
1604
|
+
}];
|
|
1605
|
+
readonly parameters: readonly [{
|
|
1606
|
+
readonly name: "id";
|
|
1607
|
+
readonly in: "path";
|
|
1608
|
+
readonly required: true;
|
|
1609
|
+
readonly schema: {
|
|
1610
|
+
readonly type: "integer";
|
|
1611
|
+
readonly minimum: 1;
|
|
1612
|
+
};
|
|
1613
|
+
}, {
|
|
1614
|
+
readonly name: "limit";
|
|
1615
|
+
readonly in: "query";
|
|
1616
|
+
readonly required: false;
|
|
1617
|
+
readonly schema: {
|
|
1618
|
+
readonly type: "integer";
|
|
1619
|
+
readonly minimum: 1;
|
|
1620
|
+
readonly maximum: 100;
|
|
1621
|
+
readonly default: 50;
|
|
1622
|
+
};
|
|
1623
|
+
}, {
|
|
1624
|
+
readonly name: "cursor";
|
|
1625
|
+
readonly in: "query";
|
|
1626
|
+
readonly required: false;
|
|
1627
|
+
readonly description: "Opaque continuation for this actor/following pair. Omit for the oldest available copy. Invalid/cross-scope cursors return 422.";
|
|
1628
|
+
readonly schema: {
|
|
1629
|
+
readonly type: "string";
|
|
1630
|
+
readonly minLength: 1;
|
|
1631
|
+
readonly maxLength: 2048;
|
|
1632
|
+
};
|
|
1633
|
+
}];
|
|
1634
|
+
readonly responses: {
|
|
1635
|
+
readonly "200": {
|
|
1636
|
+
readonly description: "Available copies at query time; concurrent explicit deletion may change later responses. Cache-Control: no-store.";
|
|
1637
|
+
readonly content: {
|
|
1638
|
+
readonly "application/json": {
|
|
1639
|
+
readonly schema: {
|
|
1640
|
+
readonly $ref: "#/components/schemas/IncomingActivityPage";
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
readonly "401": {
|
|
1646
|
+
readonly description: "The API key is missing or invalid.";
|
|
1647
|
+
readonly content: {
|
|
1648
|
+
readonly "application/json": {
|
|
1649
|
+
readonly schema: {
|
|
1650
|
+
readonly $ref: "#/components/schemas/AuthenticationErrorResponse";
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
};
|
|
1654
|
+
};
|
|
1655
|
+
readonly "404": {
|
|
1656
|
+
readonly description: "The requested resource was not found.";
|
|
1657
|
+
readonly content: {
|
|
1658
|
+
readonly "application/json": {
|
|
1659
|
+
readonly schema: {
|
|
1660
|
+
readonly $ref: "#/components/schemas/NotFoundResponse";
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
readonly "422": {
|
|
1666
|
+
readonly description: "The request is invalid.";
|
|
1667
|
+
readonly content: {
|
|
1668
|
+
readonly "application/json": {
|
|
1669
|
+
readonly schema: {
|
|
1670
|
+
readonly $ref: "#/components/schemas/ValidationErrorResponse";
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
readonly "501": {
|
|
1676
|
+
readonly description: "This site does not implement this operation.";
|
|
1677
|
+
readonly content: {
|
|
1678
|
+
readonly "application/json": {
|
|
1679
|
+
readonly schema: {
|
|
1680
|
+
readonly $ref: "#/components/schemas/NotImplementedResponse";
|
|
1681
|
+
};
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
readonly delete: {
|
|
1688
|
+
readonly operationId: "following.activity.remove";
|
|
1689
|
+
readonly summary: "Remove selected buffered website copies";
|
|
1690
|
+
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.";
|
|
1691
|
+
readonly security: readonly [{
|
|
1692
|
+
readonly bearerAuth: readonly [];
|
|
1693
|
+
}];
|
|
1694
|
+
readonly parameters: readonly [{
|
|
1695
|
+
readonly name: "id";
|
|
1696
|
+
readonly in: "path";
|
|
1697
|
+
readonly required: true;
|
|
1698
|
+
readonly schema: {
|
|
1699
|
+
readonly type: "integer";
|
|
1700
|
+
readonly minimum: 1;
|
|
1701
|
+
};
|
|
1702
|
+
}];
|
|
1703
|
+
readonly requestBody: {
|
|
1704
|
+
readonly required: true;
|
|
1705
|
+
readonly description: "JSON payload, at most 16384 bytes. Validate the entire batch before changing anything.";
|
|
1706
|
+
readonly "x-max-body-bytes": 16384;
|
|
1707
|
+
readonly content: {
|
|
1708
|
+
readonly "application/json": {
|
|
1709
|
+
readonly schema: {
|
|
1710
|
+
readonly $ref: "#/components/schemas/RemoveIncomingActivityRequest";
|
|
1711
|
+
};
|
|
1712
|
+
readonly example: {
|
|
1713
|
+
readonly ids: readonly ["b40eac11-4a38-44cc-a969-ecf2e7c4654b"];
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
readonly responses: {
|
|
1719
|
+
readonly "200": {
|
|
1720
|
+
readonly description: "Number of copies actually removed by this request; zero is a successful idempotent retry, not an error.";
|
|
1721
|
+
readonly content: {
|
|
1722
|
+
readonly "application/json": {
|
|
1723
|
+
readonly schema: {
|
|
1724
|
+
readonly $ref: "#/components/schemas/RemoveIncomingActivityResponse";
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
};
|
|
1729
|
+
readonly "401": {
|
|
1730
|
+
readonly description: "The API key is missing or invalid.";
|
|
1731
|
+
readonly content: {
|
|
1732
|
+
readonly "application/json": {
|
|
1733
|
+
readonly schema: {
|
|
1734
|
+
readonly $ref: "#/components/schemas/AuthenticationErrorResponse";
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
readonly "404": {
|
|
1740
|
+
readonly description: "The requested resource was not found.";
|
|
1741
|
+
readonly content: {
|
|
1742
|
+
readonly "application/json": {
|
|
1743
|
+
readonly schema: {
|
|
1744
|
+
readonly $ref: "#/components/schemas/NotFoundResponse";
|
|
1745
|
+
};
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
readonly "413": {
|
|
1750
|
+
readonly description: "JSON payload exceeds 16384 bytes; no changes.";
|
|
1751
|
+
readonly content: {
|
|
1752
|
+
readonly "application/json": {
|
|
1753
|
+
readonly schema: {
|
|
1754
|
+
readonly $ref: "#/components/schemas/PayloadTooLargeResponse";
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
};
|
|
1759
|
+
readonly "422": {
|
|
1760
|
+
readonly description: "The request is invalid.";
|
|
1761
|
+
readonly content: {
|
|
1762
|
+
readonly "application/json": {
|
|
1763
|
+
readonly schema: {
|
|
1764
|
+
readonly $ref: "#/components/schemas/ValidationErrorResponse";
|
|
1765
|
+
};
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
readonly "500": {
|
|
1770
|
+
readonly description: "Persistence failure rolls back the batch. A lost/uncertain transport response never establishes whether removal committed; retry the same IDs.";
|
|
1771
|
+
};
|
|
1772
|
+
readonly "501": {
|
|
1773
|
+
readonly description: "This site does not implement this operation.";
|
|
1774
|
+
readonly content: {
|
|
1775
|
+
readonly "application/json": {
|
|
1776
|
+
readonly schema: {
|
|
1777
|
+
readonly $ref: "#/components/schemas/NotImplementedResponse";
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1575
1785
|
readonly "/following/{id}/unfollow": {
|
|
1576
1786
|
readonly post: {
|
|
1577
1787
|
readonly operationId: "following.unfollow";
|
|
@@ -2578,7 +2788,7 @@ export declare const openApiDocument: {
|
|
|
2578
2788
|
};
|
|
2579
2789
|
readonly version: {
|
|
2580
2790
|
readonly type: "string";
|
|
2581
|
-
readonly const: "
|
|
2791
|
+
readonly const: "2.2.0";
|
|
2582
2792
|
};
|
|
2583
2793
|
};
|
|
2584
2794
|
};
|
|
@@ -3225,13 +3435,14 @@ export declare const openApiDocument: {
|
|
|
3225
3435
|
};
|
|
3226
3436
|
readonly Following: {
|
|
3227
3437
|
readonly type: "object";
|
|
3228
|
-
readonly required: readonly ["id", "
|
|
3438
|
+
readonly required: readonly ["id", "accountId", "profileUrl", "displayName", "handle", "inboxUrl", "avatarUrl", "status", "lastError", "followedAt", "acceptedAt", "rejectedAt", "unfollowedAt"];
|
|
3229
3439
|
readonly properties: {
|
|
3230
3440
|
readonly id: {
|
|
3231
3441
|
readonly type: "integer";
|
|
3232
3442
|
};
|
|
3233
|
-
readonly
|
|
3443
|
+
readonly accountId: {
|
|
3234
3444
|
readonly type: "integer";
|
|
3445
|
+
readonly description: "Followed contact-owned account ID. Resolve its ownerId through GET /accounts/{id} for contact attribution.";
|
|
3235
3446
|
};
|
|
3236
3447
|
readonly profileUrl: {
|
|
3237
3448
|
readonly type: "string";
|
|
@@ -3276,6 +3487,270 @@ export declare const openApiDocument: {
|
|
|
3276
3487
|
};
|
|
3277
3488
|
};
|
|
3278
3489
|
};
|
|
3490
|
+
readonly IncomingPost: {
|
|
3491
|
+
readonly type: "object";
|
|
3492
|
+
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.";
|
|
3493
|
+
readonly required: readonly ["id", "kind", "activityId", "objectId", "objectType", "url", "title", "contentHtml", "contentText", "publishedAt", "receivedAt", "sharingAccount", "sharingContact", "authorAccount", "authorContact"];
|
|
3494
|
+
readonly properties: {
|
|
3495
|
+
readonly id: {
|
|
3496
|
+
readonly type: "string";
|
|
3497
|
+
readonly format: "uuid";
|
|
3498
|
+
readonly description: "Opaque buffered-copy identity, not an activity or original-object ID. Treat as opaque and use only for this followed account.";
|
|
3499
|
+
};
|
|
3500
|
+
readonly kind: {
|
|
3501
|
+
readonly type: "string";
|
|
3502
|
+
readonly const: "post";
|
|
3503
|
+
};
|
|
3504
|
+
readonly activityId: {
|
|
3505
|
+
readonly type: "string";
|
|
3506
|
+
readonly format: "uri";
|
|
3507
|
+
};
|
|
3508
|
+
readonly objectId: {
|
|
3509
|
+
readonly type: "string";
|
|
3510
|
+
readonly format: "uri";
|
|
3511
|
+
};
|
|
3512
|
+
readonly objectType: {
|
|
3513
|
+
readonly type: "string";
|
|
3514
|
+
readonly enum: readonly ["Note", "Article", "Page"];
|
|
3515
|
+
};
|
|
3516
|
+
readonly url: {
|
|
3517
|
+
readonly type: "string";
|
|
3518
|
+
readonly format: "uri";
|
|
3519
|
+
};
|
|
3520
|
+
readonly title: {
|
|
3521
|
+
readonly type: readonly ["string", "null"];
|
|
3522
|
+
};
|
|
3523
|
+
readonly contentHtml: {
|
|
3524
|
+
readonly type: "string";
|
|
3525
|
+
readonly description: "Original remote HTML, untrusted and not sanitized. Clients must sanitize before rendering; never execute embedded scripts.";
|
|
3526
|
+
};
|
|
3527
|
+
readonly contentText: {
|
|
3528
|
+
readonly type: "string";
|
|
3529
|
+
readonly description: "Plain-text derivative, not a trusted instruction or a substitute for the preserved HTML.";
|
|
3530
|
+
};
|
|
3531
|
+
readonly publishedAt: {
|
|
3532
|
+
readonly type: readonly ["string", "null"];
|
|
3533
|
+
readonly format: "date-time";
|
|
3534
|
+
};
|
|
3535
|
+
readonly receivedAt: {
|
|
3536
|
+
readonly type: "string";
|
|
3537
|
+
readonly format: "date-time";
|
|
3538
|
+
};
|
|
3539
|
+
readonly sharingAccount: {
|
|
3540
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3541
|
+
};
|
|
3542
|
+
readonly sharingContact: {
|
|
3543
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3544
|
+
};
|
|
3545
|
+
readonly authorAccount: {
|
|
3546
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3547
|
+
};
|
|
3548
|
+
readonly authorContact: {
|
|
3549
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3550
|
+
};
|
|
3551
|
+
};
|
|
3552
|
+
};
|
|
3553
|
+
readonly IncomingAuthorAccount: {
|
|
3554
|
+
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.";
|
|
3555
|
+
readonly oneOf: readonly [{
|
|
3556
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3557
|
+
}, {
|
|
3558
|
+
readonly type: "object";
|
|
3559
|
+
readonly required: readonly ["id", "ownerType", "ownerId", "label", "url", "avatarUrl", "kind", "protocol", "isDefault", "sortOrder"];
|
|
3560
|
+
readonly properties: {
|
|
3561
|
+
readonly id: {
|
|
3562
|
+
readonly type: "null";
|
|
3563
|
+
};
|
|
3564
|
+
readonly ownerType: {
|
|
3565
|
+
readonly type: "null";
|
|
3566
|
+
};
|
|
3567
|
+
readonly ownerId: {
|
|
3568
|
+
readonly type: "null";
|
|
3569
|
+
};
|
|
3570
|
+
readonly label: {
|
|
3571
|
+
readonly type: "string";
|
|
3572
|
+
readonly description: "Resolved original-author display name, or its URI if enrichment is unavailable.";
|
|
3573
|
+
};
|
|
3574
|
+
readonly url: {
|
|
3575
|
+
readonly type: "string";
|
|
3576
|
+
readonly format: "uri";
|
|
3577
|
+
readonly description: "Stable original-author actor URI from the canonical original.";
|
|
3578
|
+
};
|
|
3579
|
+
readonly avatarUrl: {
|
|
3580
|
+
readonly type: readonly ["string", "null"];
|
|
3581
|
+
readonly format: "uri";
|
|
3582
|
+
};
|
|
3583
|
+
readonly kind: {
|
|
3584
|
+
readonly type: "string";
|
|
3585
|
+
readonly const: "social";
|
|
3586
|
+
};
|
|
3587
|
+
readonly protocol: {
|
|
3588
|
+
readonly type: "string";
|
|
3589
|
+
readonly const: "activitypub";
|
|
3590
|
+
};
|
|
3591
|
+
readonly isDefault: {
|
|
3592
|
+
readonly type: "boolean";
|
|
3593
|
+
readonly const: false;
|
|
3594
|
+
};
|
|
3595
|
+
readonly sortOrder: {
|
|
3596
|
+
readonly type: "integer";
|
|
3597
|
+
readonly const: 0;
|
|
3598
|
+
};
|
|
3599
|
+
};
|
|
3600
|
+
}];
|
|
3601
|
+
};
|
|
3602
|
+
readonly IncomingBoost: {
|
|
3603
|
+
readonly type: "object";
|
|
3604
|
+
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.";
|
|
3605
|
+
readonly required: readonly ["id", "kind", "activityId", "objectId", "objectType", "url", "title", "contentHtml", "contentText", "publishedAt", "sharedAt", "receivedAt", "sharingAccount", "sharingContact", "authorAccount", "authorContact"];
|
|
3606
|
+
readonly properties: {
|
|
3607
|
+
readonly id: {
|
|
3608
|
+
readonly type: "string";
|
|
3609
|
+
readonly format: "uuid";
|
|
3610
|
+
readonly description: "Opaque buffered-copy identity; not the Announce or original-object ID.";
|
|
3611
|
+
};
|
|
3612
|
+
readonly kind: {
|
|
3613
|
+
readonly type: "string";
|
|
3614
|
+
readonly const: "boost";
|
|
3615
|
+
};
|
|
3616
|
+
readonly activityId: {
|
|
3617
|
+
readonly type: "string";
|
|
3618
|
+
readonly format: "uri";
|
|
3619
|
+
readonly description: "Delivered Announce identity.";
|
|
3620
|
+
};
|
|
3621
|
+
readonly objectId: {
|
|
3622
|
+
readonly type: "string";
|
|
3623
|
+
readonly format: "uri";
|
|
3624
|
+
readonly description: "Canonical remote original-object identity, independent of this boost.";
|
|
3625
|
+
};
|
|
3626
|
+
readonly objectType: {
|
|
3627
|
+
readonly type: "string";
|
|
3628
|
+
readonly enum: readonly ["Note", "Article", "Page"];
|
|
3629
|
+
};
|
|
3630
|
+
readonly url: {
|
|
3631
|
+
readonly type: "string";
|
|
3632
|
+
readonly format: "uri";
|
|
3633
|
+
};
|
|
3634
|
+
readonly title: {
|
|
3635
|
+
readonly type: readonly ["string", "null"];
|
|
3636
|
+
};
|
|
3637
|
+
readonly contentHtml: {
|
|
3638
|
+
readonly type: "string";
|
|
3639
|
+
readonly description: "Untrusted original HTML; sanitize before rendering and never execute embedded scripts.";
|
|
3640
|
+
};
|
|
3641
|
+
readonly contentText: {
|
|
3642
|
+
readonly type: "string";
|
|
3643
|
+
};
|
|
3644
|
+
readonly publishedAt: {
|
|
3645
|
+
readonly type: readonly ["string", "null"];
|
|
3646
|
+
readonly format: "date-time";
|
|
3647
|
+
readonly description: "Original publication time, not the boost's age or receipt order.";
|
|
3648
|
+
};
|
|
3649
|
+
readonly sharedAt: {
|
|
3650
|
+
readonly type: readonly ["string", "null"];
|
|
3651
|
+
readonly format: "date-time";
|
|
3652
|
+
readonly description: "Announce publication time, if supplied; not proof of receipt.";
|
|
3653
|
+
};
|
|
3654
|
+
readonly receivedAt: {
|
|
3655
|
+
readonly type: "string";
|
|
3656
|
+
readonly format: "date-time";
|
|
3657
|
+
};
|
|
3658
|
+
readonly sharingAccount: {
|
|
3659
|
+
readonly $ref: "#/components/schemas/Account";
|
|
3660
|
+
};
|
|
3661
|
+
readonly sharingContact: {
|
|
3662
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3663
|
+
};
|
|
3664
|
+
readonly authorAccount: {
|
|
3665
|
+
readonly $ref: "#/components/schemas/IncomingAuthorAccount";
|
|
3666
|
+
};
|
|
3667
|
+
readonly authorContact: {
|
|
3668
|
+
readonly oneOf: readonly [{
|
|
3669
|
+
readonly $ref: "#/components/schemas/Contact";
|
|
3670
|
+
}, {
|
|
3671
|
+
readonly type: "null";
|
|
3672
|
+
}];
|
|
3673
|
+
readonly description: "Frozen known Contact attribution, or null for an unsaved/ambiguous original author.";
|
|
3674
|
+
};
|
|
3675
|
+
};
|
|
3676
|
+
};
|
|
3677
|
+
readonly IncomingActivityPage: {
|
|
3678
|
+
readonly type: "object";
|
|
3679
|
+
readonly required: readonly ["data", "meta"];
|
|
3680
|
+
readonly properties: {
|
|
3681
|
+
readonly data: {
|
|
3682
|
+
readonly type: "array";
|
|
3683
|
+
readonly maxItems: 100;
|
|
3684
|
+
readonly items: {
|
|
3685
|
+
readonly oneOf: readonly [{
|
|
3686
|
+
readonly $ref: "#/components/schemas/IncomingPost";
|
|
3687
|
+
}, {
|
|
3688
|
+
readonly $ref: "#/components/schemas/IncomingBoost";
|
|
3689
|
+
}];
|
|
3690
|
+
readonly discriminator: {
|
|
3691
|
+
readonly propertyName: "kind";
|
|
3692
|
+
readonly mapping: {
|
|
3693
|
+
readonly post: "#/components/schemas/IncomingPost";
|
|
3694
|
+
readonly boost: "#/components/schemas/IncomingBoost";
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3697
|
+
};
|
|
3698
|
+
};
|
|
3699
|
+
readonly meta: {
|
|
3700
|
+
readonly type: "object";
|
|
3701
|
+
readonly required: readonly ["nextCursor", "hasMore", "limit"];
|
|
3702
|
+
readonly properties: {
|
|
3703
|
+
readonly nextCursor: {
|
|
3704
|
+
readonly type: "string";
|
|
3705
|
+
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.";
|
|
3706
|
+
};
|
|
3707
|
+
readonly hasMore: {
|
|
3708
|
+
readonly type: "boolean";
|
|
3709
|
+
readonly description: "More copies were available at query time, not a guarantee against concurrent deletion.";
|
|
3710
|
+
};
|
|
3711
|
+
readonly limit: {
|
|
3712
|
+
readonly type: "integer";
|
|
3713
|
+
readonly minimum: 1;
|
|
3714
|
+
readonly maximum: 100;
|
|
3715
|
+
};
|
|
3716
|
+
};
|
|
3717
|
+
};
|
|
3718
|
+
};
|
|
3719
|
+
};
|
|
3720
|
+
readonly RemoveIncomingActivityRequest: {
|
|
3721
|
+
readonly type: "object";
|
|
3722
|
+
readonly additionalProperties: false;
|
|
3723
|
+
readonly required: readonly ["ids"];
|
|
3724
|
+
readonly properties: {
|
|
3725
|
+
readonly ids: {
|
|
3726
|
+
readonly type: "array";
|
|
3727
|
+
readonly minItems: 1;
|
|
3728
|
+
readonly maxItems: 100;
|
|
3729
|
+
readonly items: {
|
|
3730
|
+
readonly type: "string";
|
|
3731
|
+
readonly format: "uuid";
|
|
3732
|
+
readonly pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
3733
|
+
};
|
|
3734
|
+
};
|
|
3735
|
+
};
|
|
3736
|
+
};
|
|
3737
|
+
readonly RemoveIncomingActivityResponse: {
|
|
3738
|
+
readonly type: "object";
|
|
3739
|
+
readonly required: readonly ["data"];
|
|
3740
|
+
readonly properties: {
|
|
3741
|
+
readonly data: {
|
|
3742
|
+
readonly type: "object";
|
|
3743
|
+
readonly required: readonly ["removed"];
|
|
3744
|
+
readonly properties: {
|
|
3745
|
+
readonly removed: {
|
|
3746
|
+
readonly type: "integer";
|
|
3747
|
+
readonly minimum: 0;
|
|
3748
|
+
readonly maximum: 100;
|
|
3749
|
+
};
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
};
|
|
3753
|
+
};
|
|
3279
3754
|
readonly FollowingResponse: {
|
|
3280
3755
|
readonly type: "object";
|
|
3281
3756
|
readonly required: readonly ["data"];
|