@nuwah/vertical-sdk 0.0.0-stage → 0.2.0-rc.1
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/LICENSE +17 -0
- package/README.md +229 -2
- package/bin/nuwah-contract-check-rules.d.mts +41 -0
- package/bin/nuwah-contract-check-rules.mjs +333 -0
- package/bin/nuwah-contract-check.mjs +64 -0
- package/dist/accounting.d.ts +1417 -0
- package/dist/accounting.js +274 -0
- package/dist/active-org.d.ts +13 -0
- package/dist/active-org.js +59 -0
- package/dist/actors.d.ts +448 -0
- package/dist/actors.js +143 -0
- package/dist/ai.d.ts +359 -0
- package/dist/ai.js +229 -0
- package/dist/analytics.d.ts +37 -0
- package/dist/analytics.js +8 -0
- package/dist/atlas.d.ts +291 -0
- package/dist/atlas.js +78 -0
- package/dist/audit.d.ts +193 -0
- package/dist/audit.js +26 -0
- package/dist/authentication.d.ts +119 -0
- package/dist/authentication.js +83 -0
- package/dist/awards.d.ts +38 -0
- package/dist/awards.js +10 -0
- package/dist/blueprint/document.d.ts +178 -0
- package/dist/blueprint/document.js +17 -0
- package/dist/blueprint/index.d.ts +3 -0
- package/dist/blueprint/index.js +5 -0
- package/dist/blueprint/manifest.d.ts +105 -0
- package/dist/blueprint/manifest.js +11 -0
- package/dist/blueprint/validate.d.ts +14 -0
- package/dist/blueprint/validate.js +416 -0
- package/dist/bookings-directory.d.ts +118 -0
- package/dist/bookings-directory.js +289 -0
- package/dist/bookings-extra.d.ts +1448 -0
- package/dist/bookings-extra.js +582 -0
- package/dist/bookings.d.ts +1365 -0
- package/dist/bookings.js +305 -0
- package/dist/builder-code.d.ts +164 -0
- package/dist/builder-code.js +12 -0
- package/dist/builder-core-gaps.d.ts +83 -0
- package/dist/builder-core-gaps.js +8 -0
- package/dist/builder-repos.d.ts +73 -0
- package/dist/builder-repos.js +37 -0
- package/dist/builder.d.ts +730 -0
- package/dist/builder.js +105 -0
- package/dist/campaigns.d.ts +105 -0
- package/dist/campaigns.js +25 -0
- package/dist/catalogs.d.ts +188 -0
- package/dist/catalogs.js +36 -0
- package/dist/commerce-ai.d.ts +182 -0
- package/dist/commerce-ai.js +27 -0
- package/dist/connections.d.ts +278 -0
- package/dist/connections.js +96 -0
- package/dist/content-control.d.ts +121 -0
- package/dist/content-control.js +23 -0
- package/dist/contributions.d.ts +560 -0
- package/dist/contributions.js +140 -0
- package/dist/conversation-assist.d.ts +154 -0
- package/dist/conversation-assist.js +51 -0
- package/dist/conversation-info.d.ts +219 -0
- package/dist/conversation-info.js +43 -0
- package/dist/crm.d.ts +533 -0
- package/dist/crm.js +142 -0
- package/dist/dashboards.d.ts +119 -0
- package/dist/dashboards.js +22 -0
- package/dist/delegations.d.ts +161 -0
- package/dist/delegations.js +39 -0
- package/dist/docs.d.ts +289 -0
- package/dist/docs.js +49 -0
- package/dist/documents.d.ts +317 -0
- package/dist/documents.js +84 -0
- package/dist/drafts.d.ts +132 -0
- package/dist/drafts.js +56 -0
- package/dist/engagements.d.ts +133 -0
- package/dist/engagements.js +15 -0
- package/dist/event-stream.d.ts +54 -0
- package/dist/event-stream.js +228 -0
- package/dist/exchanges.d.ts +447 -0
- package/dist/exchanges.js +145 -0
- package/dist/exports.d.ts +113 -0
- package/dist/exports.js +81 -0
- package/dist/feeds.d.ts +228 -0
- package/dist/feeds.js +52 -0
- package/dist/files.d.ts +56 -0
- package/dist/files.js +55 -0
- package/dist/finance-insights.d.ts +41 -0
- package/dist/finance-insights.js +61 -0
- package/dist/fixed-assets.d.ts +155 -0
- package/dist/fixed-assets.js +28 -0
- package/dist/fulfilment-jobs.d.ts +405 -0
- package/dist/fulfilment-jobs.js +76 -0
- package/dist/fulfilment.d.ts +205 -0
- package/dist/fulfilment.js +39 -0
- package/dist/hr.d.ts +350 -0
- package/dist/hr.js +94 -0
- package/dist/http.d.ts +124 -0
- package/dist/http.js +392 -0
- package/dist/inbox.d.ts +206 -0
- package/dist/inbox.js +36 -0
- package/dist/index.d.ts +384 -0
- package/dist/index.js +294 -0
- package/dist/insights.d.ts +176 -0
- package/dist/insights.js +52 -0
- package/dist/inventory.d.ts +797 -0
- package/dist/inventory.js +120 -0
- package/dist/list-query.d.ts +211 -0
- package/dist/list-query.js +158 -0
- package/dist/listings.d.ts +381 -0
- package/dist/listings.js +173 -0
- package/dist/location-sharing.d.ts +83 -0
- package/dist/location-sharing.js +20 -0
- package/dist/marketplace.d.ts +268 -0
- package/dist/marketplace.js +59 -0
- package/dist/matching.d.ts +103 -0
- package/dist/matching.js +22 -0
- package/dist/media.d.ts +221 -0
- package/dist/media.js +239 -0
- package/dist/metrics.d.ts +125 -0
- package/dist/metrics.js +45 -0
- package/dist/moderation.d.ts +240 -0
- package/dist/moderation.js +40 -0
- package/dist/money.d.ts +41 -0
- package/dist/money.js +79 -0
- package/dist/my-data.d.ts +266 -0
- package/dist/my-data.js +32 -0
- package/dist/names.d.ts +14 -0
- package/dist/names.js +17 -0
- package/dist/occasions.d.ts +256 -0
- package/dist/occasions.js +40 -0
- package/dist/onboarding.d.ts +88 -0
- package/dist/onboarding.js +38 -0
- package/dist/pagination.d.ts +204 -0
- package/dist/pagination.js +141 -0
- package/dist/party-baseline-attributes.d.ts +245 -0
- package/dist/party-baseline-attributes.js +36 -0
- package/dist/party.d.ts +401 -0
- package/dist/party.js +56 -0
- package/dist/patient.d.ts +161 -0
- package/dist/patient.js +45 -0
- package/dist/payroll.d.ts +378 -0
- package/dist/payroll.js +60 -0
- package/dist/person-addresses.d.ts +88 -0
- package/dist/person-addresses.js +18 -0
- package/dist/person-cart.d.ts +250 -0
- package/dist/person-cart.js +63 -0
- package/dist/person-chat-assist.d.ts +47 -0
- package/dist/person-chat-assist.js +13 -0
- package/dist/person-data-webhooks.d.ts +72 -0
- package/dist/person-data-webhooks.js +86 -0
- package/dist/person-data.d.ts +212 -0
- package/dist/person-data.js +162 -0
- package/dist/person-locations.d.ts +54 -0
- package/dist/person-locations.js +6 -0
- package/dist/person-messaging.d.ts +405 -0
- package/dist/person-messaging.js +112 -0
- package/dist/person-notifications.d.ts +319 -0
- package/dist/person-notifications.js +164 -0
- package/dist/personalisation.d.ts +21 -0
- package/dist/personalisation.js +8 -0
- package/dist/platform.d.ts +63 -0
- package/dist/platform.js +45 -0
- package/dist/portfolio.d.ts +163 -0
- package/dist/portfolio.js +28 -0
- package/dist/pos.d.ts +743 -0
- package/dist/pos.js +129 -0
- package/dist/procurement.d.ts +664 -0
- package/dist/procurement.js +157 -0
- package/dist/promotions.d.ts +169 -0
- package/dist/promotions.js +39 -0
- package/dist/publications.d.ts +583 -0
- package/dist/publications.js +164 -0
- package/dist/ranking.d.ts +43 -0
- package/dist/ranking.js +34 -0
- package/dist/ratings.d.ts +293 -0
- package/dist/ratings.js +109 -0
- package/dist/reactions.d.ts +123 -0
- package/dist/reactions.js +41 -0
- package/dist/recipient-orders.d.ts +294 -0
- package/dist/recipient-orders.js +73 -0
- package/dist/relationships.d.ts +18 -0
- package/dist/relationships.js +8 -0
- package/dist/reporting.d.ts +107 -0
- package/dist/reporting.js +56 -0
- package/dist/sales.d.ts +270 -0
- package/dist/sales.js +66 -0
- package/dist/shares.d.ts +105 -0
- package/dist/shares.js +27 -0
- package/dist/shop.d.ts +993 -0
- package/dist/shop.js +215 -0
- package/dist/shopping-assistant.d.ts +65 -0
- package/dist/shopping-assistant.js +14 -0
- package/dist/spaces.d.ts +422 -0
- package/dist/spaces.js +118 -0
- package/dist/stored-value.d.ts +754 -0
- package/dist/stored-value.js +177 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.js +2 -0
- package/dist/vault.d.ts +290 -0
- package/dist/vault.js +55 -0
- package/dist/vertical-runtime.d.ts +17 -0
- package/dist/vertical-runtime.js +8 -0
- package/dist/vite/build-manifest-plugin.d.ts +42 -0
- package/dist/vite/build-manifest-plugin.js +42 -0
- package/dist/vite/first-paint-plugin.d.ts +26 -0
- package/dist/vite/first-paint-plugin.js +57 -0
- package/dist/wishlists.d.ts +591 -0
- package/dist/wishlists.js +188 -0
- package/dist/workbench.d.ts +114 -0
- package/dist/workbench.js +22 -0
- package/dist/workspace.d.ts +190 -0
- package/dist/workspace.js +41 -0
- package/package.json +52 -4
- package/templates/extension-image.Dockerfile +38 -0
- package/templates/nuwah-vertical.yml +102 -0
- package/templates/vertical-app/.env.example +34 -0
- package/templates/vertical-app/README.md +108 -0
- package/templates/vertical-app/github/workflows/ci.yml +51 -0
- package/templates/vertical-app/gitignore +5 -0
- package/templates/vertical-app/index.html +12 -0
- package/templates/vertical-app/package.json +28 -0
- package/templates/vertical-app/src/App.tsx +64 -0
- package/templates/vertical-app/src/blueprint/blueprint.ts +45 -0
- package/templates/vertical-app/src/blueprint/screens.ts +15 -0
- package/templates/vertical-app/src/env.d.ts +18 -0
- package/templates/vertical-app/src/index.css +139 -0
- package/templates/vertical-app/src/lib/i18n.ts +5 -0
- package/templates/vertical-app/src/lib/iam.ts +19 -0
- package/templates/vertical-app/src/lib/operations.ts +93 -0
- package/templates/vertical-app/src/lib/router.ts +24 -0
- package/templates/vertical-app/src/lib/sdk.ts +21 -0
- package/templates/vertical-app/src/lib/theme.ts +18 -0
- package/templates/vertical-app/src/lib/words.ts +39 -0
- package/templates/vertical-app/src/main.tsx +25 -0
- package/templates/vertical-app/src/pages/AppScreens.tsx +71 -0
- package/templates/vertical-app/src/pages/AuthCallback.tsx +44 -0
- package/templates/vertical-app/src/pages/Home.tsx +36 -0
- package/templates/vertical-app/tsconfig.json +24 -0
- package/templates/vertical-app/vite.config.ts +23 -0
- package/templates/vertical-ci.yml +192 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import { type Http } from './http.js';
|
|
2
|
+
import { type PartyKind, type PersonDomainCallOptions, type PersonDomainEnvelope } from './actors.js';
|
|
3
|
+
import { type DateRangeValue, type ListPage, type ListQueryState } from './list-query.js';
|
|
4
|
+
/** A decimal string at scale ≤ 4 (`"12.5000"`). Never a number. */
|
|
5
|
+
export type ContributionAmount = string;
|
|
6
|
+
export type ContributionDriveStatus = 'open' | 'funded' | 'closed' | 'cancelled' | (string & {});
|
|
7
|
+
/** How the caller stands to a drive. The beneficiary sees it only once it is revealed. */
|
|
8
|
+
export type DriveViewerRole = 'initiator' | 'member' | 'beneficiary';
|
|
9
|
+
export type ContributionDecisionMode = 'initiator' | 'majority' | 'unanimous';
|
|
10
|
+
export type DriveSettlementMode = 'declared' | 'held';
|
|
11
|
+
/** What a drive's purchase is recorded against — a typed, neutral reference. */
|
|
12
|
+
export type DriveOutcomeType = 'shop.order' | 'stored_value.entry' | 'stored_value.hold' | 'wishlists.claim';
|
|
13
|
+
export declare const DRIVE_OUTCOME_TYPES: readonly DriveOutcomeType[];
|
|
14
|
+
/**
|
|
15
|
+
* One member of a drive, with what they pledged and paid (decimal strings). `person_id` is null
|
|
16
|
+
* when the member is anonymous TO THIS VIEWER; an amount is null when the drive's amount policy
|
|
17
|
+
* hides it from this viewer.
|
|
18
|
+
*/
|
|
19
|
+
export interface ContributionDriveMember {
|
|
20
|
+
person_id: string | null;
|
|
21
|
+
invited_at: string;
|
|
22
|
+
joined_at: string | null;
|
|
23
|
+
pledged_amount: ContributionAmount | null;
|
|
24
|
+
paid_amount: ContributionAmount | null;
|
|
25
|
+
outstanding: boolean;
|
|
26
|
+
/** Absent only from an older core. */
|
|
27
|
+
anonymous?: boolean;
|
|
28
|
+
/** True on the caller's own row. Absent only from an older core. */
|
|
29
|
+
is_viewer?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Paid against target, computed exactly by core. Amounts are null for the beneficiary. */
|
|
32
|
+
export interface DriveProgress {
|
|
33
|
+
target_amount: ContributionAmount | null;
|
|
34
|
+
paid_total: ContributionAmount | null;
|
|
35
|
+
pledged_total: ContributionAmount | null;
|
|
36
|
+
currency_code: string | null;
|
|
37
|
+
/** 0..10000 (100.00 % = 10000); null without a target, or for the beneficiary. */
|
|
38
|
+
paid_basis_points: number | null;
|
|
39
|
+
/** Members who joined. */
|
|
40
|
+
contributor_count: number;
|
|
41
|
+
/** Invited, not yet joined; 0 for the beneficiary. */
|
|
42
|
+
invited_count: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A drive as the caller sees it, totals already summed by core (`DriveSummary` on the wire).
|
|
46
|
+
* For the beneficiary (after the reveal) every amount, `members` and `settlement` are empty.
|
|
47
|
+
*/
|
|
48
|
+
export interface ContributionDrive {
|
|
49
|
+
id: string;
|
|
50
|
+
initiator_person_id: string | null;
|
|
51
|
+
beneficiary_person_id: string | null;
|
|
52
|
+
subject_type: string | null;
|
|
53
|
+
subject_id: string | null;
|
|
54
|
+
freeform_label: string | null;
|
|
55
|
+
target_amount: ContributionAmount | null;
|
|
56
|
+
currency_code: string | null;
|
|
57
|
+
decision_mode: ContributionDecisionMode | (string & {});
|
|
58
|
+
status: ContributionDriveStatus;
|
|
59
|
+
closes_at: string | null;
|
|
60
|
+
/** Absent only from an older core. */
|
|
61
|
+
created_at?: string | null;
|
|
62
|
+
/** Null for the beneficiary. */
|
|
63
|
+
pledged_total: ContributionAmount | null;
|
|
64
|
+
/** Null for the beneficiary. */
|
|
65
|
+
paid_total: ContributionAmount | null;
|
|
66
|
+
/** Empty for the beneficiary. */
|
|
67
|
+
members: ContributionDriveMember[];
|
|
68
|
+
settlement?: ContributionDriveSettlementSummary | null;
|
|
69
|
+
viewer_role?: DriveViewerRole;
|
|
70
|
+
revealed_at?: string | null;
|
|
71
|
+
thanked_at?: string | null;
|
|
72
|
+
progress?: DriveProgress;
|
|
73
|
+
}
|
|
74
|
+
/** The wire name of a list row. */
|
|
75
|
+
export type DriveSummary = ContributionDrive;
|
|
76
|
+
/** A joined contributor on the detail. The beneficiary sees names (anonymous → null) and never amounts. */
|
|
77
|
+
export interface DriveContributor {
|
|
78
|
+
person_id: string | null;
|
|
79
|
+
name: string | null;
|
|
80
|
+
anonymous: boolean;
|
|
81
|
+
joined_at: string | null;
|
|
82
|
+
pledged_amount: ContributionAmount | null;
|
|
83
|
+
paid_amount: ContributionAmount | null;
|
|
84
|
+
is_viewer: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type DrivePurchaseOrderStatus = 'placed' | 'confirmed' | 'ready' | 'completed' | 'cancelled' | (string & {});
|
|
87
|
+
/** What the drive bought, as recorded. Null for the beneficiary. */
|
|
88
|
+
export interface DriveOutcome {
|
|
89
|
+
type: DriveOutcomeType | (string & {});
|
|
90
|
+
id: string;
|
|
91
|
+
tenant_id: string | null;
|
|
92
|
+
recorded_at: string | null;
|
|
93
|
+
verified: boolean;
|
|
94
|
+
order: null | {
|
|
95
|
+
reference: string;
|
|
96
|
+
shop_slug: string | null;
|
|
97
|
+
shop_name: {
|
|
98
|
+
en: string;
|
|
99
|
+
ar: string;
|
|
100
|
+
};
|
|
101
|
+
status: DrivePurchaseOrderStatus;
|
|
102
|
+
return_state: string | null;
|
|
103
|
+
item_count: number;
|
|
104
|
+
total: ContributionAmount | null;
|
|
105
|
+
currency_code: string | null;
|
|
106
|
+
placed_at: string | null;
|
|
107
|
+
/** `live` read now from the shop; `snapshot` when it could not be reached. */
|
|
108
|
+
source: 'live' | 'snapshot';
|
|
109
|
+
};
|
|
110
|
+
recipient_order?: DriveRecipientOrderState | null;
|
|
111
|
+
}
|
|
112
|
+
export type ContributionHoldStatus = 'held' | 'captured' | 'released';
|
|
113
|
+
/** One of the caller's own held payments into the drive. */
|
|
114
|
+
export interface DriveOwnHold {
|
|
115
|
+
id: string;
|
|
116
|
+
amount: ContributionAmount;
|
|
117
|
+
currency_code: string;
|
|
118
|
+
status: ContributionHoldStatus | (string & {});
|
|
119
|
+
captured_amount: ContributionAmount | null;
|
|
120
|
+
created_at: string | null;
|
|
121
|
+
}
|
|
122
|
+
/** The caller's own pledge, paid amount and holds. */
|
|
123
|
+
export interface DriveOwnContribution {
|
|
124
|
+
pledged_amount: ContributionAmount | null;
|
|
125
|
+
paid_amount: ContributionAmount | null;
|
|
126
|
+
anonymous: boolean;
|
|
127
|
+
holds: DriveOwnHold[];
|
|
128
|
+
}
|
|
129
|
+
/** The drive's declared policies (the defaults core resolved, or the drive's own). */
|
|
130
|
+
export interface DrivePolicies {
|
|
131
|
+
amount_visibility: 'initiator_only' | 'all_members';
|
|
132
|
+
beneficiary_reveal: 'initiator_reveals' | 'on_purchase' | 'never';
|
|
133
|
+
closing_reminders: 'none' | 'one_day_before' | 'three_days_and_one_day_before';
|
|
134
|
+
anonymous_contributions: 'allowed' | 'not_allowed';
|
|
135
|
+
contribution_withdrawal: 'while_open' | 'not_allowed';
|
|
136
|
+
surplus?: DrivePoolSurplusPolicy;
|
|
137
|
+
shortfall?: DrivePoolShortfallPolicy;
|
|
138
|
+
completion?: DrivePoolCompletionPolicy;
|
|
139
|
+
}
|
|
140
|
+
/** What the CALLER may do now. A screen shows only what is true; core still judges every write. */
|
|
141
|
+
export interface DriveActions {
|
|
142
|
+
/** Initiator, drive still running: the terms may be corrected (`update`). */
|
|
143
|
+
can_edit?: boolean;
|
|
144
|
+
/** False once anyone contributed: the currency is fixed. */
|
|
145
|
+
can_change_currency?: boolean;
|
|
146
|
+
/** False once anyone contributed: how the group decides is fixed. */
|
|
147
|
+
can_change_decision_mode?: boolean;
|
|
148
|
+
can_invite: boolean;
|
|
149
|
+
can_pledge: boolean;
|
|
150
|
+
can_pay: boolean;
|
|
151
|
+
can_pay_held: boolean;
|
|
152
|
+
can_withdraw: boolean;
|
|
153
|
+
can_close: boolean;
|
|
154
|
+
can_cancel: boolean;
|
|
155
|
+
can_record_purchase: boolean;
|
|
156
|
+
can_place_recipient_order?: boolean;
|
|
157
|
+
can_reveal: boolean;
|
|
158
|
+
can_thank: boolean;
|
|
159
|
+
can_post_update: boolean;
|
|
160
|
+
can_post_note: boolean;
|
|
161
|
+
can_sign_card: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* True when the caller may mark their contribution anonymous: they have a pledge row and the
|
|
164
|
+
* `anonymous_contributions` policy allows it. Show the anonymous choice only when true.
|
|
165
|
+
*/
|
|
166
|
+
can_contribute_anonymously: boolean;
|
|
167
|
+
}
|
|
168
|
+
/** `GET /{driveId}` — a summary plus contributors, outcome, own contribution, thanks, policies and actions. */
|
|
169
|
+
export interface DriveDetail extends ContributionDrive {
|
|
170
|
+
viewer_role: DriveViewerRole;
|
|
171
|
+
revealed_at: string | null;
|
|
172
|
+
thanked_at: string | null;
|
|
173
|
+
progress: DriveProgress;
|
|
174
|
+
contributors: DriveContributor[];
|
|
175
|
+
outcome: DriveOutcome | null;
|
|
176
|
+
my: DriveOwnContribution | null;
|
|
177
|
+
thanks: {
|
|
178
|
+
id: string;
|
|
179
|
+
body: string;
|
|
180
|
+
created_at: string | null;
|
|
181
|
+
} | null;
|
|
182
|
+
message_count: number;
|
|
183
|
+
policies: DrivePolicies;
|
|
184
|
+
planned_order?: DrivePlannedOrder['planned_order'];
|
|
185
|
+
actions: DriveActions;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A wall message. `update` — the initiator's progress post; `note` — among members, never shown to
|
|
189
|
+
* the beneficiary; `card` — a signed line for her, shown once revealed; `thanks` — her one reply.
|
|
190
|
+
*/
|
|
191
|
+
export type DriveMessageKind = 'update' | 'note' | 'card' | 'thanks';
|
|
192
|
+
/** The kinds a caller may POST (`thanks` has its own route). */
|
|
193
|
+
export type DriveMessagePostKind = Exclude<DriveMessageKind, 'thanks'>;
|
|
194
|
+
export interface DriveMessage {
|
|
195
|
+
id: string;
|
|
196
|
+
kind: DriveMessageKind | (string & {});
|
|
197
|
+
body: string;
|
|
198
|
+
created_at: string | null;
|
|
199
|
+
author: {
|
|
200
|
+
person_id: string | null;
|
|
201
|
+
name: string | null;
|
|
202
|
+
role: DriveViewerRole;
|
|
203
|
+
is_viewer: boolean;
|
|
204
|
+
};
|
|
205
|
+
visible_to_beneficiary: boolean;
|
|
206
|
+
can_delete: boolean;
|
|
207
|
+
}
|
|
208
|
+
/** `{data, next_cursor}` — newest first. */
|
|
209
|
+
export interface DriveMessagePage {
|
|
210
|
+
data: DriveMessage[];
|
|
211
|
+
next_cursor: string | null;
|
|
212
|
+
}
|
|
213
|
+
/** `POST /{driveId}/held-payments/{holdId}/withdraw` — the hold, released to the caller's own balance. */
|
|
214
|
+
export interface DriveWithdrawal {
|
|
215
|
+
id: string;
|
|
216
|
+
status: 'released';
|
|
217
|
+
amount: ContributionAmount;
|
|
218
|
+
currency_code: string;
|
|
219
|
+
}
|
|
220
|
+
export type DriveRelationFilter = 'initiated' | 'contributed' | 'invited' | 'for_me';
|
|
221
|
+
export type DriveListSort = '-created_at' | 'created_at' | 'closes_at' | '-closes_at';
|
|
222
|
+
/** The question `list` asks — `ListQueryState` narrowed to `contributions.drives` v1. */
|
|
223
|
+
export interface ContributionDriveListQuery extends ListQueryState {
|
|
224
|
+
sort?: DriveListSort | null;
|
|
225
|
+
filter?: {
|
|
226
|
+
relation?: DriveRelationFilter[] | null;
|
|
227
|
+
status?: Array<'open' | 'funded' | 'closed' | 'cancelled'> | null;
|
|
228
|
+
settlement_mode?: DriveSettlementMode[] | null;
|
|
229
|
+
closes_at?: DateRangeValue | null;
|
|
230
|
+
} & NonNullable<ListQueryState['filter']>;
|
|
231
|
+
}
|
|
232
|
+
/** The longest wall message or thank-you core accepts. */
|
|
233
|
+
export declare const DRIVE_MESSAGE_MAXIMUM_LENGTH = 2000;
|
|
234
|
+
/** Hold counts and amounts per state. `captured` sums what was TAKEN; the others what was reserved. */
|
|
235
|
+
export interface ContributionHoldTotals<T> {
|
|
236
|
+
held: T;
|
|
237
|
+
captured: T;
|
|
238
|
+
released: T;
|
|
239
|
+
}
|
|
240
|
+
/** `ContributionDrive.settlement`. */
|
|
241
|
+
export interface ContributionDriveSettlementSummary {
|
|
242
|
+
mode: DriveSettlementMode | (string & {});
|
|
243
|
+
stored_value_unit_key: string | null;
|
|
244
|
+
purchaser: {
|
|
245
|
+
kind: PartyKind;
|
|
246
|
+
id: string;
|
|
247
|
+
} | null;
|
|
248
|
+
outcome: {
|
|
249
|
+
type: DriveOutcomeType | (string & {});
|
|
250
|
+
id: string;
|
|
251
|
+
recorded_at: string | null;
|
|
252
|
+
} | null;
|
|
253
|
+
holds: ContributionHoldTotals<number>;
|
|
254
|
+
hold_amounts: ContributionHoldTotals<ContributionAmount>;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* A drive's money mechanics — answered by the three settlement writes. `holds` are COUNTS and
|
|
258
|
+
* `hold_amounts` decimal-string SUMS of contributions by state. `hold` and `replayed` come with
|
|
259
|
+
* a held payment; `captured_now` and `pending` with a recorded purchase.
|
|
260
|
+
*/
|
|
261
|
+
export interface DriveSettlement {
|
|
262
|
+
id: string;
|
|
263
|
+
status: ContributionDriveStatus;
|
|
264
|
+
settlement_mode: DriveSettlementMode;
|
|
265
|
+
stored_value_unit_key: string | null;
|
|
266
|
+
purchaser: {
|
|
267
|
+
kind: PartyKind;
|
|
268
|
+
id: string;
|
|
269
|
+
} | null;
|
|
270
|
+
outcome: {
|
|
271
|
+
type: DriveOutcomeType | (string & {});
|
|
272
|
+
id: string;
|
|
273
|
+
recorded_at: string | null;
|
|
274
|
+
} | null;
|
|
275
|
+
holds: ContributionHoldTotals<number>;
|
|
276
|
+
/** Absent only from an older core. */
|
|
277
|
+
hold_amounts?: ContributionHoldTotals<ContributionAmount>;
|
|
278
|
+
hold?: {
|
|
279
|
+
id: string;
|
|
280
|
+
amount: ContributionAmount;
|
|
281
|
+
status: string;
|
|
282
|
+
/**
|
|
283
|
+
* The stored-value hold behind this held payment: the id the shop counter captures when
|
|
284
|
+
* the purchase is rung up. Absent from an older core (additive since core 2baac6da9).
|
|
285
|
+
*/
|
|
286
|
+
stored_value_hold_id?: string;
|
|
287
|
+
};
|
|
288
|
+
replayed?: boolean;
|
|
289
|
+
captured_now?: number;
|
|
290
|
+
pending?: number;
|
|
291
|
+
}
|
|
292
|
+
export interface StartContributionDriveRequest {
|
|
293
|
+
beneficiary_handle: string;
|
|
294
|
+
freeform_label?: string | null;
|
|
295
|
+
subject_type?: string | null;
|
|
296
|
+
subject_id?: string | null;
|
|
297
|
+
target_amount?: ContributionAmount | null;
|
|
298
|
+
currency_code?: string | null;
|
|
299
|
+
decision_mode?: ContributionDecisionMode | null;
|
|
300
|
+
closes_at?: string | null;
|
|
301
|
+
}
|
|
302
|
+
export interface UpdateContributionDriveRequest {
|
|
303
|
+
freeform_label?: string | null;
|
|
304
|
+
target_amount?: string | null;
|
|
305
|
+
currency_code?: string | null;
|
|
306
|
+
decision_mode?: ContributionDecisionMode | null;
|
|
307
|
+
closes_at?: string | null;
|
|
308
|
+
}
|
|
309
|
+
/** `declared`, or `held` with the unit and the party the drive will buy from. */
|
|
310
|
+
export type ChooseDriveSettlementRequest = {
|
|
311
|
+
mode: 'declared';
|
|
312
|
+
} | {
|
|
313
|
+
mode: 'held';
|
|
314
|
+
unit_key: string;
|
|
315
|
+
purchaser_kind: PartyKind;
|
|
316
|
+
purchaser_id: string;
|
|
317
|
+
};
|
|
318
|
+
/** Stable refusal reasons of the settlement routes (`body.reason`). */
|
|
319
|
+
export declare const DRIVE_SETTLEMENT_REFUSAL: {
|
|
320
|
+
readonly locked: "drive_settlement_locked";
|
|
321
|
+
readonly invalid: "drive_settlement_invalid";
|
|
322
|
+
readonly notHeld: "drive_not_held";
|
|
323
|
+
readonly notOpen: "drive_not_open";
|
|
324
|
+
readonly notMember: "drive_not_a_member";
|
|
325
|
+
readonly initiatorOnly: "drive_initiator_only";
|
|
326
|
+
readonly outcomeInvalid: "drive_outcome_invalid";
|
|
327
|
+
readonly alreadyPurchased: "drive_already_purchased";
|
|
328
|
+
readonly outcomeConflict: "drive_outcome_conflict";
|
|
329
|
+
readonly idempotencyKeyInvalid: "idempotency_key_invalid";
|
|
330
|
+
readonly idempotencyKeyReused: "idempotency_key_reused";
|
|
331
|
+
};
|
|
332
|
+
export declare const DRIVE_REFUSAL: {
|
|
333
|
+
readonly revealNotAllowed: "drive_reveal_not_allowed";
|
|
334
|
+
readonly notRevealed: "drive_not_revealed";
|
|
335
|
+
readonly alreadyThanked: "drive_already_thanked";
|
|
336
|
+
readonly messageRefused: "drive_message_refused";
|
|
337
|
+
readonly withdrawalNotAllowed: "drive_withdrawal_not_allowed";
|
|
338
|
+
readonly anonymousNotAllowed: "drive_anonymous_not_allowed";
|
|
339
|
+
readonly outcomeTenantRequired: "drive_outcome_tenant_required";
|
|
340
|
+
};
|
|
341
|
+
/** The request `recordPurchase` sends. `tenantId` is REQUIRED for `shop.order` (the shop's tenant). */
|
|
342
|
+
export interface DrivePurchaseOutcomeRequest {
|
|
343
|
+
type: DriveOutcomeType;
|
|
344
|
+
id: string;
|
|
345
|
+
/** The shop's tenant id (uuid). Required when `type` is `shop.order`; ignored otherwise. */
|
|
346
|
+
tenantId?: string | null;
|
|
347
|
+
}
|
|
348
|
+
/** The regex core validates every drive amount against. */
|
|
349
|
+
export declare const CONTRIBUTION_AMOUNT_PATTERN: RegExp;
|
|
350
|
+
/** `body.reason` of a refusal, else the global middleware's `body.code`, else null. See {@link refusalReason}. */
|
|
351
|
+
export declare function driveRefusalReason(error: unknown): string | null;
|
|
352
|
+
/**
|
|
353
|
+
* True when the settlement mode can no longer change — the same rule core applies: any hold
|
|
354
|
+
* exists, or any declared payment is above zero. `paidTotal` is the drive's `paid_total`.
|
|
355
|
+
* Compared as a string (no float): any digit other than zero means money is in.
|
|
356
|
+
*/
|
|
357
|
+
export declare function isDriveSettlementLocked(settlement: Pick<DriveSettlement, 'holds'> | null, paidTotal: ContributionAmount | null): boolean;
|
|
358
|
+
export declare function createContributionsNamespace(http: Http): {
|
|
359
|
+
list: (query?: ContributionDriveListQuery, options?: PersonDomainCallOptions) => Promise<ListPage<ContributionDrive>>;
|
|
360
|
+
/**
|
|
361
|
+
* GET /{driveId} — the full detail: contributors, outcome, the caller's own contribution,
|
|
362
|
+
* thanks, policies and `actions`. 404 for a drive the caller may not see (the beneficiary
|
|
363
|
+
* before the reveal).
|
|
364
|
+
*/
|
|
365
|
+
show: (driveId: string, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveDetail>>;
|
|
366
|
+
messages: {
|
|
367
|
+
/** GET /{driveId}/messages — newest first. Blocked or restricted authors are left out. */
|
|
368
|
+
list: (driveId: string, query?: {
|
|
369
|
+
cursor?: string | null;
|
|
370
|
+
limit?: number;
|
|
371
|
+
}, options?: PersonDomainCallOptions) => Promise<DriveMessagePage>;
|
|
372
|
+
/**
|
|
373
|
+
* POST /{driveId}/messages `{kind, body}` — `Idempotency-Key` required: pass ONE key per
|
|
374
|
+
* press and the SAME key on its retry. Refused `drive_message_refused` when the kind is
|
|
375
|
+
* not the caller's to post (see `actions.can_post_update / can_post_note / can_sign_card`).
|
|
376
|
+
*/
|
|
377
|
+
post: (driveId: string, message: {
|
|
378
|
+
kind: DriveMessagePostKind;
|
|
379
|
+
body: string;
|
|
380
|
+
}, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveMessage>>;
|
|
381
|
+
/** DELETE /{driveId}/messages/{messageId} — the author, or the initiator moderating (`can_delete`). */
|
|
382
|
+
delete: (driveId: string, messageId: string, options?: PersonDomainCallOptions) => Promise<void>;
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* POST /{driveId}/reveal — the initiator shows the closed drive to its beneficiary
|
|
386
|
+
* (policy `initiator_reveals`). Idempotent: a second reveal answers the same detail.
|
|
387
|
+
*/
|
|
388
|
+
reveal: (driveId: string, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveDetail>>;
|
|
389
|
+
/**
|
|
390
|
+
* POST /{driveId}/thanks `{body}` — the beneficiary's ONE thank-you to everyone, after the
|
|
391
|
+
* reveal. A second is `drive_already_thanked`; pass the same key on a retry.
|
|
392
|
+
*/
|
|
393
|
+
thank: (driveId: string, body: string, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveMessage>>;
|
|
394
|
+
/**
|
|
395
|
+
* POST /{driveId}/held-payments/{holdId}/withdraw — the contributor takes back one held
|
|
396
|
+
* payment while the drive is open (policy `while_open`); it returns to their own balance.
|
|
397
|
+
*/
|
|
398
|
+
withdraw: (driveId: string, contributionHoldId: string, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveWithdrawal>>;
|
|
399
|
+
/** POST / — start a drive for a beneficiary named by HANDLE (never a raw person id). */
|
|
400
|
+
start: (request: StartContributionDriveRequest, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<ContributionDrive | null>>;
|
|
401
|
+
/** POST /{driveId}/invitations `{handle}`. */
|
|
402
|
+
invite: (driveId: string, handle: string, options?: PersonDomainCallOptions) => Promise<unknown>;
|
|
403
|
+
/**
|
|
404
|
+
* POST /{driveId}/pledge `{amount, anonymous?}` — a promise, nothing moves. `anonymous`
|
|
405
|
+
* hides the caller's name from the other members and the beneficiary; refused
|
|
406
|
+
* `drive_anonymous_not_allowed` when the drive's policy does not allow it. Omitted: unchanged.
|
|
407
|
+
*/
|
|
408
|
+
pledge: (driveId: string, amount: ContributionAmount, options?: PersonDomainCallOptions & {
|
|
409
|
+
anonymous?: boolean;
|
|
410
|
+
}) => Promise<unknown>;
|
|
411
|
+
/** POST /{driveId}/payments `{amount}` — declare money paid outside (declared drives). */
|
|
412
|
+
declarePayment: (driveId: string, amount: ContributionAmount, options?: PersonDomainCallOptions) => Promise<unknown>;
|
|
413
|
+
/**
|
|
414
|
+
* PATCH /{driveId} — the initiator corrects the terms; only the keys sent change. Once
|
|
415
|
+
* anyone pledged or paid, the goal may not drop below what was put in
|
|
416
|
+
* (`target_below_raised`) and the currency and decision rule are fixed
|
|
417
|
+
* (`currency_locked`, `decision_mode_locked`); an ended drive answers `drive_ended`.
|
|
418
|
+
* Who and what the drive is for never change. Money never moves. Answers the drive page.
|
|
419
|
+
*/
|
|
420
|
+
update: (driveId: string, changes: UpdateContributionDriveRequest, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveDetail>>;
|
|
421
|
+
/** POST /{driveId}/close `{cancelled?}` — a cancel also RELEASES every open hold. */
|
|
422
|
+
close: (driveId: string, cancelled?: boolean, options?: PersonDomainCallOptions) => Promise<unknown>;
|
|
423
|
+
settlement: {
|
|
424
|
+
/**
|
|
425
|
+
* PUT /{driveId}/settlement — initiator only; refused `drive_settlement_locked` once
|
|
426
|
+
* any money is in. `held` needs the unit and the purchaser (never the beneficiary).
|
|
427
|
+
*/
|
|
428
|
+
choose: (driveId: string, request: ChooseDriveSettlementRequest, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveSettlement>>;
|
|
429
|
+
/**
|
|
430
|
+
* POST /{driveId}/held-payments `{amount}` — put money in as a hold on your own
|
|
431
|
+
* balance, designated to the purchaser. Held until the purchase; released on cancel.
|
|
432
|
+
*/
|
|
433
|
+
payHeld: (driveId: string, amount: ContributionAmount, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveSettlement>>;
|
|
434
|
+
/**
|
|
435
|
+
* POST /{driveId}/purchase `{outcome_type, outcome_id, outcome_tenant_id?}` — initiator
|
|
436
|
+
* only: what the drive bought. On a held drive every hold is captured into the
|
|
437
|
+
* purchaser, then the drive closes. A second, different outcome is
|
|
438
|
+
* `drive_outcome_conflict`. A `shop.order` NEEDS the shop's tenant id (`tenantId`):
|
|
439
|
+
* refused here before any request without it (core answers `drive_outcome_tenant_required`).
|
|
440
|
+
*/
|
|
441
|
+
recordPurchase: (driveId: string, outcome: DrivePurchaseOutcomeRequest, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveSettlement>>;
|
|
442
|
+
};
|
|
443
|
+
recipientOrder: {
|
|
444
|
+
/**
|
|
445
|
+
* GET /{driveId}/recipient-order/preview — what buying at `price` from the shop would do to
|
|
446
|
+
* the pool: the shortfall, the surplus and where it goes (by `contributions.surplus`), and
|
|
447
|
+
* `reach` (the most the pool pays without anyone adding to it). Nothing moves.
|
|
448
|
+
*/
|
|
449
|
+
preview: (driveId: string, query: DrivePoolPreviewQuery, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DrivePoolPlan>>;
|
|
450
|
+
/**
|
|
451
|
+
* POST /{driveId}/recipient-order — places an order for the drive's beneficiary at the
|
|
452
|
+
* shop, paid from the pool, with the normal claim link (open the answer's
|
|
453
|
+
* `recipient_order_id` in the recipient-orders namespace to send it). ONE order per drive,
|
|
454
|
+
* ever: a later call with any key answers that same order (`replayed: true`).
|
|
455
|
+
* `Idempotency-Key` required: one key per press, the same key on its retry. 201 placed,
|
|
456
|
+
* 200 replayed. Refusals: `pool_short`, `choose_cheaper_item` (`details.reach` is the
|
|
457
|
+
* most the pool buys), `top_up_unconfirmed` (`details.top_up` is the gap to confirm),
|
|
458
|
+
* `pool_hold_unusable`, `drive_settlement_invalid`, `drive_not_open`, `drive_initiator_only`.
|
|
459
|
+
*/
|
|
460
|
+
place: (driveId: string, request: DriveRecipientOrderRequest, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DriveRecipientOrderPlacement>>;
|
|
461
|
+
/**
|
|
462
|
+
* PUT /{driveId}/recipient-order/plan — plan the order NOW; nothing is placed. The drive's
|
|
463
|
+
* completion policy (`contributions.completion`) acts the moment the pool covers it at the
|
|
464
|
+
* shop's own prices: `automatic` (default) places it once, `organiser_confirms` notifies
|
|
465
|
+
* the organiser (`contributions.drive.pool_complete`), `off` does nothing. Replaces an
|
|
466
|
+
* earlier plan; refused with `drive_already_purchased` once the drive has its order.
|
|
467
|
+
*/
|
|
468
|
+
plan: (driveId: string, request: Omit<DriveRecipientOrderRequest, "top_up">, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DrivePlannedOrder>>;
|
|
469
|
+
/** DELETE /{driveId}/recipient-order/plan — take the plan back; nothing will be placed on its own. Idempotent. */
|
|
470
|
+
clearPlan: (driveId: string, options?: PersonDomainCallOptions) => Promise<PersonDomainEnvelope<DrivePlannedOrder>>;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
/** Where pooled money left over goes (`contributions.surplus`). `return_to_contributors` is the default and the "none". */
|
|
474
|
+
export type DrivePoolSurplusPolicy = 'return_to_contributors' | 'recipient_credit' | 'shop_tip';
|
|
475
|
+
/** What a short pool does (`contributions.shortfall`). `refuse` is the default and the "none". */
|
|
476
|
+
export type DrivePoolShortfallPolicy = 'refuse' | 'organiser_tops_up' | 'choose_cheaper_item';
|
|
477
|
+
/** What happens when the pool covers the planned order (`contributions.completion`). `automatic` is the default; `off` is the "none". */
|
|
478
|
+
export type DrivePoolCompletionPolicy = 'automatic' | 'organiser_confirms' | 'off';
|
|
479
|
+
/** The order the organiser planned, placed by the completion policy. */
|
|
480
|
+
export interface DrivePlannedOrder {
|
|
481
|
+
drive_id: string;
|
|
482
|
+
planned_order: (Omit<DriveRecipientOrderRequest, 'top_up'> & {
|
|
483
|
+
planned_at: string;
|
|
484
|
+
}) | null;
|
|
485
|
+
/** Set once the drive has its one order. */
|
|
486
|
+
recipient_order_id: string | null;
|
|
487
|
+
}
|
|
488
|
+
export declare const DRIVE_POOLED_PURCHASE_REFUSALS: {
|
|
489
|
+
readonly poolShort: "pool_short";
|
|
490
|
+
readonly chooseCheaperItem: "choose_cheaper_item";
|
|
491
|
+
readonly topUpUnconfirmed: "top_up_unconfirmed";
|
|
492
|
+
readonly poolHoldUnusable: "pool_hold_unusable";
|
|
493
|
+
};
|
|
494
|
+
export interface DrivePoolPreviewQuery {
|
|
495
|
+
shopSlug: string;
|
|
496
|
+
price: ContributionAmount;
|
|
497
|
+
/** A declared drive: the organiser's balance unit. A held drive pays in its own unit. */
|
|
498
|
+
unitKey?: string | null;
|
|
499
|
+
/** Under `organiser_tops_up`: the exact gap the organiser confirms. */
|
|
500
|
+
topUp?: ContributionAmount | null;
|
|
501
|
+
}
|
|
502
|
+
/** How a price is paid from the pool. Money is decimal strings; no contributor is named. */
|
|
503
|
+
export interface DrivePoolPlan {
|
|
504
|
+
price: ContributionAmount;
|
|
505
|
+
held: ContributionAmount;
|
|
506
|
+
collected_used: ContributionAmount;
|
|
507
|
+
collected_unused: ContributionAmount;
|
|
508
|
+
top_up: ContributionAmount;
|
|
509
|
+
organiser_amount: ContributionAmount;
|
|
510
|
+
shortfall: ContributionAmount;
|
|
511
|
+
covered: boolean;
|
|
512
|
+
surplus: ContributionAmount;
|
|
513
|
+
returned: ContributionAmount;
|
|
514
|
+
kept: ContributionAmount;
|
|
515
|
+
surplus_policy: DrivePoolSurplusPolicy | (string & {});
|
|
516
|
+
shortfall_policy: DrivePoolShortfallPolicy | (string & {});
|
|
517
|
+
contributions_used: number;
|
|
518
|
+
contributions_kept: number;
|
|
519
|
+
/** The most the pool pays without anyone adding to it (preview only). */
|
|
520
|
+
reach: ContributionAmount | null;
|
|
521
|
+
}
|
|
522
|
+
export interface DriveRecipientOrderRequest {
|
|
523
|
+
shop_slug: string;
|
|
524
|
+
/** `variant_id` and `modifier_option_ids` (optional): the version chosen and its add-ons, priced exactly as the shop prices them. */
|
|
525
|
+
items: Array<{
|
|
526
|
+
shop_item_id: string;
|
|
527
|
+
quantity: number;
|
|
528
|
+
variant_id?: string | null;
|
|
529
|
+
modifier_option_ids?: string[];
|
|
530
|
+
}>;
|
|
531
|
+
recipient_name: string;
|
|
532
|
+
message?: string | null;
|
|
533
|
+
show_price?: boolean;
|
|
534
|
+
buyer: {
|
|
535
|
+
name: string;
|
|
536
|
+
phone: string;
|
|
537
|
+
email?: string | null;
|
|
538
|
+
};
|
|
539
|
+
unit_key?: string | null;
|
|
540
|
+
top_up?: ContributionAmount | null;
|
|
541
|
+
}
|
|
542
|
+
export interface DriveRecipientOrderPlacement {
|
|
543
|
+
drive_id: string;
|
|
544
|
+
recipient_order_id: string;
|
|
545
|
+
shop_order_id: string;
|
|
546
|
+
tenant_id: string;
|
|
547
|
+
status: string;
|
|
548
|
+
amount: ContributionAmount;
|
|
549
|
+
currency_code: string;
|
|
550
|
+
plan: DrivePoolPlan | null;
|
|
551
|
+
replayed: boolean;
|
|
552
|
+
}
|
|
553
|
+
/** The order the drive bought for its recipient, with its claim state (every member sees the state). */
|
|
554
|
+
export interface DriveRecipientOrderState {
|
|
555
|
+
id: string;
|
|
556
|
+
status: 'purchased' | 'sent' | 'opened' | 'claimed' | 'delivering' | 'delivered' | 'cashed' | 'expired' | 'cancelled' | 'failed' | (string & {});
|
|
557
|
+
choice: 'deliver' | 'cash' | null;
|
|
558
|
+
recipient_name: string | null;
|
|
559
|
+
}
|
|
560
|
+
export type ContributionsNamespace = ReturnType<typeof createContributionsNamespace>;
|