@zinn-digital/sdk 0.1.2029 → 0.1.2032
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/dist/generated/schema.d.ts +69 -2
- package/package.json +1 -1
|
@@ -41526,7 +41526,7 @@ export interface paths {
|
|
|
41526
41526
|
* Record where the signed-in customer came from (the app's landing capture).
|
|
41527
41527
|
* @description The dashboard captures `utm_*`, `ref`, `zd_vid` (the product sites' visit id), the referring host and the landing page BEFORE the sign-in hop, and sends them here on the first signed-in page load. This is the only way an app sign-up can be attributed: self-registration provisions the organization inside authentication, which never sees the landing URL (docs/750). Unknown keys are dropped, values are capped, and the landing page is host and path only.
|
|
41528
41528
|
*
|
|
41529
|
-
* Recorded only against an organization the caller OWNS — a member of someone else's account did not bring it to us — and never under impersonation. A MEMBER who is not the owner (staff, an invited team member) gets `200` with `recorded: false, reason: not_owner` and nothing is written; `403` only for an organization the caller
|
|
41529
|
+
* Recorded only against an organization the caller OWNS — a member of someone else's account did not bring it to us — and never under impersonation. A MEMBER who is not the owner (staff, an invited team member) gets `200` with `recorded: false, reason: not_owner` and nothing is written, as does a reseller acting in a client organization it reaches through its own; `403` only for an organization the caller cannot reach at all. The first touch is written once and never overwritten; the last touch is overwritten each time. A capture with nothing attributable (no campaign, affiliate code, visit id or foreign referrer) records nothing and answers `recorded: false, reason: empty` — except the app's DIRECT first visit (`entry: direct`), which is recorded as a first touch only, when the org has none, so the owner's alert reads "Direct" instead of "Unknown"; it never overwrites a source. The app sends that marker once per organization when it has nothing pending (a browser that already reported another account's landing). On an organization more than a day old it records nothing and answers `reason: late`, so an old "Unknown" sign-up is never relabelled "Direct". Before recording a direct marker on an org with no first touch, the engine asks Keycloak for the caller's REGISTER event: the app's register redirect URI carries the campaign (`zd_acq`), so a sign-up finished in another browser (the verify-email link) keeps its source, which is then recorded instead of "Direct".
|
|
41530
41530
|
*/
|
|
41531
41531
|
post: operations["recordAcquisitionTouch"];
|
|
41532
41532
|
delete?: never;
|
|
@@ -62537,7 +62537,7 @@ export interface paths {
|
|
|
62537
62537
|
put?: never;
|
|
62538
62538
|
/**
|
|
62539
62539
|
* Add credit to your balance.
|
|
62540
|
-
* @description Charged on **your provider's own** payment account when you are a reseller's client, and on Zinn®'s when you buy directly. The credit is written when the payment **captures**: a crypto invoice awaiting confirmation (`pending`), a card awaiting 3-D Secure or a PayPal payment awaiting your approval at `action_url` (`requires_action`) returns 201 with that status and **no** balance change, because the money has not arrived. An approved PayPal top-up is captured and credited when PayPal reports the approval. 422 when your provider has not finished connecting a payment account — the charge is refused rather than settled somewhere else. 422 `PAYMENT_METHOD_REQUIRED` (refusal `refusal.wallet.topUpPaymentStep`) when a card top-up is bought from Zinn® with no saved card: nothing is written and no gateway is asked. Show the customer a choice of card, PayPal or crypto for the same amount, then repeat the request on the chosen `gateway` (1108#13).
|
|
62540
|
+
* @description Charged on **your provider's own** payment account when you are a reseller's client, and on Zinn®'s when you buy directly. The credit is written when the payment **captures**: a crypto invoice awaiting confirmation (`pending`), a card awaiting 3-D Secure or a PayPal payment awaiting your approval at `action_url` (`requires_action`) returns 201 with that status and **no** balance change, because the money has not arrived. An approved PayPal top-up is captured and credited when the buyer returns (`POST /v1/wallet/top-ups/{topUpId}/paypal/capture`) or when PayPal reports the approval, whichever comes first, and only once. 422 when your provider has not finished connecting a payment account — the charge is refused rather than settled somewhere else. 422 `PAYMENT_METHOD_REQUIRED` (refusal `refusal.wallet.topUpPaymentStep`) when a card top-up is bought from Zinn® with no saved card: nothing is written and no gateway is asked. Show the customer a choice of card, PayPal or crypto for the same amount, then repeat the request on the chosen `gateway` (1108#13).
|
|
62541
62541
|
*
|
|
62542
62542
|
* ⚖️ **Credit bought from Zinn® is never refundable, including on account closure, and never expires** (owner ruling 2026-08-22). Call `GET /v1/wallet/top-ups/estimate` first and show the customer what they will receive. ⚖️ We absorb the top-up fee on every rail (owner ruling 2026-11-21, "top up 50, get 50"): a top-up paid in full credits the full amount; a crypto invoice paid only in part credits what was sent. Requires `billing.payment.manage`.
|
|
62543
62543
|
*/
|
|
@@ -62548,6 +62548,26 @@ export interface paths {
|
|
|
62548
62548
|
patch?: never;
|
|
62549
62549
|
trace?: never;
|
|
62550
62550
|
};
|
|
62551
|
+
"/v1/wallet/top-ups/{topUpId}/paypal/capture": {
|
|
62552
|
+
parameters: {
|
|
62553
|
+
query?: never;
|
|
62554
|
+
header?: never;
|
|
62555
|
+
path?: never;
|
|
62556
|
+
cookie?: never;
|
|
62557
|
+
};
|
|
62558
|
+
get?: never;
|
|
62559
|
+
put?: never;
|
|
62560
|
+
/**
|
|
62561
|
+
* Capture a PayPal credit top-up when the buyer returns from PayPal.
|
|
62562
|
+
* @description Call it from the PayPal return page with the `token` PayPal put on the return URL (the PayPal order id). The top-up is captured and credited once, however this call and PayPal's own approval webhook race: both go through one capture under one `PayPal-Request-Id` and one row lock. 200 with the top-up as it now stands (`captured`, `failed`, or `pending` while PayPal is still clearing it); a top-up that is already settled or failed is returned as it is and nothing is asked of PayPal, so a reload is safe. 202 when the capture is running right now on another request: read `GET /v1/wallet/top-ups` again shortly. 404 for a top-up that is not yours, is not a PayPal top-up bought from Zinn®, or does not match the PayPal order id while it is still pending. Requires `billing.payment.manage`.
|
|
62563
|
+
*/
|
|
62564
|
+
post: operations["captureClientWalletTopUpPayPal"];
|
|
62565
|
+
delete?: never;
|
|
62566
|
+
options?: never;
|
|
62567
|
+
head?: never;
|
|
62568
|
+
patch?: never;
|
|
62569
|
+
trace?: never;
|
|
62570
|
+
};
|
|
62551
62571
|
"/v1/wallet/top-ups/estimate": {
|
|
62552
62572
|
parameters: {
|
|
62553
62573
|
query?: never;
|
|
@@ -228614,6 +228634,53 @@ export interface operations {
|
|
|
228614
228634
|
429: components["responses"]["TooManyRequests"];
|
|
228615
228635
|
};
|
|
228616
228636
|
};
|
|
228637
|
+
captureClientWalletTopUpPayPal: {
|
|
228638
|
+
parameters: {
|
|
228639
|
+
query?: {
|
|
228640
|
+
/** @description Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 rather than a 403, so this can never widen scope. */
|
|
228641
|
+
org_id?: components["schemas"]["Uuid"];
|
|
228642
|
+
};
|
|
228643
|
+
header?: never;
|
|
228644
|
+
path: {
|
|
228645
|
+
topUpId: components["schemas"]["Uuid"];
|
|
228646
|
+
};
|
|
228647
|
+
cookie?: never;
|
|
228648
|
+
};
|
|
228649
|
+
requestBody: {
|
|
228650
|
+
content: {
|
|
228651
|
+
"application/json": {
|
|
228652
|
+
/** @description The PayPal order id (`token` on the PayPal return URL). */
|
|
228653
|
+
paypal_order_id: string;
|
|
228654
|
+
};
|
|
228655
|
+
};
|
|
228656
|
+
};
|
|
228657
|
+
responses: {
|
|
228658
|
+
/** @description The top-up as it now stands. */
|
|
228659
|
+
200: {
|
|
228660
|
+
headers: {
|
|
228661
|
+
[name: string]: unknown;
|
|
228662
|
+
};
|
|
228663
|
+
content: {
|
|
228664
|
+
"application/json": components["schemas"]["ClientWalletTopUp"];
|
|
228665
|
+
};
|
|
228666
|
+
};
|
|
228667
|
+
/** @description Another request is capturing this top-up right now; it is still pending. */
|
|
228668
|
+
202: {
|
|
228669
|
+
headers: {
|
|
228670
|
+
[name: string]: unknown;
|
|
228671
|
+
};
|
|
228672
|
+
content: {
|
|
228673
|
+
"application/json": components["schemas"]["ClientWalletTopUp"];
|
|
228674
|
+
};
|
|
228675
|
+
};
|
|
228676
|
+
400: components["responses"]["UnprocessableEntity"];
|
|
228677
|
+
401: components["responses"]["Unauthorized"];
|
|
228678
|
+
403: components["responses"]["Forbidden"];
|
|
228679
|
+
404: components["responses"]["NotFound"];
|
|
228680
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
228681
|
+
429: components["responses"]["TooManyRequests"];
|
|
228682
|
+
};
|
|
228683
|
+
};
|
|
228617
228684
|
estimateWalletTopUp: {
|
|
228618
228685
|
parameters: {
|
|
228619
228686
|
query: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2032",
|
|
4
4
|
"description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",
|