@volter/twin-tiktok 0.1.36 → 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.
Files changed (202) hide show
  1. package/README.md +25 -308
  2. package/business/spec/SOURCE.md +17 -0
  3. package/business/spec/openapi.json +1045 -0
  4. package/business/spec/sources.json +84 -0
  5. package/business/src/fetch.ts +14 -0
  6. package/business/src/generated/surface.gen.json +1 -0
  7. package/business/src/generated/ui.gen.json +1 -0
  8. package/business/src/index.ts +3 -0
  9. package/business/src/manifest.ts +38 -0
  10. package/business/src/semantics/index.ts +16 -0
  11. package/business/src/semantics/open_api.ts +142 -0
  12. package/business/src/semantics/shared.ts +119 -0
  13. package/business/src/semantics/states.ts +3 -0
  14. package/dist/business/spec/SOURCE.md +17 -0
  15. package/dist/business/spec/openapi.json +1045 -0
  16. package/dist/business/spec/sources.json +84 -0
  17. package/dist/business/src/fetch.d.ts +2 -0
  18. package/dist/business/src/fetch.js +13 -0
  19. package/dist/business/src/fetch.ts +14 -0
  20. package/dist/business/src/generated/surface.gen.json +1 -0
  21. package/dist/business/src/generated/ui.gen.json +1 -0
  22. package/dist/business/src/index.d.ts +2 -0
  23. package/dist/business/src/index.js +3 -0
  24. package/dist/business/src/index.ts +3 -0
  25. package/dist/business/src/manifest.d.ts +2 -0
  26. package/dist/business/src/manifest.js +33 -0
  27. package/dist/business/src/manifest.ts +38 -0
  28. package/dist/business/src/semantics/index.d.ts +2 -0
  29. package/dist/business/src/semantics/index.js +12 -0
  30. package/dist/business/src/semantics/index.ts +16 -0
  31. package/dist/business/src/semantics/open_api.d.ts +10 -0
  32. package/dist/business/src/semantics/open_api.js +162 -0
  33. package/dist/business/src/semantics/open_api.ts +142 -0
  34. package/dist/business/src/semantics/shared.d.ts +31 -0
  35. package/dist/business/src/semantics/shared.js +109 -0
  36. package/dist/business/src/semantics/shared.ts +119 -0
  37. package/dist/business/src/semantics/states.d.ts +8 -0
  38. package/dist/business/src/semantics/states.js +3 -0
  39. package/dist/business/src/semantics/states.ts +3 -0
  40. package/dist/generated/pack-facts.json +55 -0
  41. package/dist/journeys/coverage.json +220 -0
  42. package/dist/journeys/customer-life.json +2950 -0
  43. package/dist/journeys/customer-life.outline.md +59 -0
  44. package/dist/journeys/decisions.json +161 -0
  45. package/dist/journeys/demand.json +142 -0
  46. package/dist/journeys/score.json +294 -0
  47. package/dist/journeys/unreachable.json +13 -0
  48. package/dist/open/spec/SOURCE.md +20 -0
  49. package/dist/open/spec/openapi.json +1417 -0
  50. package/dist/open/spec/sources.json +124 -0
  51. package/dist/open/src/engine/mp4.d.ts +6 -0
  52. package/dist/open/src/engine/mp4.js +55 -0
  53. package/dist/open/src/engine/mp4.ts +48 -0
  54. package/dist/open/src/fetch.d.ts +2 -0
  55. package/dist/open/src/fetch.js +17 -0
  56. package/dist/open/src/fetch.ts +18 -0
  57. package/dist/open/src/generated/surface.gen.json +1 -0
  58. package/dist/open/src/generated/ui.gen.json +1 -0
  59. package/dist/open/src/index.d.ts +2 -0
  60. package/dist/open/src/index.js +3 -0
  61. package/dist/open/src/index.ts +3 -0
  62. package/dist/open/src/manifest.d.ts +2 -0
  63. package/dist/open/src/manifest.js +53 -0
  64. package/dist/open/src/manifest.ts +59 -0
  65. package/dist/open/src/screens/authorize.d.ts +2 -0
  66. package/dist/open/src/screens/authorize.js +53 -0
  67. package/dist/open/src/screens/authorize.ts +53 -0
  68. package/dist/open/src/semantics/doors.d.ts +10 -0
  69. package/dist/open/src/semantics/doors.js +118 -0
  70. package/dist/open/src/semantics/doors.ts +121 -0
  71. package/dist/open/src/semantics/index.d.ts +2 -0
  72. package/dist/open/src/semantics/index.js +16 -0
  73. package/dist/open/src/semantics/index.ts +20 -0
  74. package/dist/open/src/semantics/oauth.d.ts +2 -0
  75. package/dist/open/src/semantics/oauth.js +30 -0
  76. package/dist/open/src/semantics/oauth.ts +28 -0
  77. package/dist/open/src/semantics/post.d.ts +6 -0
  78. package/dist/open/src/semantics/post.js +66 -0
  79. package/dist/open/src/semantics/post.ts +60 -0
  80. package/dist/open/src/semantics/shared.d.ts +51 -0
  81. package/dist/open/src/semantics/shared.js +196 -0
  82. package/dist/open/src/semantics/shared.ts +197 -0
  83. package/dist/open/src/semantics/states.d.ts +20 -0
  84. package/dist/open/src/semantics/states.js +15 -0
  85. package/dist/open/src/semantics/states.ts +23 -0
  86. package/dist/open/src/semantics/user.d.ts +2 -0
  87. package/dist/open/src/semantics/user.js +24 -0
  88. package/dist/open/src/semantics/user.ts +24 -0
  89. package/dist/open/src/semantics/video.d.ts +4 -0
  90. package/dist/open/src/semantics/video.js +112 -0
  91. package/dist/open/src/semantics/video.ts +97 -0
  92. package/dist/src/cli.js +11 -34
  93. package/dist/src/fetch.d.ts +2 -0
  94. package/dist/src/fetch.js +9 -0
  95. package/dist/src/index.d.ts +5 -22
  96. package/dist/src/index.js +13 -167
  97. package/dist/src/manifest.d.ts +2 -0
  98. package/dist/src/manifest.js +28 -0
  99. package/dist/src/semantics/shared.d.ts +49 -0
  100. package/dist/src/semantics/shared.js +61 -0
  101. package/dist/src/server.d.ts +7 -0
  102. package/dist/src/server.js +7 -0
  103. package/generated/pack-facts.json +55 -0
  104. package/journeys/coverage.json +220 -0
  105. package/journeys/customer-life.json +2950 -0
  106. package/journeys/customer-life.outline.md +59 -0
  107. package/journeys/decisions.json +161 -0
  108. package/journeys/demand.json +142 -0
  109. package/journeys/score.json +294 -0
  110. package/journeys/unreachable.json +13 -0
  111. package/open/spec/SOURCE.md +20 -0
  112. package/open/spec/openapi.json +1417 -0
  113. package/open/spec/sources.json +124 -0
  114. package/open/src/engine/mp4.ts +48 -0
  115. package/open/src/fetch.ts +18 -0
  116. package/open/src/generated/surface.gen.json +1 -0
  117. package/open/src/generated/ui.gen.json +1 -0
  118. package/open/src/index.ts +3 -0
  119. package/open/src/manifest.ts +59 -0
  120. package/open/src/screens/authorize.ts +53 -0
  121. package/open/src/semantics/doors.ts +121 -0
  122. package/open/src/semantics/index.ts +20 -0
  123. package/open/src/semantics/oauth.ts +28 -0
  124. package/open/src/semantics/post.ts +60 -0
  125. package/open/src/semantics/shared.ts +197 -0
  126. package/open/src/semantics/states.ts +23 -0
  127. package/open/src/semantics/user.ts +24 -0
  128. package/open/src/semantics/video.ts +97 -0
  129. package/package.json +13 -41
  130. package/src/cli.ts +11 -32
  131. package/src/fetch.ts +10 -0
  132. package/src/index.ts +15 -270
  133. package/src/manifest.ts +33 -0
  134. package/src/semantics/shared.ts +78 -0
  135. package/src/server.ts +8 -0
  136. package/client/tiktok-consent.tsx +0 -154
  137. package/client/tiktok-mirror.css +0 -137
  138. package/client/tiktok-mirror.tsx +0 -497
  139. package/dist/client/tiktok-consent.bundle.js +0 -18
  140. package/dist/client/tiktok-consent.d.ts +0 -47
  141. package/dist/client/tiktok-consent.js +0 -20
  142. package/dist/client/tiktok-consent.tsx +0 -154
  143. package/dist/client/tiktok-mirror.bundle.js +0 -484
  144. package/dist/client/tiktok-mirror.css +0 -137
  145. package/dist/client/tiktok-mirror.d.ts +0 -42
  146. package/dist/client/tiktok-mirror.js +0 -325
  147. package/dist/client/tiktok-mirror.tsx +0 -497
  148. package/dist/src/tiktok-blobs.d.ts +0 -66
  149. package/dist/src/tiktok-blobs.js +0 -161
  150. package/dist/src/tiktok-budget.d.ts +0 -56
  151. package/dist/src/tiktok-budget.js +0 -136
  152. package/dist/src/tiktok-capabilities.d.ts +0 -7
  153. package/dist/src/tiktok-capabilities.js +0 -1855
  154. package/dist/src/tiktok-conformance.d.ts +0 -11
  155. package/dist/src/tiktok-conformance.js +0 -498
  156. package/dist/src/tiktok-connector.d.ts +0 -158
  157. package/dist/src/tiktok-connector.js +0 -600
  158. package/dist/src/tiktok-consent-ui.d.ts +0 -19
  159. package/dist/src/tiktok-consent-ui.js +0 -127
  160. package/dist/src/tiktok-errors.d.ts +0 -78
  161. package/dist/src/tiktok-errors.js +0 -175
  162. package/dist/src/tiktok-ids.d.ts +0 -16
  163. package/dist/src/tiktok-ids.js +0 -48
  164. package/dist/src/tiktok-media.d.ts +0 -7
  165. package/dist/src/tiktok-media.js +0 -86
  166. package/dist/src/tiktok-mirror-ui.d.ts +0 -61
  167. package/dist/src/tiktok-mirror-ui.js +0 -187
  168. package/dist/src/tiktok-pkce.d.ts +0 -25
  169. package/dist/src/tiktok-pkce.js +0 -56
  170. package/dist/src/tiktok-posting.d.ts +0 -100
  171. package/dist/src/tiktok-posting.js +0 -599
  172. package/dist/src/tiktok-sample-mp4.d.ts +0 -10
  173. package/dist/src/tiktok-sample-mp4.js +0 -55
  174. package/dist/src/tiktok-scopes.d.ts +0 -29
  175. package/dist/src/tiktok-scopes.js +0 -106
  176. package/dist/src/tiktok-server.d.ts +0 -28
  177. package/dist/src/tiktok-server.js +0 -99
  178. package/dist/src/tiktok-store.d.ts +0 -164
  179. package/dist/src/tiktok-store.js +0 -451
  180. package/dist/src/tiktok-twin.d.ts +0 -70
  181. package/dist/src/tiktok-twin.js +0 -1197
  182. package/dist/src/tiktok-user.d.ts +0 -28
  183. package/dist/src/tiktok-user.js +0 -174
  184. package/src/tiktok-blobs.ts +0 -217
  185. package/src/tiktok-budget.ts +0 -163
  186. package/src/tiktok-capabilities.ts +0 -2022
  187. package/src/tiktok-conformance.ts +0 -526
  188. package/src/tiktok-connector.ts +0 -637
  189. package/src/tiktok-consent-ui.ts +0 -146
  190. package/src/tiktok-errors.ts +0 -197
  191. package/src/tiktok-ids.ts +0 -51
  192. package/src/tiktok-journey.uitest.ts +0 -305
  193. package/src/tiktok-media.ts +0 -89
  194. package/src/tiktok-mirror-ui.ts +0 -193
  195. package/src/tiktok-pkce.ts +0 -61
  196. package/src/tiktok-posting.ts +0 -617
  197. package/src/tiktok-sample-mp4.ts +0 -54
  198. package/src/tiktok-scopes.ts +0 -122
  199. package/src/tiktok-server.ts +0 -110
  200. package/src/tiktok-store.ts +0 -543
  201. package/src/tiktok-twin.ts +0 -1361
  202. package/src/tiktok-user.ts +0 -137
