Conversation
A six-page SDK section — overview, errors and retries, profiles, domains, webhooks, keys and members — plus an SDK example beside the cURL and CLI ones on all 21 endpoint pages, the quickstart, authentication and the landing page. The prose is a person's job; the rest is guarded. `sdk.spec.ts` builds a client and finds its methods by reflection, so an example naming a method that does not exist fails, every method has to appear somewhere under /sdk, and every endpoint page that has an SDK equivalent has to show it. Signup and confirm are the two written-down exceptions, and the list of them is checked against the pages that exist. The error table needed a runtime list to be checkable at all, so `PROPGATE_ERROR_CODES` is now exported and the union derives from it — the same shape CHECK_KINDS and WEBHOOK_EVENTS already use.
…real worst case Two from review, both real. The verification handler called `verifyPayload` and stopped there. That validates the HMAC and nothing else — freshness is deliberately the receiver's job, which is why `TOLERANCE_SECONDS` is exported — so the example published a handler a captured request replays forever. `/webhooks` already got this right; this one now quotes the same constant, and a spec asserts every example that verifies a signature performs the comparison. The worst case for one call was written as 65 seconds. The defaults it is computed from give 100: three attempts at 30 seconds plus two waits at the five-second ceiling. A reader sizing an enclosing deadline from 65 would have had it fire before the retries finished. `MAX_RETRY_WAIT_MS` is now exported so the page computes the number instead of stating it, and the source comment that carried the same arithmetic is fixed too.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation for
@propgate/sdk, and the third tab everywhere the docs already showed a call two ways.A new SDK section
Six pages, mirroring how the CLI section is split:
/sdk{ data, error, meta }envelope, configuration, the keyless calls, types, and what is covered/sdk/errorsPropgateErrorCodetable, what gets retried and what deliberately does not, and the rate limits you have to schedule around/sdk/profilesrequiredPerDomain, typed requirements/sdk/domainslistAll, and a reconciliation loop worth copying/sdk/webhooks@propgate/webhooksrather than this package/sdk/accountsAn SDK tab beside cURL and CLI
All 21 endpoint pages, plus the quickstart,
/authenticationand the landing page. Thirteen of those pages showed a bare cURL block; those became tabs. The two signup pages keep the pair they had — the flow ends in a mailbox and a server-side client is on the wrong side of it, which both pages already say.What is guarded, and what is not
Prose stays a person's job.
src/lib/sdk.spec.tstakes the rest, in the shapecli.spec.tsestablished:propgate.x.y(across the SDK and API pages is checked against a real client, found by reflection rather than a hand-kept list. Verified it bites by renaming one./sdk./sdk/errorsis asserted to name every member of the union.That last one needed the union to exist at runtime, so
PROPGATE_ERROR_CODESis now exported andPropgateErrorCodederives from it — the same shapeCHECK_KINDSandWEBHOOK_EVENTSalready use here. Changeset included; it is additive.coverage.spec.tsalso learned the new sidebar section, which is what keeps an empty one from silently vanishing.Checks
pnpm lint,pnpm check,pnpm test(202 docs specs) andnext buildall pass — 132 static pages, the six new ones included. Spot-checked the built HTML: three tabs on/api/domains/register, Shiki highlighting on the TypeScript panels.Greptile Summary
The PR adds comprehensive
@propgate/sdkdocumentation and SDK examples throughout the API reference.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(docs): check the timestamp in the we..." | Re-trigger Greptile