@faiber/faiber-social 1.4.0 → 1.6.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 +19 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/campaigns.d.ts +360 -0
- package/dist/campaigns.d.ts.map +1 -0
- package/dist/campaigns.js +31 -0
- package/dist/campaigns.js.map +1 -0
- package/dist/index.d.ts +39 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts +112 -112
- package/package.json +2 -2
- package/provenance.json +6 -5
package/README.md
CHANGED
|
@@ -135,3 +135,22 @@ A view requires at least 1000 visible milliseconds (400 below that threshold); o
|
|
|
135
135
|
User follows and published comment inserts can enqueue notifications through a database trigger, subject to preference opt-out. Place follows do not enqueue follow notifications. Retrying an existing follow edge does not create another insert notification.
|
|
136
136
|
|
|
137
137
|
Package contracts describe the supported service source. Native integration evidence and deployment compatibility are separate verification requirements; this SDK does not assert that every mounted operation has been exercised against the deployed service.
|
|
138
|
+
|
|
139
|
+
### Funded campaigns and private recognition
|
|
140
|
+
|
|
141
|
+
Campaign jobs use Social posts and claims. Public Do campaign discovery does not
|
|
142
|
+
expose private participant identities or evidence. Starting a job queues a funded
|
|
143
|
+
reservation; proof review queues an idempotent Asset settlement. A pending response
|
|
144
|
+
is not confirmation that a reward has been paid. Read the assignment again to
|
|
145
|
+
observe settlement. Dox campaigns are private and have no spending power.
|
|
146
|
+
|
|
147
|
+
Use stable `request_id` values on retries. A reused ID with different contents
|
|
148
|
+
returns a conflict. Upload scanned evidence using `FormData`; proof downloads
|
|
149
|
+
require participant, campaign moderator, or authorized operator access. These APIs
|
|
150
|
+
require deployed campaign support and configured service integrations. Financial
|
|
151
|
+
features are disabled until funded and enabled by the service operator.
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
const campaigns = await social.campaigns.campaigns({ view: 'public' }, { signal: controller.signal });
|
|
155
|
+
console.log(campaigns.status, campaigns.data.data.items);
|
|
156
|
+
```
|
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/types.ts","../src/admin.types.ts","../src/contracts.types.ts","../src/discovery.types.ts","../src/operations.types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66,67,68,69],[60,61,65],[60],[70,71],[70,71,72],[70,71,72,73,74,75,76],[70,74,75],[70,71,72,73,74],[70]],"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":"51cdc3cd25ded88f5e064fbf2dbd4a7a7a2339865a873cb84b10492e0cb837b0","signature":"8b82a4e814584d1f2abad844974a44cc77a01a6d9efe7dc2b240584175ac7e71","impliedFormat":99},{"version":"f7759044ddf7d708ac9826d01dd508f249b5598256b896bc3ce47f80555d7c46","signature":"810fe4b88a6157771078027bc5e3142eca192f3ded5a5f642026b2b92a9bfdab","impliedFormat":99},{"version":"2ca85b932c7202502b4e50939f8421d4d5501e2f9e352dfcace80541e51ee4b3","signature":"45efad2b7cef0b27fd202ce2c76b072e5c5e1db300e5393353ea58c183db62d2","impliedFormat":99},{"version":"aa4fe6cad0618957a196cdba17a6ee7abdbbca26146803661af27c4d6c690cfd","signature":"9d1fb3d0d3b4fc0184d0bc495615156f700cfd683ec60ebf46e2388fb0bcb1d9","impliedFormat":99},{"version":"62bdd141c13e39b048dab35d788a7f14df8fb26755a43937819aee5a9be04a1e","signature":"34277d5f6848bc01edc4eee6cc265a55ec97a08b2ae73e15b25829d2879bedbe","impliedFormat":99},{"version":"1fbad0ec14daec823ddf6d1f3b9d0eb750c8ac80e920c227dddec1834487f93f","signature":"97c27a3349cfcda16f045cd311002d61c0f6bce76cea3c6c535806c2f4b53da6","impliedFormat":99},{"version":"3d17ffdf4c3997809898219eabaedf0372979b9307117d9ac054ca29e3349bd9","signature":"d0354fec242bef6aff6a970f504d524e285719abbc712ea93a2252d09405adc0","impliedFormat":99}],"root":[[71,77]],"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":[[64,1],[65,2],[63,1],[70,3],[67,4],[66,4],[61,5],[72,6],[73,7],[74,6],[77,8],[76,9],[75,10],[71,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/types.ts","../src/admin.types.ts","../src/campaigns.ts","../src/contracts.types.ts","../src/discovery.types.ts","../src/operations.types.ts","../src/operations.ts","../src/index.ts"],"fileIdsList":[[61],[60,61],[60,61,62,63,64,65,66,67,68,69],[60,61,65],[60],[70,71],[70],[70,71,72],[70,71,72,73,74,75,76,77],[70,75,76],[70,71,72,74,75]],"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":"51cdc3cd25ded88f5e064fbf2dbd4a7a7a2339865a873cb84b10492e0cb837b0","signature":"8b82a4e814584d1f2abad844974a44cc77a01a6d9efe7dc2b240584175ac7e71","impliedFormat":99},{"version":"f7759044ddf7d708ac9826d01dd508f249b5598256b896bc3ce47f80555d7c46","signature":"810fe4b88a6157771078027bc5e3142eca192f3ded5a5f642026b2b92a9bfdab","impliedFormat":99},{"version":"155c8da9693fa39c5a988be5335a4b385a0c40d5d961e54753c6a70b7984c8d8","signature":"5d38f64132ae769f9607cffe294252f1aa0dc00a16077b863d0495b678e8d168","impliedFormat":99},{"version":"2ca85b932c7202502b4e50939f8421d4d5501e2f9e352dfcace80541e51ee4b3","signature":"45efad2b7cef0b27fd202ce2c76b072e5c5e1db300e5393353ea58c183db62d2","impliedFormat":99},{"version":"aa4fe6cad0618957a196cdba17a6ee7abdbbca26146803661af27c4d6c690cfd","signature":"9d1fb3d0d3b4fc0184d0bc495615156f700cfd683ec60ebf46e2388fb0bcb1d9","impliedFormat":99},{"version":"62bdd141c13e39b048dab35d788a7f14df8fb26755a43937819aee5a9be04a1e","signature":"34277d5f6848bc01edc4eee6cc265a55ec97a08b2ae73e15b25829d2879bedbe","impliedFormat":99},{"version":"1fbad0ec14daec823ddf6d1f3b9d0eb750c8ac80e920c227dddec1834487f93f","signature":"69bca0990f2f7638d8a216b3fa58cf8fc44161434b0182c8f66ca1ee2cc433eb","impliedFormat":99},{"version":"489e28969b33ecf50f70fed218c1827bbf96436a5bbc90767241a01416638579","signature":"45d6fb7b8b1ff648bd25ad482fe7b766586e50a69902edcaa99c282870142225","impliedFormat":99}],"root":[[71,78]],"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":[[64,1],[65,2],[63,1],[70,3],[67,4],[66,4],[61,5],[72,6],[73,7],[74,8],[75,6],[78,9],[77,10],[76,11],[71,7]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { ServiceApi, type RequestOptions } from '@faiber/sdk-core';
|
|
2
|
+
export type CampaignAsset = 'do' | 'dox';
|
|
3
|
+
export type CampaignVisibility = 'public' | 'private';
|
|
4
|
+
export type CampaignStatus = 'draft' | 'published' | 'closed';
|
|
5
|
+
export type AssignmentStatus = 'funding_pending' | 'active' | 'submitted' | 'changes_requested' | 'rejected' | 'appealed' | 'payout_pending' | 'paid' | 'release_pending' | 'released';
|
|
6
|
+
export interface RewardResponse<T> {
|
|
7
|
+
data: T;
|
|
8
|
+
}
|
|
9
|
+
export interface Campaign {
|
|
10
|
+
reward_min?: number | null;
|
|
11
|
+
reward_max?: number | null;
|
|
12
|
+
remaining_slots?: number;
|
|
13
|
+
available_do?: number | null;
|
|
14
|
+
id: string;
|
|
15
|
+
organization_id: string;
|
|
16
|
+
space_id: string | null;
|
|
17
|
+
owner_id: string;
|
|
18
|
+
asset: CampaignAsset;
|
|
19
|
+
visibility: CampaignVisibility;
|
|
20
|
+
status: CampaignStatus;
|
|
21
|
+
official: boolean;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
terms: string;
|
|
25
|
+
cover: string | null;
|
|
26
|
+
starts_at: string;
|
|
27
|
+
ends_at: string;
|
|
28
|
+
version: number;
|
|
29
|
+
created_at: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CampaignInput {
|
|
32
|
+
request_id: string;
|
|
33
|
+
space_id: string | null;
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
terms: string;
|
|
37
|
+
cover: string | null;
|
|
38
|
+
asset: CampaignAsset;
|
|
39
|
+
visibility: CampaignVisibility;
|
|
40
|
+
starts_at: string;
|
|
41
|
+
ends_at: string;
|
|
42
|
+
moderators: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface CampaignJob {
|
|
45
|
+
remaining_slots?: number;
|
|
46
|
+
available_slots?: number;
|
|
47
|
+
available?: boolean;
|
|
48
|
+
required_approvals?: number | null;
|
|
49
|
+
id: string;
|
|
50
|
+
campaign_id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
instructions: string;
|
|
53
|
+
reward: number;
|
|
54
|
+
capacity: number;
|
|
55
|
+
per_person: number;
|
|
56
|
+
submission_hours: number;
|
|
57
|
+
evidence_type: 'proof' | 'referral';
|
|
58
|
+
version: number;
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface CampaignJobInput {
|
|
62
|
+
request_id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
instructions: string;
|
|
65
|
+
reward: number;
|
|
66
|
+
capacity: number;
|
|
67
|
+
per_person: number;
|
|
68
|
+
submission_hours: number;
|
|
69
|
+
evidence_type: 'proof' | 'referral';
|
|
70
|
+
}
|
|
71
|
+
export interface CampaignMutation {
|
|
72
|
+
request_id: string;
|
|
73
|
+
version?: number;
|
|
74
|
+
action: 'join' | 'invite' | 'moderator' | 'remove' | 'publish' | 'visibility' | 'fund' | 'close' | 'official' | 'start';
|
|
75
|
+
user_id?: string;
|
|
76
|
+
coins?: number;
|
|
77
|
+
confirmed?: boolean;
|
|
78
|
+
visibility?: CampaignVisibility;
|
|
79
|
+
}
|
|
80
|
+
export interface RewardReceipt {
|
|
81
|
+
id: string;
|
|
82
|
+
version?: number;
|
|
83
|
+
status?: AssignmentStatus | 'pending';
|
|
84
|
+
accepted?: boolean;
|
|
85
|
+
coins?: number;
|
|
86
|
+
approvals?: number;
|
|
87
|
+
}
|
|
88
|
+
export interface CampaignList {
|
|
89
|
+
items: Campaign[];
|
|
90
|
+
page: number;
|
|
91
|
+
}
|
|
92
|
+
export interface CampaignListQuery {
|
|
93
|
+
view?: 'mine' | 'public';
|
|
94
|
+
page?: number;
|
|
95
|
+
space_id?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface CampaignMember {
|
|
98
|
+
user_id: string;
|
|
99
|
+
role: 'participant' | 'moderator';
|
|
100
|
+
active: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface CampaignAvailability {
|
|
103
|
+
available_do: number | null;
|
|
104
|
+
review_hours: number | null;
|
|
105
|
+
appeal_days: number | null;
|
|
106
|
+
}
|
|
107
|
+
export interface CampaignDetail {
|
|
108
|
+
availability?: CampaignAvailability;
|
|
109
|
+
campaign: Campaign;
|
|
110
|
+
jobs: CampaignJob[];
|
|
111
|
+
role: 'participant' | 'moderator' | null;
|
|
112
|
+
members: CampaignMember[];
|
|
113
|
+
finance: DoSnapshot | null;
|
|
114
|
+
}
|
|
115
|
+
export interface CampaignAssignment {
|
|
116
|
+
id: string;
|
|
117
|
+
campaign_id: string;
|
|
118
|
+
job_id: string;
|
|
119
|
+
user_id: string;
|
|
120
|
+
status: AssignmentStatus;
|
|
121
|
+
reward: number;
|
|
122
|
+
instructions: string;
|
|
123
|
+
required_approvals: number;
|
|
124
|
+
review_hours: number;
|
|
125
|
+
appeal_days: number;
|
|
126
|
+
deadline: string;
|
|
127
|
+
review_deadline: string | null;
|
|
128
|
+
appeal_until: string | null;
|
|
129
|
+
submission_version: number;
|
|
130
|
+
version: number;
|
|
131
|
+
risk_flags: string[];
|
|
132
|
+
last_error: string | null;
|
|
133
|
+
created_at: string;
|
|
134
|
+
campaign_title?: string;
|
|
135
|
+
job_title?: string;
|
|
136
|
+
asset?: CampaignAsset;
|
|
137
|
+
}
|
|
138
|
+
export interface CampaignWorkList {
|
|
139
|
+
items: CampaignAssignment[];
|
|
140
|
+
}
|
|
141
|
+
export interface CampaignWorkQuery {
|
|
142
|
+
view?: 'review' | 'appeals';
|
|
143
|
+
}
|
|
144
|
+
export interface CampaignProof {
|
|
145
|
+
assignment_id: string;
|
|
146
|
+
version: number;
|
|
147
|
+
note: string;
|
|
148
|
+
links: string[];
|
|
149
|
+
attachment_ids: string[];
|
|
150
|
+
external_ids: string[];
|
|
151
|
+
created_at: string;
|
|
152
|
+
}
|
|
153
|
+
export interface ProofFile {
|
|
154
|
+
id: string;
|
|
155
|
+
filename: string;
|
|
156
|
+
mime: string;
|
|
157
|
+
size_bytes: number;
|
|
158
|
+
status: 'uploading' | 'clean' | 'quarantined';
|
|
159
|
+
}
|
|
160
|
+
export interface CampaignReview {
|
|
161
|
+
id: string;
|
|
162
|
+
assignment_id: string;
|
|
163
|
+
submission_version: number;
|
|
164
|
+
reviewer_id: string;
|
|
165
|
+
decision: 'approve' | 'changes' | 'reject' | 'appeal' | 'resolve_approve' | 'resolve_reject';
|
|
166
|
+
reason: string;
|
|
167
|
+
created_at: string;
|
|
168
|
+
}
|
|
169
|
+
export interface CampaignWorkDetail {
|
|
170
|
+
assignment: CampaignAssignment;
|
|
171
|
+
submissions: CampaignProof[];
|
|
172
|
+
reviews: CampaignReview[];
|
|
173
|
+
files: ProofFile[];
|
|
174
|
+
}
|
|
175
|
+
export interface SubmitCampaignProof {
|
|
176
|
+
request_id: string;
|
|
177
|
+
version: number;
|
|
178
|
+
note: string;
|
|
179
|
+
links: string[];
|
|
180
|
+
attachments: string[];
|
|
181
|
+
external_ids: string[];
|
|
182
|
+
}
|
|
183
|
+
export interface ReviewCampaignProof {
|
|
184
|
+
request_id: string;
|
|
185
|
+
version: number;
|
|
186
|
+
decision: CampaignReview['decision'];
|
|
187
|
+
reason: string;
|
|
188
|
+
}
|
|
189
|
+
export interface DoPack {
|
|
190
|
+
id: string;
|
|
191
|
+
coins: number;
|
|
192
|
+
price_rial: number;
|
|
193
|
+
enabled: boolean;
|
|
194
|
+
}
|
|
195
|
+
export interface DoItem {
|
|
196
|
+
id: string;
|
|
197
|
+
title_en: string;
|
|
198
|
+
title_fa: string;
|
|
199
|
+
kind: 'cosmetic' | 'badge' | 'plan';
|
|
200
|
+
coins: number;
|
|
201
|
+
cost_rial: number;
|
|
202
|
+
enabled: boolean;
|
|
203
|
+
plan: string | null;
|
|
204
|
+
}
|
|
205
|
+
export interface DoHistory {
|
|
206
|
+
operation_id: string;
|
|
207
|
+
source: string;
|
|
208
|
+
destination: string;
|
|
209
|
+
coins: number;
|
|
210
|
+
created_at: string;
|
|
211
|
+
}
|
|
212
|
+
export interface DoOrder {
|
|
213
|
+
id: string;
|
|
214
|
+
pack: DoPack;
|
|
215
|
+
status: 'pending' | 'paid' | 'refunded' | 'cancelled';
|
|
216
|
+
redirect_url: string | null;
|
|
217
|
+
}
|
|
218
|
+
export interface RewardStreak {
|
|
219
|
+
current_days: number;
|
|
220
|
+
best_days: number;
|
|
221
|
+
freezes: number;
|
|
222
|
+
last_day: string | null;
|
|
223
|
+
}
|
|
224
|
+
export interface RewardEnrollment {
|
|
225
|
+
workspace_id: string;
|
|
226
|
+
user_id: string;
|
|
227
|
+
enrolled_at: string;
|
|
228
|
+
timezone: string;
|
|
229
|
+
first_purchase_id: string | null;
|
|
230
|
+
first_purchase_status: 'reserved' | 'paid' | null;
|
|
231
|
+
referrer_id: string | null;
|
|
232
|
+
}
|
|
233
|
+
export interface RewardReferral {
|
|
234
|
+
status: 'pending' | 'reserved' | 'qualified' | 'expired';
|
|
235
|
+
expires_at: string;
|
|
236
|
+
}
|
|
237
|
+
export interface DoRedemption {
|
|
238
|
+
id: string;
|
|
239
|
+
item: DoItem;
|
|
240
|
+
coins: number;
|
|
241
|
+
status: 'pending' | 'delivered' | 'held';
|
|
242
|
+
created_at: string;
|
|
243
|
+
}
|
|
244
|
+
export interface DoOwnedItem {
|
|
245
|
+
item_id: string;
|
|
246
|
+
kind: 'cosmetic' | 'badge';
|
|
247
|
+
}
|
|
248
|
+
export interface DoRiskHold {
|
|
249
|
+
reason: string;
|
|
250
|
+
created_at: string;
|
|
251
|
+
}
|
|
252
|
+
export interface DoRiskAppeal {
|
|
253
|
+
id: string;
|
|
254
|
+
reason: string;
|
|
255
|
+
status: 'open' | 'resolved';
|
|
256
|
+
created_at: string;
|
|
257
|
+
}
|
|
258
|
+
export interface CampaignBudgetSummary {
|
|
259
|
+
campaign_id: string;
|
|
260
|
+
status: string;
|
|
261
|
+
available: number;
|
|
262
|
+
reserved: number;
|
|
263
|
+
}
|
|
264
|
+
export interface DoSnapshot {
|
|
265
|
+
campaign_budgets?: CampaignBudgetSummary[];
|
|
266
|
+
risk_hold: DoRiskHold | null;
|
|
267
|
+
risk_appeals: DoRiskAppeal[];
|
|
268
|
+
version: number;
|
|
269
|
+
enabled: boolean;
|
|
270
|
+
public_creation: boolean;
|
|
271
|
+
public_participation: boolean;
|
|
272
|
+
high_value_threshold: number;
|
|
273
|
+
review_hours: number;
|
|
274
|
+
appeal_days: number;
|
|
275
|
+
first_week_discount: number;
|
|
276
|
+
later_discount: number;
|
|
277
|
+
referral_extra_discount: number;
|
|
278
|
+
referral_reward: number;
|
|
279
|
+
referral_monthly_limit: number;
|
|
280
|
+
referral_campaign_id: string | null;
|
|
281
|
+
available: number;
|
|
282
|
+
reserved: number;
|
|
283
|
+
packs: DoPack[];
|
|
284
|
+
catalog: DoItem[];
|
|
285
|
+
history: DoHistory[];
|
|
286
|
+
orders: DoOrder[];
|
|
287
|
+
campaign_available?: number;
|
|
288
|
+
redemptions: DoRedemption[];
|
|
289
|
+
owned_items: DoOwnedItem[];
|
|
290
|
+
standard_approvals: number;
|
|
291
|
+
high_value_approvals: number;
|
|
292
|
+
}
|
|
293
|
+
export interface RewardOverview extends DoSnapshot {
|
|
294
|
+
discount_percent: number;
|
|
295
|
+
enrollment: RewardEnrollment;
|
|
296
|
+
streak: RewardStreak;
|
|
297
|
+
referrals: RewardReferral[];
|
|
298
|
+
}
|
|
299
|
+
export interface RewardPurchase {
|
|
300
|
+
request_id: string;
|
|
301
|
+
pack_id?: string;
|
|
302
|
+
item_id?: string;
|
|
303
|
+
}
|
|
304
|
+
export interface DoPackCheckout {
|
|
305
|
+
redirect_url: string;
|
|
306
|
+
}
|
|
307
|
+
export interface DoPackSettlement {
|
|
308
|
+
credited: number;
|
|
309
|
+
}
|
|
310
|
+
export interface RewardCheckin {
|
|
311
|
+
request_id: string;
|
|
312
|
+
timezone: string;
|
|
313
|
+
referrer_id?: string;
|
|
314
|
+
}
|
|
315
|
+
export interface DoxScore {
|
|
316
|
+
space_id: string;
|
|
317
|
+
enabled: boolean;
|
|
318
|
+
score: number;
|
|
319
|
+
can_manage: boolean;
|
|
320
|
+
}
|
|
321
|
+
export interface DoxMutation {
|
|
322
|
+
request_id: string;
|
|
323
|
+
action: 'request' | 'approve' | 'configure';
|
|
324
|
+
amount?: number;
|
|
325
|
+
enabled?: boolean;
|
|
326
|
+
}
|
|
327
|
+
export interface DoxResult {
|
|
328
|
+
accepted?: boolean;
|
|
329
|
+
enabled?: boolean;
|
|
330
|
+
}
|
|
331
|
+
/** Campaigns and rewards use authenticated Task access; private records additionally
|
|
332
|
+
* enforce campaign/space membership. Every operation preserves Axios responses,
|
|
333
|
+
* supports cancellation and reports unavailable funding as a service error. */
|
|
334
|
+
export declare class CampaignsApi extends ServiceApi {
|
|
335
|
+
/** Lists authorized campaigns, 25 per page; view=public never includes private campaigns. */
|
|
336
|
+
campaigns(query?: CampaignListQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<RewardResponse<CampaignList>, any, {}, any>>;
|
|
337
|
+
/** Creates a draft; Dox requires a private authorized space. */
|
|
338
|
+
createCampaign(body: CampaignInput, options?: RequestOptions<CampaignInput>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, CampaignInput, {}, any>>;
|
|
339
|
+
/** Gets visible campaign metadata and jobs. Proof and participant identities are private. */
|
|
340
|
+
campaign(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<RewardResponse<CampaignDetail>, any, {}, any>>;
|
|
341
|
+
/** Mutates membership, publication, budget or closure; owner permissions apply. */
|
|
342
|
+
changeCampaign(id: string, body: CampaignMutation, options?: RequestOptions<CampaignMutation>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, CampaignMutation, {}, any>>;
|
|
343
|
+
/** Adds a job to an owned draft; accepted reward terms are immutable. */
|
|
344
|
+
addJob(id: string, body: CampaignJobInput, options?: RequestOptions<CampaignJobInput>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, CampaignJobInput, {}, any>>;
|
|
345
|
+
/** Starts an eligible job; pending funding must complete before submission. */
|
|
346
|
+
startJob(id: string, body: CampaignMutation, options?: RequestOptions<CampaignMutation>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, CampaignMutation, {}, any>>;
|
|
347
|
+
/** Lists own assignments or a permitted moderation/appeals queue. */
|
|
348
|
+
work(query?: CampaignWorkQuery, options?: RequestOptions): Promise<import("axios").AxiosResponse<RewardResponse<CampaignWorkList>, any, {}, any>>;
|
|
349
|
+
/** Gets private evidence, submission versions and review history. */
|
|
350
|
+
assignment(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<RewardResponse<CampaignWorkDetail>, any, {}, any>>;
|
|
351
|
+
/** Submits clean attachment IDs or HTTPS proof links using the current assignment version. */
|
|
352
|
+
submit(id: string, body: SubmitCampaignProof, options?: RequestOptions<SubmitCampaignProof>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, SubmitCampaignProof, {}, any>>;
|
|
353
|
+
/** Reviews or appeals a submission; self-approval is forbidden. */
|
|
354
|
+
review(id: string, body: ReviewCampaignProof, options?: RequestOptions<ReviewCampaignProof>): Promise<import("axios").AxiosResponse<RewardResponse<RewardReceipt>, ReviewCampaignProof, {}, any>>;
|
|
355
|
+
/** Uploads one private proof file. The server scans and validates it before acceptance. */
|
|
356
|
+
upload(id: string, body: FormData, options?: RequestOptions<FormData>): Promise<import("axios").AxiosResponse<RewardResponse<ProofFile>, FormData, {}, any>>;
|
|
357
|
+
/** Downloads evidence only for its participant, moderator or authorized appeal operator. */
|
|
358
|
+
file(id: string, options?: RequestOptions): Promise<import("axios").AxiosResponse<Blob, any, {}, any>>;
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=campaigns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaigns.d.ts","sourceRoot":"","sources":["../src/campaigns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACnE,MAAM,MAAM,aAAa,GAAG,IAAI,GAAC,KAAK,CAAC;AACvC,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAC,SAAS,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAC,WAAW,GAAC,QAAQ,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAC,QAAQ,GAAC,WAAW,GAAC,mBAAmB,GAAC,UAAU,GAAC,UAAU,GAAC,gBAAgB,GAAC,MAAM,GAAC,iBAAiB,GAAC,UAAU,CAAC;AACrK,MAAM,WAAW,cAAc,CAAC,CAAC;IAAE,IAAI,EAAC,CAAC,CAAA;CAAC;AAC1C,MAAM,WAAW,QAAQ;IAAE,UAAU,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;IAAA,UAAU,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;IAAA,eAAe,CAAC,EAAC,MAAM,CAAC;IAAA,YAAY,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;IAAA,EAAE,EAAC,MAAM,CAAC;IAAA,eAAe,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,GAAC,IAAI,CAAC;IAAA,QAAQ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EAAC,cAAc,CAAC,gBAAgB,CAAC;IACxF,yEAAyE;IACzE,MAAM,CAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,gBAAgB,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,gBAAgB,CAAC;IAChF,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,gBAAgB,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,gBAAgB,CAAC;IAClF,qEAAqE;IACrE,IAAI,CAAC,KAAK,CAAC,EAAC,iBAAiB,EAAC,OAAO,CAAC,EAAC,cAAc;IACrD,qEAAqE;IACrE,UAAU,CAAC,EAAE,EAAC,MAAM,EAAC,OAAO,CAAC,EAAC,cAAc;IAC5C,8FAA8F;IAC9F,MAAM,CAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,mBAAmB,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,mBAAmB,CAAC;IACtF,mEAAmE;IACnE,MAAM,CAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,mBAAmB,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,mBAAmB,CAAC;IACtF,2FAA2F;IAC3F,MAAM,CAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,CAAC,EAAC,cAAc,CAAC,QAAQ,CAAC;IAChE,4FAA4F;IAC5F,IAAI,CAAC,EAAE,EAAC,MAAM,EAAC,OAAO,CAAC,EAAC,cAAc;CACtC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ServiceApi } from '@faiber/sdk-core';
|
|
2
|
+
/** Campaigns and rewards use authenticated Task access; private records additionally
|
|
3
|
+
* enforce campaign/space membership. Every operation preserves Axios responses,
|
|
4
|
+
* supports cancellation and reports unavailable funding as a service error. */
|
|
5
|
+
export class CampaignsApi extends ServiceApi {
|
|
6
|
+
/** Lists authorized campaigns, 25 per page; view=public never includes private campaigns. */
|
|
7
|
+
campaigns(query, options) { return this.client.get('/api/v1/campaigns', query ? { ...query } : undefined, options); }
|
|
8
|
+
/** Creates a draft; Dox requires a private authorized space. */
|
|
9
|
+
createCampaign(body, options) { return this.client.post('/api/v1/campaigns', body, options); }
|
|
10
|
+
/** Gets visible campaign metadata and jobs. Proof and participant identities are private. */
|
|
11
|
+
campaign(id, options) { return this.client.get(`/api/v1/campaigns/${encodeURIComponent(id)}`, undefined, options); }
|
|
12
|
+
/** Mutates membership, publication, budget or closure; owner permissions apply. */
|
|
13
|
+
changeCampaign(id, body, options) { return this.client.post(`/api/v1/campaigns/${encodeURIComponent(id)}`, body, options); }
|
|
14
|
+
/** Adds a job to an owned draft; accepted reward terms are immutable. */
|
|
15
|
+
addJob(id, body, options) { return this.client.post(`/api/v1/campaigns/${encodeURIComponent(id)}/jobs`, body, options); }
|
|
16
|
+
/** Starts an eligible job; pending funding must complete before submission. */
|
|
17
|
+
startJob(id, body, options) { return this.client.post(`/api/v1/campaign-jobs/${encodeURIComponent(id)}/start`, body, options); }
|
|
18
|
+
/** Lists own assignments or a permitted moderation/appeals queue. */
|
|
19
|
+
work(query, options) { return this.client.get('/api/v1/campaign-assignments', query ? { ...query } : undefined, options); }
|
|
20
|
+
/** Gets private evidence, submission versions and review history. */
|
|
21
|
+
assignment(id, options) { return this.client.get(`/api/v1/campaign-assignments/${encodeURIComponent(id)}`, undefined, options); }
|
|
22
|
+
/** Submits clean attachment IDs or HTTPS proof links using the current assignment version. */
|
|
23
|
+
submit(id, body, options) { return this.client.post(`/api/v1/campaign-assignments/${encodeURIComponent(id)}/submit`, body, options); }
|
|
24
|
+
/** Reviews or appeals a submission; self-approval is forbidden. */
|
|
25
|
+
review(id, body, options) { return this.client.post(`/api/v1/campaign-assignments/${encodeURIComponent(id)}/review`, body, options); }
|
|
26
|
+
/** Uploads one private proof file. The server scans and validates it before acceptance. */
|
|
27
|
+
upload(id, body, options) { return this.client.post(`/api/v1/campaign-assignments/${encodeURIComponent(id)}/files`, body, options); }
|
|
28
|
+
/** Downloads evidence only for its participant, moderator or authorized appeal operator. */
|
|
29
|
+
file(id, options) { return this.client.get(`/api/v1/campaign-files/${encodeURIComponent(id)}`, undefined, { ...options, responseType: 'blob' }); }
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=campaigns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaigns.js","sourceRoot":"","sources":["../src/campaigns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AAgDnE;;+EAE+E;AAC/E,MAAM,OAAO,YAAa,SAAQ,UAAU;IAC3C,6FAA6F;IAC7F,SAAS,CAAC,KAAwB,EAAC,OAAuB,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA+B,mBAAmB,EAAC,KAAK,CAAA,CAAC,CAAA,EAAC,GAAG,KAAK,EAAC,CAAA,CAAC,CAAA,SAAS,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACzK,gEAAgE;IAChE,cAAc,CAAC,IAAkB,EAAC,OAAsC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA8C,mBAAmB,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACjL,6FAA6F;IAC7F,QAAQ,CAAC,EAAS,EAAC,OAAuB,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiC,qBAAqB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAC,SAAS,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IACpK,mFAAmF;IACnF,cAAc,CAAC,EAAS,EAAC,IAAqB,EAAC,OAAyC,IAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiD,qBAAqB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAC,IAAI,EAAC,OAAO,CAAC,CAAA,CAAA,CAAC;IAC9N,yEAAyE;IACzE,MAAM,CAAC,EAAS,EAAC,IAAqB,EAAC,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