@@ -0,0 +1,59 @@
1
+ # tiktok customer life: outline
2
+
3
+ Author: `codex-demand-rule`.
4
+
5
+ **Tidewater Yoga** posts to TikTok from **Postiz** (gitroomhq/postiz-app at `e0a08a7d9592fdc1ef1e82cb7cb781489fceade3`, ../journeys/demand.json). The World
6
+ clock starts Tue 20 Jan 2026, 09:00.
7
+
8
+ 1. **The developer site and the person.** The World registers Postiz's TikTok app on the developer site: its client key
9
+ and secret (the credential door answers TIKTOK_CLIENT_ID and TIKTOK_CLIENT_SECRET), its redirect URI
10
+ (`https://postiz.tidewater.yoga/integrations/social/tiktok`) and its URL property (the studio's media domain).
11
+ Maya (@tidewateryoga, 1,240 followers, following 180, 9,800 likes, videos up to 10 minutes) has a TikTok account.
12
+ 2. **Connecting.** Postiz sends Maya to the authorize page with its six scopes; she signs in and authorizes; the
13
+ browser returns to the redirect URI with a code, the granted scopes and the state. A redirect URI the app never
14
+ registered is refused on the page. Postiz trades the code (form, grant_type authorization_code): an access token,
15
+ a refresh token, open_id and the scopes; the same code again is refused (invalid_grant). It reads the account
16
+ (open_id, avatar_url, display_name, union_id, username).
17
+ 3. **A video, posted directly.** Postiz asks the creator's longest video (600 seconds) and initializes a Direct Post of
18
+ a 2,304-byte synthetic MP4 as one chunk (FILE_UPLOAD, PUBLIC_TO_EVERYONE); a privacy level not among the creator's options is
19
+ refused. It PUTs the bytes to the upload URL: 201. The status is PUBLISH_COMPLETE with its public post id and the
20
+ bytes uploaded. A second PUT to the finished upload is refused (416).
21
+ 4. **A video to the inbox.** A second video goes to Maya's inbox (inbox/video/init): after its upload the status is
22
+ SEND_TO_USER_INBOX, and it is no public video. Maya also reviews a 65 MiB class recording: Postiz's actual plan
23
+ (`tiktok.provider.ts:703–718,755–786,825–832`) sends five 10 MiB parts (206) and a 15 MiB final part (201), then
24
+ reads SEND_TO_USER_INBOX and the complete uploaded byte count. Compact synthetic media fills keep the life small.
25
+ 5. **Photos.** Postiz posts two photos by URL from a domain the app never verified: 403 url_ownership_unverified.
26
+ From the studio's verified domain, whose server the World does not run: the post's status is FAILED,
27
+ photo_pull_failed (the twin pulls through the World and reaches nothing else).
28
+ 6. **Analytics.** TikTok's audience watches (the door): 1,200 views, 150 likes, 12 comments, 8 shares. Postiz reads
29
+ the account's stats (followers 1,240, video count 1), lists its videos (the public one, newest first, cursor and
30
+ has_more) and queries their counts.
31
+ 7. **The next day.** The access token is refreshed (grant_type refresh_token): a new pair, and the old refresh token no
32
+ longer works. A request with no token answers 401 access_token_invalid.
33
+ 8. **What TikTok refuses, and its edges.** The developer site takes only https redirect URIs; TikTok takes no invalid,
34
+ empty-passworded or taken username. Jonah (a teacher, a private account) is refused on an unknown client key, a
35
+ response type other than code, a scope the app lacks and a wrong password; he cancels once (access_denied), then
36
+ authorizes only his basic profile and posting. His code is refused with a wrong client secret or another redirect
37
+ URI, and a grant type TikTok lacks is refused; traded, his token cannot read stats or videos (scope_not_authorized)
38
+ or Maya's post, and his creator settings offer a private account's privacy levels. Maya's refreshed token meets the
39
+ rest: an unknown user field; a caption over 2200 characters; a video from a URL (the twin's gap, said so); no
40
+ source; every chunk-plan rule; an upload URL naming no task, a chunk without its range or with the wrong bytes, and
41
+ an upload URL an hour old; photo posts with the wrong media type, post mode or source, no photos, a cover index past
42
+ them, a title over 90 or a description over 4000 characters, or a privacy level not offered; photos sent to the
43
+ inbox (their pull fails as before); a publish_id TikTok never gave; a video field that does not exist, a page over
44
+ 20, videos before the first one's time, a query naming none; a video's cover from the CDN.
45
+ 9. **TikTok Business.** The ads portal gives Postiz's business app its App ID and secret, and refuses a redirect URL
46
+ without its trailing slash, with a port, a query, http, a relative one, or eleven; Postiz's is registered. Maya
47
+ connects her account through the same authorize page; the code is refused with a wrong secret (40131), another
48
+ grant type, a code TikTok never gave (40110) or another redirect URL, then traded. An open-platform token is not the
49
+ business API's (40105), none is 40104, another account's business_id 40001; fields that are not a JSON array or
50
+ name what the profile lacks are 40002. Postiz names the account and reads its analytics, and its posts' counts (the
51
+ public video of chapter 3, 1,200 views); a page over 20, fields without item_id, and posts before the first are
52
+ refused or empty. TikTok knows a location near the studio and two tracks; Postiz finds the location and lists the
53
+ tracks, all and by genre. A video published by URL, with a track, loses its media body after the studio's server
54
+ supplies headers: FAILED, video_pull_failed. Her next video downloads successfully from the application's media
55
+ response and becomes PUBLISH_COMPLETE; Postiz reads its id, caption and zero initial counts back from the public
56
+ Business video list (`tiktok.business.provider.ts:666–691,1140`). Photos saved as a draft fail because the World
57
+ has no response for those image URLs; every missing field is
58
+ 40002. Jonah connects his business account; Maya's task is not his (40001). The token is refreshed once; the spent
59
+ refresh token is 40107; a day later Jonah's unrefreshed token has expired (40102).
@@ -0,0 +1,161 @@
1
+ {
2
+ "about": "Postiz channel connections, posting and analytics at its pinned scanned commit; revocation, cancellation and token-info flows answer the gap.",
3
+ "decisions": [
4
+ {
5
+ "operation": "oauthToken",
6
+ "demand": "Postiz trades the authorize code for tokens, and refreshes them (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:305,382).",
7
+ "mechanism": "handler",
8
+ "why": "an action: a code or refresh token is spent, a token pair issued (drawn from ctx.secret, kept by SHA-256)"
9
+ },
10
+ {
11
+ "operation": "userInfo",
12
+ "demand": "Postiz names the connected account and reads its stats (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:319,399,978).",
13
+ "mechanism": "handler",
14
+ "why": "a computed read: the person projected to the fields asked, each gated by its scope"
15
+ },
16
+ {
17
+ "operation": "creatorInfoQuery",
18
+ "demand": "Postiz reads the creator's longest video (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:425).",
19
+ "mechanism": "handler",
20
+ "why": "a computed read of the creator's settings"
21
+ },
22
+ {
23
+ "operation": "videoInit",
24
+ "demand": "Postiz posts a video directly (FILE_UPLOAD) (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:543,546,857).",
25
+ "mechanism": "handler",
26
+ "why": "an action: a post made in PROCESSING_UPLOAD with its upload task"
27
+ },
28
+ {
29
+ "operation": "inboxVideoInit",
30
+ "demand": "Postiz sends a video to the creator's inbox (FILE_UPLOAD) (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:543,546,857).",
31
+ "mechanism": "handler",
32
+ "why": "an action: a post made in PROCESSING_UPLOAD with its upload task"
33
+ },
34
+ {
35
+ "operation": "contentInit",
36
+ "demand": "Postiz posts photos (PULL_FROM_URL) (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:543,546,857).",
37
+ "mechanism": "handler",
38
+ "why": "an action: a post made in PROCESSING_DOWNLOAD, and the vendor pulls its photos through the World (ctx.vendorFetch)"
39
+ },
40
+ {
41
+ "operation": "uploadVideo",
42
+ "demand": "Postiz PUTs the video's bytes to the upload URL (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:773).",
43
+ "mechanism": "handler",
44
+ "why": "an action: a chunk's bytes into ctx.blobs; the last moves the post (states.ts) and makes its video"
45
+ },
46
+ {
47
+ "operation": "publishStatusFetch",
48
+ "demand": "Postiz polls the post's status (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:455,1158).",
49
+ "mechanism": "handler",
50
+ "why": "a computed read of the post by its publish_id, the caller's own only"
51
+ },
52
+ {
53
+ "operation": "videoList",
54
+ "demand": "Postiz lists the account's videos for analytics (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:1028,1115).",
55
+ "mechanism": "handler",
56
+ "why": "a computed read: the public videos, newest first, by the cursor rule, projected to the fields asked"
57
+ },
58
+ {
59
+ "operation": "videoQuery",
60
+ "demand": "Postiz reads its videos' counts (libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:1047,1183).",
61
+ "mechanism": "handler",
62
+ "why": "a computed read: the caller's videos by id, projected to the fields asked"
63
+ },
64
+ {
65
+ "operation": "ttUserOauth2Token",
66
+ "demand": "Postiz trades the business account's authorize code for tokens (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:370).",
67
+ "mechanism": "handler",
68
+ "why": "an action: the shared code spent, a business token pair issued"
69
+ },
70
+ {
71
+ "operation": "ttUserOauth2RefreshToken",
72
+ "demand": "Postiz refreshes the business token (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:300).",
73
+ "mechanism": "handler",
74
+ "why": "an action: a refresh token spent, a new pair issued"
75
+ },
76
+ {
77
+ "operation": "businessGet",
78
+ "demand": "Postiz names the account (username, display_name, profile_image) and reads its analytics counts (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:260,956).",
79
+ "mechanism": "handler",
80
+ "why": "a computed read of the person, projected to the fields asked"
81
+ },
82
+ {
83
+ "operation": "businessVideoList",
84
+ "demand": "Postiz reads its posts' likes, comments, shares and views (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:909,1140).",
85
+ "mechanism": "handler",
86
+ "why": "a computed read of the public videos, projected to the fields asked"
87
+ },
88
+ {
89
+ "operation": "businessVideoPublish",
90
+ "demand": "Postiz publishes a video by URL (or to the drafts) (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:677).",
91
+ "mechanism": "handler",
92
+ "why": "an action: a post made and pulled through the World; its video made"
93
+ },
94
+ {
95
+ "operation": "businessPhotoPublish",
96
+ "demand": "Postiz publishes photos by URL (or as a draft) (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:677).",
97
+ "mechanism": "handler",
98
+ "why": "an action: a post made and pulled through the World"
99
+ },
100
+ {
101
+ "operation": "businessPublishStatus",
102
+ "demand": "Postiz reads the post's status once per poll (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:431).",
103
+ "mechanism": "handler",
104
+ "why": "a computed read of the post"
105
+ },
106
+ {
107
+ "operation": "businessPublishLocation",
108
+ "demand": "Postiz searches location tags for a post (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:873).",
109
+ "mechanism": "handler",
110
+ "why": "a computed read of the World's location tags"
111
+ },
112
+ {
113
+ "operation": "discoveryCmlTrendingList",
114
+ "demand": "Postiz lists popular tracks to pick music for a post (libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:810).",
115
+ "mechanism": "handler",
116
+ "why": "a computed read of the World's tracks"
117
+ },
118
+ {
119
+ "operation": "door:appCredentials",
120
+ "demand": "Customer life appCredentials setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
121
+ "mechanism": "door",
122
+ "why": "Developer dashboard creates the first app credential; no TikTok API operation does."
123
+ },
124
+ {
125
+ "operation": "door:apps",
126
+ "demand": "Customer life apps setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
127
+ "mechanism": "door",
128
+ "why": "Developer-site redirect URIs and verified URL properties have no API operation."
129
+ },
130
+ {
131
+ "operation": "door:people",
132
+ "demand": "Customer life people setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
133
+ "mechanism": "door",
134
+ "why": "The audience\u2019s accounts exist before the application connects them; no published API creates them."
135
+ },
136
+ {
137
+ "operation": "door:videoStats",
138
+ "demand": "Customer life videoStats setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
139
+ "mechanism": "door",
140
+ "why": "Audience view and engagement counts are not writable through the application API."
141
+ },
142
+ {
143
+ "operation": "door:media",
144
+ "demand": "Customer life media setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
145
+ "mechanism": "door",
146
+ "why": "The vendor CDN serves synthetic avatar/cover bytes in the World."
147
+ },
148
+ {
149
+ "operation": "door:locations",
150
+ "demand": "Customer life locations setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
151
+ "mechanism": "door",
152
+ "why": "Location tags are TikTok\u2019s external inventory; no application API creates them."
153
+ },
154
+ {
155
+ "operation": "door:tracks",
156
+ "demand": "Customer life tracks setup; Postiz token, profile, posting and analytics calls recorded in demand.json.",
157
+ "mechanism": "door",
158
+ "why": "Commercial Music Library tracks are external inventory; no application API creates them."
159
+ }
160
+ ]
161
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "measured": "Application calls and optional settings are recorded below at the cited commits.",
3
+ "applications": [
4
+ {
5
+ "name": "gitroomhq/postiz-app",
6
+ "commit": "e0a08a7d9592fdc1ef1e82cb7cb781489fceade3",
7
+ "client": "fetch; TikTokProvider and TiktokBusinessProvider",
8
+ "frontend": [
9
+ {
10
+ "call": "Connect the selected TikTok account through Login Kit consent",
11
+ "operation": "screen:authorize",
12
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:345-346; libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:352-353"
13
+ }
14
+ ],
15
+ "backend": [
16
+ {
17
+ "call": "oauthToken",
18
+ "operation": "oauthToken",
19
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:305,382"
20
+ },
21
+ {
22
+ "call": "userInfo",
23
+ "operation": "userInfo",
24
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:320,399,978"
25
+ },
26
+ {
27
+ "call": "creatorInfoQuery",
28
+ "operation": "creatorInfoQuery",
29
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:425"
30
+ },
31
+ {
32
+ "call": "videoInit",
33
+ "operation": "videoInit",
34
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:858-863"
35
+ },
36
+ {
37
+ "call": "inboxVideoInit",
38
+ "operation": "inboxVideoInit",
39
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:858-863"
40
+ },
41
+ {
42
+ "call": "contentInit",
43
+ "operation": "contentInit",
44
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:858-863"
45
+ },
46
+ {
47
+ "call": "uploadVideo",
48
+ "operation": "uploadVideo",
49
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:773"
50
+ },
51
+ {
52
+ "call": "publishStatusFetch",
53
+ "operation": "publishStatusFetch",
54
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:455,1158"
55
+ },
56
+ {
57
+ "call": "videoList",
58
+ "operation": "videoList",
59
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:1028,1115"
60
+ },
61
+ {
62
+ "call": "videoQuery",
63
+ "operation": "videoQuery",
64
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts:1047,1183"
65
+ },
66
+ {
67
+ "call": "ttUserOauth2Token",
68
+ "operation": "ttUserOauth2Token",
69
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:370"
70
+ },
71
+ {
72
+ "call": "ttUserOauth2RefreshToken",
73
+ "operation": "ttUserOauth2RefreshToken",
74
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:300"
75
+ },
76
+ {
77
+ "call": "businessGet",
78
+ "operation": "businessGet",
79
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:261,957"
80
+ },
81
+ {
82
+ "call": "businessVideoList",
83
+ "operation": "businessVideoList",
84
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:910,1140"
85
+ },
86
+ {
87
+ "call": "businessVideoPublish",
88
+ "operation": "businessVideoPublish",
89
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:678-682"
90
+ },
91
+ {
92
+ "call": "businessPhotoPublish",
93
+ "operation": "businessPhotoPublish",
94
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:678-682"
95
+ },
96
+ {
97
+ "call": "businessPublishStatus",
98
+ "operation": "businessPublishStatus",
99
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:432,1116"
100
+ },
101
+ {
102
+ "call": "businessPublishLocation",
103
+ "operation": "businessPublishLocation",
104
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:874"
105
+ },
106
+ {
107
+ "call": "discoveryCmlTrendingList",
108
+ "operation": "discoveryCmlTrendingList",
109
+ "evidence": "libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts:811"
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "name": "dubinc/dub",
115
+ "client": "partner TikTok handle verification",
116
+ "backend": [
117
+ {
118
+ "call": "Partner profile OAuth code exchange",
119
+ "operation": "oauthToken",
120
+ "evidence": "apps/web/lib/api/partner-profile/partner-platforms-providers.ts:73"
121
+ },
122
+ {
123
+ "call": "Verify partner username",
124
+ "operation": "userInfo",
125
+ "evidence": "apps/web/lib/tiktok/client.ts:24-29"
126
+ }
127
+ ],
128
+ "commit": "7e0101363b2a",
129
+ "gate": "The shipped partner-profile verification flow authenticates TikTok with its client credentials (apps/web/lib/api/partner-profile/partner-platforms-providers.ts:71-85).",
130
+ "evidence": "apps/web/lib/api/partner-profile/partner-platforms-providers.ts:74,75",
131
+ "frontend": [
132
+ {
133
+ "call": "TikTok partner verification consent",
134
+ "operation": "authorize",
135
+ "evidence": "apps/web/lib/api/partner-profile/partner-platforms-providers.ts:72"
136
+ }
137
+ ]
138
+ }
139
+ ],
140
+ "standIns": "the developer site's app (client key and secret, redirect URIs, URL properties) is the doors'; a TikTok person (who signs in on the authorize page) and a video's audience counts are the doors'; the twin decodes no media: a video's duration and size are read from its MP4 boxes, its cover is a labeled placeholder.",
141
+ "optional": []
142
+ }
@@ -0,0 +1,294 @@
1
+ {
2
+ "vendor": "tiktok",
3
+ "life": {
4
+ "steps": 154,
5
+ "verdict": "unjudged",
6
+ "judge": null,
7
+ "authors": []
8
+ },
9
+ "failures": [],
10
+ "flags": [
11
+ {
12
+ "step": "The finished upload takes no more",
13
+ "pattern": "REPEAT",
14
+ "detail": "repeats a request that succeeded earlier in the sitting (PUT https://open-upload.tiktokapis.com/video/?upload_id=73000000)"
15
+ },
16
+ {
17
+ "step": "The old refresh token no longer works",
18
+ "pattern": "REPEAT",
19
+ "detail": "repeats a request that succeeded earlier in the sitting (POST https://open.tiktokapis.com/v2/oauth/token/ [content-type=ap)"
20
+ },
21
+ {
22
+ "step": "The old refresh token no longer works",
23
+ "pattern": "RUN",
24
+ "detail": "5 refusals in a row, from \"The old refresh token no longer works\" to \"A username already taken\""
25
+ },
26
+ {
27
+ "step": "A wrong client secret",
28
+ "pattern": "RUN",
29
+ "detail": "3 refusals in a row, from \"A wrong client secret\" to \"A grant type TikTok does not take\""
30
+ },
31
+ {
32
+ "step": "His stats need a scope he did not grant",
33
+ "pattern": "RUN",
34
+ "detail": "3 refusals in a row, from \"His stats need a scope he did not grant\" to \"Maya's post is not his to read\""
35
+ },
36
+ {
37
+ "step": "A field the user object does not have",
38
+ "pattern": "RUN",
39
+ "detail": "13 refusals in a row, from \"A field the user object does not have\" to \"An upload URL that names no task\""
40
+ },
41
+ {
42
+ "step": "A chunk with no Content-Range",
43
+ "pattern": "RUN",
44
+ "detail": "11 refusals in a row, from \"A chunk with no Content-Range\" to \"A photo post's privacy not among the creator's opt\""
45
+ },
46
+ {
47
+ "step": "A publish_id TikTok never gave",
48
+ "pattern": "RUN",
49
+ "detail": "3 refusals in a row, from \"A publish_id TikTok never gave\" to \"A page of more than 20\""
50
+ },
51
+ {
52
+ "step": "A query naming no video",
53
+ "pattern": "RUN",
54
+ "detail": "3 refusals in a row, from \"A query naming no video\" to \"Stats for a video TikTok does not have\""
55
+ },
56
+ {
57
+ "step": "A business redirect URL without its trailing slash is refused",
58
+ "pattern": "RUN",
59
+ "detail": "6 refusals in a row, from \"A business redirect URL without its trailing slash\" to \"Eleven are too many\""
60
+ }
61
+ ],
62
+ "coverage": {
63
+ "vendor": "tiktok",
64
+ "missing": 0,
65
+ "stale": [],
66
+ "code": {
67
+ "lines": 851,
68
+ "run": 849,
69
+ "recorded": 2,
70
+ "missing": 0
71
+ },
72
+ "state": {
73
+ "declared": 6,
74
+ "reached": 6,
75
+ "recorded": 0,
76
+ "missing": [],
77
+ "undeclared": []
78
+ },
79
+ "files": [
80
+ {
81
+ "file": "semantics/shared.ts",
82
+ "lines": {
83
+ "found": 39,
84
+ "hit": 39
85
+ },
86
+ "missing": []
87
+ },
88
+ {
89
+ "file": "manifest.ts",
90
+ "lines": {
91
+ "found": 28,
92
+ "hit": 28
93
+ },
94
+ "missing": []
95
+ },
96
+ {
97
+ "file": "index.ts",
98
+ "lines": {
99
+ "found": 10,
100
+ "hit": 10
101
+ },
102
+ "missing": []
103
+ },
104
+ {
105
+ "file": "server.ts",
106
+ "lines": {
107
+ "found": 4,
108
+ "hit": 2
109
+ },
110
+ "missing": []
111
+ },
112
+ {
113
+ "file": "fetch.ts",
114
+ "lines": {
115
+ "found": 6,
116
+ "hit": 6
117
+ },
118
+ "missing": []
119
+ },
120
+ {
121
+ "file": "../business/src/semantics/states.ts",
122
+ "lines": {
123
+ "found": 2,
124
+ "hit": 2
125
+ },
126
+ "missing": []
127
+ },
128
+ {
129
+ "file": "../business/src/semantics/shared.ts",
130
+ "lines": {
131
+ "found": 78,
132
+ "hit": 78
133
+ },
134
+ "missing": []
135
+ },
136
+ {
137
+ "file": "../business/src/semantics/open_api.ts",
138
+ "lines": {
139
+ "found": 105,
140
+ "hit": 105
141
+ },
142
+ "missing": []
143
+ },
144
+ {
145
+ "file": "../business/src/semantics/index.ts",
146
+ "lines": {
147
+ "found": 12,
148
+ "hit": 12
149
+ },
150
+ "missing": []
151
+ },
152
+ {
153
+ "file": "../business/src/manifest.ts",
154
+ "lines": {
155
+ "found": 27,
156
+ "hit": 27
157
+ },
158
+ "missing": []
159
+ },
160
+ {
161
+ "file": "../business/src/index.ts",
162
+ "lines": {
163
+ "found": 2,
164
+ "hit": 2
165
+ },
166
+ "missing": []
167
+ },
168
+ {
169
+ "file": "../business/src/fetch.ts",
170
+ "lines": {
171
+ "found": 10,
172
+ "hit": 10
173
+ },
174
+ "missing": []
175
+ },
176
+ {
177
+ "file": "../open/src/semantics/doors.ts",
178
+ "lines": {
179
+ "found": 81,
180
+ "hit": 81
181
+ },
182
+ "missing": []
183
+ },
184
+ {
185
+ "file": "../open/src/semantics/oauth.ts",
186
+ "lines": {
187
+ "found": 21,
188
+ "hit": 21
189
+ },
190
+ "missing": []
191
+ },
192
+ {
193
+ "file": "../open/src/semantics/video.ts",
194
+ "lines": {
195
+ "found": 76,
196
+ "hit": 76
197
+ },
198
+ "missing": []
199
+ },
200
+ {
201
+ "file": "../open/src/semantics/states.ts",
202
+ "lines": {
203
+ "found": 11,
204
+ "hit": 11
205
+ },
206
+ "missing": []
207
+ },
208
+ {
209
+ "file": "../open/src/semantics/shared.ts",
210
+ "lines": {
211
+ "found": 126,
212
+ "hit": 126
213
+ },
214
+ "missing": []
215
+ },
216
+ {
217
+ "file": "../open/src/semantics/index.ts",
218
+ "lines": {
219
+ "found": 16,
220
+ "hit": 16
221
+ },
222
+ "missing": []
223
+ },
224
+ {
225
+ "file": "../open/src/semantics/user.ts",
226
+ "lines": {
227
+ "found": 18,
228
+ "hit": 18
229
+ },
230
+ "missing": []
231
+ },
232
+ {
233
+ "file": "../open/src/semantics/post.ts",
234
+ "lines": {
235
+ "found": 39,
236
+ "hit": 39
237
+ },
238
+ "missing": []
239
+ },
240
+ {
241
+ "file": "../open/src/screens/authorize.ts",
242
+ "lines": {
243
+ "found": 39,
244
+ "hit": 39
245
+ },
246
+ "missing": []
247
+ },
248
+ {
249
+ "file": "../open/src/manifest.ts",
250
+ "lines": {
251
+ "found": 45,
252
+ "hit": 45
253
+ },
254
+ "missing": []
255
+ },
256
+ {
257
+ "file": "../open/src/index.ts",
258
+ "lines": {
259
+ "found": 2,
260
+ "hit": 2
261
+ },
262
+ "missing": []
263
+ },
264
+ {
265
+ "file": "../open/src/engine/mp4.ts",
266
+ "lines": {
267
+ "found": 40,
268
+ "hit": 40
269
+ },
270
+ "missing": []
271
+ },
272
+ {
273
+ "file": "../open/src/fetch.ts",
274
+ "lines": {
275
+ "found": 14,
276
+ "hit": 14
277
+ },
278
+ "missing": []
279
+ }
280
+ ]
281
+ },
282
+ "examples": {
283
+ "done": false,
284
+ "replayed": true,
285
+ "verdict": "no file",
286
+ "failures": [],
287
+ "line": "examples: 0 published, 0 of patch-removed operations, 0 of operations the twin does not serve, 0 replayed, 0 recorded; 0 failing done: no"
288
+ },
289
+ "breadth": {
290
+ "operations": 23,
291
+ "handler": 19,
292
+ "gap": 4
293
+ }
294
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "code": [
3
+ {
4
+ "file": "server.ts",
5
+ "declarations": [
6
+ "createTiktokTwinServer"
7
+ ],
8
+ "world": "host-process",
9
+ "why": "The fixed host-process listener wraps createTiktokFetch (src/server.ts:5-7); the customer and vendor-example walks send every request through that fetch in their World rather than starting the CLI listener (src/cli.ts:17). Its listener creation and port/stop return are host-process work, not a Postiz customer act."
10
+ }
11
+ ],
12
+ "state": []
13
+ }