@numen-crypto/contract 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +47 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -5
- package/dist/index.d.ts +294 -5
- package/dist/index.js +45 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -207,6 +207,33 @@ var PartnerLevelSchema = zod.z.object({
|
|
|
207
207
|
turnover: MoneyStringSchema,
|
|
208
208
|
reward: MoneyStringSchema
|
|
209
209
|
});
|
|
210
|
+
var PartnerNodeSchema = zod.z.object({
|
|
211
|
+
id: zod.z.string().uuid(),
|
|
212
|
+
email: zod.z.string(),
|
|
213
|
+
displayName: zod.z.string().nullable(),
|
|
214
|
+
level: zod.z.number().int().min(1).max(10),
|
|
215
|
+
balanceUsd: MoneyStringSchema,
|
|
216
|
+
directPartners: zod.z.number().int().nonnegative(),
|
|
217
|
+
networkSize: zod.z.number().int().nonnegative(),
|
|
218
|
+
personalTurnover: MoneyStringSchema,
|
|
219
|
+
joinedAt: zod.z.string()
|
|
220
|
+
});
|
|
221
|
+
var PartnerBranchRootSchema = zod.z.object({
|
|
222
|
+
id: zod.z.string().uuid(),
|
|
223
|
+
email: zod.z.string(),
|
|
224
|
+
displayName: zod.z.string().nullable(),
|
|
225
|
+
/** 0 — сам пользователь, 1-10 — глубина узла в его сети. */
|
|
226
|
+
level: zod.z.number().int().min(0).max(10),
|
|
227
|
+
directPartners: zod.z.number().int().nonnegative(),
|
|
228
|
+
networkSize: zod.z.number().int().nonnegative()
|
|
229
|
+
});
|
|
230
|
+
var PartnerBranchSchema = zod.z.object({
|
|
231
|
+
root: PartnerBranchRootSchema,
|
|
232
|
+
partners: zod.z.array(PartnerNodeSchema),
|
|
233
|
+
total: zod.z.number().int().nonnegative(),
|
|
234
|
+
page: zod.z.number().int().min(1),
|
|
235
|
+
pageSize: zod.z.number().int().min(1)
|
|
236
|
+
});
|
|
210
237
|
var PartnersOverviewSchema = zod.z.object({
|
|
211
238
|
period: PeriodSchema,
|
|
212
239
|
referralCode: zod.z.string(),
|
|
@@ -692,6 +719,21 @@ exports.GetPartnersCommand = void 0;
|
|
|
692
719
|
});
|
|
693
720
|
GetPartnersCommand2.ResponseSchema = PartnersOverviewSchema;
|
|
694
721
|
})(exports.GetPartnersCommand || (exports.GetPartnersCommand = {}));
|
|
722
|
+
exports.BrowsePartnersCommand = void 0;
|
|
723
|
+
((BrowsePartnersCommand2) => {
|
|
724
|
+
BrowsePartnersCommand2.endpointDetails = endpoint(
|
|
725
|
+
"GET",
|
|
726
|
+
"/partners/browse",
|
|
727
|
+
"Direct partners of a node inside the caller downline, with balances and counts"
|
|
728
|
+
);
|
|
729
|
+
BrowsePartnersCommand2.QuerySchema = zod.z.object({
|
|
730
|
+
root: UuidSchema.optional(),
|
|
731
|
+
page: zod.z.coerce.number().int().min(1).default(1),
|
|
732
|
+
pageSize: zod.z.coerce.number().int().min(1).max(500).default(48),
|
|
733
|
+
search: zod.z.string().max(254).optional()
|
|
734
|
+
});
|
|
735
|
+
BrowsePartnersCommand2.ResponseSchema = PartnerBranchSchema;
|
|
736
|
+
})(exports.BrowsePartnersCommand || (exports.BrowsePartnersCommand = {}));
|
|
695
737
|
|
|
696
738
|
// src/commands/packages/get-packages.command.ts
|
|
697
739
|
exports.GetPackagesCommand = void 0;
|
|
@@ -1174,7 +1216,8 @@ var REST_API = {
|
|
|
1174
1216
|
ORDER: "/exchange/orders/:id"
|
|
1175
1217
|
},
|
|
1176
1218
|
PARTNERS: {
|
|
1177
|
-
OVERVIEW: "/partners"
|
|
1219
|
+
OVERVIEW: "/partners",
|
|
1220
|
+
BROWSE: "/partners/browse"
|
|
1178
1221
|
},
|
|
1179
1222
|
PACKAGES: {
|
|
1180
1223
|
OVERVIEW: "/packages",
|
|
@@ -1292,7 +1335,10 @@ exports.PackagesOverviewSchema = PackagesOverviewSchema;
|
|
|
1292
1335
|
exports.PaginatedSchema = PaginatedSchema;
|
|
1293
1336
|
exports.PaginationQuerySchema = PaginationQuerySchema;
|
|
1294
1337
|
exports.PartnerAccrualSchema = PartnerAccrualSchema;
|
|
1338
|
+
exports.PartnerBranchRootSchema = PartnerBranchRootSchema;
|
|
1339
|
+
exports.PartnerBranchSchema = PartnerBranchSchema;
|
|
1295
1340
|
exports.PartnerLevelSchema = PartnerLevelSchema;
|
|
1341
|
+
exports.PartnerNodeSchema = PartnerNodeSchema;
|
|
1296
1342
|
exports.PartnersOverviewSchema = PartnersOverviewSchema;
|
|
1297
1343
|
exports.PeriodSchema = PeriodSchema;
|
|
1298
1344
|
exports.PositiveMoneyStringSchema = PositiveMoneyStringSchema;
|