@faiber/faiber-asset 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/do-dox.d.ts +171 -0
- package/dist/do-dox.d.ts.map +1 -0
- package/dist/do-dox.js +22 -0
- package/dist/do-dox.js.map +1 -0
- package/dist/dox.d.ts +110 -0
- package/dist/dox.d.ts.map +1 -0
- package/dist/dox.js +15 -0
- package/dist/dox.js.map +1 -0
- package/dist/index.d.ts +40 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/ledger-contracts.d.ts +222 -0
- package/dist/ledger-contracts.d.ts.map +1 -0
- package/dist/ledger-contracts.js +2 -0
- package/dist/ledger-contracts.js.map +1 -0
- package/dist/operations.d.ts +233 -110
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +151 -0
- package/dist/operations.js.map +1 -1
- package/dist/operations.types.d.ts +48 -0
- package/dist/operations.types.d.ts.map +1 -1
- package/package.json +2 -2
- package/provenance.json +12 -9
package/README.md
CHANGED
|
@@ -123,3 +123,48 @@ Use `@faiber/faiber-ts-sdk` when one application needs multiple Faiber services
|
|
|
123
123
|
Create assets with `{name, asset_type}` (`Coin`, `Badge`, `XP`, `Charge`, or `Gem`) and ranks with `{name, min_xp}`. User AI plan updates accept `{tier}`. `dashboard({month: "2026-10"})` selects a month. Charge mapping conditions are tagged objects such as `{type: "xp_balance", operator: "gte", value: "100"}`. Action criteria, reward conditions, caps and multiplier models are exported alongside the operation models.
|
|
124
124
|
|
|
125
125
|
`economyPolicy()` returns `null` before configuration and includes `configuration_revision` afterward; policy updates return the saved policy. Policy models include funding settings and evidence bindings, and capabilities include rule creation/update flags. Economy journal accepts `before` and `descending`; own-history supports `after` and `limit` only. Gift list/detail payloads remain product-owned JSON because Asset forwards the configured adapter's data unchanged; Asset annotates detail/items with `can_copy` and exposes a concrete token-copy response.
|
|
126
|
+
|
|
127
|
+
### Funded Do and private Dox
|
|
128
|
+
|
|
129
|
+
`asset.doEconomy` manages the separately configured funded-rewards policy. It does
|
|
130
|
+
not change the existing scoped economy's prohibition on coin purchases. Prices
|
|
131
|
+
use integer rial and integer coins. Operators configure inactive packs, catalog
|
|
132
|
+
items, backing, delivery costs, review requirements and promotion reserves.
|
|
133
|
+
|
|
134
|
+
Policy updates require `admin:coin_settings:update`, a current version and an
|
|
135
|
+
audit reason. Read-only policy/audit calls require `admin:coin_settings:read`.
|
|
136
|
+
Campaign funding uses a stable `request_id`; retries cannot issue twice.
|
|
137
|
+
Financial transfers, purchases and entitlement delivery require trusted backend
|
|
138
|
+
integrations. Never put their credentials in a browser.
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
const snapshot = await asset.doEconomy.policy({ signal: controller.signal });
|
|
142
|
+
console.log(snapshot.data.data.version, snapshot.data.data.policy.enabled);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Generic Dox ledger (trusted backends)
|
|
146
|
+
|
|
147
|
+
Dox is a closed, space-scoped asset independent of purchasable Do. `AssetApi.dox`
|
|
148
|
+
owns issuance, account balances, immutable postings, replay protection, and
|
|
149
|
+
atomic transfers. Task checks membership and work-review permissions before
|
|
150
|
+
requesting a transfer. No browser application holds the service credential.
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
const asset = new AssetApi(new FaiberClient('asset', {
|
|
154
|
+
domains: { asset: process.env.ASSET_URL! }, authMode: 'cookie'
|
|
155
|
+
}));
|
|
156
|
+
const result = await asset.dox.management({
|
|
157
|
+
profile_id: moderatorId, space_id: spaceId,
|
|
158
|
+
dox_management: { account: 'space', direction: 'out', page: 1, page_size: 20 }
|
|
159
|
+
}, { headers: { 'x-do-service-token': process.env.ASSET_TASK_TOKEN! }, signal });
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`execute()` accepts named configure/transfer commands with a stable `id` and
|
|
163
|
+
`actor_id`. The source/destination UUID is a member; null represents the space.
|
|
164
|
+
Each member receives a one-time 500 allocation, routed by the configured mode.
|
|
165
|
+
Transfers conserve supply and reject overspending. A task or purchase identity
|
|
166
|
+
cannot pay twice even with a different request ID. `management()` is Task-service
|
|
167
|
+
only; `read()` pages one member's history. Page size is 1–100; direction requires
|
|
168
|
+
an account (`space` or `user:UUID`). Full Axios responses and cancellation are
|
|
169
|
+
preserved; handle 401/403, insufficient balance, and conflicting replays. These
|
|
170
|
+
contracts are generic and contain no product routing or UI assumptions.
|
package/dist/.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/short-id.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/realtime.d.ts","../../core/dist/summary-access.d.ts","../../core/dist/index.d.ts","../src/economy.types.ts","../src/contracts.types.ts","../src/operations.types.ts","../src/types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[70,71],[70],[70,71,72,73,74,75],[70,73],[70,71,72,74],[71,73],[61],[60,61],[60,61,62,63,64,65,66,67,68,69],[60,61,65],[60]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2343ec253c90c370449755739733f5f429f58cffdb51a50977bb4a042012fa8f","impliedFormat":99},{"version":"61806e75fc22177d65d9b33c90c4b88e4370abd4dd88d8196ca0fc87d7702fe9","impliedFormat":99},{"version":"cd5dcd4588b6b2d1e345d338edef1598cbfd33a138169b5f07a8fd707b63cdca","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"e8345259c97aa6b8a84b27963fff00e79b7f45852b0024fffc52c9a7949007ac","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"ac62f6b0f2e963ea9a251ee8384e64cebe0fe4acd32ca177d838d7c5a7ad2b43","impliedFormat":99},{"version":"967088f3793139562bc3fd0e5db990a8bc2885f7444a1f10ea6a5a6479fa6d40","impliedFormat":99},{"version":"fbb76e489b24bd45225372dec4fddbbc3e9fe4ea23d4da6015fb209e424db9de","impliedFormat":99},{"version":"4a42bf7b821679a7f79829140f2da49474354ad19ae9d1756b77028aa8270045","signature":"cdd207955f2d6fc4a4fe6ef0b216a0d4d3ef52a7fb9d6b2bc4dcdadbb39c3a11","impliedFormat":99},{"version":"98f028bd1d35558ac0e1b2ae61db8012ac212bcbf831cb473acfb3d2b82f4fe9","signature":"b192e0d879e5c278493bfde5095b0250e044827ca7609c3a37cd5254df0cccca","impliedFormat":99},{"version":"64761d51e0620d071ec295f2bff9029c3433a594833f33d0eda98021ce3706f6","signature":"132c7c6f594d92a83927a12a7879a4ab59df744e672eb73836e655a739609e92","impliedFormat":99},{"version":"53d89e1644808d1b66f19dc5088213a2c3208ef6b402c9deffc5dd6e647fd0f5","impliedFormat":99},{"version":"fa360c4a5af4bf5b9ab7fe4d126d850afcb0d6f93e081a30a202069063979363","signature":"6999527a27598aa4178fa2da170dc0f147ee57bed3f8b637a4d0ed8337d4f3bc","impliedFormat":99},{"version":"1d05d48f29663758dae88f0615192f91a56b0332806fcba2a040d88522a6bbaf","signature":"7bda908236b4802a7766d3ca81d3b62ef7c3cfb9edacf4cfda183f631c7e4ac9","impliedFormat":99}],"root":[[71,76]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[72,1],[71,2],[76,3],[75,4],[73,5],[74,6],[64,7],[65,8],[63,7],[70,9],[67,10],[66,10],[61,11]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/axios/index.d.ts","../../core/dist/types.d.ts","../../core/dist/short-id.d.ts","../../core/dist/env.d.ts","../../core/dist/auth.d.ts","../../core/dist/client.d.ts","../../core/dist/resource.d.ts","../../core/dist/openapi.d.ts","../../core/dist/realtime.d.ts","../../core/dist/summary-access.d.ts","../../core/dist/index.d.ts","../src/economy.types.ts","../src/contracts.types.ts","../src/do-dox.ts","../src/dox.ts","../src/ledger-contracts.ts","../src/operations.types.ts","../src/types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[70,71],[70],[70,71,72,73,74,75,76,77,78],[70,73,74],[70,76],[70,71,72,73,75,77],[71,76],[61],[60,61],[60,61,62,63,64,65,66,67,68,69],[60,61,65],[60]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2368a31d44ccc59758e3b3c682fee74e820b08fad98623905a85092018c06e3b","impliedFormat":99},{"version":"61806e75fc22177d65d9b33c90c4b88e4370abd4dd88d8196ca0fc87d7702fe9","impliedFormat":99},{"version":"cd5dcd4588b6b2d1e345d338edef1598cbfd33a138169b5f07a8fd707b63cdca","impliedFormat":99},{"version":"82065c5512d8d6f81b26cf13ea9ecd3e558be9560f7b5c62260858219ecd87f7","impliedFormat":99},{"version":"ed17ed1b2bcf384c88bc6cec6b427989b98db99fc7ad35a50605501a463bbc53","impliedFormat":99},{"version":"82bf4efcca8ab8764a91ac126c0af605ab6717ee94b2316461b5fa388b27e165","impliedFormat":99},{"version":"e8345259c97aa6b8a84b27963fff00e79b7f45852b0024fffc52c9a7949007ac","impliedFormat":99},{"version":"3f5eeb0a84713ccf640b9a6af4629e006f59d7629abc3fc95af2efb062fd0b83","impliedFormat":99},{"version":"ac62f6b0f2e963ea9a251ee8384e64cebe0fe4acd32ca177d838d7c5a7ad2b43","impliedFormat":99},{"version":"967088f3793139562bc3fd0e5db990a8bc2885f7444a1f10ea6a5a6479fa6d40","impliedFormat":99},{"version":"fbb76e489b24bd45225372dec4fddbbc3e9fe4ea23d4da6015fb209e424db9de","impliedFormat":99},{"version":"4a42bf7b821679a7f79829140f2da49474354ad19ae9d1756b77028aa8270045","signature":"cdd207955f2d6fc4a4fe6ef0b216a0d4d3ef52a7fb9d6b2bc4dcdadbb39c3a11","impliedFormat":99},{"version":"98f028bd1d35558ac0e1b2ae61db8012ac212bcbf831cb473acfb3d2b82f4fe9","signature":"b192e0d879e5c278493bfde5095b0250e044827ca7609c3a37cd5254df0cccca","impliedFormat":99},{"version":"ea667515e855e5c301c7446a8949fc6e04efb3dc9202db42011f87d00002c825","signature":"baad39d5a004d2572fd95ebb3c658a9d931b7bb1e45d92a08d772e5f452f68bb","impliedFormat":99},{"version":"9540a8d1caf4337a1511a5b4f793fcb671723e67431216ca247590eb4cc16081","signature":"f5a0607a00ddd921ed86cbe844f3aa5ee74c091f638e14a84bdfac40c4c8db88","impliedFormat":99},{"version":"35033f5c25e0c1821c35d9fbb23c4ba6a86f14d3b5d06a6c368f76021e1dc9a9","signature":"7ee06cd36d4ddafc5405092d094a29ab0c4b1bd11d2fa65e0f9b9ec10034db1d","impliedFormat":99},{"version":"1548ca1af11f3b0b27b2ac53467abe4b4c0bd347f8a135154d96c010640e211e","signature":"e339dfee10aeb8f4d98b41d5adeee3a208a0b4b46ff42c8a2dd83bf19eb3e015","impliedFormat":99},{"version":"53d89e1644808d1b66f19dc5088213a2c3208ef6b402c9deffc5dd6e647fd0f5","impliedFormat":99},{"version":"35ce769ec58a4f94e084225df5ba14436ad693eacd65f175413240be327c1907","signature":"186a9679d087f9ed57b09026038b1b29e32afd536505ef463649ba7be6f89b9e","impliedFormat":99},{"version":"9a6a4149e0bc7293ec5c1773abffcc0f96b0990ff277d5e10ac87af4f68a7ae3","signature":"8fcdf63fcd7837a2150200b1e7a36be24f175c1f9f7d01446dbc4bd079905d89","impliedFormat":99}],"root":[[71,79]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[72,1],[73,2],[74,2],[71,2],[79,3],[75,4],[78,5],[76,6],[77,7],[64,8],[65,9],[63,8],[70,10],[67,11],[66,11],[61,12]],"latestChangedDtsFile":"./ledger-contracts.d.ts","version":"5.9.3"}
|
package/dist/do-dox.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { ServiceApi, type RequestOptions } from '@faiber/sdk-core';
|
|
2
|
+
export interface DoPack {
|
|
3
|
+
id: string;
|
|
4
|
+
coins: number;
|
|
5
|
+
price_rial: number;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AssetDoRefundReceipt {
|
|
9
|
+
id: string;
|
|
10
|
+
profile_id: string;
|
|
11
|
+
order_id: string;
|
|
12
|
+
transaction_id: string;
|
|
13
|
+
coins: number;
|
|
14
|
+
amount_rial: number;
|
|
15
|
+
status: 'pending' | 'refunded';
|
|
16
|
+
}
|
|
17
|
+
export interface AssetDoRefundRequest {
|
|
18
|
+
id: string;
|
|
19
|
+
operation_id: string;
|
|
20
|
+
profile_id: string;
|
|
21
|
+
order_id: string;
|
|
22
|
+
}
|
|
23
|
+
/** Trusted backend integration. Supply x-do-service-token for Task requests or x-do-refund-token for Payment reads; never expose these credentials in a browser. */
|
|
24
|
+
export declare class DoRefundIntegrationApi extends ServiceApi {
|
|
25
|
+
reserve(body: AssetDoRefundRequest, options?: RequestOptions<AssetDoRefundRequest>): Promise<import("axios").AxiosResponse<DoResponse<AssetDoRefundReceipt>, AssetDoRefundRequest, {}, any>>;
|
|
26
|
+
receipt(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<DoResponse<AssetDoRefundReceipt>, any, {}, any>>;
|
|
27
|
+
}
|
|
28
|
+
export interface DoItem {
|
|
29
|
+
id: string;
|
|
30
|
+
title_en: string;
|
|
31
|
+
title_fa: string;
|
|
32
|
+
kind: 'cosmetic' | 'badge' | 'plan';
|
|
33
|
+
coins: number;
|
|
34
|
+
cost_rial: number;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
plan: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface DoPolicy {
|
|
39
|
+
pilot_profiles?: string[];
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
public_creation: boolean;
|
|
42
|
+
public_participation: boolean;
|
|
43
|
+
packs: DoPack[];
|
|
44
|
+
catalog: DoItem[];
|
|
45
|
+
reserve_rial_per_do: number;
|
|
46
|
+
fee_basis_points: number;
|
|
47
|
+
marketing_budget_rial: number;
|
|
48
|
+
margin_basis_points: number;
|
|
49
|
+
delivery_cost_rial: Record<string, number>;
|
|
50
|
+
high_value_threshold: number;
|
|
51
|
+
standard_approvals: number;
|
|
52
|
+
high_value_approvals: number;
|
|
53
|
+
review_hours: number;
|
|
54
|
+
appeal_days: number;
|
|
55
|
+
first_week_discount: number;
|
|
56
|
+
later_discount: number;
|
|
57
|
+
referral_extra_discount: number;
|
|
58
|
+
referral_reward: number;
|
|
59
|
+
referral_monthly_limit: number;
|
|
60
|
+
referral_campaign_id: string | null;
|
|
61
|
+
}
|
|
62
|
+
export interface DoResponse<T> {
|
|
63
|
+
status: string;
|
|
64
|
+
message: string;
|
|
65
|
+
data: T;
|
|
66
|
+
}
|
|
67
|
+
export interface DoPolicySnapshot {
|
|
68
|
+
can_edit: boolean;
|
|
69
|
+
version: number;
|
|
70
|
+
policy: DoPolicy;
|
|
71
|
+
}
|
|
72
|
+
export interface DoPolicyEdit {
|
|
73
|
+
version: number;
|
|
74
|
+
policy: DoPolicy;
|
|
75
|
+
reason: string;
|
|
76
|
+
}
|
|
77
|
+
export interface DoRiskEdit {
|
|
78
|
+
profile_id: string;
|
|
79
|
+
held: boolean;
|
|
80
|
+
reason: string;
|
|
81
|
+
}
|
|
82
|
+
export interface DoRiskResult {
|
|
83
|
+
held: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface DoCampaignFunding {
|
|
86
|
+
request_id: string;
|
|
87
|
+
campaign_id: string;
|
|
88
|
+
owner_id: string;
|
|
89
|
+
coins: number;
|
|
90
|
+
reason: string;
|
|
91
|
+
}
|
|
92
|
+
export interface DoFundingResult {
|
|
93
|
+
funded: number;
|
|
94
|
+
reserved_rial: number;
|
|
95
|
+
}
|
|
96
|
+
export interface DoPolicyAuditData {
|
|
97
|
+
reason: string;
|
|
98
|
+
before: DoPolicy;
|
|
99
|
+
after: DoPolicy;
|
|
100
|
+
}
|
|
101
|
+
export interface DoRiskAuditData {
|
|
102
|
+
profile_id: string;
|
|
103
|
+
held: boolean;
|
|
104
|
+
reason: string;
|
|
105
|
+
}
|
|
106
|
+
export interface DoFundingAuditData {
|
|
107
|
+
actor: string;
|
|
108
|
+
campaign_id: string;
|
|
109
|
+
owner_id: string;
|
|
110
|
+
coins: number;
|
|
111
|
+
reason: string;
|
|
112
|
+
}
|
|
113
|
+
export type DoAuditEvent = {
|
|
114
|
+
id: string;
|
|
115
|
+
actor_id: string;
|
|
116
|
+
created_at: string;
|
|
117
|
+
} & ({
|
|
118
|
+
action: 'risk_signal';
|
|
119
|
+
data: {
|
|
120
|
+
profile_id: string;
|
|
121
|
+
reason: 'circular_funding';
|
|
122
|
+
assignment_id: string;
|
|
123
|
+
};
|
|
124
|
+
} | {
|
|
125
|
+
action: 'risk_appeal';
|
|
126
|
+
data: {
|
|
127
|
+
profile_id: string;
|
|
128
|
+
reason: string;
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
action: 'policy';
|
|
132
|
+
data: DoPolicyAuditData;
|
|
133
|
+
} | {
|
|
134
|
+
action: 'risk';
|
|
135
|
+
data: DoRiskAuditData;
|
|
136
|
+
} | {
|
|
137
|
+
action: 'marketing_fund';
|
|
138
|
+
data: DoFundingAuditData;
|
|
139
|
+
});
|
|
140
|
+
export interface DoRiskAppeal {
|
|
141
|
+
id: string;
|
|
142
|
+
profile_id: string;
|
|
143
|
+
reason: string;
|
|
144
|
+
status: 'open' | 'resolved';
|
|
145
|
+
created_at: string;
|
|
146
|
+
}
|
|
147
|
+
export interface DoAudit {
|
|
148
|
+
risk_appeals: DoRiskAppeal[];
|
|
149
|
+
outstanding: number;
|
|
150
|
+
balances: number;
|
|
151
|
+
backing_rial: string;
|
|
152
|
+
submitted: number;
|
|
153
|
+
pending: number;
|
|
154
|
+
audit: DoAuditEvent[];
|
|
155
|
+
}
|
|
156
|
+
/** Product-isolated funded rewards policy. The existing scoped economy remains separate.
|
|
157
|
+
* All methods inherit FaiberClient authentication, cancellation, and full Axios responses.
|
|
158
|
+
*/
|
|
159
|
+
export declare class DoEconomyApi extends ServiceApi {
|
|
160
|
+
/** Reads packs, benefit prices, review rules and promotion reserves. Requires admin:coin_settings:read. */
|
|
161
|
+
policy(options?: RequestOptions): Promise<import("axios").AxiosResponse<DoResponse<DoPolicySnapshot>, any, {}, any>>;
|
|
162
|
+
/** Saves an audited version of policy. Requires admin:coin_settings:update; stale versions and underfunded packs return 409. */
|
|
163
|
+
savePolicy(body: DoPolicyEdit, options?: RequestOptions<DoPolicyEdit>): Promise<import("axios").AxiosResponse<DoResponse<DoPolicySnapshot>, DoPolicyEdit, {}, any>>;
|
|
164
|
+
/** Reads outstanding backing and the latest 100 operator audit records. Requires admin:coin_settings:read. */
|
|
165
|
+
audit(options?: RequestOptions): Promise<import("axios").AxiosResponse<DoResponse<DoAudit>, any, {}, any>>;
|
|
166
|
+
/** Holds or releases a profile's payouts/redemptions with an audited reason. Requires admin:coin_settings:update. */
|
|
167
|
+
setRisk(body: DoRiskEdit, options?: RequestOptions<DoRiskEdit>): Promise<import("axios").AxiosResponse<DoResponse<DoRiskResult>, DoRiskEdit, {}, any>>;
|
|
168
|
+
/** Funds a campaign from explicit marketing reserves. Requires admin:coin_settings:update. Reuse request_id on retries; changed semantics return 409. */
|
|
169
|
+
fundCampaign(body: DoCampaignFunding, options?: RequestOptions<DoCampaignFunding>): Promise<import("axios").AxiosResponse<DoResponse<DoFundingResult>, DoCampaignFunding, {}, any>>;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=do-dox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"do-dox.d.ts","sourceRoot":"","sources":["../src/do-dox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,WAAW,MAAM;IAAG,EAAE,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,UAAU,EAAC,MAAM,CAAC;IAAC,OAAO,EAAC,OAAO,CAAA;CAAE;AACvF,MAAM,WAAW,oBAAoB;IAAE,EAAE,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,cAAc,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,SAAS,GAAC,UAAU,CAAA;CAAC;AACrK,MAAM,WAAW,oBAAoB;IAAE,EAAE,EAAC,MAAM,CAAC;IAAA,YAAY,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,QAAQ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,YAAY,EAAE,CAAA;CAAE;AAEzK;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,2GAA2G;IAC3G,MAAM,CAAC,OAAO,CAAC,EAAC,cAAc;IAC9B,gIAAgI;IAChI,UAAU,CAAC,IAAI,EAAC,YAAY,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,YAAY,CAAC;IAClE,8GAA8G;IAC9G,KAAK,CAAC,OAAO,CAAC,EAAC,cAAc;IAC7B,qHAAqH;IACrH,OAAO,CAAC,IAAI,EAAC,UAAU,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,UAAU,CAAC;IAC3D,yJAAyJ;IACzJ,YAAY,CAAC,IAAI,EAAC,iBAAiB,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,iBAAiB,CAAC;CAC/E"}
|
package/dist/do-dox.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ServiceApi } from '@faiber/sdk-core';
|
|
2
|
+
/** Trusted backend integration. Supply x-do-service-token for Task requests or x-do-refund-token for Payment reads; never expose these credentials in a browser. */
|
|
3
|
+
export class DoRefundIntegrationApi extends ServiceApi {
|
|
4
|
+
reserve(body, options) { return this.client.post('/api/v1/internal/do/refunds', body, options); }
|
|
5
|
+
receipt(id, options) { return this.client.get(`/api/v1/internal/do/refunds/${encodeURIComponent(id)}`, undefined, options); }
|
|
6
|
+
}
|
|
7
|
+
/** Product-isolated funded rewards policy. The existing scoped economy remains separate.
|
|
8
|
+
* All methods inherit FaiberClient authentication, cancellation, and full Axios responses.
|
|
9
|
+
*/
|
|
10
|
+
export class DoEconomyApi extends ServiceApi {
|
|
11
|
+
/** Reads packs, benefit prices, review rules and promotion reserves. Requires admin:coin_settings:read. */
|
|
12
|
+
policy(options) { return this.client.get('/api/v1/do/policy', undefined, options); }
|
|
13
|
+
/** Saves an audited version of policy. Requires admin:coin_settings:update; stale versions and underfunded packs return 409. */
|
|
14
|
+
savePolicy(body, options) { return this.client.put('/api/v1/do/policy', body, options); }
|
|
15
|
+
/** Reads outstanding backing and the latest 100 operator audit records. Requires admin:coin_settings:read. */
|
|
16
|
+
audit(options) { return this.client.get('/api/v1/do/audit', undefined, options); }
|
|
17
|
+
/** Holds or releases a profile's payouts/redemptions with an audited reason. Requires admin:coin_settings:update. */
|
|
18
|
+
setRisk(body, options) { return this.client.post('/api/v1/do/risk', body, options); }
|
|
19
|
+
/** Funds a campaign from explicit marketing reserves. Requires admin:coin_settings:update. Reuse request_id on retries; changed semantics return 409. */
|
|
20
|
+
fundCampaign(body, options) { return this.client.post('/api/v1/do/campaign-funding', body, options); }
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=do-dox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"do-dox.js","sourceRoot":"","sources":["../src/do-dox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AAKnE,oKAAoK;AACpK,MAAM,OAAO,sBAAuB,SAAQ,UAAU;IACrD,OAAO,CAAC,IAAyB,EAAC,OAA6C,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAwD,6BAA6B,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IAC5M,OAAO,CAAC,EAAS,EAAC,OAAuB,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmC,+BAA+B,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAC,SAAS,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;CAC/K;AAyBD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,UAAU;IAC1C,2GAA2G;IAC3G,MAAM,CAAC,OAAuB,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA+B,mBAAmB,EAAC,SAAS,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IAC5H,gIAAgI;IAChI,UAAU,CAAC,IAAiB,EAAC,OAAqC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA4C,mBAAmB,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACxK,8GAA8G;IAC9G,KAAK,CAAC,OAAuB,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsB,kBAAkB,EAAC,SAAS,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACjH,qHAAqH;IACrH,OAAO,CAAC,IAAe,EAAC,OAAmC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAsC,iBAAiB,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IAC1J,yJAAyJ;IACzJ,YAAY,CAAC,IAAsB,EAAC,OAA0C,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAgD,6BAA6B,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;CACpM"}
|
package/dist/dox.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ServiceApi, type RequestOptions } from '@faiber/sdk-core';
|
|
2
|
+
export type DoxTransferStatus = 'completed' | 'processing' | 'failed';
|
|
3
|
+
export type DoxTransactionKind = 'allocation' | 'task' | 'purchase';
|
|
4
|
+
export interface DoxTransactionQuery {
|
|
5
|
+
account?: string;
|
|
6
|
+
direction?: 'all' | 'in' | 'out';
|
|
7
|
+
kind?: 'all' | DoxTransactionKind;
|
|
8
|
+
status?: DoxTransferStatus;
|
|
9
|
+
page?: number;
|
|
10
|
+
page_size?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DoxTransaction {
|
|
13
|
+
id: string;
|
|
14
|
+
source: string;
|
|
15
|
+
destination: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
kind: DoxTransactionKind;
|
|
18
|
+
source_id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
created_at: string;
|
|
21
|
+
status: DoxTransferStatus;
|
|
22
|
+
error?: 'insufficient' | 'unavailable';
|
|
23
|
+
}
|
|
24
|
+
export interface DoxAccountBalance {
|
|
25
|
+
account: string;
|
|
26
|
+
balance: number;
|
|
27
|
+
}
|
|
28
|
+
export interface DoxSpaceSummary {
|
|
29
|
+
treasury: number;
|
|
30
|
+
wallets: number;
|
|
31
|
+
issued: number;
|
|
32
|
+
returned: number;
|
|
33
|
+
paid: number;
|
|
34
|
+
}
|
|
35
|
+
export interface DoxTransactionPage {
|
|
36
|
+
items: DoxTransaction[];
|
|
37
|
+
total: number;
|
|
38
|
+
page: number;
|
|
39
|
+
page_size: number;
|
|
40
|
+
volume: number;
|
|
41
|
+
accounts: DoxAccountBalance[];
|
|
42
|
+
summary: DoxSpaceSummary;
|
|
43
|
+
}
|
|
44
|
+
export type DoxMode = 'distributed' | 'managed';
|
|
45
|
+
export interface DoxConfigureCommand {
|
|
46
|
+
type: 'dox_configure';
|
|
47
|
+
space_id: string;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
mode: DoxMode;
|
|
50
|
+
members: string[];
|
|
51
|
+
version: number;
|
|
52
|
+
}
|
|
53
|
+
export interface DoxTransferCommand {
|
|
54
|
+
type: 'dox_transfer';
|
|
55
|
+
space_id: string;
|
|
56
|
+
source: string | null;
|
|
57
|
+
destination: string | null;
|
|
58
|
+
amount: number;
|
|
59
|
+
kind: 'task' | 'purchase';
|
|
60
|
+
source_id: string;
|
|
61
|
+
title: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DoxCommandIdentity {
|
|
64
|
+
id: string;
|
|
65
|
+
actor_id: string;
|
|
66
|
+
}
|
|
67
|
+
export type DoxCommand = DoxCommandIdentity & (DoxConfigureCommand | DoxTransferCommand);
|
|
68
|
+
export interface DoxCommandReceipt {
|
|
69
|
+
accepted?: boolean;
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
mode?: DoxMode;
|
|
72
|
+
superseded?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface DoxLedgerRead {
|
|
75
|
+
profile_id: string;
|
|
76
|
+
space_id: string;
|
|
77
|
+
dox_history_before?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface DoxLedgerPage {
|
|
80
|
+
balance: number;
|
|
81
|
+
treasury: number;
|
|
82
|
+
history: DoxLedgerPosting[];
|
|
83
|
+
history_has_more: boolean;
|
|
84
|
+
history_cursor: string | null;
|
|
85
|
+
}
|
|
86
|
+
export interface DoxLedgerManagementRead {
|
|
87
|
+
profile_id: string;
|
|
88
|
+
space_id: string;
|
|
89
|
+
dox_management: Omit<DoxTransactionQuery, 'status'>;
|
|
90
|
+
}
|
|
91
|
+
export interface AssetDoxResponse<T> {
|
|
92
|
+
status: string;
|
|
93
|
+
message: string;
|
|
94
|
+
data: T;
|
|
95
|
+
}
|
|
96
|
+
/** Generic space-scoped asset ledger. These are trusted server integration methods;
|
|
97
|
+
* supply x-do-service-token using request options. Never expose service credentials
|
|
98
|
+
* to browser code. The caller must enforce membership and action permissions first.
|
|
99
|
+
* Task is the admitted ledger authority; Social cannot request space management.
|
|
100
|
+
* All methods preserve Axios errors, metadata and cancellation. */
|
|
101
|
+
export declare class DoxLedgerApi extends ServiceApi {
|
|
102
|
+
/** Configure the closed ledger or transfer existing Dox atomically. Stable operation IDs are idempotent; task/purchase domain IDs prevent duplicate payouts. 409 on insufficient funds or conflicting replays. */
|
|
103
|
+
execute(input: DoxCommand, options?: RequestOptions<DoxCommand>): Promise<import("axios").AxiosResponse<AssetDoxResponse<DoxCommandReceipt>, DoxCommand, {}, any>>;
|
|
104
|
+
/** Read one member's balance and cursor-paginated history; at most 100 postings per page. */
|
|
105
|
+
read(input: DoxLedgerRead, options?: RequestOptions<DoxLedgerRead>): Promise<import("axios").AxiosResponse<AssetDoxResponse<DoxLedgerPage>, DoxLedgerRead, {}, any>>;
|
|
106
|
+
/** Read confirmed space postings and balances. Page is one-based, size1..100; direction requires an account. Only Task credentials are accepted. */
|
|
107
|
+
management(input: DoxLedgerManagementRead, options?: RequestOptions<DoxLedgerManagementRead>): Promise<import("axios").AxiosResponse<AssetDoxResponse<DoxTransactionPage>, DoxLedgerManagementRead, {}, any>>;
|
|
108
|
+
}
|
|
109
|
+
export type DoxLedgerPosting = Omit<DoxTransaction, 'status' | 'error'>;
|
|
110
|
+
//# sourceMappingURL=dox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dox.d.ts","sourceRoot":"","sources":["../src/dox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,KAAK,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAC,WAAW,GAAC,YAAY,GAAC,QAAQ,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAC,YAAY,GAAC,MAAM,GAAC,UAAU,CAAC;AAC9D,MAAM,WAAW,mBAAmB;IAAE,OAAO,CAAC,EAAC,MAAM,CAAC;IAAA,SAAS,CAAC,EAAC,KAAK,GAAC,IAAI,GAAC,KAAK,CAAC;IAAA,IAAI,CAAC,EAAC,KAAK,GAAC,kBAAkB,CAAC;IAAA,MAAM,CAAC,EAAC,iBAAiB,CAAC;IAAA,IAAI,CAAC,EAAC,MAAM,CAAC;IAAA,SAAS,CAAC,EAAC,MAAM,CAAA;CAAC;AAC1K,MAAM,WAAW,cAAc;IAAE,EAAE,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,kBAAkB,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,iBAAiB,CAAC;IAAA,KAAK,CAAC,EAAC,cAAc,GAAC,aAAa,CAAA;CAAC;AAC/N,MAAM,WAAW,iBAAiB;IAAE,OAAO,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAA;CAAC;AAClE,MAAM,WAAW,eAAe;IAAE,QAAQ,EAAC,M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15 @@
|
|
|
1
|
+
import { ServiceApi } from '@faiber/sdk-core';
|
|
2
|
+
/** Generic space-scoped asset ledger. These are trusted server integration methods;
|
|
3
|
+
* supply x-do-service-token using request options. Never expose service credentials
|
|
4
|
+
* to browser code. The caller must enforce membership and action permissions first.
|
|
5
|
+
* Task is the admitted ledger authority; Social cannot request space management.
|
|
6
|
+
* All methods preserve Axios errors, metadata and cancellation. */
|
|
7
|
+
export class DoxLedgerApi extends ServiceApi {
|
|
8
|
+
/** Configure the closed ledger or transfer existing Dox atomically. Stable operation IDs are idempotent; task/purchase domain IDs prevent duplicate payouts. 409 on insufficient funds or conflicting replays. */
|
|
9
|
+
execute(input, options) { return this.client.post('/api/v1/internal/do/execute', input, options); }
|
|
10
|
+
/** Read one member's balance and cursor-paginated history; at most 100 postings per page. */
|
|
11
|
+
read(input, options) { return this.client.post('/api/v1/internal/do/read', input, options); }
|
|
12
|
+
/** Read confirmed space postings and balances. Page is one-based, size1..100; direction requires an account. Only Task credentials are accepted. */
|
|
13
|
+
management(input, options) { return this.client.post('/api/v1/internal/do/read', input, options); }
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=dox.js.map
|
package/dist/dox.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dox.js","sourceRoot":"","sources":["../src/dox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AAmBhE;;;;mEAImE;AACnE,MAAM,OAAO,YAAa,SAAQ,UAAU;IAC3C,kNAAkN;IAClN,OAAO,CAAC,KAAgB,EAAC,OAAmC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiD,6BAA6B,EAAC,KAAK,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACnL,6FAA6F;IAC7F,IAAI,CAAC,KAAmB,EAAC,OAAsC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAgD,0BAA0B,EAAC,KAAK,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IAClL,oJAAoJ;IACpJ,UAAU,CAAC,KAA6B,EAAC,OAAgD,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA+D,0BAA0B,EAAC,KAAK,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;CAC3N"}
|